Elamur Research

Query Expansion with Locally-Trained Word Embeddings

Paper · 2016 · Fernando Diaz, Bhaskar Mitra and Nick Craswell

Summary

A search engine may miss a useful document because its author used different words from the person searching. Query expansion addresses that problem by giving related words a place in the ranking. The difficulty is deciding which relationships matter for the search at hand. A term can have several common uses, and the words most often associated with it in a broad collection may fit a different subject from the one the user has in mind. The authors investigate this problem in information retrieval, using numerical representations that place words near others with related patterns of use, known as word embeddings.

Their method starts with an ordinary search. It uses the initial scores to sample documents likely to concern the query, then trains word vectors on that sample. The learned similarities give candidate expansion terms their weights. The system combines the resulting term distribution with the original query and uses it to reorder the initial results. The documents used to learn the vectors can come from the collection being searched or from an auxiliary collection. A search about gasoline tax illustrates the reason for adapting the training data. In general news, the word cut has several uses. Among documents about the query, its nearest neighbors give greater prominence to the sense of a tax cut.

The authors test the method on the newswire collections trec12 and robust and the Web collection web. On NDCG@10, a measure that emphasizes the top of the ranking, the best local expansion significantly outperforms the best global expansion on every collection at p < 0.05. The strongest local training source for the newswire collections is Gigaword. For web, it is Wikipedia. The precision–recall curves also favor local expansion across almost the entire range shown, while the top-rank gains from global expansion are less apparent in those curves.

The retrieval results establish that query-specific training can improve expansion in this setup. The evidence about why it helps is more tentative. In one visualization, words frequent in judged-relevant documents lie closer to the query in the local space. Across queries, however, the overall shift in word frequencies between a topic and its collection has only a weak positive association with the gain from local training. The authors also identify a practical cost. Training a fresh representation for each query takes more work than looking up vectors learned in advance.

Deep dive: Query Expansion with Locally-Trained Word Embeddings

Query Expansion with Locally-Trained Word Embeddings tests whether learning word relationships from documents about a query improves search rankings. · about 35 minutes to read

The problem and its context

Why a search needs more than the words typed

The paper studies ad hoc retrieval. A person supplies a query, and the system has to rank an existing collection for that request. The input may be only a few keywords. Those words provide evidence about the subject, but they cover a small part of the vocabulary that authors might use to discuss it. A ranking that gives weight to related terms can promote useful documents even when their wording differs from the query.

This makes query expansion a problem of choosing evidence. A system has to decide which additional terms deserve weight and how much they should influence the ranking. A broad association may be linguistically reasonable and still be unhelpful in a particular search. An expansion term earns its place by helping the system distinguish documents relevant to the request. The authors therefore judge the similarities by what happens to document rankings, instead of relying solely on whether neighboring words look related in isolation.

A conventional word embedding provides one position for a word in a shared numerical space. Words that occur in related environments can acquire similar representations. This gives a search system a reusable source of associations, and the paper notes that widely used embeddings had performed well on word similarity and analogy tasks. Those successes motivate using vectors for retrieval. They leave open how well a single representation will serve queries on different subjects. The paper takes word2vec and GloVe as examples of ways to learn such representations.

The distinction between two kinds of context is central. A nearby window of words supplies the immediate context of a training occurrence. The subject of the document supplies a broader context that affects which word uses are likely to appear there in the first place. Training with small windows addresses the first kind. If the windows come from a broad collection, the resulting vector still reflects their combined influence across subjects. Restricting the documents changes the collection of windows from which the associations are learned. This is how the paper uses distributional semantics.

The paper draws on the observation that the intended sense of an ambiguous word tends to stay consistent within a discourse. It also discusses earlier work showing that local clues from nearby words can be combined with broader discourse evidence to resolve ambiguity. A search gives the system a different source of broader context. It lets the system identify documents likely to share a subject, even when the query itself is too short to offer much immediate linguistic context. These connections come from One Sense Per Discourse and Yarowsky’s work on word sense disambiguation.

Ambiguity is only part of the problem. A topic can have a characteristic vocabulary whose words are uncommon in the full collection. Even a term with a fairly stable meaning can participate in associations that matter much more within one subject than elsewhere. A collection-wide training procedure gives such associations influence according to how frequently it encounters them across all subjects. When retrieval depends on those associations, the relevant question is how much evidence the training procedure gives them. This is one way the paper connects document retrieval to lexical semantics.

How earlier work used local evidence

Search systems already had a way to use topic-specific text when the searcher supplied no examples. In pseudo-relevance feedback, the system uses its own initial ranking as an imperfect indication of what documents concern the request. Those documents can provide words for a revised query. The paper also cites work in which expansion based on global embeddings had surpassed classic pseudo-relevance feedback. The local embedding approach puts the two pieces together in a specific way. It uses an initial search to choose the text on which similarities are learned, then uses those similarities to weight terms.

