Decoding a Neural Retriever's Latent Space for Query Suggestion
Paper · 2022 · Leonard Adolphs, Michelle Chen Huebscher, Christian Buck et al.
Summary
A search system can miss the right passage even when the information is present in its collection. Sometimes the problem is the wording of the query: another expression of the same need would have led to better results. With a conventional keyword system, the connection between wording and retrieval is relatively visible. Adding a term changes which documents match and how strongly they score. A neural retriever makes that connection harder to inspect because it converts queries and passages into numerical representations before comparing them. Leonard Adolphs and colleagues investigate whether those representations can be translated back into useful search queries. Their central device is a query decoder: a generator trained to recover a query from the vector produced by a fixed retriever.
The paper uses GTR-base, a shared encoder that places queries and passages in a common representation space. The authors train a T5-based decoder on queries and their GTR representations, then test whether it can reconstruct unseen queries. Reconstruction is approximate rather than exact, but the generated wording typically retains a representation close to the original. On the MSMarco evaluation queries, word-overlap F1 is 0.750 and cosine similarity after re-encoding is 0.960. On NQ, the corresponding values are 0.886 and 0.980. The decoder can also start from a passage representation and generate a query that retrieves that passage. These experiments establish a practical connection between numerical retrieval representations and readable search expressions.
The authors then use that connection to manufacture training examples for query rewriting. Given a training query and its human-labeled relevant passage, they move through representation space along the line joining their vectors. Decoding intermediate points produces candidate reformulations. Some retain much of the original wording; others adopt details associated with the target passage. The authors keep candidates that retrieve the labeled passage in the leading position, improve its retrieval score over the original query, and increase the relevant vector inner product. Their main account reports 863,307 retained rewrites. The procedure uses existing relevance judgments rather than requiring people to write a new reformulation for every query.
Those synthetic pairs train query suggestion systems. The stronger version, qsT5, receives both the original query and the passages initially retrieved for it. This is pseudo-relevance feedback: the system treats early search results as potentially useful context without assuming that a person has verified their relevance. A comparison version, qsT5-plain, receives only the query. The experiments evaluate collections of suggestions by asking whether at least one candidate, considered alongside the original query, retrieves the labeled passage effectively. Across MSMarco and NQ, qsT5 exceeds the tested alternatives, including grammatical question rewriting, conventional feedback-based term expansion, and random perturbations decoded from the query’s neighborhood. The advantage over qsT5-plain indicates that the retrieved passages provide useful information beyond the original wording.
The contribution is both diagnostic and practical. Decoding makes some consequences of a retriever’s representations readable, while movement toward known relevant passages supplies supervision for a suggestion system that can operate without knowing the target passage at inference time. Yet retrieval success is not equivalent to preserving a person’s intent. Some generated questions drift towards secondary topics in a passage, and some achieve strong retrieval scores despite awkward or misleading wording. The evaluation also chooses the strongest candidate after measuring retrieval against a known target; it does not demonstrate that a user or automatic selector would identify that candidate. The authors therefore present promising automatic evidence for query suggestion, while leaving user studies and a fuller end-to-end search evaluation unresolved.
Interesting ideas
Make internal representations inspectable. A readable decoder can expose information that is otherwise difficult to connect with system behavior. Its output is not a complete explanation, but it gives researchers something concrete to compare with inputs, targets, and failures. This approach is useful wherever an intermediate representation influences decisions while remaining difficult to interpret directly.
Explore toward a known objective. Random alternatives reveal nearby possibilities, but movement towards a relevant target gives exploration a purpose. The paper turns that direction into candidate rewrites rather than treating the target representation as an answer on its own. Similar reasoning can guide repair searches, structured prediction, or configuration exploration when a trustworthy training target is available.
Separate candidate generation from acceptance. The decoder proposes reformulations, and retrieval checks decide which proposals become training examples. This makes it possible to explore broadly without treating every generated string as useful supervision. The same separation applies to automatically induced rules, annotation corrections, dictionary candidates, and synthetic exercises.
Ground rewriting in retrieved evidence. The initial search results can reveal entities, terminology, and interpretations that are difficult to recover from a short query alone. Conditioning on those results helps the suggestion system make more specific changes. The reusable lesson is to provide relevant observations when asking a system to revise its input, while retaining the possibility that those observations are misleading.
Measure several kinds of fidelity. Word overlap, representation similarity, retrieval performance, diversity, and fluency answer different questions. A system may preserve vocabulary while failing to retrieve, or improve retrieval while changing the question. Using complementary measurements prevents a convenient proxy from silently becoming the definition of success.
Distinguish candidate potential from usable selection. A collection can contain an excellent suggestion without offering a reliable way to recognize it. Reporting the best candidate against a known target reveals the collection’s potential, but it leaves selection unresolved. This distinction matters in search assistance, answer generation, repair proposals, and any workflow that produces alternatives for later judgment.
Inspect metric successes as well as failures. Some of the paper’s highest-scoring examples are semantically strange or reveal problems with the relevance label. Looking closely at successful outputs can uncover shortcuts and annotation weaknesses that an error-only analysis misses. This is especially valuable when a benchmark rewards reaching a recorded target instead of satisfying an independently verified information need.
Deep dive: Decoding a Neural Retriever's Latent Space for Query Suggestion
How a query decoder turns retrieval vectors into search suggestions, how synthetic rewrites improve retrieval, and where intent can drift. · about 38 minutes to read
How Mova uses it
Mova is a small language system written in Rust, with explicit linguistic structures, world state, rules, and statistical components. The connections below concern transferable methods rather than a claim that Mova implements this paper’s neural query decoder. The status marks describe proposals assessed against the documented mechanisms. They do not establish that an application has been measured, and the available evidence does not establish exhaustive coverage of Mova’s development history.
Idea: Make an internal representation readable. Where: Query Decoder, query reconstruction evaluation, and Table 1. Area: interpretability. Mova: частково є (prag frames, world reasons, and native decision traces). Mova already exposes structural observations and explanations, but it could also test whether a readable rendering preserves the information needed to reconstruct an original request. The proposed addition is a checked reconstruction experiment, not merely another explanation string. Its value would be measured by what survives the round trip and which distinctions disappear.
Idea: Keep a fixed reference while testing an interpreter. Where: Query Decoder, training. Area: experimental design. Mova: частково є (deterministic CPU reference behavior and regression-gated revisions). The paper trains the decoder while holding the retrieval encoder fixed. Mova could use the same separation when evaluating a new frame renderer, graph reader, or diagnostic adapter: freeze the producing component, then measure the interpretation layer. This would help attribute changes to the adapter rather than to simultaneous changes throughout the pipeline.
Idea: Compare wording fidelity with representation fidelity. Where: Query Decoder, query reconstruction evaluation. Area: evaluation. Mova: нове. Mova could compare an original request and a reconstructed request at both the word level and the frame or world-operation level. Why Mova: a surface change can preserve meaning, while a small lexical change can alter an argument, polarity, or referent. This is a proposed paired diagnostic; the digest does not establish that this exact comparison is implemented or measured.
Idea: Test whether a representation supports an intended downstream action. Where: Query Decoder, paragraph-to-query evaluation, and Table 2. Area: operational evaluation. Mova: частково є (configured capability resolution and native worker adapters). A readable description of a task representation could be fed back through the bounded planner to check whether it selects the same admitted operation and arguments. This would test practical recoverability. A successful round trip would still establish only behavior within configured capabilities, rather than general understanding.
Idea: Explore toward a known objective. Where: Query Decoder, latent space traversal decoding, and Equation 1. Area: search and mathematics. Mova: нове. A structural analogue could explore bounded edits that move an analysis towards a reviewed target, such as repairing an incorrect role assignment while retaining unaffected relations. Why Mova: directed exploration could spend less effort on irrelevant alternatives. Unlike the paper’s vectors, Mova’s typed structures do not automatically admit linear interpolation, so an explicit edit space and distance would need separate justification.
Idea: Keep intermediate candidates rather than only the endpoint. Where: latent space traversal decoding and the discussion following Figure 3. Area: search. Mova: нове. A repair process could retain intermediate analyses and test them before adopting a fully target-shaped result. Why Mova: an endpoint can introduce information from the target that the original input does not support. This proposal borrows the paper’s caution about passage-driven drift without claiming that intermediate structural edits necessarily preserve meaning.
Idea: Separate candidate generation from acceptance. Where: Query Suggestion Model, dataset generation. Area: data admission. Mova: вже є (mova-enrich preparation, review, staging, and separate admission; dictionary proposal and review gates). The paper’s generation-and-filtering design reinforces an existing Mova boundary. Generated rewrites, rule candidates, and lexical proposals should retain their proposal status until the relevant checks pass. The useful connection is methodological; it does not show that the paper’s retrieval filters would be sufficient for Mova’s knowledge admission.
Idea: Require a candidate to improve the original case. Where: Query Suggestion Model, dataset generation. Area: evaluation. Mova: частково є (held-out self-play, rule audits, and same-question comparison in enrichment). The paper excludes reformulations that fail to improve over the original query. Mova could apply an explicit unchanged-input baseline to each proposed repair or rewritten exercise. This would distinguish a candidate that works from one whose success was already available, while preserving regression checks over cases beyond the motivating example.
Idea: Combine an external outcome with an internal compatibility check. Where: successful-reformulation filtering in dataset generation. Area: validation. Mova: частково є (UD structural gates, source-bound enrichment validation, and dictionary compatibility checks). The authors check retrieval success and a vector relation to the target. Mova’s corresponding checks would be typed and task-specific: a repair must help the downstream reader while retaining a valid tree and supported roles. The proposal is to document these as distinct obligations, because satisfying one does not establish the other.
Idea: Ground rewriting in retrieved evidence. Where: Query Suggestion Model, model training, and the qsT5 comparison. Area: retrieval and pragmatics. Mova: частково є (dictindex occurrence retrieval and source-bound enrichment packets). Mova could use retrieved sentence witnesses to propose a clearer query or lexical lookup, with every added term connected to its source. Its existing evidence retrieval provides part of the mechanism. A measured rewriting policy that improves search while preserving the original request is not established by the digest.
Idea: Treat retrieved context as provisional. Where: pseudo-relevance feedback setup and the discussion of sparse relevance judgments in Limitations. Area: provenance and reasoning. Mova: вже є (source provenance separated from narrative facts, attributed content, and review-only consultant notes). Initial search results can suggest interpretations without proving them. Mova’s explicit evidence types should preserve that distinction when retrieved material influences a proposed rewrite. A passage’s presence in the result set must not turn its claims or its interpretation into accepted knowledge.
Idea: Compare contextual revision with query-only revision. Where: qsT5 and qsT5-plain training and evaluation. Area: controlled comparison. Mova: нове. A future rewriting experiment could compare the same task with and without retrieved witnesses while keeping the remaining procedure as similar as possible. Why Mova: this would show whether the evidence context helps, rather than attributing every gain to the rewriting rules themselves. The paper motivates the comparison, but its results do not predict the outcome for Mova.
Idea: Distinguish semantic repair from grammatical polishing. Where: the MQR baseline and the retrieval results discussion. Area: syntax and evaluation. Mova: частково є (separate parsing, frame reading, and world answering). A grammatically improved question need not identify the desired entity or relation more accurately. Mova could report grammatical validity separately from task success when assessing rewritten requests. This fits its existing layer boundaries, while requiring an explicit evaluation if used to judge a new rewrite mechanism.
Idea: Compare directed exploration with undirected alternatives. Where: the Sampling+QD baseline. Area: experimental controls. Mova: нове. A proposed structural search could be compared with admissible edits chosen without target-directed information. Why Mova: otherwise, gains from producing more alternatives might be mistaken for gains from the search strategy. The control would need the same candidate budget and relevant validity constraints; the paper does not supply those choices for Mova’s discrete structures.
Idea: Measure the value of alternatives without assuming equal trust. Where: query suggestion evaluation and Figure 5. Area: evaluation. Mova: частково є (top-K mathematical judging and retained explanations). Mova can already examine multiple candidate solutions in some tasks. A query or repair experiment could separately record the strongest available candidate and the one its actual judge selects. This would locate whether the difficulty lies in generating useful alternatives or recognizing them, without turning retrospective success into a deployment claim.
Idea: Preserve the original request among alternatives. Where: query suggestion evaluation, where the original query remains in the evaluated candidate set. Area: operational behavior. Mova: нове. A rewriting component could retain the original request alongside its proposals and expose the reason for preferring any revision. Why Mova: automatic rewriting should not silently erase a valid starting interpretation. This is a candidate-handling proposal, not evidence that retaining the original alone prevents intent drift.
Idea: Measure diversity independently of success. Where: Diversity & Fluency and Table 6. Area: statistics and evaluation. Mova: нове. For rule-based query variants or candidate analyses, Mova could measure whether alternatives differ in meaningful structural decisions rather than only in wording. Why Mova: repeated expressions can create the appearance of broad exploration while contributing little additional coverage. The paper’s Self-BLEU analysis motivates the distinction, but a structural diversity measure would require its own definition and validation.
Idea: Keep fluency separate from correctness. Where: Diversity & Fluency and the MQR comparison. Area: evaluation. Mova: частково є (structural validation separated from downstream school and reader scores). A fluent rewritten question can still choose the wrong referent or ask a different question. Mova could retain grammatical checks while requiring independent task evidence. The paper’s perplexity measurements are not proposed as a necessary Mova component; explicit grammar and observed downstream behavior are more consistent with its current direction.
Idea: Check whether ambiguity has been resolved or merely replaced. Where: the Quincy traversal in Figure 2 and Table 15. Area: pragmatics and reference. Mova: частково є (sense selection, coreference reasons, and missing_context in the configured planner). A rewrite that adds a location may disambiguate a name, but one that changes a location question into a climate question has altered more than reference. Mova could log those changes separately and require supporting context before admitting either interpretation.
Idea: Distinguish a narrowing of scope from a change of requested relation. Where: the stock-market traversal in Table 4 and the currency example in Table 18. Area: semantic parsing. Mova: нове. Frame comparisons could identify whether a rewrite restricts an entity class or replaces the relation being asked about. Why Mova: both can improve retrieval, but only some preserve the information need. The digest contains the necessary kinds of roles and world observations, but not this particular rewrite-admission procedure.
Idea: Use metric successes to audit labels. Where: Tables 18 and 19 in the additional traversal examples. Area: data quality. Mova: частково є (reviewed disagreements, retained evidence, and corpus source checks). Mova could queue cases where an improved score coincides with a substantial change in the question’s frame. Such cases may indicate a faulty target rather than a useful repair. The proposal preserves disagreement for review; it must not automatically replace an assessment label or promote the successful output into training material.
Idea: Explain why a target was reached. Where: the declaration example in Table 17 and the aircraft-and-car example in Table 19. Area: interpretability. Mova: частково є (rules and answers retain reasons). Mova could attach a diagnostic explaining which added term, changed role, or selected sense accounts for retrieval improvement. This would make suspicious shortcuts easier to inspect. The paper shows that target retrieval can occur without an intuitively good question, so the explanation would remain a diagnostic instead of a proof of preserved intent.
Idea: Learn coordinated expressions rather than isolated expansion terms. Where: the private-pilot example in Table 14. Area: lexical semantics and multiword expressions. Mova: частково є (prag idioms, expression knowledge, and dictionary occurrence frames). A phrase can carry a useful interpretation that its words do not supply independently. Mova could use exact sentence witnesses when proposing coordinated expansions or multiword dictionary entries. The paper motivates this application, while Mova’s existing provenance and dictionary admission rules would still determine whether a proposal is acceptable.
Idea: Use source context to disambiguate proper names. Where: the Shopko example in Table 12. Area: entity resolution. Mova: частково є (entity aliases in configured deployments, coreference, and indexed corpus witnesses). Retrieved context can supply a location that distinguishes an entity from similarly named alternatives. Mova could retain the witness for that location and expose uncertainty when the context conflicts. This does not authorize filling missing arguments from an unsupported guess.
Idea: Keep synthetic supervision distinct from human-written supervision. Where: dataset generation and the MQR baseline. Area: data provenance. Mova: вже є (teacher silver, source-bound proposals, and separately admitted training). The paper compares automatically generated retrieval-oriented rewrites with human question edits, which serve different purposes. Mova should preserve comparable distinctions in its training records. Synthetic origin does not make an example unusable, but neither does a successful automatic check give it the same evidential role as reviewed instruction.
Idea: Record unsuccessful candidates as diagnostic evidence. Where: traversal analyses and additional examples. Area: learning records. Mova: частково є (self-play journals, rejected tree edits, and explicit gaps). A search path contains information beyond its final accepted rewrite. Mova could retain why candidates failed—invalid structure, changed meaning, or no task improvement—so later experiments do not repeatedly rediscover the same failure. The existing journals support this principle, though a query-rewriting implementation and its effects remain unknown.
Idea: Check domain transfer separately from in-domain improvement. Where: evaluation on MSMarco and NQ after suggestion training on MSMarco-derived pairs. Area: evaluation. Mova: частково є (multiple treebank measurements and distinct school and reader tasks). A rule or rewrite strategy should be assessed where it was developed and in a separately defined setting. The paper’s cross-dataset comparison supports this experimental discipline; it does not establish that its approach transfers to Mova’s linguistic or operational tasks.
Idea: Separate uncertainty from system variation. Where: Figure 5 and Appendix A.1. Area: statistics. Mova: частково є (deterministic repeatability requirements and paired checks where relevant). The authors use resampling to characterize variation in their suggestion evaluation. Mova could similarly distinguish variation caused by candidate generation from uncertainty caused by the sampled assessment cases. An appropriate analysis would depend on the task; deterministic execution alone does not show that an observed advantage generalizes.
Idea: Audit dataset accounting before training. Where: Appendix A.3 and Table 11. Area: data processing. Mova: частково є (source fingerprints, immutable versions, and source verification). The paper reports inconsistent rewrite totals in its prose. Mova could require a manifest that binds accepted record counts to exact source and split identities. This would make discrepancies visible before learning begins. The proposal strengthens accounting; it does not imply that the paper’s reported results are invalid.
Idea: Measure the complete decision process. Where: Limitations, including the discussion of end-to-end search and reranking. Area: system evaluation. Mova: частково є (worker outcomes inspected beyond transport success and school assessment separated from teaching). Mova should evaluate whether a proposed rewrite improves the final admitted answer or action, not only an intermediate retrieval score. Existing boundaries express that principle, but any new retrieval-assisted capability would need task-specific evidence.
Idea: Test human usefulness independently of automatic target recovery. Where: Limitations. Area: human evaluation. Mova: нове. A future suggestion interface could examine whether people understand the alternatives, recognize changed assumptions, and select useful variants. Why Mova: a transparent logical module should help users make informed decisions, and automatic target recovery cannot establish that benefit. The paper explicitly leaves this question unresolved; there is no evidence here of a measured Mova user study for such an interface.
Idea: Keep representation decoding within a bounded role. Where: Query Decoder and the distinction between latent traversal and deployed query suggestion. Area: architecture. Mova: частково є (explicit capability interfaces and experimental combinatorial boundaries). A diagnostic component can inspect an intermediate state without becoming an unrestricted task planner. For Mova, a readable reconstruction should remain an observation until the relevant parser, source, capability, and admission checks establish what can be done. The authors’ decoder is useful precisely because its role is narrower than solving the entire search problem.
The problem and its context
Why query wording becomes difficult to reason about
The paper belongs to information retrieval, where a system ranks documents or passages in response to a request. A query is often short, incomplete, or ambiguous. The user may name an entity without specifying which one, omit a useful technical phrase, or describe a relation in language unlike that of the relevant passage. Search quality therefore depends on more than whether a collection contains an answer. It also depends on how the retrieval mechanism connects the query with that answer.
The authors contrast conventional sparse retrieval with dense neural retrieval. A method such as BM25 uses statistics associated with words. Although its behavior can still be complicated, the role of query terms remains relatively direct. If a target passage contains a useful expression, adding that expression to the query offers an understandable route toward retrieving it. Relevance feedback builds on this connection by using information from relevant or apparently relevant documents to adjust the search.
A dense retriever instead represents a query and each candidate passage as vectors. These vectors are compared using a numerical similarity function. This can connect different expressions of related meanings without requiring the same words. The difficulty is that changing a word does not have an easily predictable effect on the vector. A more grammatical question might move in an unhelpful direction, while an unusual expression might happen to match a target passage well.
The paper identifies several practical concerns. Neural retrieval can perform poorly outside the domains on which it was developed. Its similarity decisions are hard to explain through visible term contributions. Small wording changes can also produce unexpectedly different results. The authors do not claim that decoding resolves all these problems. They investigate a narrower missing connection: whether a retriever’s numerical representation can be converted into a query that makes its retrieval behavior more inspectable and useful.
What earlier retrievers supplied
The paper describes Dense Passage Retrieval as a dual-encoder approach based on BERT. Separate encoding operations turn queries and documents into representations, and inner-product search identifies promising matches. The cited work connects this retrieval architecture with open-domain question answering, where a system must first locate evidence rather than assume that the relevant text has already been supplied.
GTR, the retriever used in the experiments, follows the broader dual-encoder approach but uses a shared encoder based on T5. The authors describe its earlier training as involving multiple stages, including MSMarco fine-tuning. The shared representation space is important for their method: a query vector and a passage vector can serve as endpoints of the same numerical path.
Other cited developments concern how dense retrieval is learned and improved. The paper discusses contrastive unsupervised retrieval and ANCE, alongside feedback methods that adjust dense query representations. The distinction the authors emphasize is user-visible output. Improving a representation internally does not necessarily provide a person with a readable alternative query. Their decoder is intended to make such alternatives available.
Why query suggestions matter beyond search ranking
Retrieved passages also support larger language-processing systems. The paper describes retrieval-augmented generation through earlier work that joins a retriever with a generator. It discusses RAG as combining retrieval with BART, and Fusion-in-Decoder as bringing multiple retrieved passages into answer generation.
The related-work account also connects retrieval with dialogue systems. In the cited retrieval-augmentation study, retrieved knowledge helps reduce unsupported factual statements in conversation. These applications make query formulation consequential: a later answer generator can only use the evidence that the retrieval stage makes available.
Earlier query-improvement methods approached the problem in different ways. Some used reinforcement learning, while other search-agent work explored refinements directly in language and used search operators to reach desired documents. The paper positions its approach as complementary. Instead of searching only through possible strings, it exploits a path through an already learned representation space and translates points on that path back into language.
Why a decoder is a plausible bridge
A fixed-vector decoder produces a sequence of words from a numerical input of fixed size. The related-work discussion places this idea beside sentence autoencoders, including continuous-space sentence generation and variational autoencoders. Those lines of research had already confronted a relevant problem: producing sensible text from more than a small set of familiar representations.
The authors also describe a shift from recurrent decoders toward Transformer-based generation, citing Attention Is All You Need among the architectural foundations. Their own question is more specific than general sentence generation. They want to decode vectors produced by a retrieval encoder, keep that encoder fixed, and determine whether the resulting language can help explain or improve search.
The method, step by step
Learn to reconstruct queries from fixed representations
The first stage creates the query decoder. The authors take a random sample of 3 million PAQ queries, encode each with GTR-base, and use the original query as the desired output. Training therefore pairs a numerical representation with the text that produced it. GTR-base is not jointly changed to make reconstruction easier. The learning problem is to interpret an existing retrieval representation.
The decoder is initialized from T5-base using the Transformers implementation. Only the decoder part is trained and used for this task. The appendix identifies the checkpoint as a 220M-parameter model and describes 12 decoder layers, 12 attention heads, and a hidden dimension of 768. Those details matter because reconstruction is performed by a substantial learned generator, not by a transparent algebraic inverse of the encoder.
The training configuration uses a batch size of 64, dropout of 0.0, a base learning rate of 0.0005, and 100 warm-up steps. AdamW is the optimizer, with weight decay 0.01. The appendix reports 5M fine-tuning steps and a training duration of 130 hours on 16 Cloud TPU v3. The authors examine several learning rates instead of conducting a comprehensive parameter search, then choose a checkpoint using held-out development performance.
The term “inverse” should be read operationally. A query representation need not preserve every original word, and different queries can express nearly the same request. The decoder is trained to produce a likely query associated with the vector. The experiments ask how close that reconstruction is and whether the decoded wording retains useful retrieval behavior.
Check reconstruction in language and representation space
The first evaluation sends an unseen query through GTR-base and then through the decoder. The generated query is compared with the original using word-overlap F1. This tests how much wording is recovered, but it cannot fully characterize meaning. A paraphrase can lose overlap while preserving the request, and a superficially similar sentence can change an important detail.
The authors therefore perform another encoding step. They encode the generated query with GTR and compare its vector with the original query vector using cosine similarity. This asks whether the decoder’s output returns to a nearby position in the retriever’s own representation space. It is a complementary check rather than an independent semantic judge: both sides are interpreted by the same retriever whose behavior is under investigation.
The paper’s illustrative reconstruction changes the wording of a question about a world chess champion into a question about the best chess player. The example makes the measurement issue clear without establishing that these expressions are interchangeable in every context. A decoder can preserve broad subject matter while changing the exact relation requested.
Decode a query from a passage
The next experiment starts from a relevant passage rather than from a query. GTR-base encodes the passage, the query decoder generates a search expression, and the retriever searches the collection using that expression. Success is measured by where the original passage appears in the results.
This is a stronger behavioral test than simply asking whether the generated question looks related to the passage. The output must lead the retriever back to its source passage. At the same time, the test remains passage-centered. A paragraph can support several questions, so a successful decoded query does not necessarily recover the wording or intent of the original human query associated with that passage.
The paper provides examples involving a cryptocurrency price passage and an election passage. In both cases, the passage-derived query retrieves the target in the leading position. Their role is to demonstrate that a representation learned for retrieval contains enough usable information for a decoder trained on queries to produce a viable search expression from a passage vector.
Traverse from a query toward its target passage
Directly decoding a passage can overemphasize whatever topics dominate that passage. The authors instead construct intermediate vectors between the original query and its labeled relevant passage. Their interpolation rule is:
qκ = q + (κ / k)(d − q), κ = 0, …, k
Here, q is the original query’s embedding, and d is the embedding of its human-labeled relevant passage. The symbol k gives the number of equal increments along the path. The index κ identifies the current position, and qκ is the vector at that position. The expression d − q gives the direction from the query towards the passage; multiplying it by κ / k determines how far to move before adding it to q.
The endpoints have different roles. At the query end, the decoder is reconstructing an input of the kind used in its own training. At the passage end, it is being asked to produce a query from a passage representation. Intermediate points are intended to combine the original request with information that makes the target easier to retrieve.
This is a numerical interpolation, not a guarantee of a smooth semantic transformation. Neighboring vectors can decode into repeated strings, abrupt changes, awkward expressions, or altered questions. The authors therefore examine retrieval behavior along the path rather than assuming that moving closer to the target vector always yields a better reformulation.
From retrieval representations to query suggestions
The steps in order.
Generate and filter synthetic rewrite pairs
For dataset construction, the authors begin with 532,761 queries from MSMarco-train and their labeled relevant passages. They set k = 20 for traversal and decode candidates along each query-to-passage path. The target passage is known during this offline stage because it supplies the direction of movement.
The authors report that more than 80% of the starting queries yield at least one reformulation that retrieves the target passage in the leading position. That observation concerns the generation process with access to the training target. It should not be confused with the performance of the later suggestion system, which must work without knowing the relevant passage.
A candidate enters the training collection only if it passes several conditions. Its nDCG must be 1, indicating that it places the labeled passage first under the paper’s evaluation. Its nDCG must exceed the score obtained by the original query. Its embedding must also have a larger inner product with the target passage embedding than the original query does.
These conditions connect observable retrieval behavior with the geometry used to generate candidates. They exclude unchanged successes and candidates that move in an unhelpful numerical direction. They do not explicitly test whether the original information need is preserved. The examples later in the paper show why this remains a separate concern.
The main text reports 863,307 successful rewrites. Appendix A.3 gives split sizes of 768,372 for training, 86,478 for development, and 8,457 for testing. Its prose also contains a different total, 863,207, whereas the associated table prints 863,307. That inconsistency should remain visible rather than being silently resolved.
Train a suggestion system that does not know the target
The query decoder and the final suggestion system perform different tasks. The decoder converts a vector into a query. The suggestion system takes an actual user query, optionally accompanied by its initial results, and predicts a useful rewrite. The synthetic pairs connect these stages: target-guided exploration produces examples from which a deployable system can learn.
Both suggestion variants start from T5-large. For qsT5-plain, the input is the original query and the target is an accepted rewrite. For qsT5, the input also contains GTR’s top-5 passages for that original query. The query and passages receive identifying text prefixes so that the system can distinguish their roles.
The feedback passages are available through ordinary retrieval at inference time. They are not the known gold passage supplied during latent traversal. This distinction is central to the paper’s practical contribution: privileged target information is used to create supervision offline, while the final system receives only information obtainable from an initial search.
The appendix reports an input limit of 1024 tokens and an output limit of 32 tokens. The training batch size is 128, dropout is 0.1, and the learning rate is 0.001 with 1000 warm-up steps. AdaFactor is used for optimization. The reported fine-tuning schedules are 40k steps for qsT5 and 31k for qsT5-plain, with each training run taking ∼24 hours on 16 Cloud TPU v3.
Generate alternatives and assess their potential
At evaluation time, the systems produce up to 10 suggestions using nucleus sampling. This generation procedure allows alternative outputs instead of forcing a single deterministic rewrite. The resulting candidate set is evaluated together with the original query.
The principal score is the strongest nDCG@10 obtained within the considered set. The paper examines different numbers of suggestions to see whether a small collection contains something useful. This matches a query suggestion setting in which a person might choose among alternatives, but the experiment itself does not observe that choice.
The authors make reproduction resources available under the project name query_decoder. Those resources accompany a method whose stages should remain conceptually separate: representation reconstruction, target-guided synthetic data construction, and query suggestion from information available during an ordinary search.
Experiments and results
Datasets and what the measurements mean
The decoder is trained using PAQ queries. Synthetic rewrite generation uses MSMarco-train, while the main suggestion evaluation uses MSMarco and NQ test sets. This arrangement lets the authors examine both performance on the dataset supplying rewrite supervision and behavior on another retrieval dataset.
The paper uses several measurements because no single score captures all the desired properties. Word-overlap F1 measures reconstruction in terms of shared words. Cosine similarity measures the relation between original and reconstructed query vectors. Passage recovery records whether a decoded query returns its source passage among highly ranked results.
For the main suggestion experiment, nDCG@10 rewards placing relevant material near the beginning of the retrieved list. The authors treat the labeled passage as the representation of the query’s information need. That makes the metric reproducible, but its interpretation depends on the quality and completeness of the relevance annotation.
Diversity and fluency are assessed separately. Self-BLEU compares suggestions for the same query: more overlap produces a higher value, so lower values indicate greater variation. Per-token perplexity is calculated with a T5-base language model trained on C4. The authors use lower perplexity as a relative sign of more fluent output, not as a direct measure of retrieval usefulness.
Reconstruction and passage recovery
For queries from MSMarco, the decoder obtains word-overlap F1 of 0.750. For NQ, the value is 0.886. After the generated queries are encoded again, cosine similarity with the original representations is 0.960 on MSMarco and 0.980 on NQ. Together, these results support approximate recoverability: the decoder often changes wording while remaining close under the retriever’s representation.
The passage-to-query test gives a different view. On MSMarco, the share of target passages retrieved in the top position is 0.551. The shares within the top-3 and top-5 are 0.737 and 0.796. On NQ, the corresponding reported values are 0.721, 0.863, and 0.897.
These figures show that decoding passage vectors can produce effective retrieval queries with considerable frequency. They do not mean that the decoder reconstructs a unique question implicit in each passage. A passage may answer several questions, and the evaluation accepts any decoded expression that retrieves that passage successfully.
The comparison systems
MQR tests whether making a query resemble a well-written question is sufficient. The authors fine-tune T5-large using 427,719 human question-edit histories from Stack Exchange. These examples teach a mapping from poorly formed questions to improved versions. The baseline does not receive retrieved passages.
RM3 represents a conventional feedback-based expansion strategy. It extracts important terms from the top-5 retrieved documents using a relevance formulation with µ = 2500. Each suggestion consists of the original query with a selected term added. Unlike full rewriting, this procedure preserves the starting expression and varies its expansion.
Sampling+QD tests whether gains can arise from local variation alone. The method samples a point from a neighborhood around the original query vector and decodes that point. It has access to the query decoder but not to retrieved passages or a target-directed path at evaluation time.
The qsT5-plain comparison uses the paper’s synthetic rewrite supervision without feedback passages. It is especially informative because it separates the usefulness of the generated training pairs from the additional value of contextual evidence supplied by the first search.
Retrieval performance with multiple suggestions
The following comparisons use the best result obtainable from 10 reformulations together with the original query. They therefore measure candidate-set potential. The original query provides a baseline, while the suggestion scores assume that the strongest available retrieval outcome can be identified retrospectively.
MSMarco test, best-of-10 suggestions and original query, nDCG@10
Feedback-conditioned rewriting yields the strongest candidate-set retrieval score among the tested systems.
The numbers
| System or setting | nDCG@10 |
|---|---|
| Original Query | .420 |
| MQR | .477 |
| Sampling+QD | .506 |
| RM3 | .522 |
| qsT5 (this paper) | .554 |
| qsT5-plain | .508 |
The MSMarco results show that several forms of reformulation provide useful alternatives to the original query. Grammatical editing helps, and random local decoding also produces candidates that improve the best available retrieval outcome. The full qsT5 system is stronger than these alternatives and than the feedback-based term expansion baseline.
The comparison between qsT5 and qsT5-plain is particularly important. Both learn from the synthetic rewrites, but only the former reads the initially retrieved passages. Their separation supports the authors’ conclusion that feedback context helps the generator choose useful changes rather than relying only on the original query and learned associations.
NQ test, best-of-10 suggestions and original query, nDCG@10
The feedback-conditioned system also leads on the dataset not used to generate its rewrite supervision.
The numbers
| System or setting | nDCG@10 |
|---|---|
| Original Query | .495 |
| MQR | .571 |
| Sampling+QD | .580 |
| RM3 | .589 |
| qsT5 (this paper) | .637 |
| qsT5-plain | .577 |
The NQ comparison follows the same broad pattern. The full system has the strongest reported candidate-set score, while the query-only system remains much closer to local sampling and question editing. This is evidence of useful transfer across the evaluated datasets, but not a demonstration of general robustness across domains.
The authors describe qsT5 as significantly better than the tested baselines on both datasets. Their main figure includes bootstrap confidence intervals derived from the generated candidates, and the appendix reports associated variability. Those estimates qualify the automatic comparison; they do not address uncertainty about a person’s intended interpretation or ability to choose a suggestion.
Diversity and fluency
The output characteristics clarify why retrieval scores alone are incomplete. On MSMarco, MQR has Self-BLEU of 46.1, while RM3 has 74.8. The full qsT5 system has 17.8, and qsT5-plain has 9.2. The relatively high overlap for RM3 follows from its construction: every candidate retains the original query and appends a term.
The same ordering is broadly visible on NQ. MQR has Self-BLEU of 61.4, RM3 has 88.0, qsT5 has 18.4, and qsT5-plain has 7.6. The query-only variant is the most varied under this proxy, but that variation does not make it the strongest retriever. Diversity can include unsupported or off-topic changes.
MQR produces the lowest reported suggestion perplexity: 59.6 on MSMarco and 56.8 on NQ. For qsT5, the reported values are 247.8 and 223.2. Sampling+QD has 726.0 on MSMarco and 687.5 on NQ, consistent with the examples in which local vector perturbations decode into awkward language.
The table therefore supports a tradeoff rather than a single universal ranking. Grammatical editing is especially fluent but comparatively repetitive. Local decoding can explore alternatives while damaging readability. Feedback-conditioned rewriting combines substantial variation with better fluency than direct random decoding, while also achieving stronger retrieval performance.
What the examples add
A query about the creator of Spiritual Gangster illustrates contextual grounding. The relevant passage describes a brand associated with yoga. Feedback-conditioned suggestions can draw on that topic, whereas query-only generation can attach “gangster” to unrelated interpretations. The example shows how retrieved text can supply the connection needed for a useful revision.
The private-pilot example makes a related lexical point. A short query contains an abbreviation, and successful suggestions expand it into a meaningful phrase. RM3 identifies useful individual terms but adds them separately. Full rewriting can coordinate them within a question, which is a different capability from merely recognizing important words.
These examples are explanatory, not a replacement for aggregate evaluation. The authors identify the main illustrative suggestion example as selected to display characteristic behavior. It helps a reader understand the quantitative comparisons, while leaving open how frequently any particular success or failure pattern occurs.
What the ablations show
Retrieved context is the clearest controlled factor
The strongest controlled comparison is between qsT5 and qsT5-plain. Both use T5-large and synthetic reformulations generated through the same general procedure. Their key difference is whether the initial retrieved passages accompany the original query.
The full system’s stronger results support the claim that this context matters. Short queries often omit distinctions that are recoverable from the first search results: a place name, an entity category, or the expansion of an abbreviation. Supplying those observations allows the suggestion system to make changes that are more closely connected with the current retrieval situation.
The comparison does not establish that every feedback passage is useful or that the system reasons explicitly about source reliability. It shows an aggregate benefit from the contextual input. A misleading initial result set can still encourage an inappropriate interpretation, and the paper does not isolate that risk through a dedicated adversarial feedback experiment.
Better grammar explains only part of the gain
MQR provides a control for question polishing. Its training data concerns human edits that improve poorly formed questions, rather than rewrites selected for retrieval success. Its gains over the original query show that presentation and phrasing can matter.
Yet the full qsT5 system exceeds MQR, and the query-only synthetic system can also do better when multiple MSMarco suggestions are considered. This indicates that the paper’s supervision teaches something beyond adding conventional question syntax. It can encourage terminology and topic choices associated with successful retrieval.
The comparison is not perfectly matched in every respect. The training collections differ in origin, size, and objective. MQR also receives its own training configuration. The result therefore supports the usefulness of retrieval-oriented supervision, but does not isolate a single cause with all other factors held constant.
Local variation explains some query-only behavior
Sampling+QD asks whether simply exploring a query’s neighborhood can produce useful alternatives. Its performance is frequently close to qsT5-plain. The authors interpret this as suggesting that some benefit of the query-only system may come from generating several nearby formulations.
This is a restrained interpretation. The experiment does not prove that qsT5-plain literally performs latent sampling internally. It shows that an explicit local-sampling procedure achieves similar retrieval potential under the chosen evaluation. That makes local diversity a plausible contributor to the observed gain.
The important contrast is with the feedback-conditioned system. Its advantage suggests that useful information from retrieved passages contributes more than an undirected collection of nearby expressions. It also explains why the paper’s central practical result is not merely that decoding can generate many variants.
Term expansion is weaker than full contextual rewriting
RM3 and qsT5 both use pseudo-relevance feedback, but they expose that information differently. RM3 selects individual terms and appends them to the original query. qsT5 generates a new expression conditioned on the query and passage text.
The stronger qsT5 results indicate that the richer operation is useful in this setting. The examples suggest possible mechanisms: adding a coordinated phrase, resolving an entity’s location, or shifting to terminology that better matches the relevant material. These are more flexible changes than adding a single word.
However, the comparison evaluates complete methods instead of a tightly isolated phrase-composition mechanism. It does not establish how much of the gain comes from phrase formation, entity disambiguation, syntax, or the broader training objective. Those remain plausible explanations supported by examples rather than separately measured components.
Traversal reveals a useful region and a risky endpoint
The traversal analysis measures decoded queries along the line from query to target passage. Average nDCG generally improves as the input moves toward the passage, then levels off and declines slightly near the end.
The authors offer several explanations for that final decline. The decoder is trained on query representations, so passage-like inputs may be less familiar. Queries and passages can occupy different regions in spite of sharing an embedding space. A passage may also contain answers to several questions, making its representation an imperfect target for preserving a particular request.
These explanations are hypotheses informed by the observed curve. The paper does not independently manipulate each proposed cause. What it establishes directly is that the endpoint is not always the most useful place to decode, which supports examining intermediate candidates.
Case studies expose what automatic success can hide
The stock-market example moves from a broad request about yearly returns toward wording associated with a particular stock index. Retrieval improves, but the question becomes more specific. This may be a helpful clarification, or it may introduce an assumption the user did not intend.
The Quincy example goes further. The original request concerns location, while later candidates ask about climate or rainfall because those subjects are prominent in the target paragraph. Such changes reveal how a passage-directed objective can reward a question different from the starting one.
The currency example is more troubling because the authors identify the labeled passage as unsuitable for the original information need. Movement toward that target changes a question about money in circulation into one about denominations. The search procedure succeeds at reaching its assigned target while exposing a problem with the assignment.
Finally, the aircraft-and-car example shows that strange language can retrieve a target exceptionally well. This demonstrates a gap between a retriever-compatible expression and a good human-facing suggestion. It is also why the paper’s qualitative analyses are necessary even after strong automatic scores have been reported.
Limitations
Limitations stated by the authors
The authors explicitly identify the absence of a user study. Their automatic task asks whether a suggestion can retrieve the labeled passage, but people may interpret a query differently or prefer a suggestion that preserves a nuance not captured by that label. Designing reliable human judgments is difficult when a suggestion introduces an interpretation that was not obvious in the starting query.
This difficulty does not make human evaluation unnecessary. It explains why the current experiment cannot establish the full usefulness of a suggestion interface. A person must recognize a relevant alternative, decide whether it still expresses the intended request, and understand any additional assumptions. None of those decisions is directly measured.
The authors also leave fuller end-to-end retrieval evaluation unresolved. Their preliminary MSMarco investigations were inconclusive. A complete search pipeline would require selecting or combining candidates, retrieving passages, and potentially reranking results. Performance at the suggestion-generation stage does not determine the outcome of that entire process.
Sparse relevance annotation is another stated obstacle. A query can have several relevant passages even when the benchmark records only a limited target. Near-duplicate passages further complicate the distinction between genuine failure and disagreement with the recorded label. The authors suggest that deeper manual assessment of a smaller query collection would help.
The evaluation reveals potential rather than automatic selection
A careful reading must distinguish a candidate set from a decision rule. The reported best-of-set result uses the known target to identify the strongest available query. The original query also remains available, so the experiment asks whether generating alternatives creates an opportunity for improvement.
That is a useful measurement for suggestion, but it is optimistic about selection. A user may overlook the effective candidate or choose a fluent but misleading one. An automatic selector may also fail to distinguish useful specificity from changed intent. The paper does not provide a demonstrated solution to this recognition problem.
The distinction also affects comparisons with systems that produce a single final query. A collection can gain strength by covering several interpretations. Whether that coverage is worthwhile depends in part on the cost of presenting, evaluating, or executing the alternatives, which the principal score does not model.
Shared geometry does not guarantee shared meaning
High cosine similarity is evidence about the retriever’s own representations. It is not an external certificate that the decoded request means the same thing. Because the same encoder produces the vectors and evaluates their proximity, semantic weaknesses in that representation can remain invisible to the round-trip measurement.
Likewise, the line between a query vector and a passage vector is mathematically simple but semantically unconstrained. Intermediate points need not correspond to grammatical questions, preserve the requested relation, or introduce information gradually. The appendix examples show repeated outputs, sudden shifts, and expressions that are difficult to interpret.
The t-SNE visualizations help communicate individual trajectories, but their displayed proximity should not be treated as a complete account of the original representation geometry. The direct evidence remains the decoded language and its retrieval behavior. A visually appealing path does not establish a general semantic law.
Synthetic supervision can inherit target problems
The rewrite filter rewards retrieval of a labeled passage. If that passage only partially addresses the query, or addresses a different issue, the generated supervision can encourage the wrong transformation. The currency example demonstrates this concern within the paper’s own analysis.
Even with a suitable target, a paragraph may contain several answerable questions. A rewrite can exploit a distinctive secondary topic to retrieve the paragraph while failing to preserve the original request. The filtering conditions do not independently verify entailment between the original and revised information needs.
The authors argue that training smooths over some awkwardness in the generated data. The final system’s stronger fluency and retrieval results make that plausible at the aggregate level. They do not establish that intent-changing noise has been eliminated, nor does the paper provide a comprehensive human audit of the synthetic pairs.
Scope, comparability, and reporting boundaries
The main experiments concern a fixed GTR-base retrieval setting and the evaluated MSMarco and NQ data. The paper does not show that the same decoder works unchanged for another encoder, that another latent space has the same useful paths, or that the trained suggestion system transfers broadly to unrelated search domains.
The baselines also differ in more than one dimension. MQR uses a distinct supervision source, while RM3 performs a constrained expansion operation. These are relevant practical comparisons, but they do not isolate every architectural and data choice. The query decoder and suggestion systems are substantial learned components, with training costs that constrain parameter exploration.
There are reporting details that warrant caution. Appendix A.3 contains inconsistent rewrite totals. The fluency discussion also includes a general statement about dataset perplexity that is not uniformly supported by the table entries. The numerical table should therefore guide interpretation of the reported settings rather than an unqualified prose generalization.
Finally, decoding provides a behavioral window, not a complete explanation of a retriever. A readable suggestion shows one expression associated with a vector and one way to reach a passage. It does not identify all encoded information, explain every ranking decision, or establish that the retriever represents meaning in the way a person would.
What came after
Text Embeddings Reveal is a later work from 2023 that cites this study. Its title places it near the question of what information can be recovered from textual representations. That makes it a relevant continuation for readers interested in the recoverability side of the query-decoding problem.
The available account establishes the citation relationship but does not describe the later work’s method, experiments, or use of this paper’s findings. It therefore does not support a claim that the later authors adopted latent traversal, reused the synthetic reformulation procedure, or improved query suggestion performance.
The enduring distinction is between recovering readable information from a representation and turning that recovery into a reliable application. Adolphs and colleagues investigate both, but with different evidence: reconstruction and passage recovery support the decoding claim, while synthetic supervision and feedback-conditioned suggestions support the retrieval application. Any later extension should be assessed against the particular claim it advances.
Cite
Cite as Leonard Adolphs, Michelle Chen Huebscher, Christian Buck, Sertan Girgin, Olivier Bachem, Massimiliano Ciaramita and Thomas Hofmann. 2022. Decoding a Neural Retriever's Latent Space for Query Suggestion. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{adolphs2022decoding,
title = {{Decoding a Neural Retriever's Latent Space for Query Suggestion}},
author = {Leonard Adolphs, Michelle Chen Huebscher, Christian Buck, Sertan Girgin, Olivier Bachem, Massimiliano Ciaramita and Thomas Hofmann},
booktitle = {Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing},
year = {2022},
doi = {10.18653/v1/2022.emnlp-main.601},
url = {https://doi.org/10.18653/v1/2022.emnlp-main.601}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/adolphs-2022-decoding-neural-retriever-s-latent/