Generative Retrieval as Dense Retrieval

Thong Nguyen, Andrew YatesarXiv 2023 · DOI

Abstract

Generative Retrieval (GR) has emerged as a promising paradigm for neural search, yet it faces significant challenges in scalability and handling new documents. This paper bridges the gap between GR and the established Dense Retrieval (DR) framework by demonstrating their mathematical equivalence. We introduce Tied-Atomic, a model that leverages embedding tying and contrastive loss to scale generative retrieval to millions of documents, achieving performance parity with state-of-the-art dense retrievers.

Introduction

Neural search is currently dominated by two paradigms: Dense Retrieval (DR) and Generative Retrieval (GR). DR relies on dual-encoder architectures to map queries and documents into a shared vector space, performing retrieval via Maximum Inner Product Search (MIPS). In contrast, GR models, such as the Differentiable Search Index (DSI), treat retrieval as a sequence-to-sequence task where a model generates document identifiers (DocIDs) directly from queries.

Comparison of Dense Retrieval (a) and Generative Retrieval (b) paradigms.

While GR is conceptually elegant, it has historically struggled with two major flaws: scalability and static memory. As the number of documents grows into the millions, the output vocabulary of DocIDs becomes unmanageable. Furthermore, because traditional GR models treat DocIDs as fixed parameters, adding new documents often requires expensive retraining.

Methodology: Unifying the Paradigms

The authors demonstrate that the final prediction step in GR—calculating the probability of a DocID—is mathematically equivalent to the dot product between a query representation and a document embedding in DR. This insight suggests that GR is not necessarily more expressive than DR, but rather a different framing of the same underlying calculation.

Based on this unification, the researchers proposed Tied-Atomic, which incorporates two key innovations from the DR world to fix GR's flaws:

  1. Embedding Tying: Instead of treating DocIDs as random, learnable parameters, they are "tied" to the document text. The ID embedding is generated by passing the document text through the transformer’s own encoder-decoder stack, allowing the model to generalize to unseen data.
  2. Contrastive Loss: Traditional GR uses cross-entropy loss over the entire document set. Tied-Atomic adopts contrastive loss, pulling queries and correct documents together while pushing irrelevant "negatives" away. This is significantly more computationally efficient for large-scale indexing.
The Tied-Atomic architecture, illustrating how document embeddings are tied to document text via the encoder.

Experimental Results

The model was evaluated on two benchmarks: the mid-sized NQ320k and the massive MSMARCO (Full), which contains over 8 million passages.

  • Performance: On NQ320k, Tied-Atomic achieved an MRR@100 of 74.67, outperforming standard DSI and NCI models.
  • Scalability: On the full MSMARCO dataset, Tied-Atomic reached an MRR@10 of 33.42. This represents a massive improvement over the original DSI Atomic model (24.20) and places GR on par with established dense models like ANCE.

Conclusion and Future Work

By framing Generative Retrieval as a form of Dense Retrieval, this work provides a path forward for scaling "all-in-one" search models. While the study primarily focuses on Atomic DocIDs, it opens the door for future research into whether the generative "pathway" through hierarchical tree-structured IDs offers unique advantages over traditional vector indexing that the bi-encoder view might overlook.

Summary updated

BibTeX
@misc{nguyen2023generative,
  author = {Thong Nguyen and Andrew Yates},
  title = {{Generative Retrieval as Dense Retrieval}},
  year = {2023},
  eprint = {2306.11397},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.11397},
}
Figure