The authors situate this idea in a wider retrieval tradition. They describe earlier local approaches to expansion, term clustering, and the grouping of documents. In each area, a decision made for the current search can draw on the part of the collection that matters to that search. One particularly close precedent is the work that confined latent semantic analysis to documents associated with the query. The paper reports that this restriction improved results in routing experiments and that subsequent research reproduced the benefit. The parallel lies in adapting a low-dimensional representation to the documents at issue, an idea the authors carry from latent semantic indexing into word-vector training.

The paper distinguishes representations derived from patterns of terms across documents from representations derived from word co-occurrences. The former can express broad patterns of document content. The authors point to prior retrieval results in which such representations could perform poorly unless used alongside lexical evidence. In the latter family, word2vec draws its training instances from local word environments. The direction taken in this paper preserves term-based ranking and uses dense vectors to tell that ranker how to distribute expansion weight. The paper’s account of the training draws on Efficient Estimation of Word Representations in Vector Space and the word2vec work on distributed word and phrase representations.

Earlier embedding-based retrieval had used similarity for other parts of the search process. One line of work used distances in word2vec space to estimate how plausibly one term could stand in for another in a probabilistic retrieval framework. Another estimated a document’s relationship to a query by comparing its words with the query words across dual embedding spaces. The authors share the premise that vector proximity can capture relatedness useful for search. They focus their experiment on the training data behind that proximity and keep its role in the search pipeline confined to expansion.

Other approaches had already addressed the problem of assigning a word a single vector. The paper discusses learning several prototypes for a word, using topic information, and organizing senses with mechanisms such as fixed inventories or class labels. Those approaches allow representation to vary with use. Here the immediate task is to estimate one space for the subject suggested by the current search. A different query can produce different vectors for the same vocabulary even when the procedure has no explicit inventory of senses. Examples of the earlier direction include Multi-Prototype Vector-Space Models of Word Meaning and Improving Word Representations via Global Context and Multiple Word Prototypes.

The other precedent is topic adaptation in language processing. The paper describes previous work that collected domain-specific documents ahead of time or gathered topic evidence as a discourse unfolded. It discusses applications in speech recognition and machine translation, and notes that some of this work combined general and adapted estimates. In the retrieval method here, the current query supplies the cue for gathering documents and the text of those documents supplies the word contexts. The experimental comparison is between expansion from entirely local vectors and expansion from entirely global vectors.

These precedents define the practical question the paper can test. A broad corpus supplies more text and can support a reusable embedding. A search-specific sample gives the words and usages of the topic more influence on training. The experiment asks which source of similarity helps when the same kind of scoring mechanism turns that similarity into expansion terms. The aim is better retrieval for the current query, an outcome judged through the resulting order of documents.

The method, step by step

From the first search to the expanded query

The procedure begins with the original words the searcher entered. The retrieval system treats them as a distribution over words and compares that distribution with one estimated for each document. The comparison produces the initial ranking. On the local branch, these scores also determine how likely each document is to be sampled for training. Documents whose wording has a closer fit to the query contribute more often in expectation. They can come from the target collection or from a separate corpus searched for this purpose.

The sampled documents provide contexts for word2vec. A word can end up in a different neighborhood from the one it has in a general embedding because the selected documents use it in different ways or use particular senses more often. Once the vectors have been learned, the system compares possible expansion words with the original query words. It gives the strongest candidates a share of the expansion weight, combines that distribution with the original query distribution, and runs the scoring rule again on the leading documents from the target search.

Query expansion with locally trained word embeddings

The steps in order.

Query expansion with locally trained word embeddingsStep 1: Score documents with the original query1. Score documents with the original queryStep 2: Convert source scores into sampling probabilities2. Convert source scores into sampling probabilitiesStep 3: Draw documents for the query-specific training set3. Draw documents for the query-specific training setStep 4: Train word2vec on the sampled text4. Train word2vec on the sampled textStep 5: Score expansion terms against the query words5. Score expansion terms against the query wordsStep 6: Normalize the strongest candidates6. Normalize the strongest candidatesStep 7: Mix expansion weights with original query weights7. Mix expansion weights with original query weightsStep 8: Rescore the leading target documents8. Rescore the leading target documents

There are two distinct uses of the initial search. The target ranking determines which documents can move in the final ranking and which vocabulary can supply expansion terms. A search of the training source determines which documents teach the system how words relate. When the source is the target itself, the two uses draw on the same collection. With an auxiliary source, the search of that corpus supplies training text, and the documents returned to the user still come from the target. An association learned from outside the target can change how target documents are scored without inserting an auxiliary document into their ranking.

The global comparison uses embeddings trained across their respective sources without drawing a fresh topic-specific sample. Once an embedding has been chosen, both approaches use the same kind of calculation to score expansion words and the same kind of interpolation to use them. A reader can consequently follow the role of local training separately from the downstream act of adding new vocabulary to a query. To see the authors’ rationale for the training change, it helps to start with what the learning objective gives weight to.

What changes when the training distribution changes

