Generative Retrieval for Long Sequences

Hyunji Lee, Sohee Yang, Hanseok Oh, Minjoon Seo

Abstract

A common practice for text retrieval is to use an encoder to map the documents and the query to a common vector space and perform a nearest neighbor search (NNS); multi-hop retrieval also often adopts the same paradigm, usually with a modification of iteratively reformulating the query vector so that it can retrieve different documents at each hop. However, such a bi-encoder approach has limitations in multi-hop settings; (1) the reformulated query gets longer as the number of hops increases, which further tightens the embedding bottleneck of the query vector, and (2) it is prone to error propagation. In this paper, we focus on alleviating these limitations in multi-hop settings by formulating the problem in a fully generative way. We propose an encoder-decoder model that performs multi-hop retrieval by simply generating the entire text sequences of the retrieval targets, which means the query and the documents interact in the language model's parametric space rather than L2 or inner product space as in the bi-encoder approach. Our approach, Generative Multi-hop Retrieval(GMR), consistently achieves comparable or higher performance than bi-encoder models in five datasets while demonstrating superior GPU memory and storage footprint.

Introduction

Modern information retrieval is dominated by the bi-encoder paradigm, where queries and documents are mapped into a shared vector space. While effective for single-hop search, this approach faces significant challenges in multi-hop retrieval—tasks requiring a chain of reasoning across multiple documents. The authors identify two primary flaws in traditional bi-encoders: the embedding bottleneck, where increasing query complexity must be compressed into a fixed-size vector, and error propagation, where an early irrelevant retrieval can derail the entire reasoning chain.

Generative Multi-hop Retrieval (GMR)

To overcome these limitations, the authors propose Generative Multi-hop Retrieval (GMR). Instead of searching a vector space, GMR treats retrieval as a sequence-to-sequence problem. Given a query, an encoder-decoder model (based on T5) directly generates the text of the target documents token-by-token.

Comparison of Bi-Encoder Retrieval (BE) and Generative Multi-hop Retrieval (GMR) architectures.

Key Components

  • Constrained Decoding: To prevent hallucinations, GMR uses a prefix tree (trie) built from the corpus. This ensures the model only generates valid document sequences.
  • Corpus Memorization: Two pre-training strategies—LM Memorization and Multi-hop Memorization—help the model internalize the document collection and practice multi-step retrieval.
  • Dynamic Retrieval: GMR can generate a DONE token to stop retrieval dynamically, allowing it to adapt to the complexity of the query rather than being forced into a fixed number of hops.

Experimental Evaluation

GMR was evaluated across five diverse datasets requiring different reasoning types: HotpotQA (open-domain QA), Entailment TreeBank (reasoning trees), StrategyQA (implicit reasoning), Explagraphs-Open (commonsense graphs), and RuleTaker-Open (logical reasoning).

Results and Discussion

GMR consistently outperforms bi-encoder baselines in complex reasoning tasks. Notably, on the synthetic RuleTaker-Open task, GMR achieved a 51% success rate compared to 17% for the bi-encoder.

Performance comparison across EntailBank, Explagraphs-Open, and StrategyQA datasets showing GMR's robustness.

Advantages

  • Robustness to Sequence Length: Unlike bi-encoders, which struggle as the number of hops increases, GMR maintains consistent performance by interacting in the model's parametric space.
  • Storage Efficiency: By eliminating massive vector indices, GMR reduces the storage footprint by 70-80% compared to traditional MIPS-based systems.
  • Error Recovery: GMR demonstrates a higher likelihood of recovering from early-hop errors compared to vector-based models, which often fail once the representation shifts due to noise.

Conclusion and Limitations

While GMR shows great promise, it currently lags behind specialized models on HotpotQA, likely due to the lack of advanced training techniques like hard-negative mining. Additionally, token-by-token generation introduces higher inference latency compared to vector lookups. Future work will focus on scaling the prefix tree and memorization processes to web-scale corpora.

Summary updated

Abstract

A common practice for text retrieval is to use an encoder to map the documents and the query to a common vector space and perform a nearest neighbor search (NNS); multi-hop retrieval also often adopts the same paradigm, usually with a modification of iteratively reformulating the query vector so that it can retrieve different documents at each hop. However, such a bi-encoder approach has limitations in multi-hop settings; (1) the reformulated query gets longer as the number of hops increases, which further tightens the embedding bottleneck of the query vector, and (2) it is prone to error propagation. In this paper, we focus on alleviating these limitations in multi-hop settings by formulating the problem in a fully generative way. We propose an encoder-decoder model that performs multi-hop retrieval by simply generating the entire text sequences of the retrieval targets, which means the query and the documents interact in the language model's parametric space rather than L2 or inner product space as in the bi-encoder approach. Our approach, Generative Multi-hop Retrieval(GMR), consistently achieves comparable or higher performance than bi-encoder models in five datasets while demonstrating superior GPU memory and storage footprint.
BibTeX
@inproceedings{lee2022generative,
  author = {Hyunji Lee and Sohee Yang and Hanseok Oh and Minjoon Seo},
  title = {{Generative Retrieval for Long Sequences}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=QDWVHIFJVsJ},
}
Figure