Generative Dense Retrieval: Memory Can Be a Burden

Peiwen Yuan, Xinglin Wang, Shaoxiong Feng, Boyuan Pan, Yiwei Li, Heda Wang, Xupeng Miao, Kan Li

Introduction

Information retrieval (IR) has traditionally been dominated by two paradigms. Dense Retrieval (DR) utilizes dual-encoders to map queries and documents into a shared vector space, identifying relevant content through similarity metrics. Conversely, Generative Retrieval (GR) treats the retrieval task as a sequence-to-sequence problem, where a language model "memorizes" document identifiers (IDs) and autoregressively decodes the ID of a relevant document given a query.

While GR has shown remarkable performance on smaller datasets due to the deep interaction between query and document features within the model's parameters, it faces significant challenges when scaled to larger corpora. In the paper "Generative Dense Retrieval: Memory Can Be a Burden," the authors identify the inherent limitations of pure generative models and propose a hybrid solution: Generative Dense Retrieval (GDR).

The Three Burdens of Memory

The authors argue that as the number of documents increases, the internal "memory" of a generative model becomes a liability. They categorize these challenges into three specific "burdens":

  1. Fine-grained Inaccuracy: Generative models are adept at capturing broad semantic categories but struggle to distinguish between highly similar documents that share overlapping content.
  2. Memory Confusion: As the corpus grows, the model's internal parameter space becomes crowded. This leads to "collisions" in memory, resulting in a sharp decline in retrieval performance.
  3. Update Costs: Pure GR systems are notoriously rigid. Adding new documents typically requires retraining or extensive fine-tuning to allow the model to "memorize" the new identifiers, making real-time index updates nearly impossible.

Methodology: The Coarse-to-Fine Approach

To overcome these hurdles, GDR introduces a "coarse-to-fine" retrieval strategy that splits the task into two distinct stages, leveraging the strengths of both generative and dense paradigms.

Stage 1: Inter-cluster Matching (Coarse)

Instead of attempting to decode a unique, granular ID for every document, the model decodes a Cluster Identifier (CID). This stage utilizes the generative model's ability to map queries to high-level semantic regions without overtaxing its memory capacity. By focusing on clusters rather than individual items, the model avoids the confusion associated with high-cardinality ID spaces.

Stage 2: Intra-cluster Matching (Fine)

Once a cluster is identified, the system transitions to a "memorizing-free" mechanism. GDR employs a standard document encoder to calculate the vector similarity between the query and the specific documents contained within that cluster. This ensures high precision without requiring the model to have memorized every document's specific identifier.

Technical Innovations

To facilitate this hybrid workflow, the authors introduced two key components:

  • Memory-friendly CIDs: A strategy for constructing cluster identifiers that are easy for the model to learn, ensuring that documents relevant to similar queries share consistent prefixes.
  • Cluster-adaptive Negative Sampling: A training technique that teaches the model to differentiate between documents within the same cluster, significantly sharpening the accuracy of the second-stage dense matching.

Experimental Results and Scalability

The researchers evaluated GDR primarily on the Natural Questions (NQ) dataset, creating versions ranging from 334,000 to 4 million documents (NQ334K to NQ4M) to test scalability. They also validated generalization on the TriviaQA dataset.

Performance and Recall

GDR demonstrated superior recall compared to state-of-the-art baselines. On the NQ dataset, GDR outperformed both AR2 (Dense Retrieval) and NCI (Generative Retrieval), achieving an average improvement of 3.0 points in R@100.

Robustness at Scale

The most significant finding was GDR's resilience to corpus growth. When scaling from 334K to 4M documents, the performance of the pure generative model (NCI) plummeted by over 15%. In contrast, GDR’s performance only dropped by approximately 3.5%. This decay rate is comparable to traditional sparse and dense retrieval methods, proving that GDR effectively mitigates the "memory burden."

Discussion and Future Work

GDR identifies a "sweet spot" in the decoding process. The authors observed that generative models have a very low error rate when decoding the initial tokens of an ID but fail as they attempt to decode the final, more specific tokens. GDR exploits this by "handing off the baton" to dense retrieval at the exact point where the generative model’s reliability begins to wane.

However, some trade-offs remain. Because GDR relies on autoregressive beam search for the first stage, its inference latency (approximately 195ms per query) is higher than pure Dense Retrieval (35ms). Additionally, while 4 million documents is a substantial test, future research is needed to determine if GDR can maintain its efficiency at web-scale (billions of documents).

Conclusion

Generative Dense Retrieval represents a significant step forward in making generative search architectures practical for real-world applications. By offloading the burden of fine-grained memorization to a dense matching component, GDR maintains the deep interaction benefits of generative models while achieving the scalability and flexibility required for large-scale information retrieval.

Summary updated

BibTeX
@inproceedings{yuan2024generative,
  author = {Peiwen Yuan and Xinglin Wang and Shaoxiong Feng and Boyuan Pan and Yiwei Li and Heda Wang and Xupeng Miao and Kan Li},
  title = {{Generative Dense Retrieval: Memory Can Be a Burden}},
  booktitle = {EACL},
  year = {2024},
  url = {https://openreview.net/forum?id=hX3xB2aSwa},
}
Figure