The authors motivate the procedure with a word2vec-style training objective. A training instance contains a target word and its observed context. The score for the observed pair rises as their vectors align. The objective also uses sampled negative material, for which it rewards the opposite direction. With the signs shown, the expression is a log score to reward. The corresponding loss to minimize has the opposite sign.

ℓ(w, c) = log σ(φ(w) · ψ(c)) + η · E_{w̃∼θ_C}[log σ(−φ(w) · ψ(w̃))]

Here ℓ(w, c) is the instance expression, w is the target word, and c is the observed context. The map φ takes a target word from the vocabulary into the embedding space. The map ψ takes context material into the same number of dimensions, with c composed of m terms and m the number of terms in that context. The symbol · between the vectors denotes a dot product, and between η and the expectation it denotes scalar multiplication. σ is the sigmoid function and log takes its logarithm. The symbol E means an expected value. The index w̃∼θ_C means that the negative item w̃ is drawn from the negative-sampling distribution θ_C. The tilde distinguishes that sampled item from the observed target. The negative sign reverses the dot product for this sampled context, and η controls the contribution from negative sampling.

The formula gives the authors a way to ask which observed pairs influence training most. An observed context matters through the association it expresses and through how often the trainer sees it. A rare word–context pair receives relatively little emphasis when the objective is averaged across a corpus, even when it would be informative for a particular search. The paper writes the collection-wide objective as an expectation.

L_c = E_{w,c∼p_c}[ℓ(w, c)]

L_c is the expected instance expression for the broad corpus. In the expectation, w and c stand for a target word and its observed context, and p_c is the joint distribution of those pairs in the corpus. The subscript on L_c and p_c refers to the corpus, while the c paired with w denotes a context. E averages ℓ(w, c) according to the probability of drawing the pair from p_c.

A search can concern a subject in which those same pairs occur with very different probabilities. If the topic uses a technical word frequently, contexts involving that word may carry more of the useful evidence than they do across general text. If a common word takes on a particular use within the topic, the balance among that word’s contexts can change as well. In either case, what matters to the query is the average under the topic’s distribution.

L_t = E_{w,c∼p_c}[(p_t(w, c) / p_c(w, c)) · ℓ(w, c)]

L_t is the expected instance expression under topic t, written as a reweighted expectation under the corpus distribution p_c. The term p_t(w, c) gives the probability of target word w with context c within the topic. p_c(w, c) is the corresponding broad-corpus probability, / denotes division, and · multiplies the resulting importance weight by the instance expression ℓ. For the reweighting to make sense, pairs that can occur under p_t must also occur under p_c. The authors expect that condition to be plausible when the broader corpus is diverse enough to contain the uses found in the topic.

The ratio expresses relative emphasis. A word–context pair can be rare in absolute terms within a topic and still deserve more attention than it gets in the corpus at large. Conversely, many pairs encountered in general text have little bearing on a particular search. The change in objective concerns the mixture of examples used to learn each vector. Sampling documents by query score is a practical way of changing that mixture. It avoids having to estimate true topic probabilities for individual word–context pairs.

The paper makes the frequency argument concrete using documents about the query argentina pegging dollar. It compares how frequently individual words occur in the topical material with how often they occur in Gigaword. This is a word-level illustration of the pair-level argument. A high ratio identifies a word whose share of the topical text exceeds its share of the broad corpus by a large amount. Since a ratio can be large for a word that is still uncommon in-topic, the authors also consider each word’s contribution to the divergence between the distributions.

D_w(p_t ∥ p_c) = p_t(w) log(p_t(w) / p_c(w))

D_w is the pointwise contribution of word w to the Kullback–Leibler divergence, frequently shortened to KL divergence. The notation ∥ separates the first distribution from the comparison distribution. Here p_t(w) and p_c(w) are probabilities of individual words in the topical text and the broad corpus. The logarithm of their ratio measures how strongly the word’s share of the text shifts, and the factor p_t(w) supplies its absolute importance in the topic. The authors examine this quantity for the top 100 words by topical frequency in the example.

The frequency diagnostic and the embedding example answer different questions. The first shows that selecting a topic can shift the prominence of particular terms. The second asks whether the kinds of context associated with a word also change. The authors compare representations trained on generic Gigaword text and on a Gigaword subset related to gasoline tax. The local neighbors of cut give more weight to the tax-related use. That comparison illustrates the difference between learning a broad set of associations for a word and learning associations from text in which one subject organizes its uses. It supplies a reason to consider word sense disambiguation when interpreting local neighbors, even though the retrieval procedure never assigns a sense label.

Turning the initial ranking into training material

The first retrieval uses estimates based on term frequencies. A query distribution gives each word its share of the query, and a document distribution describes the word frequencies associated with that document. The scoring rule compares these distributions with KL divergence. It gives a smaller score to documents whose term probabilities are more compatible with the query’s distribution.

D(p_q ∥ p_d) = Σ_{w∈V} p_q(w) log(p_q(w) / p_d(w))

