{'fraction_non_alphanumeric': 0.0292257161973116, 'fraction_numerical': 0.007542120308983638, 'mean_word_length': 4.912081984897519, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cooperative neural networks (CoNN): Exploiting prior independence structure for improved classification

We propose a new approach, called cooperative neural networks (CoNN), which uses a set of cooperatively trained neural networks to capture latent representations that exploit prior given independence structure. The model is more flexible than traditional graphical models based on exponential family distributions, but incorporates more domain specific prior structure than traditional deep networks or variational autoencoders. The framework is very general and can be used to exploit the independence structure of any graphical model. We illustrate the technique by showing that we can transfer the independence structure of the popular Latent Dirichlet Allocation (LDA) model to a cooperative neural network, CoNN-sLDA. Empirical evaluation of CoNN-sLDA on supervised text classification tasks demonstrates that the theoretical advantages of prior independence structure can be realized in practice -we demonstrate a 23\% reduction in error on the challenging MultiSent data set compared to state-of-the-art.


Introduction
Neural networks offer a low-bias solution for learning complex concepts such as the linguistic knowledge required to separate documents into thematically related classes. However, neural networks typically start with a fairly generic structure, with each level comprising a number of functionally equivalent neurons connected to other layers by identical, repetitive connections. Any structure present in the problem domain must be learned from training examples and encoded as weights. In practice, some domain structure is often known ahead of time; in such cases, it is desirable to pre-design a network with this domain structure in mind. In this paper, we present an approach that allows incorporating certain kinds of independence structure into a new kind of neural learning machine.
The proposed approach is called "Cooperative Neural Networks" (CoNN). This approach works by constructing a set of neural networks, each trained to output an embedding of a probability distribution. The networks are iteratively updated so that each embedding is consistent with the embeddings of the other networks and with the training data. Like probabilistic graphical models, the representation is factored into components that are independent. Unlike probabilistic graphical models, which are limited to tractable conditional probability distributions (e.g., exponential family), CoNNs can exploit powerful generic distributions represented by non-linear neural networks. The resulting approach allows us to create models that can exploit both known independence structure as well as the expressive powers of neural networks to improve accuracy over competing approaches.
We illustrate the general approach of cooperative neural networks by showing how one can transfer the independence structure from the popular Latent Dirichlet Allocation (LDA) model [2] to a set of cooperative neural networks. We call the resultant model CoNN-sLDA. Cooperative neural networks are different from feed forward networks as they use back-propagation to enforce consistency across variables within the latent representation. CoNN-sLDA improves over LDA as it admits more complex distributions for document topics and better generalization over word distributions. CoNN-sLDA is also better than a generic neural network classifier as the factored representation forces a consistent latent feature representation that has a natural relationship between topics, words and documents. We demonstrate empirically that the theoretical advantages of cooperative neural networks are realized in practice by showing that our CoNN-sLDA model beats both probabilistic and neural networkbased state-of-the-art alternatives. We emphasize that although our example is based on LDA, the CoNN approach is general and can be used with other graphical models, as well as other sources of independence structure (for example, physics-or biology-based constraints).

Related Work
Text classification has a long history beginning with the use of support vector machines on text features [11]. More sophisticated approaches integrated unsupervised feature generation and classification in models such as sLDA [17,6] and discriminative LDA (discLDA) [13] and a maximum margin based combination [33].
One limitation of LDA-based models is that they pick topic distributions from a Dirichlet distribution and cannot represent the joint probability of topics in a document ( i.e., hollywood celebrities, politics and business are all popular categories, but politics and business appear together more often than their independent probabilities would predict). Models such as pachinko allocation [15] attempt to address this with complex tree structured priors. Another limitation of LDA stems from the fact that word topics and words themselves are selected from categorical distributions. These admit arbitrary empirical distributions over tokens, but don't generalize what they learn. Learning about the topic for the token "happy" tells us nothing about the token "joyful".
There have been many generative deep learning models such as Deep Boltzmann Machines [27], NADE [14,32], variational auto-encoders (VAEs) [31] and variations [18], GANs [9] and other deep generative networks [28,1,22,20] which can capture complex joint distributions of words in documents and surpass the performance of LDA. These techniques have proven to be good generative models. However, as purely generative models, they need a separate classifier to assign documents to classes. As a result, they are not trained end-to-end for the actual discriminative task that needs to be performed. Therefore, the resulting representation that is learned does not incorporate any problem-specific structure, leading to limited classification performance. Supervised convolutional networks have been applied to text classification [12] but are limited to small fixed inputs and still require significant data to get high accuracy. Recurrent networks have also been used to handle open ended text [8]. A supervised approach for LDA with DNN was developed by [4,5] using end-to-end learning for LDA by using Mirror-Descent back propagation over a deep architecture called BP-sLDA. To achieve better classification, they have to increase the number of layers of their model, which results in higher model complexity, thereby limiting the capability of their model to scale. In summary, there are still significant challenges to creating expressive, but efficiently trainable and computationally tractable models.
In the face of limited data, regularization techniques are an important way of trying to reduce overfitting in neural approaches. The use of pretrained layers for networks is a key regularization strategy; however, training industrial applications with domain specific language and tasks remains challenging. For instance, classification of field problem reports must handle content with arcane technical jargon, abbreviations and phrasing and be able to output task specific categories.
Techniques such as L2 normalization of weights and random drop-out [26] of neurons during training are now widely used but provide little problem specific advantage. Bayesian neural networks with distributions have been proposed, but independent distributions over weights result in network weight means where the variance must be controlled fairly closely so that relative relationship of (a) LDA summarizes the content of each document m in M as a topic distribution θm. Each word wm,n in Nm has topic zm,n drawn from θm.  weights produces the desired computation. Variational auto-encoders explicitly enable probability distributions and can therefore be integrated over, but are still largely undifferentiated structure of identical units. They don't provide a lot of prior structure to assist with limited data.
Recently there has been work incorporating other kinds of domain inspired structure into networks such Spatial transformer networks [10], capsule networks [23] and natural image priors [21].

Deriving Cooperative Neural Networks
Application of our approach proceeds in several distinct steps. First, we define the independence structure for the problem. In our supervised text classification example, we incorporate structure from latent dirichlet allocation (LDA) by choosing to factor the distribution over document texts into document topic probabilities and word topic probabilities. This structure naturally enforces the idea that there are topics that are common across all documents and that documents express a mixture of these topics independently through word choices. Second, a set of inference equations is derived from the independence structure. Next, the probability distributions involved in the variational approximation, as well as the inference equations, are mapped into a Hilbert space to reduce limitations on their functional form. Finally, these mapped Hilbert-space equations are approximated by a set of neural networks (one for each constraint), and inference in the Hilbert space is performed by iterating these networks. We call the combination of Cooperative Neural Networks and LDA as Cooperative Neural Network supervised Latent Dirichlet Allocation, or 'CoNN-sLDA'. These steps are elaborated in the following sections.

LDA model
Here, we use the same notation and the same plate diagram (Figure 1a) as in the original LDA description [2]. Let K be the number of topics, N be the number of words in a document, V be the vocabulary size over the whole corpus, and M be the number of documents in the corpus. Given the prior over topics α and topic word distributions β, the joint distribution over the latent topic structure θ, word topic assignments z, and observed words in documents w is given by:

Variational approximation to LDA
Inference in LDA requires estimating the distribution over θ and z. Using the Bayes rule, this posterior can be written as follows: Unfortunately, directly marginalizing out θ in the original model is intractable. Variational approximation of p(θ, z) is a common work-around. To perform variational approximation, we approximate this LDA posterior with the Probabilistic Graphical Model (PGM) shown in Figure 1b. The joint distribution for the approximate PGM is given by: We want to tune the approximate distribution to resemble the true posterior as much as possible. To this end, we minimize the KL divergence between the two distributions. Alternatively, this can be seen as minimizing the variational free energy of the Mean-Field inference algorithm [30]: To solve this minimization problem, we derive a set of fixed-point equations in Appendix(A). These fixed-point equations can be expressed as This set of equations is difficult to solve analytically. In addition, even if it was possible to solve them analytically, they are still subject to the limitations of the original graphical models, such as the need to use exponential family distributions and conjugate priors for tractability.
Therefore, the next step in the proposed method is to map the probability distributions and the corresponding fixed-point equations into a Hilbert space, where some of these limitations can be relaxed. Section 3.3 gives a general overview of Hilbert space embeddings, and section 3.4 derives the corresponding equations for our model.

Hilbert Space Embeddings of Distributions
We follow the notations and procedure defined in [7] for parameterizing Hilbert spaces. By definition, the Hilbert Space embeddings of probability distributions are mappings of these distributions into potentially infinite -dimensional feature spaces. [24]. For any given distribution p(X) and a feature map φ(x), the embedding µ X : P → F is defined as: For some choice of feature map φ, the above embedding of distributions becomes injective [25]. Therefore, any two distinct distributions p(X) and q(X) are mapped to two distinct points in the feature space. We can treat the injective embedding µ X as a sufficient statistic of the corresponding probability density. In other words, µ X preserves all the information of p(X). Using µ X , we can uniquely recover p(X) and any mathematical operation on p(X) will have an equivalent operation on µ X . These properties lead to the following equivalence relations. We can compute a functional f : P → IR of the density p(X) using only its embedding, by definingf : F → IR as the operation on µ X equivalent to f . Similarly, we can generalize this property to operators. An operator T : P → IR d applied to a density can also be equivalently carried out using its embedding, whereT : F → IR d is again the corresponding equivalent operator applied to the embedding. In our derivations, we assume that there exists a feature space where the embeddings are injective and apply the above equivalence relations in subsequent sections. Figure 2: Visualization of the CoNN-sLDA architecture for a single document. For the i'th word, the latent topic variable is z i . The embedding for the distribution p(z i ) is µ zi ; these embeddings are shown as three-dimensional vectors for illustration. They are accumulated and passed through a non-linearity to obtain µ θ , which is the embedding of p(θ), the distribution over the topics for the document. Thus, the embedding µ θ is determined (up to the non-linearity) by the average of the embeddings µ zi , as in the original LDA model. Similarly, there is feedback from µ θ (which happens for T iterations, see Alg1), so that µ θ , in turn, influences µ zi , again, as in the original LDA model.

Hilbert space embedding for LDA
We consider Hilbert space embeddings of q(θ), q i (z i ), as well as the equations (5) and (6). By definition given in equation (7), The variational update equations in (5) and (6) provide us with the key relationships between latent variables in the model. We can replace the specific distributional forms in these equations with operators that maintain the same relationships among distributions represented in the Hilbert space embeddings.
Here, f 1 and f 2 represent the abstract structure of the model implied by (5) and (6) without specific distributional forms. We will provide a specific instantiation of f 1 and f 2 shortly. Following the same argument as in equation (8), we can write equation (11) as Iterating through all values of θ, z i and using the operator view given in equation (9) as reference, we get the following equivalent fixed-point equations in the Hilbert Space:

Parameterization of Hilbert space embedding using Deep Neural Networks
The operators T 1 and T 2 have complex non-linear dependencies on the unknown true probability distributions and the feature map φ. Thus, we need to model these operators in such a way that we can utilize the available data to learn the underlying non-linear functions. We will use deep neural networks which are known for their ability to model non-linear functions.
We start by parameterizing the embeddings. We assume that any point in the Hilbert space is a vector µ i ∈ IR D . Next, as the operators are non-linear function maps, we replace them by deep neural networks. In its simplest form, we only use a single fully connected layer with 'tanh' activations yielding the following fixed point update equations, The original work on Hilbert space embeddings required the embeddings to be injective. We observe that we do not need the embedding to be injective on the domain of all distributions. Instead, we only need it to be injective on the sub-domain of distributions used in the training corpus. The supervised training process on the training set will have to find embeddings that allow the model to distinguish documents that occur in the corpus automatically causing the learned embeddings to be injective for the training domain.
We keep the dimension of the word2vec [19] embedding identical to the Hilbert space embedding, i.e. w i ∈ IR D . Note, that the above parameterization is one example. Multiple fully connected layers can be used to achieve denser models.
Assume the parameters word2vec, W 1 , W 2 and W 3 are known. We calculate the set of embeddings for a given text corpus by iterating equations (13,14). Algorithm 1 summarizes this procedure. We normalize the embeddings after every iteration to avoid overflow. This is the heart of the Cooperative Neural Network paradigm in which a set of neural networks co-constrain each other to produce an embedding informed by prior structure. In our experience, we found that 'tanh' works better than 'σ' as a choice for non-linearity. Using rectified linear 'ReLU' units will not work as they zero out negative values of the embeddings. We apply dropout [26] to µ zi 's, µ θ and word2vec for regularization. For every document, the algorithm returns the associated µ θ embedding, representing the document in the Hilbert space.

Algorithm 1 Getting Hilbert Space Embeddings
In practice, the parameters word2vec, W 1 , W 2 and W 3 are not known and need to be learned from training data. This requires formulating an objective function, and then optimizing that objective function. An additional advantage of the proposed method is that it allows using a wide variety of objective functions. In our case, we trained the model using a discriminative/supervised criterion that relies on the labels associated with each document, and we used binary cross-entropy loss or cross-entropy loss for multiclass classification.
Algorithm 2 summarizes the training procedure. It uses Algorithm 1 as a subroutine. The H function is chosen to be a single fully connected layer in our implementation, which transforms the input embedding to a vector corresponding to number of classes. We sample (without replacement) a batch of documents D s from the corpus, compute their embeddings and update the parameters. The loss function takes in the µ θ embeddings and the corresponding document labels. The resulting model, called 'CoNN-sLDA' is schematically illustrated in Figure 2.
The CoNN-sLDA model retains the overall structure of the LDA model by separating the problem into document topic distributions and word topic distributions within each document. As with traditional LDA, one can visualize a document corpus by projecting topic vectors associated with documents into a 2D plane (e.g., using MDS, tSNE). An advantage of CoNN-sLDA over typical neural network approaches is that typical DNNs produce only a single embedding, whereas CoNN-sLDA elegantly factors the local and global information into separate parts of the model. An advantage of CoNN-sLDA over traditional probabilistic graphical models is that we can use low-bias, highly expressive distributions implied by the neural network implementations of update operators.

Description of Datasets
We evaluated our model 'CoNN-sLDA' on two real-world datasets. The first dataset is a multi-domain sentiment dataset (MultiSent) [3], consisting of 342,104 Amazon product reviews on 25 different types of products (apparels, books, DVDs, kitchen appliances, · · · ). For each review, we go through the ratings given by the customer (between 1 to 5 stars) and label a it as positive, if the rating is higher than 3 stars and negative otherwise. We pose this as a binary classification problem. The average length of reviews is roughly 210 words after preprocessing the data. The ratio of positive to negative reviews is ∼ 8 : 1. We use 5-fold cross validation and report the average area under the ROC curve (AUC), in %.
The second dataset is the 20 Newsgroup dataset 3 . It has around 19,000 news articles, divided roughly equally into 20 different categories. We pose this as a multiclass classification problem and report accuracy over 20 classes. The dataset is divided into training set (11,314 articles) and test set (7,531 articles), approximately maintaining the relative ratio of articles of different categories. The average length of documents after preprocessing is ∼ 160 words. This task becomes challenging as there are some categories that are highly similar, making their separation difficult. For example, the categories "PC hardware" and "Mac hardware" have quite a lot in common.
We apply standard text preprocessing steps to both datasets. We convert everything to lower case characters and remove the standard stopwords defined in the 'Natural Language Toolkit' library. We remove punctuations, followed by lemmatization and stemming to further clean the data. However, for other classifiers, we use the preprocessing techniques recommended by the respective authors.

Baselines for comparison
We compare 'CoNN-sLDA' with existing state-of-the-art algorithms for document classification. We compare against VI-sLDA, [6,17], which includes the label of the document in the graphical model formulation and then maximizes the variational lower bound. Different from VI-sLDA, the supervised topic model using DiscLDA [13] reduces the dimensionality of topic vectors θ for classification by introducing a class-dependent linear transformation.
Boltzmann Machines are traditionally used to model distributions and with the recent development of deep learning techniques, these approaches have gained momentum. We compare with one such Deep Boltzmann Machine developed for modeling documents called Over-Replicated Softmax (OverRep-S) [27]. Another popular approach is by [4], called BP-sLDA, which does end-to-end learning of LDA by mirror-descent back propagation over a deep architecture. We also compare with a recent deep learning model developed by [5] called DUI-sLDA.

Classification Results
Table (1) shows the accuracy results on newsgroup dataset together with standard error on the mean (SEM) over 5 folds. For each of 5 folds, we split training data into train and validation and optimize all parameters. We then evaluate against a fixed common test set. As the number of classes is 20, we found that using higher Hilbert space dimensions work better (See entries for Dim=40 and Dim=80 in table). A dropout of ∼ 0.8 was applied to word2vec embeddings. The batch size was fixed at 100 and we trained for around 400 batches. The performance of CoNN-sLDA is better than BP-sLDA and at par with 5 layer DUI-sLDA model. The cost sensitive version CoNN-sLDA (Imb), balances out the misclassification cost for different classes in the loss function tends to perform slightly better. The 20 newsgroup dataset is one of the earliest and most studied text corpuses. It is fairly separable, so most modern state-of-the-art methods do well on it, but it is an important benchmark to establish the credibility of an algorithm.
Our CoNN-sLDA model was able to outperform the recently proposed state-of-the-art method, DUI-sLDA, on the large 'MultiSent' dataset (table2) having over 300K documents by a significant AUC margin of 2%. This corresponds to a 23% reduction in error rate. We used a single fully connected layer with tanh non-linear function for both, µ θ , µ zi embeddings. Hilbert space dimension and  word2vec dimension are both 10. We use a dropout probability of 0.1, The Algorithm(1) was unrolled for 1 iteration. 'Batch size' was set at 100 and ran for 3000 batches with optimization done using 'Adam' optimizer. We also ran a cost sensitive version of CoNN-sLDA (Imb) model, with a balancing ratio of 1.4 towards the minority class which was incorporated in the loss function. We observe slight improvement in results. CoNN-sLDA consistently outperformed other models over various choices of model parameters, see Appendix(B).
The number of layers required by other deep models like DUI-sLDA, BP-sLDA for good classification is usually quite high and their performance decreases considerably with fewer layers. CoNN-sLDA outperforms them with a single layer neural network.
We have a vectorized and efficient implementation of CoNN-sLDA in PyTorch and Tensorflow. The results shown above are from the PyTorch version. We ran our experiments on NVIDIA Tesla P100 GPUs. The runtime for 1 fold of 'MultiSent' for the settings mentioned above is around 5 minutes, while a single fold for '20 Newsgroup' dataset runs within 2 minutes.
In Appendix(B), we report our experiments to optimize the algorithmic and architectural hyperparameters. We use the 'MultiSent' data for our analysis. In general for training, we recommend starting with a small Hilbert space dimension and batch size, then try increasing the number of fully connected layers and finally choose to unroll the model further.

Discussions & Future extensions
In addition to supervised classification, we can use LDA style models for visualizing and interpreting the cluster structure of the datasets. For example, in CoNN-sLDA model, we can use t-SNE [16] to visualize the documents using their µ θ values. In Figure 3 we see that CoNN-sLDA clearly maps different newsgroups to homogeneous regions of space that help classification accuracy and provide Figure 4: tSNE visualization of a random sample of 10-dimensional µ θ embeddings for Multisent documents (Blue positive, red negative). The embeddings project distinct categories to highly coherent regions.
insight into the structure of the domain. Similarly, Figure 4 shows that CoNN-sLDA maps the positive and negative product reviews into different regions facilitating classification and interpretation.
An interesting extension for the CoNN-sLDA model will be to map the Hilbert space topic embedding µ θ back to the original topic space distribution. This would potentially allow us to provide text labels for the discovered clusters providing an intuitive interpretation for the model learned by our technique. Appendix (C) discusses an approach to get most relevant words in a document pertaining to a discriminative task.
In this work, we obtain the fixed point update equations using the mean-field inference technique. In general, we can extend this procedure to other variational inference techniques. For example, we can find embeddings for Algorithm 1 by minimizing the free energies of loopy belief propagation or its variants (e.g., [29]) and use Algorithm 2 to train them end-to-end.

Conclusion
Cooperative neural networks (CoNN) are a new theoretical approach for implementing learning systems which can exploit both prior insights about the independence structure of the problem domain and the universal approximation capability of deep networks. We make the theory concrete with an example, CoNN-sLDA, which has superior performance to both prior work based on the probabilistic graphical model LDA and generic deep networks. While we demonstrated the method on text classification using the structure of LDA, the approach provides a fully general methodology for computing factored embeddings using a set of highly expressive networks. Cooperative neural networks thus expand the design space of deep learning machines in new and promising ways.

Appendix A. Derivation of fixed point equations
Inference in LDA requires estimating the distribution over θ and z. Using the Bayes rule, this posterior can be written as follows: To perform variational approximation, we approximate this LDA posterior with the PGM as shown in Figure 1b.
The joint distribution for the approximate PGM is given by: We want to tune the approximate distribution to resemble the true posterior as much as possible. To this end, we minimize the KL divergence between the two distributions. Alternatively, this can be seen as minimizing the variational free energy of the Mean-Field inference algorithm [30]: min Substituting the expression for KL-divergence, we get Using the Bayes formulation given in equation (2) and observing that p(w|α, β) is a constant, we can write Substituting the probability densities given in equations (1) and (3), the following minimization expression is obtained: Pulling logarithms inwards we can convert products to summations. We then move integrals inward. In some cases, integrals add up to 1 ( e.g., θ q(θ) dθ = 1). In some cases, inner sums can be pulled outwards. The result consists of simple integrals: We denote the expression given in equation (21) by min {q} (L). To minimize the functional equation given by L, we take the functional derivatives of L with respect to q(θ) and q i (z i ) and equate them to zero.
Solving for δL δq(θ) = 0 , we get the first fixed point equation: Similarly, solving for δL δqi(zi) = 0, we get the second fixed point equation: Note that this derivation is different from the classical variational approximation derivations, where the EM algorithm is eventually used to iteratively approximate the posterior.

B. Architecture choices of CoNN-sLDA model
In this section we report on our experiments to optimize the algorithmic and architectural hyperparameters. We use the 'MultiSent' dataset for our analysis. The dimensionality of the Hilbert space trades off the expressive power against computation and storage requirements of the model. In Figure 5, we show varying Hilbert space dimensions on the x-axis and compare their AUCs. We observe a decline in AUC after Hilbert dimension of 20. We postulate that higher Hilbert space dimensions tend to overfit the data. Empirically we found that with lower Hilbert space dimensions we have to scale down the dropout appropriately.

B.1 Varying Hilbert Space Embeddings dimension
As the data is imbalanced between number of positive and negative reviews, we did cost sensitive learning in CoNN-sLDA (Imb) by adjusting the weights of the loss function for different classes and were able to attain slight improvement.  (1) versus the AUC obtained. We can observe the that AUC decreases and the corresponding standard deviation increases as we increase the number of iterations. In our experience, our algorithm works well even for a single iteration and going beyond 5 iteration gives no significant improvement in results.

B.3 Varying depth of the model
In Algorithm 1, we parameterized the embeddings µ θ and µ zi using deep neural networks. Here, we analyze the results of varying the depth of the neural networks and their effect on the corresponding AUC. Figure 6b shows a combination plot, where we visualize the AUC values for various different combinations of depth between µ θ and µ zi .
We found that two fully connected layers for embedding µ zi and a single fully connected layer for embedding µ θ works well for both datasets. Deeper models tend to overfit the data. For training, we recommend starting with a small Hilbert space dimension and batch size, then increase the number of fully connected layers, and finally choose to unroll the model further. The embedding model defines a relationship between words found in documents w and topic distributions for documents µ θ . Usually we calculate the topic distribution from the words in documents. For interpretation purposes, we might wish to go the other direction: from topics µ θ to words in the topic. For instance, after running CoNN-sLDA, we get embeddings for all of the documents. We could then cluster these to get K clusters. We might then ask how to interpret these clusters. We could take the mean embedding of each cluster µ k and recover the words that would be associated with the cluster (e.g., SLR, aperture, resolution versus click-and-shoot, special effects). Alternatively, we could run PCA on the embedding space to find the principle directions of variation of document topics. We can then recover the words associated with the end-points of each distribution in order to label this dimension (e.g., light weight versus heavy or easy-to-use versus complicated).
We show here how to define a relationship between a given µ θ and the words associated with the topic. Given the µ θ from CoNN-sLDA model of a document under consideration, we want to find the top word2vec vectors which satisfies the equation (24). If we substitute 14 into 13, we can eliminate the dependence on word topic distributions z i .
The µ θ terms are related by the sum of the embeddings of words in the text. The embeddings for the same word are always the same, so we can group all embeddings for word class c together and just keep a class weights F c . We set to zero so that we have an equation that measures discrepancy between current system and a consistent system. We then form an objective J w which is a function of topic distribution µ θ and K word class weights F c .
Minimizing the square of J w w.r.t. the F c parameter will give us the weights of the words relevant to the embeddings µ θ . F * c = argmin Fc J 2 w (F c ; µ θ ) (26) We can thus find the top most commonly occurring highly weighted words corresponding to any documents distribution embedding µ θ or examine words associated with any µ θ in the embedded space.