Abstract
Modern Information Retrieval (IR) has largely transitioned from generative models to discriminative ones, typically relying on the [CLS] token of models like BERT for similarity scoring. This research from AWS AI re-evaluates the generative approach, proposing a "Ranking by Generation" framework. By fine-tuning Large Language Models (LLMs) such as GPT-2 and BART with novel unlikelihood and ranking losses, the authors demonstrate that generative models can significantly outperform traditional discriminative rankers on passage retrieval and answer selection benchmarks.
Introduction
In the pre-deep learning era, generative models dominated IR by calculating "Query Likelihood"—the probability that a document would generate a specific user query. With the advent of BERT, the paradigm shifted toward discriminative ranking, where a model outputs a score based on a joint representation of the query and document. This paper explores whether modern LLMs can revitalize the generative approach. The primary challenge lies in adapting models trained for next-token prediction to distinguish between relevant and irrelevant content for ranking purposes.
Methodology: Ranking by Generation
The proposed framework treats ranking as a conditional generation task. Instead of a simple similarity score, candidate passages are ranked based on the conditional likelihood $P(query | passage)$.
Model Architecture and Input Format
The authors utilize pretrained models like GPT-2 (decoder-only) and BART (encoder-decoder). The input is structured as:
<bos> passage <boq> query <eoq>
The model is trained to generate the query tokens while conditioned on the passage context.
Specialized Loss Functions
To bridge the gap between generation and ranking, two new loss functions are introduced:
- Likelihood + Unlikelihood (LUL): Standard training only encourages the model to generate the correct query. LUL adds an "unlikelihood" penalty for generating the query when paired with an incorrect (negative) passage, forcing the model to actively suppress irrelevant results.
- Ranking Likelihood Loss (RLL): This hinge-loss variant ensures that the log-likelihood of a "correct" passage-query pair exceeds that of an "incorrect" pair by a predefined margin.
Experimental Results
The models were evaluated on four major benchmarks: WikiQA, WikipassageQA, InsuranceQA V2, and YahooQA. The experimental results indicate that generative models are highly competitive and often superior to discriminative baselines.
Key Findings
- Superior Performance: The BART-large RLL model achieved state-of-the-art results on YahooQA (0.970 MAP/MRR) and WikiQA (0.849 MAP), surpassing strong discriminative baselines like BERT-PR-large.
- The Impact of Loss Functions: The transition from standard Maximum Likelihood Estimation (MLE) to RLL resulted in significant performance gains. For instance, GPT-2-base's MRR on YahooQA jumped from 0.768 to 0.958.
- Directionality Matters: The authors found that $P(query | passage)$ is a more effective ranking signal than $P(passage | query)$. Predicting a long, potentially noisy passage from a short query is inherently more difficult than predicting a concise query from a descriptive passage.
- Architectural Advantages: BART generally outperformed GPT-2, likely due to its bidirectional encoder, which allows the model to process the entire passage context before generating the query.
Conclusion and Future Work
This research demonstrates that generative models, when properly fine-tuned with ranking-aware losses, can surpass the performance of standard discriminative rankers. While computationally more expensive—making them ideal as re-rankers rather than first-stage retrievers—they offer a powerful alternative to the [CLS]-based paradigm. Future work will focus on scaling these methods to multi-billion parameter models and improving the factual accuracy of generated synthetic data.
Summary updated