D(p_q ∥ p_d) is the divergence from query distribution p_q to document distribution p_d. V is the vocabulary, w is a word, ∈ means membership, and Σ adds the contributions over the vocabulary. For each word with positive query probability, p_q(w) weights the logarithm of the ratio between that probability and p_d(w). Terms with zero query probability contribute nothing to the sum. A usable finite score requires handling query words to which the document assigns zero probability. The paper describes the frequency estimates and identifies Indri as the retrieval implementation. Its displayed equation does not specify the settings for this part of the calculation.

The paper calls this the query likelihood score. For the same query, the query-only part of the comparison stays fixed across documents. What changes the ordering is how much probability each document gives the query’s words, weighted by their importance in the query. The expanded distribution can then be substituted into the same scoring rule. This is the role of the language model in the ranking stage. The paper relates its formulation to Relevance-Based Language Models.

An ordered list of documents alone gives no sampling probabilities. The method uses a softmax to obtain them. The negative sign in the exponent turns a low divergence into a high unnormalized weight. Dividing by the sum of those weights yields a distribution of sampling chances for the collection being searched.

p(d) = exp(−D(p_q ∥ p_d)) / Σ_{d′} exp(−D(p_q ∥ p_{d′}))

p(d) is the probability assigned to document d for the current query. exp is the exponential function. D is the divergence just defined, with p_q the fixed query distribution and p_d the distribution of document d. The symbol d′ indexes the documents in the source collection, and p_{d′} is the distribution associated with the indexed document. The summation Σ in the denominator covers that collection, so the normalized weights form one distribution over documents.

The authors draw 1000 documents with replacement for each local training run. Replacement allows a high-probability document to appear repeatedly in the sample. This matters because the sample is a way of giving documents unequal influence, and a draw of 1000 documents does not imply 1000 distinct texts. A document can also have a positive chance of being sampled without being judged relevant. The probabilities come from the original query and the collection’s text. They carry the uncertainties of the first search into the data used to learn the embedding.

The experiments use the publicly available continuous bag-of-words implementation of word2vec. Its training instances use surrounding words as context for a target. The reported local vectors have dimension 400. To allow for the smaller quantity of training text in each run, the authors train for 80 iterations. They generally retain the implementation’s default settings except where they report parameter choices or validation. The same training procedure can be applied to text drawn from the target collection or from either auxiliary source. Changing the source changes the available documents and their language while preserving the general sampling procedure.

From vector similarities to ranking weights

The next stage converts the embedding into one score per candidate expansion term. Think of arranging the vectors as rows of a matrix, with one row per vocabulary item. Multiplying that matrix by its transpose produces all the word-to-word dot products. The term vector for the query gives contributions from its original terms to the scores of other terms. The authors express the resulting vector of weights compactly.

s = U Uᵀ q

s names the vector of expansion scores. U is the embedding matrix, with |V| rows and k columns in the paper’s description of its shape. |V| is the size of the vocabulary V, and the k in that shape is the embedding dimension. Uᵀ is the transpose of U. The column vector q represents the original query over the same vocabulary. Juxtaposition denotes matrix multiplication. The product first brings the query terms into the shared vector space and then gives each vocabulary term a score from its alignment with that query representation.

The paper also uses k to denote the number of highest-scoring terms retained. This is a separate choice from the embedding dimension. The matrix calculation assigns weights before the cutoff is applied. The system keeps the selected terms and normalizes their weights to construct the expansion distribution. Because a candidate’s score can draw on several original query terms, the calculation uses more evidence than looking up a fixed number of neighbors for each original word separately. Which terms actually score highly still depends on the neighborhoods learned from the training text.

There is also a target vocabulary restriction. A word must occur among the initial target retrieval results to be considered for expansion. This matters for globally trained vectors that were produced with possibly different conventions for splitting and normalizing text. The authors first attempt to find the candidate directly in the embedding vocabulary. If that fails, they look in a stemmed version of the vocabulary. They discard the candidate if they still cannot match it. These steps connect the terms used for reranking with the tokenization and stemming conventions of the retrieval system.

The final step mixes the normalized expansion weights with the original query. The original words keep an explicit part of the probability mass, while the expansion contributes associations learned from text. This interpolation gives the ranking a way to benefit from extra evidence while retaining a direct connection to the keywords the person entered.

p_q¹(w) = λp_q(w) + (1 − λ)p_q⁺(w)

p_q¹(w) is the final expanded query probability for word w. p_q(w) is the original query probability, and p_q⁺(w) comes from normalizing the weights of the selected expansion terms. λ is the share assigned to the original distribution. The factor 1 − λ gives the remaining share to expansion. The plus sign adds the weighted contributions, so a word that occurs in both distributions can receive weight from both. The superscripts distinguish the expansion distribution and the final interpolated distribution from the original. The paper follows the query interpolation approach described in UMass at TREC 2004: Novelty and HARD.

