Document Embedding with Paragraph Vectors
Paper · 2015 · Andrew M. Dai, Christopher Olah and Quoc Viet Le
Summary
A reader who has found a useful article often wants to know what to read next. A system can look for articles that reuse the same vocabulary, but this only goes so far. Related articles may use different words, and the same words can appear in articles that cover different subjects. “Document Embedding with Paragraph Vectors” studies a way to address this problem by learning a compact numerical description of each article from its text. The authors ask whether distances between these descriptions help find related documents, a practical test of semantic similarity.
Paragraph Vectors learns a list of numbers for each document by using it to predict words from that document. Predicting many words gives the same list a chance to capture information that recurs across the text. The authors focus on a version that makes these predictions without looking at the words immediately around the target. They also train numerical representations of words alongside the document representations and find that this joint training improves the document vectors. The earlier work had shown how document vectors could support tasks such as classifying movie reviews. This paper tests their usefulness for comparing long articles without training them on judgments about which documents belong together.
The authors test whether a known related pair ranks ahead of a comparison involving another article. On Wikipedia, they use both examples assembled by hand and examples generated from article categories. Paragraph Vectors does better than Latent Dirichlet Allocation, a method that describes each article as a mixture of topics, and reaches its reported peak at 10,000 dimensions. On arXiv, where shared subject labels define related pairs, Paragraph Vectors performs about as well as the best topic-count setting of Latent Dirichlet Allocation and is less sensitive to its own choice of size. Its reported peak there is at 100 dimensions.
The paper also shows how these representations can support a more directed kind of browsing. Starting with the vector for the Wikipedia article about Lady Gaga, the authors subtract the vector for “American” and add the vector for “Japanese” before searching for nearby articles. A related exercise uses “neural” and “Bayesian” to redirect a search on arXiv. These examples illustrate a way to express a change in what a reader is looking for. The triplet tests provide the broader comparison of how well the original document vectors rank related articles.
Deep dive: Document Embedding with Paragraph Vectors
Document Embedding with Paragraph Vectors tests how well learned document representations find related articles in Wikipedia and arXiv. · about 30 minutes to read
The problem and its context
What makes an article a useful neighbor?
The point of departure is a familiar problem in information retrieval and search. A reader already has an article and wants to discover other articles worth reading. The first article stands in for a query. It may have a familiar title, as on Wikipedia, or it may be a long technical paper. A system needs some way to compare it with a collection of possible neighbors. The authors concentrate on the description of the article that makes that comparison possible. Once each article has a numerical description, a distance or similarity measure can be applied to any pair.
Turning a document into numbers raises a question about what to preserve. A long article can name a subject, give examples of it, describe controversies around it, and mention other subjects in passing. The entire text is available as evidence, but the comparison uses the representation derived from it. A useful representation for browsing has to preserve enough of the article's substance that a reader can recognize a reason to move from the starting article to its neighbors. The paper treats this as an empirical question. Different descriptions can be judged by asking whether their comparisons put recognizably related articles close together.
The article a reader starts with also leaves their intent partly open. Someone browsing a Wikipedia entry might want another treatment of the same subject, an article in a related discipline, or a counterpart that differs along some recognizable feature. A reader looking for arXiv papers might be interested in a shared research area or in another approach to a similar problem. The authors address ordinary proximity first. They then ask if the same numerical descriptions allow a useful change of direction, by substituting one word for another in the arithmetic of a search.
From word counts to learned descriptions
The paper identifies bags of words as an established way to represent documents. A bag assigns positions to words and records their occurrence or weight. A coordinate can thus be traced back to a vocabulary item. The article's sequence of words is discarded when the bag is assembled. The paper also mentions bags of n-grams, which can preserve short sequences as counted units. This keeps some local order inside an item while still describing a document through a collection of counts or weights.
A bag can support comparisons with very little machinery. If an article emphasizes terms that another article also emphasizes, the weighted descriptions can be close. The connection to the vocabulary helps explain where the comparison comes from. It also makes the treatment of each term important. In the paper's bag-of-words baseline, TF-IDF weighting favors terms that matter within a document while accounting for how widely they occur across the collection. The design gives a familiar starting point for judging what a learned description adds to a comparison of articles.
The paper names Latent Dirichlet Allocation as another established approach. It belongs to topic modeling. Here a document is described through proportions assigned to topics inferred from the collection. This permits a comparison at the level of mixtures. Articles can resemble each other because their inferred topic proportions are similar, even when a direct comparison of their individual word weights behaves differently. The number of topics is a setting of the method. It determines how many components are available to describe a document.
The authors set these approaches alongside distributed representations. In a distributed representation, the information attached to an item is spread across the coordinates of a vector. The paper points to Efficient Estimation of Word Representations in Vector Space for the word-level approach. Word embeddings give words learned numerical descriptions whose coordinates can work together to express relationships. For a document, the analogous move is to learn a vector from the text that belongs to it. Its individual coordinates are harder to interpret directly than the named vocabulary positions of a bag of words.
What the earlier evidence left open
The starting point for the document method is Distributed Representations of Sentences and Documents. As the authors describe it, that work demonstrated the use of learned document vectors in settings including movie review classification and webpage retrieval. In the review setting, the vector supplies evidence for a decision about sentiment. The presence of a useful decision boundary for that task leaves open how the same kind of representation behaves when articles are compared directly, especially across a large collection of long texts.
There is also a question about the source of any advantage. A learned description at the document level is only one way to benefit from word representations. An article can be represented by averaging the vectors of its words. A comparison with this alternative helps distinguish the value of directly fitting a document vector from the value of using learned word coordinates in the first place. Comparison with a topic mixture addresses another possibility. A relatively concise description can already be built around inferred topics, so the relevant comparison is between different ways of arriving at document coordinates.
Finally, the authors ask what happens when one changes the capacity of a representation. Choosing how many coordinates a document vector has is part of specifying the method, much as choosing a topic count is part of specifying Latent Dirichlet Allocation. A comparison made at one setting for each method could depend on those particular choices. The paper therefore treats size as a variable. The question is useful both for understanding the observed rankings and for anyone trying to decide how large a description to use in a collection with many documents.
The method, step by step
A document supplies its own training examples
Imagine taking a word from an article and asking a predictor to recover it. The article supplies the answer because that word is already in the text. Paragraph Vectors gives the predictor a learned vector associated with the document. The vector begins as an adjustable set of numbers. Each prediction provides a small piece of evidence about how those numbers should change. When the process is repeated for words from throughout the document, the same vector is involved in many different predictions. It becomes a description of the article through the job the training procedure asks it to do.
An important distinction is between the identity of the document and the text used to fit its vector. The document identity determines which vector participates in an update. The words determine which predictions are rewarded. A word that occurs in different documents can be predicted using different document vectors, while many words from the same document are predicted using the same vector. A later similarity comparison uses the learned coordinates. The identifier has served its purpose once it has directed the training examples to the right vector.
This is unsupervised representation learning in the sense used by the paper. The training signal comes from words already present in the collection. A researcher does not have to supply examples that say which article should rank above which other article. Those comparisons enter later as evaluation. This separation matters for interpreting the tests. For instance, a Wikipedia category can provide an expected ranking even though the procedure that learns the vectors is trying to predict words. A category is evidence for the evaluator about what the vector captured through the text.
Distributed Memory and Distributed Bag of Words
The paper describes two forms of Paragraph Vectors. Distributed Memory brings together the document vector and vectors for nearby words when predicting the next word. The authors describe combining these inputs either by concatenation or by averaging. Concatenation joins the numerical lists into a longer input and keeps their contributions in separate positions. Averaging combines corresponding coordinates. In either case, there is a place for information that persists across the document and for information from the immediate context. The prediction updates the participating word and document vectors.
The role of the document vector in Distributed Memory is easiest to see when different parts of an article use similar language in different contexts. The nearby words provide evidence that changes as the prediction position moves. The document vector is available at each position in that article, so it can supply evidence that is shared across locations. Its role as a memory is therefore defined by how it is reused in the prediction procedure. The authors describe it as a way to capture the topics of the document through a word-prediction task.
Distributed Bag of Words takes away the local word inputs to the document prediction. The document vector is used to predict words from its text. Since the predictor receives the same document input across those predictions, it has no local word context with which to distinguish the different positions in the article. The task favors a vector that can support predictions for the article's vocabulary as a whole. The authors choose this form for the experiments because they consider it more efficient.
Distributed Bag of Words can sound like another name for an ordinary bag of words. Both put aside local order in their description of a document, but they arrive at different objects. In the TF-IDF bag, vocabulary items have explicit positions with occurrence-based weights. A Distributed Bag of Words vector is fitted by how it helps a predictor recover words. Its coordinates have no assigned vocabulary names. Later, cosine similarity is applied to these learned coordinates, while the same kind of similarity can also be applied to a vector of explicit word weights.
Fitting the document and word vectors
The authors lower-case the words in both collections before training. This makes upper-case and lower-case spellings equivalent for these experiments. They apply vocabulary frequency cutoffs, with the resulting vocabulary sizes reported separately for the collections. They use unigrams, which are individual words. The paper reports a preliminary comparison in which adding bigrams, or adjacent word pairs, gave no improvement in the quality of the final vectors. These decisions define which word forms can serve as learning targets and what counts as the same form.
For the publicly available corpora, the document-vector training runs for at least 10 epochs. An epoch is a pass through the training data. Repeated passes let the procedure revisit the evidence associated with each article and continue adjusting its coordinates. The paper uses a hierarchical softmax organized as a Huffman tree for the word predictor. A hierarchical softmax expresses the prediction of a word through a path of choices in a tree. The tree supplies an organized way for the predictor to distinguish words across a large vocabulary.
The document objective is accompanied by joint training of word embeddings. The authors describe the added word training in terms of skip-gram. The word-level task uses a word to predict nearby words, giving the word vectors their own learning signal while the document vectors learn through prediction from documents. This is compatible with choosing Distributed Bag of Words for the document task. The document prediction can proceed without local word inputs even while nearby words supply training examples for the accompanying word task. Joint training is a setting in the empirical comparisons as well as a source of vectors for the arithmetic examples.
The following flow follows the representation used for the article comparisons, from the initial text to a similarity ranking.
Learning and comparing article vectors
The steps in order.
The paper also describes inference as tuning a paragraph vector by back-propagation. Back-propagation carries information from the word-prediction error back to the coordinates being adjusted. In this description, the new document's vector is what is fitted, with the word vectors and classifier parameters outside the set of quantities being tuned. The account is brief. It specifies the role of the document vector in inference, while the reported experiments give much more detail about collection preparation and comparisons than about the procedure for fitting vectors to incoming articles.
From coordinates to comparisons
The word predictor is a means of learning the representation. Browsing happens by comparing the fitted document vectors. Cosine similarity measures how closely the directions of two vectors align. Two vectors can thus be close by cosine even if their lengths differ. For ordinary browsing, the starting article supplies the query vector. The candidate vectors can be ranked by their similarity to that query, and nearby items in the ranking become candidates for what to read next.
The same similarity measure can compare articles represented by averaged word embeddings. In that baseline, the article's coordinates come from the word vectors of its text, aggregated by taking their average. The average gives a document a position in the word-vector coordinate system through its contents. Paragraph Vectors instead fits an article's coordinates through repeated prediction. Both yield numerical lists that can be compared directly, which makes their comparison informative about how those lists were obtained. TF-IDF retains the direct connection between a coordinate and a vocabulary entry.
Latent Dirichlet Allocation supplies a different kind of description. The authors use Gibbs sampling for 500 iterations, varying the number of topics. Gibbs sampling iteratively revises parts of the inferred structure using the current values of other parts. The paper sets α to 0.1 and uses β values between 0.01 and 0.000001. In this procedure, α and β are settings of the prior distributions governing document topic mixtures and topic word distributions, respectively. The document comparison uses posterior topic proportions, meaning the mixture estimates after taking the document evidence into account.
For the topic mixtures, the paper uses Hellinger distance, a distance between probability distributions. Small distances indicate similar topic proportions. The paper's comparison of neighbors for the Wikipedia article on machine learning uses Hellinger distance for the topic mixtures and cosine distance for Paragraph Vectors, explaining that the measures suit their respective representations. The benchmark therefore compares complete ways of obtaining a ranking. It pairs each document description with the comparison rule the authors select for it.
Changing a query by changing its vector
A nearest-neighbor search can begin with an article, but it can also begin with a point obtained by adjusting the article vector. The authors demonstrate this with a search for a Japanese counterpart to Lady Gaga. They use the following expression.
pv(“Lady Gaga”) − wv(“American”) + wv(“Japanese”)
Here pv returns the paragraph vector for the article named inside its parentheses, and wv returns the word vector for the term inside its parentheses. The quotation marks delimit the article title and the words. The minus sign means to subtract the corresponding coordinates of the vector for “American.” The plus sign means to add the corresponding coordinates of the vector for “Japanese.” The result is a vector used as the query for a new neighbor search. Its usefulness depends on whether the articles close to that adjusted point fit the intended relation.
The choice of terms gives the example its interpretation. The authors start with an article about a person and ask for an adjustment associated with nationality. The article vector contributes the initial position, while the word-vector difference supplies the direction of the change. Both the original article and the adjusted query can therefore be used to rank the same article collection. A reader can understand the intended shift without having to identify an individual coordinate that represents nationality.
On arXiv, the authors use the earlier Paragraph Vectors paper as the starting point and change the wording of the desired direction.
pv(“Distributed Representations of Sentences and Documents”) − wv(“neural”) + wv(“Bayesian”)
In this expression pv returns the vector for the named paper, and wv returns a vector for the word in parentheses. The quotation marks identify the title and the individual search terms. The minus sign removes the coordinates of the “neural” vector from those of the paper, and the plus sign adds the coordinates of the “Bayesian” vector to that result. The authors use the resulting point to rank nearby papers. They identify the word vectors in this experiment as those learned during the training of the paragraph vectors.
Both expressions turn a search request into a change to a numerical query. The paper evaluates ordinary proximity more systematically, through expected comparisons between an article and its neighbors. The arithmetic examples serve a different purpose. They illustrate a query that can begin from something already known and move in a direction specified by words. The retrieved items are the evidence for whether that operation makes sense in a particular example.
Experiments and results
Relatedness as a ranking decision
The main quantitative test uses triplets. Each contains an article as the point of comparison, an article expected to be close to it, and another article intended as a less related candidate. A method makes the desired ranking when it puts the first pair closer than the comparison pair. With cosine similarity, the related candidate should receive the higher value. With Hellinger distance, it should receive the smaller value. The same expected order can therefore be checked for representations whose numerical scales have different meanings.
The benchmark concerns a relative judgment. A vector comparison can succeed without providing a universally interpretable score for how closely two articles are related. It only has to prefer the expected neighbor within the example. This resembles an everyday browsing decision, where the useful question is often which available item to read next. The construction of the candidates is consequently central to the evaluation. A distinction between research subjects and a distinction grounded in detailed knowledge of particular articles can both be phrased as triplets, while making different demands on the ranking.
The paper reports dimensional comparisons for the document representations and topic-count comparisons for Latent Dirichlet Allocation. It describes the best-performing sizes and the relative performance of the methods. The numerical sizes reported below refer to the corpora, the evaluation collections, or the representations themselves. The results discussed for the triplets concern the ordering of candidates. The dimensionality at a peak identifies the setting at which the authors observed that peak, and is a different quantity from the rate of successful rankings.
Wikipedia articles and their neighborhoods
The Wikipedia collection consists of the main body text of 4,490,000 articles from the English-language site. The authors remove links and apply a frequency cutoff, leaving a vocabulary of 915,715 words. The document vectors are trained on the resulting article texts. Wikipedia is useful to this experiment because it offers articles across many subjects and an existing category system. The body text supplies the material used for prediction, while the categories supply a way to construct some of the expected comparisons afterward.
The paper starts its examination of the space with a t-SNE visualization. This is a display that places high-dimensional descriptions in a form where groups can be inspected visually. The authors observe that articles in the same category tend to group together. They describe sports articles as more dispersed and relate that pattern to the range of sports covered by Wikipedia. The figure shows the appearance of groups at a broad level. Its evidence is visual, whereas the triplet tests ask for individual ranking decisions under a stated rule.
The authors also compare neighbors of the article about machine learning. They inspect a list produced by paragraph-vector comparisons and one obtained from the topic mixtures. Their judgment is that Paragraph Vectors produces better neighbors overall for this query. This example puts a recognizable document at the center of the evaluation. A reader can consider why a neighboring article might be helpful and what could make a topic-level match less useful. The authors' assessment is a qualitative judgment about the example, with the larger collections of triplets supplying the systematic test.
The examples involving Lady Gaga illustrate two ways to browse the same collection. One starts with the unmodified vector and asks for related articles. The other uses the change from “American” to “Japanese” and asks what appears nearby after that change. The first search uses the article to express a general neighborhood. The second gives a more particular reading of what a useful neighbor would be. The authors present both as evidence that article vectors can support queries about how items are related as well as what lies close by.
Wikipedia triplets made by hand and by category
The hand-built collection contains 172 triplets. The authors choose these comparisons using their knowledge of the items. For an article about machine learning, their examples favor deep learning over computer networks. For Google, the preferred comparison is Facebook rather than Walmart. These are comparisons where a reader can recognize the intended connection even though the articles may differ substantially in their descriptions and the names alone may offer little common wording.
A comparison among San Diego, Los Angeles, and San Jose illustrates a narrower distinction. The authors expect Los Angeles to be closer to San Diego than San Jose is. All the choices are cities, so a coarse classification of the articles as the same type of entity gives little help in ordering the candidates. The example illustrates why the hand choices can pose a different kind of challenge from broad subject classification. The author-supplied preference gives the triplet an answer, while the closeness of the candidates leaves room for different reasonable grounds of comparison.
The generated Wikipedia collection contains 19,876 triplets. A pair is designated close when both articles are listed in the same category. The comparison article is chosen outside that category and can come from a sibling category. The procedure is random within its selection rule, allowing the authors to assemble many evaluations without personally comparing every pair. The paper points readers to a downloadable archive of the Wikipedia triplet data.
One generated example favors the comparison between Barack Obama and Britney Spears over the comparison between Barack Obama and China. The category rule makes the expected ordering possible even when a reader would need more context to see why these particular pages were assigned to the same side of the comparison. The expected relation comes from Wikipedia's organization. A ranking that matches it provides evidence that the vectors capture some of the distinctions reflected in the categories. The manual evaluations probe judgments that the authors can specify directly, including more narrowly drawn comparisons.
The generated comparison article can be in a sibling category, which matters for the difficulty of the test. Being outside the shared category is enough to be selected as a distractor under the rule. It does not imply that the article comes from a remote area of the encyclopedia. The method may have to separate close categories in some triplets and make a broader distinction in others. The average pattern of successful rankings therefore describes performance under this particular mixture of comparisons.
Across the Wikipedia triplet results, the authors report that Paragraph Vectors performs better than Latent Dirichlet Allocation. Their discussion describes that advantage across the document-vector sizes they examine. Averaging word embeddings also performs better than the topic method. This gives the comparison a useful qualification. Some of the benefit of learned numerical descriptions is available from the word vectors alone, so the topic comparison is different from a test of how much direct document training adds to averaging. The paper also reports that joint word training improves the final paragraph vectors.
The authors report a peak for Paragraph Vectors at 10,000 dimensions in the Wikipedia experiments. That figure describes the length of the document vector at the reported peak. Both the hand-built and generated datasets are used in the dimensional comparisons, and the reported Wikipedia findings draw on the evaluation with both kinds of triplets. The choice of a peak dimensionality is informative about the range explored for this corpus. A reader considering another collection would still need evidence about where its own rankings perform best.
Research papers from arXiv
The arXiv corpus contains 886,000 full papers. The authors use text extracted from PDFs and select the latest available revision of each paper. After applying a minimum frequency cutoff, the vocabulary contains 969,894 words. The unit of representation is the full paper, so an article can supply vocabulary from across its text. The source differs from Wikipedia both in the kind of writing it contains and in the metadata the authors use to judge which documents should be close.
The subject assignments make the triplet rule possible. A related pair shares at least one subject. For the other candidate, the authors choose a paper at random from papers with no subject in common with the starting article. The evaluation contains 20,000 triplets constructed this way. The condition on the distractor is relative to the starting article, which is the item used in both comparisons. It gives the test an operational definition of a less related candidate based on the repository's labeling.
Having a shared subject is a dependable way to construct many examples with a common rule. It can cover comparisons where a pair addresses different problems in a broad field as well as comparisons where the papers deal with closely connected research. The rule rewards a ranking that reflects shared subject membership. It gives less direct evidence for a searching reader's finer judgments, such as which paper develops the most closely related approach. This distinction shapes the meaning of a strong result on the triplets.
For the qualitative arXiv checks, the authors look at neighbors of the earlier Paragraph Vectors paper and of their own paper. Both queries concern the subject of document representations, which gives readers a clear reason to inspect the resulting lists. The shift from “neural” to “Bayesian” asks a more directed question about the earlier paper's neighborhood. The authors judge the examples to be useful for finding related work and for the intended change of direction. The triplet study supplies the larger comparison against other representations.
In the arXiv triplet experiment, Paragraph Vectors performs about as well as Latent Dirichlet Allocation at the latter's best topic count. The authors report that the paragraph-vector results vary less with dimensionality than the topic results do with topic count. Both methods perform better than the vector-space baseline. These observations apply to the task defined by shared subject labels. The authors report a peak for Paragraph Vectors at 100 dimensions on this collection.
The peak sizes are the numerical comparison in the chart. A smaller value means the representation at the reported peak requires fewer coordinates per document. The direction of preference shown for this measure refers to compactness only. The two peaks come from different collections and triplet constructions, each with its own ranking task.
Paragraph Vector dimensions at peak triplet performance on arXiv and Wikipedia
The arXiv setting reaches its reported peak with a more compact representation than the Wikipedia setting.
The numbers
| System or setting | embedding dimensions |
|---|---|
| Paragraph Vectors on Wikipedia | 10,000 |
| Paragraph Vectors on arXiv (this paper) | 100 |
The corpus comparison gives two practical readings of the benchmark. On Wikipedia, the relative advantage over topic mixtures appears across the reported range of document sizes. On arXiv, the best topic setting is competitive, and the document method's advantage is in the consistency of its results across the sizes examined. These are different kinds of evidence. A system can compare favorably in its ranking at a given setting, or it can give a similar ranking over a broader range of settings. The paper finds reason to pay attention to both.
What the ablations show
Joint word training changes the document results
The closest comparison to an ablation asks what happens when word embeddings are trained along with the paragraph vectors. The authors describe preliminary evidence favoring joint training and report a benefit in the Wikipedia results. In the document task, the article vector still has to support predictions of its words. The accompanying skip-gram task adds word-level predictions. The comparison indicates that this addition can help produce better document vectors under the evaluation, giving the authors a reason to include it in the main setup.
The connection between the added objective and the measured result is empirical. The comparison tells us that the joint training procedure improves the resulting vectors in the reported experiment. The paper does not trace that improvement to a particular part of the geometry or to a particular type of article. Joint training also gives the authors word vectors for the arithmetic queries. Success in those examples and improvement in the triplets concern different uses of the learned coordinates. The triplets judge original article rankings, while the examples use word vectors to modify a query.
Averaging word embeddings helps put this comparison in context. It tests what a document description can do when it is assembled directly from learned word information. That baseline does better than the topic representation on the Wikipedia comparisons. It therefore supplies evidence that important information for these rankings is already present at the word level. It is a distinct comparison from turning joint training on or off. Averaging changes the way the whole article representation is made, while the joint-training comparison changes the training procedure for Paragraph Vectors.
Size is a setting with corpus-specific consequences
The dimensional sweeps test a direct change to the amount of space available for each document vector. The peak at 10,000 dimensions on Wikipedia and the peak at 100 dimensions on arXiv give different answers to the question of which reported size works best. Both the texts and the definitions of relatedness change across the collections. Consequently, the size findings establish what happened in each setup. They leave open whether the disparity comes mainly from differences in the writing, the corpus, the target relations, or some interaction among them.
Varying the number of LDA topics gives the topic method an opportunity to be competitive at a setting suited to its own document descriptions. A topic is one component of a probability mixture, whereas an embedding dimension is a coordinate in a learned vector. The sweeps compare sensitivity to a capacity setting in each method without requiring the two settings to mean the same thing. On arXiv, the authors' finding of relatively consistent Paragraph Vector results across dimensionalities bears directly on the ease of choosing a size in that experiment.
On Wikipedia, the reported comparison across sizes helps establish that the advantage over LDA extends across the particular choices the authors tried. The advantage and the peak answer different questions. A peak says which document-vector size gives the best result within the sweep. A persistent advantage says that the method comparison continues to favor Paragraph Vectors when its size is changed. The paper gives both observations for Wikipedia, while its account of arXiv emphasizes a competitive best topic setting and the relative stability of paragraph vectors.
Additional comparisons concern the inputs and the baselines
The authors report a preliminary test of adding bigrams to the unigrams used in training. They observed no improvement in final vector quality when the vocabularies were combined. This is evidence about giving the tested training procedure an additional kind of input. It does not determine whether short phrases carry useful information for particular queries or for other tasks. Distributed Memory also uses local context in a different way, through the word inputs to a prediction. The bigram observation concerns a vocabulary choice in the reported setup.
The paper also describes experiments with TF-IDF weighting in the LDA procedure, involving words and their inferred topic allocations. The authors report that the change did not affect performance in either corpus. That result speaks to a particular attempt to change the topic baseline. TF-IDF also defines the weighting of the separate bag-of-words comparison. The evidence about its effect within LDA therefore has a narrower meaning than a general judgment about the value of TF-IDF in retrieval.
The visual, neighborhood, and arithmetic analyses round out the comparisons by making the fitted space inspectable. The Wikipedia display suggests broad grouping by category. The neighbor lists let the authors judge particular retrievals. The adjusted queries illustrate a way of asking for a relationship through the vector operations. These analyses give examples of what the method does, while the settings comparisons give evidence about how its measured behavior changes when training or capacity changes. Each bears on a different reason a reader might trust the document space for browsing.
Limitations
Boundaries the authors describe
The authors motivate the study by describing the earlier evidence as narrow. Their own contribution extends the evaluation to document similarity in Wikipedia and arXiv, with particular attention to long texts. They discuss book recommendation, reviewer allocation, and corpus exploration as possible applications. These are motivated by the kinds of comparisons and searches shown in the paper. The experiments themselves involve Wikipedia articles and arXiv papers, with relatedness defined by hand-built judgments, Wikipedia categories, or arXiv subjects.
The authors acknowledge a loss of direct interpretability in distributed descriptions relative to earlier representations. This affects what a reader can learn from a successful comparison. A system built around vocabulary weights offers a direct route from a coordinate to a term, and a topic mixture offers proportions over its inferred topics. Paragraph Vectors gives a numerical location learned through prediction. A neighbor list can be examined for recognizable relationships, while the individual coordinates offer less immediate explanation for why two articles landed close together.
The authors also give a qualified account of the comparison with LDA. They report a clear advantage for the document vectors on Wikipedia and describe the best arXiv topic setting as performing about as well. The latter finding is important because the corpora illustrate different outcomes under task-specific definitions of relatedness. A claim about which representation is preferable for article browsing has to preserve that distinction. In the arXiv experiment, the paper's case for Paragraph Vectors rests in part on how it behaves across sizes.
Limits of the evaluation design
A generated triplet measures agreement with a rule that is available at scale. In Wikipedia, the rule is shared membership in a category. In arXiv, it is subject overlap for the related pair and an absence of overlap with the starting paper for the distractor. These rules capture recognizable types of similarity. They can also group documents that have different immediate purposes and separate documents that a reader would see as related for a particular question. The resulting judgments are evidence about ranking under those metadata rules.
The handwritten examples offer another source of evidence. They let the authors formulate comparisons that require distinctions within a broad subject or type of entity. The paper describes them as based on the authors' domain knowledge and illustrates the rationale with selected cases. It gives no independent judgment procedure for deciding whether other readers would make all the same choices. A case like the comparison among California cities shows why this matters. The ranking can be well motivated while depending on the aspect of relatedness the evaluator has in mind.
A triplet is also a particular kind of retrieval test. The system has a designated pair of candidates to order. An interactive browsing session would ask what is useful among many candidates and might change as a reader learns more or refines a question. The nearest-neighbor lists illustrate that broader setting for individual queries, but the paper's systematic evaluation uses the triplet decisions. Its evidence is strongest when read as a test of relative similarity given the candidates the authors constructed.
The quantitative tests do not establish how the selected settings transfer to previously unseen articles. The paper describes fitting paragraph vectors to the collected Wikipedia and arXiv texts and evaluating comparisons among articles from those collections. It gives a brief description of inference by adjusting a paragraph vector. It does not report a separate result for a collection held apart to test incoming documents. The evidence supports comparing articles represented in the studied collections. Extending that conclusion to routine insertion of new articles would require an evaluation of that use of inference.
The dimension sweeps support comparisons within the chosen settings, while the choice of a peak is itself based on observed evaluation performance. The paper gives no separate estimate of how often that same choice of size would be selected on another sample of triplets. Likewise, the reported ordering of methods gives no uncertainty estimate for how much the rankings might vary with another draw of generated examples. Conclusions about the size of an advantage should stay close to the benchmark construction and to the comparative results the authors describe.
Limits of the explanatory examples
In the visual analysis, t-SNE lets the authors inspect whether categories appear grouped in a display. This provides a view of the fitted vectors at the level of collections of articles. A visible group alone gives no measurement of its effect on a particular ranking. It also does not identify which words or training decisions produce the group. The sports example is an interpretation of a pattern the authors see. The triplet comparisons provide more direct evidence for the sorting behavior on specified article pairs.
The arithmetic demonstrations are similarly specific. The choices of starting article and replacement words express a relation that the authors can explain. Their inspection of the neighbors shows what that relation looks like in examples. The paper does not give a benchmark of document analogies, an aggregate rate of acceptable answers, or a rule for selecting replacement terms in general. A result that looks like a useful Japanese counterpart or a useful Bayesian direction shows the possibility of such queries. It leaves their reliability across other relations unmeasured.
The complete result also depends on more than the word-prediction objective. Corpus preparation changes the words available to the training procedure. Dimensionality affects the description that can be learned. The measure used to compare two descriptions influences the resulting ranking. LDA is compared using a distance suited to topic proportions, while Paragraph Vectors is compared with cosine. That choice makes sense for testing usable ranking procedures. It leaves open how much of a difference in any particular comparison can be attributed to a single component of either procedure.
What came after
The later citations place the paper in discussions of machine-learning systems, automatic evaluation of longer texts, and evaluation surveys. Their connections can be stated at different levels of specificity. In the evaluation work, the titles identify the kinds of texts or comparisons at issue. The systems citation identifies a broader setting in which document embeddings were relevant prior work. The citations give a view of where the paper entered subsequent literature, with limited detail about the particular uses.
The 2016 paper TensorFlow: A system for large-scale machine learning cites the study from the perspective of systems for large-scale machine learning. The connection is that Paragraph Vectors is a learned representation whose training associates parameters with documents across a collection and repeatedly updates them from word predictions. The citation places the document study in that broader systems literature. It supplies no specific evidence that TensorFlow adopted its inference procedure, ran its Wikipedia or arXiv benchmarks, or implemented its browsing examples.
The 2019 paper Sentence Mover's Similarity turns to automatic evaluation for multi-sentence texts. The relationship is clearest in the role of comparison. The Paragraph Vectors study asks whether a numerical comparison agrees with an expected ranking among articles. Sentence Mover's Similarity addresses automatic evaluation where the objects being compared also extend across sentences. This is a shift in the purpose of the comparison, from helping a reader find related material to evaluating a text automatically. The citation establishes the connection to the earlier work without specifying that the later method uses its paragraph-vector training procedure.
The 2020 paper Evaluation of Text Generation: A Survey brings the citation into a survey of text generation evaluation. The earlier study offers an example of testing text representations by asking whether their numerical comparisons correspond to judgments about relatedness. In a survey concerned with evaluation, that work is relevant to the broader question of what a comparison between longer pieces of text can measure. The citation identifies the study as part of the literature considered by the survey. It provides no basis for attributing a new Paragraph Vectors experiment to the survey itself.
Cite
Cite as Andrew M. Dai, Christopher Olah and Quoc Viet Le. 2015. Document Embedding with Paragraph Vectors. arXiv (Cornell University).
@misc{dai2015document,
title = {{Document Embedding with Paragraph Vectors}},
author = {Andrew M. Dai, Christopher Olah and Quoc Viet Le},
year = {2015},
doi = {10.48550/arxiv.1507.07998},
eprint = {1507.07998},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1507.07998}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dai-2015-document-embedding-paragraph-vectors/
References
- D. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 2003. OpenAlex ↗ · Scholar ↗
- Z. Harris. Distributional structure. Word, 1954. OpenAlex ↗ · Scholar ↗
- Q. V. Le and T. Mikolov. Distributed representations of sentences and documents. In International Conference on Machine Learning, 2014. our card
- T. Mikolov, K. Chen, G. Corrado, and J. Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. our card
- L. J. P. van der Maaten and G. E. Hinton. Visualizing high-dimensional data using t-SNE. Journal of Machine Learning Research, 2008. OpenAlex ↗ · Scholar ↗