Abstract
Generative Retrieval (GR) has emerged as a promising paradigm in Information Retrieval, where models directly generate document identifiers (docids) for a given query. However, the short nature of docids often creates an "information bottleneck," leading to a loss of the semantic richness found in full documents. This paper introduces DOGR (Document-Oriented Contrastive Learning in Generative Retrieval), a framework that addresses this limitation through a two-stage learning process and novel negative sampling techniques. By incorporating contrastive learning to model the direct semantic relationship between queries and full document text, DOGR significantly improves retrieval precision. Experimental results on NQ320k and MS MARCO benchmarks demonstrate that DOGR achieves state-of-the-art performance, effectively bridging the gap between generative power and semantic understanding.
Introduction
Traditional Information Retrieval (IR) systems typically rely on an external index, such as BM25 or dense vector stores, to retrieve relevant documents. In contrast, Generative Retrieval (GR) models internalize the document collection within their parameters, generating a Document Identifier (docid)—such as a title or a cluster number—in response to a query. While this approach is innovative, it suffers from a significant drawback: docids are inherently brief, whereas documents are semantically dense.
Existing GR models primarily focus on the mapping between a query and a short docid string. This focus often results in the model "ranking strings" rather than truly "understanding documents." When multiple documents share similar docid prefixes, the model struggles to distinguish the most relevant one, leading to suboptimal retrieval performance. DOGR is designed to overcome this "information bottleneck" by enabling the model to look past the identifier and directly engage with the full document content.
Methods
DOGR implements a two-stage learning strategy to enhance the semantic grounding of generative retrieval:
- Identifier Generation Stage: In this initial phase, an encoder-decoder model (such as T5) is trained to generate docids from both queries and random segments of the documents. This stage ensures the model learns the basic "address" or mapping for every document in the corpus.
- Document Ranking Stage: The model is then fine-tuned using contrastive learning. Instead of merely predicting the next token in a docid sequence, the model is trained to maximize the semantic similarity between the hidden representations of the query and the full document.
To refine this process, DOGR employs two specialized negative sampling strategies:
- Prefix-oriented Negative Sampling: This method selects "hard" negatives—documents that share the same docid prefix as the target document. This forces the model to learn fine-grained distinctions between documents that appear similar at the identifier level.
- Retrieval-augmented Negative Sampling: The model uses its own top predictions from the first stage as negatives, allowing it to iteratively correct its own errors.
During inference, DOGR calculates a "fusion score" that combines the probability of the generated docid with the semantic similarity score derived from the contrastive learning stage. This dual approach allows the model to use generative power to locate the general "neighborhood" of a document and contrastive power to pinpoint the specific "house."
Experimental Setup
The performance of DOGR was evaluated on two major benchmarks:
- NQ320k (Natural Questions): A dataset comprising 320,000 query-document pairs from real Google searches, featuring both "seen" and "unseen" documents to test generalization.
- MS MARCO: A large-scale dataset with 8.8 million passages, representing a significant challenge for generative models due to its scale.
Results and Discussion
DOGR achieved state-of-the-art (SOTA) results across both benchmarks. On the NQ320k dataset, it reached a Recall@1 of 70.2%, surpassing previous leading models such as GLEN and LTRGR. On the massive MS MARCO dataset, DOGR achieved an MRR@10 of 22.5%, a substantial improvement over existing generative methods.
Key insights from the evaluation include:
- Overcoming the Bottleneck: The results confirm that relying solely on short docid generation limits retrieval performance. By integrating full document content via contrastive learning, DOGR raises the performance ceiling.
- The Importance of Hard Negatives: Prefix-oriented sampling proved crucial. Most generative errors occur when the model correctly identifies the start of a docid but fails on the final tokens. Training on these "near misses" significantly enhances precision.
- Robustness: Ablation studies indicated that the semantic score is a primary driver of success; removing it led to a significant performance drop, highlighting the necessity of direct query-document interaction.
Conclusion
DOGR successfully addresses the information bottleneck in generative retrieval by combining the strengths of sequence generation and contrastive semantic modeling. While the framework shows exceptional promise, scaling to billions of documents remains a challenge, as generative retrieval requires document information to be stored within model parameters. Future research will explore tighter end-to-end integration and strategies for maintaining performance in "web-scale" environments.
Summary updated