The system uses the expanded distribution to rescore the top 1000 documents from the original target ranking. This is a separate use of 1000 from the number of documents sampled for training. Here the number defines the set of documents eligible for reranking. In the training step it defines a sample size and allows repeat draws. The paper cites earlier work as evidence that reranking a shortlist can give performance close to a fresh expanded search at lower cost. The comparison in this study consequently asks whether the expansion scores improve the order inside the original shortlist.

Experiments and results

The target collections and outside sources

The study uses three target collections with associated retrieval queries. The trec12 newswire collection consists of Tipster disks 1 and 2. It contains 469,949 documents, 438,338 vocabulary entries in the paper’s corpus statistics, and 150 queries. The robust newswire collection consists of Tipster disks 4 and 5, with 528,155 documents, 665,128 vocabulary entries, and 250 queries. The target datasets thus allow the authors to compare outcomes on different collections of news writing under the same general procedure.

The web target comes from ClueWeb 2009 Category B. The authors keep only documents whose Waterloo spam rank exceeds 70. After this selection, the corpus statistics report 50,220,423 documents and 90,411,624 vocabulary entries, with 200 queries used for evaluation. This setting gives the experiment a different kind of collection from the newswire targets. Its results address the filtered Web corpus the authors actually search.

Gigaword is the auxiliary news source, named news in the corpus statistics. It has 9,875,524 documents and 2,645,367 vocabulary entries. The authors choose it as a place where a query might retrieve a broader supply of topical news text than would be available from searching a newswire target alone. The auxiliary wiki source is a Wikipedia snapshot dated December 2014, with 3,225,743 documents and 4,726,862 vocabulary entries. The motivation for trying it is to see whether a source with cleaner text could support local learning for a target such as web. These auxiliary corpora supply training documents and have no corresponding sets of evaluation queries in the corpus table.

All the corpora in the retrieval setup use the SMART stopword list and the Krovetz stemmer. The stopword procedure removes designated frequent words, and the stemmer maps forms to the representations used in the index. Indri handles indexing and retrieval. The preprocessing gives the search and candidate selection a common basis within this setup. The authors still have to account for vocabulary mismatches when they use publicly available embeddings trained under other conventions. This is why the study describes the fallback search over stemmed entries before discarding candidates with no vector.

The baseline and competing sources of similarity

The query likelihood ranking is the unexpanded baseline. It measures how well the original term distribution can order results without additional associations. Comparing any expanded run with this baseline asks whether adding learned term evidence improves the search. Comparing global and local expansion then asks how the choice of embedding affects the gain, given a common way of converting similarities into term weights.

For global expansion the study includes versions of GloVe with different dimensions, trained on a combination of Wikipedia and Gigaword. It also evaluates a word2vec embedding that is publicly available and was trained on Google News. For trec12 and robust, the authors train separate global embeddings over the entire respective target corpora. These runs test whether ordinary unspecialized training benefits from exposure to the same collection that will be ranked. For web, the large-corpus comparison uses GloVe trained on Common Crawl in place of an embedding trained globally over the Web target itself.

The local alternatives use the same word2vec implementation but change the source of the initial training retrieval. The source can be the target itself, Gigaword, or Wikipedia. The target version draws directly from the kind of text that the system has to rank. The auxiliary versions ask whether a different collection can supply useful topical associations. The expansion term still has to occur in the target retrieval, so the larger auxiliary vocabulary is useful insofar as it can help weight terms available to the target ranking.

The comparison therefore addresses several different questions. The baseline establishes the value of having expansion at all. The global runs show what the search can gain from broadly estimated associations. The full-target global runs for newswire test a closer match between embedding training and the search collection. The local runs test retrieval-based selection within a source and show how the choice of that source affects the outcome. The design makes those comparisons possible even though it does not hold every corpus property constant across every pair of runs.

Parameter selection and the evaluation measures

The authors use 10-fold cross-validation across queries. The query folds are the units for selecting and testing settings, while the documents sampled for any local run come from the retrieval scores for its current query. The distinction matters because the system can build a representation for a held-out query from document text without consulting relevance judgments for that query. Validation controls the choice of settings used to apply the method.

The candidate expansion counts are 5, 10, 25, 50, 100, 250, and 500. The interpolation coefficient λ is validated over the interval from 0 to 1. This lets the procedure consider settings from giving the expanded distribution full weight to relying completely on the original query distribution. For local word2vec, the authors also validate the learning rate α, the parameter controlling the size of training updates. They consider 10⁻¹, 10⁻², and 10⁻³. The local dimension stays fixed at 400 in the reported runs. The authors say that other dimensional choices did not significantly affect their results.

The first measure, NDCG@10, is normalized discounted cumulative gain at rank 10. Cumulative gain rewards the presence of relevant documents. Discounting gives earlier positions greater influence, and normalization expresses the result in relation to an ordering that places the most relevant available items first. The cutoff means this measure addresses the head of the result list. It can register an improvement when useful documents move to prominent positions even if the improvement is hard to see over the list as a whole.

The authors also report interpolated precision at standard recall points. Precision describes how much of the material retrieved up to a point is relevant. Recall describes how much of the relevant material has been recovered. Interpolation gives comparable precision values along a common recall scale. The resulting curves show whether a method’s advantage extends to settings in which a searcher wants to find a larger share of the relevant documents. The cutoff metric and the curves address different aspects of retrieval, which makes the difference between their patterns informative.

What the rankings show

Embedding-based expansion exceeds the unexpanded query likelihood baseline on NDCG@10 in the reported comparisons. Among global alternatives there is variation across the news targets. In trec12, the embedding trained globally on the target itself significantly outperforms the other global choices even though its training collection is smaller. The authors offer two possible explanations. Its preprocessing may be better aligned with the terms used in the index, and its news text may better represent the language of trec12 than the outside sources do. Both possibilities make the construction of the comparison embedding consequential.

For each target, the best local entry outperforms the best global entry. The authors use a Wilcoxon signed-rank test on the paired comparison and report p < 0.05 for every collection. The test addresses whether the query-level differences between those entries consistently favor local expansion. The significance threshold describes evidence for the comparison. It gives no absolute NDCG@10 score or numerical estimate of the size of the gain.

The best source of topical training text depends on the target. For trec12 and robust, the strongest local results come from retrieving training documents from Gigaword. The authors attribute this advantage to access to a wider variety of relevant news while retaining a writing style close to that of the target. Wikipedia tends to be less effective for the newswire collections. For web, Wikipedia supplies the strongest local embedding, while Gigaword is less helpful. The authors interpret this reversal in terms of how well each source’s language suits the documents being ranked.

This is why the source comparison matters alongside the local–global result. Local training can use only the topical material that its initial search can find. An auxiliary collection may yield more useful contexts if it contains varied coverage of the subject. It can also introduce patterns of phrasing less suited to the target. The experiment shows that auxiliary size and suitability should be understood together. The ordering of the sources in the newswire runs cannot be carried over directly to the Web run.

The precision–recall curves compare the unexpanded baseline with the best global and local expansions. The authors observe that the global method’s gains on NDCG@10 are much less evident in those curves. Local expansion, by comparison, lies above both alternatives over nearly the entire displayed recall range. This gives the local result a broader interpretation than a gain concentrated only at the highest ranks. A system can improve the first part of the list without achieving the same relative improvement as the search proceeds towards greater coverage. The curves show that the stronger local methods generally fare better on both views of the ranking.

The paper also asks whether the amount of vocabulary shift in a query’s training material can account for its ranking gain. The chart compares evaluation settings on the same diagnostic. Each row gives the association between local-to-corpus divergence and the NDCG@10 improvement of the strongest local expansion over the strongest global one. The star marks the highest reported coefficient in this diagnostic.

Kendall’s τ between topic divergence and local NDCG@10 gains across the target collections

The association is weak and positive in every collection.

Kendall’s τ between topic divergence and local NDCG@10 gains across the target collectionstrec12 (this paper): 0.0585trec12 (this paper)0.0585robust: 0.0545robust0.0545web: 0.0204web0.0204
The numbers
System or settingKendall’s τ
trec12 (this paper)0.0585
robust0.0545
web0.0204

These coefficients describe a relationship across queries within each collection. They do not measure the performance of the ranking itself. Read alongside the significance result, they show that the method can improve retrieval at the collection level even when a plausible query-level indicator does little to explain which queries benefit most.

What the ablations show

What the comparisons hold in common

The controlled comparisons vary the source of expansion weights and the source of local training text. They are most informative when read as comparisons of complete conditions within the same retrieval pipeline. The comparison against query likelihood changes whether the query receives added term evidence. The comparison between embedding-based expansions retains the mechanism for scoring and mixing terms while changing the representation used to supply their similarities. The comparison among local runs preserves query-based training and changes where the search for training documents takes place.

The unexpanded baseline is important because the local–global comparison by itself would show only which representation is preferable. With the baseline, the paper can show that global similarities also give useful evidence at the top of the list, and that local similarities can improve upon them. The precision–recall result adds a boundary to that conclusion. Useful top-rank behavior from global expansion provides only part of the picture of its behavior along the ranking.

The trec12 result compares unspecialized embeddings trained on several sources. Its strongest global result comes from training on the target corpus. This supports the idea that bringing training closer to the task can help before any query-specific filtering is applied. It also identifies a confound in comparisons with ready-made vectors. The in-collection embedding inherits conventions and vocabulary from the retrieval corpus. The reported difference is consistent with benefits from those conventions as well as benefits from a better match in language. Either can matter to an expansion system whose candidate terms must map to vector entries.

The local training source comparison gives a more specific view of what the method needs. The Gigaword results show the value of a source that can supply additional topical news text to newswire retrieval. The Wikipedia result for web shows that selecting topical material from a broad news source is not sufficient to make that source equally suitable for every target. The authors’ language-style explanation is plausible because the preference changes with the target. The runs vary collection size, vocabulary, document composition, and the training text surfaced by the original query at the same time. They leave the separate contribution of each property unresolved.

The study’s observation about dimensionality is narrower. The authors report using dimension 400 for local training and say that other choices had no significant effect on their results. That supports treating the reported outcome as more than a peculiarity of choosing that dimension. The paper gives the reader little basis for inferring how performance would behave at any particular alternative dimension. The reported cross-validation choices likewise establish the studied training and expansion regimes without identifying a universally preferred configuration.

A divergence score as a possible predictor

The motivation suggests that local training should matter most when the language of a topic differs substantially from the language of its collection. The authors test a version of that idea by constructing a query-specific unigram distribution. A unigram distribution assigns probabilities to individual words independently of their neighboring words for the purpose of this calculation. A document contributes its estimated word probabilities, weighted by the sampling probability that the initial search assigned it.

p_local(w) = Σ_d p(w ∣ d) p(d)

p_local(w) denotes the resulting local probability of word w. d is a document, Σ_d adds distributions across documents, and p(w ∣ d) is the probability of w within document d. The vertical bar means that the word probability is conditional on the document. p(d) is the query-dependent document weight from the softmax. The product weights each document’s contribution, and the total describes the word distribution implied by the sampling procedure.

The authors compute KL divergence between this mixture and the collection’s unigram distribution. Then they order queries by their divergence and compare that ordering with the ordering by NDCG@10 gains for the best local expansion over the best global expansion. They use Kendall’s τ and Spearman’s ρ. These are rank correlations, so they examine agreement in relative order. A positive value means that larger shifts tend to accompany larger gains, to the degree indicated by the association.

Kendall’s coefficients appear in the chart. The Spearman coefficients for the same comparison are 0.0798 for trec12, 0.0792 for robust, and 0.0283 for web. Both measures show a positive association in every collection, and the authors judge the association weak. A large shift in the local word distribution is therefore at most a limited guide to whether a query will gain from local training in these experiments.

The diagnostic is less specific than the training argument. The motivation concerns target words together with their neighboring contexts. The diagnostic only tracks individual word frequencies. A topic can alter which words tend to occur around an ambiguous term without producing a large shift in the unigram distribution across the vocabulary. A large unigram shift can also reflect words that receive little expansion weight or add little useful ranking evidence. The result qualifies the proposed predictor while leaving room for the choice of contexts to account for some of the gains.

Seeing where useful terms lie

The authors use judged-relevant documents for a separate, retrospective analysis. For the query ocean remote sensing, they identify terms that occur frequently in that relevant material after stopword removal and stemming. They treat these terms as plausible expansion candidates. The set displayed includes the top 50 terms by this frequency criterion and a sample from the initial query likelihood retrieval. The relevance judgments determine how the candidate terms are identified in the visualization. They play no such role when the actual system has to select expansion terms for a query.

The comparison puts the candidates and a representation of the query into a two-dimensional view of each embedding. In the global view, the terms marked as promising are interspersed with terms having low or no frequency in relevant documents. In the local view, promising terms cluster more closely and occupy space near the query. The paper uses that arrangement to suggest an explanation for improved term selection. If relevant-document vocabulary receives more of the similarity weight around a query, it has a better chance of being selected for expansion.

This complements the gasoline tax illustration. In that case the reader sees how the neighbors of cut emphasize a use appropriate to the topic. In ocean remote sensing, the reader sees how terms selected by an independent relevance-based criterion are arranged relative to a whole query. One diagnostic shows a shift in the apparent use of a word. The other gives a picture of the neighborhood from which expansion candidates may be drawn. Both provide concrete cases consistent with the training rationale.

The projection gives qualitative evidence for one query. A two-dimensional view does not completely determine the similarity scores in the original space, and the relevant-document frequency criterion is a proxy for an expansion term’s usefulness. An individual term may be frequent in relevant documents and still contribute little to the final order. The paper therefore stops short of attributing the measured gains to the clustering pattern alone. The ranking experiments establish the performance difference, while these analyses show some of the ways the learned spaces can differ.

Limitations

Limits identified by the authors

The authors explicitly identify the cost of query-specific training. Global vectors can be computed in advance and reused. In the proposed procedure, a query leads to document sampling and another word2vec training run before expansion can be applied. Reranking a shortlist reduces the amount of final retrieval work, but training still has to take place. The authors suggest learning representations offline at a level broader than individual queries and narrower than the entire corpus. A retrieval system could then select among those representations when a request arrives. The study leaves the effectiveness and cost of that approach open.

The authors are also explicit about uncertainty over the mechanism. The distribution-shift correlations provide little explanatory power, and the visual comparisons supply examples. Together they are insufficient for a firm account of why local training improves rankings. The strongest evidence is comparative, showing that the locally trained expansion performs better in the studied retrieval conditions. The paper calls for further theoretical and empirical work to explain the result.

The study contrasts expansion based on global embeddings with expansion based on local embeddings. The authors point to combining the two kinds of representation as a possible extension. The interpolation already present in the studied method serves a different purpose. It mixes the original query distribution with the expansion distribution after term weights have been learned. It gives no evidence about how to mix broad and local similarities or about when such a mixture would be preferable.

Finally, the authors propose that a sentence, paragraph, or document could play a role in other language tasks similar to the role the query plays here. That is a generalization of the method’s motivation. The empirical tests concern search expansion, and the paper does not measure effects on those other tasks. An application would need a way to use the proposed context to identify useful training text and a task-specific measure of whether its local representation helped.

Limits visible in the experimental setup

The method relies on the initial retrieval to find suitable training material. The document probabilities are estimates of topicality from the wording of the original query. When the initial results emphasize an unintended subject, those results can give the wrong contexts more influence during training. Sampling with replacement can reinforce that emphasis if the highest-weighted documents describe the wrong subject. This is a consequence of the design. The paper’s aggregate results and examples leave open how often it occurs and which kinds of queries are most susceptible.

The reranking boundary also constrains what the gains mean. An expanded query can promote a document only if it already falls within the first 1000 target results, and it can use an expansion term only if the initial target retrieval contains it. A relevant document outside the shortlist stays outside the reranking comparison. An unrestricted second search could use the expanded query to reach different documents, but the reported experiment does not measure that behavior. The precision–recall curves describe the tested setup with its candidate boundary.

The comparisons give evidence across newswire and filtered Web retrieval. They leave other domains and collection conditions open. In particular, web was filtered using a spam-rank threshold, and the paper uses Common Crawl GloVe as a global Web-scale comparison instead of training a global embedding over the full Web target. The global target comparisons are closer in source for the newswire datasets. Results for one target therefore cannot, on their own, distinguish query-specific selection from every other difference between the available embeddings.

The setup also leaves a gap between vector-relatedness and an account of relevance. A term can receive a high score because it tends to appear in local contexts similar to those of the query words. Relevance still depends on what the document says about the subject, and common topical vocabulary can occur in marginal material. The system tests the worth of that relatedness through ranking, so it can accommodate imperfect individual associations. Its success on retrieval measures does not establish that the induced neighborhoods resolve senses reliably or capture every distinction useful for interpreting a query.

The significance result compares the best local and global entries across the studied collections. It supports the direction of their aggregate comparison. It cannot establish that local expansion wins on each query, and the weak divergence correlations offer little basis for selecting queries by that statistic alone. The careful reading is that the local approach earns its additional training cost in measured retrieval effectiveness under the tested setup, with open questions about how to identify when that cost will pay off for a particular search.

What came after

The later works that cite this study touch different parts of its question about word use and retrieval. Their titles identify the direction of each study, and the citation establishes a connection to the earlier paper. The details of how each work uses that citation are unspecified. The distinctions below concern the approaches the titles identify and how their stated subjects relate to locally trained expansion.

COIL revisits exact lexical matching through a contextualized inverted list. The local expansion paper puts context into the similarities used to give additional terms weight. The direction named by COIL puts contextual information alongside exact lexical matching itself. This is a different place in the search process to make context matter. A term-based ranking can use context when deciding which words to add to a query or when deciding how to interpret a match between occurrences of the same word. The citation connects the approaches without establishing that COIL adopts the earlier paper’s document sampling or query-time training. COIL

IR like a SIR describes sense-enhanced information retrieval for multiple languages. Its stated focus meets the earlier paper at the problem of how the intended use of a word affects search. In query-specific expansion, the selection of training documents can make a topical sense more prominent within the learned space, as in the example of cut. IR like a SIR names word senses directly as the basis of its enhancement and extends the stated setting to multiple languages. The citation indicates that the earlier study is part of the work it addresses. It does not specify a shared way to train or use the word representations. IR like a SIR

The later paper on bias addresses origins, evaluation, and mitigation in large-scale language systems. This is a broader setting for questions about what learned representations reflect from their data. The retrieval study demonstrates that changing which documents supply word contexts can change the associations used for a downstream decision. Its evaluation concerns relevance and search ranking, with no bias assessment. The citation places it in the later work’s reading of the field without identifying a specific bias mechanism or mitigation derived from local query expansion. Bias in Large Language Models

Cite

Cite as Fernando Diaz, Bhaskar Mitra and Nick Craswell. 2016. Query Expansion with Locally-Trained Word Embeddings. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/p16-1035

@inproceedings{diaz2016query,
  title = {{Query Expansion with Locally-Trained Word Embeddings}},
  author = {Fernando Diaz, Bhaskar Mitra and Nick Craswell},
  booktitle = {Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2016},
  doi = {10.18653/v1/p16-1035},
  url = {https://doi.org/10.18653/v1/p16-1035}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/diaz-2016-query-expansion-locally-trained-word/