Overview
Retrieval-augmented language models (RALMs) are widely used to improve the factuality of AI systems by allowing them to look up information from external sources. However, these models often suffer a drop in performance when they encounter irrelevant information—a phenomenon known as "distraction." This paper introduces two methods to mitigate this issue: a simple filter using Natural Language Inference (NLI) and a robust fine-tuning method that teaches models to ignore noise using just 1,000 automatically generated examples.
The Problem: Distraction by Irrelevant Context
While RALMs excel at answering questions about recent events or niche topics, retrievers are not perfect and frequently return noisy or irrelevant context. When this happens, Large Language Models (LLMs) often get distracted. They may trust the provided text even when it is unrelated, leading to errors they would not have made relying solely on their internal parameters.
This vulnerability is particularly damaging in multi-hop reasoning, where a single irrelevant fact can derail an entire chain of logic. As illustrated above, a standard LLM might know the correct answer internally, but providing a "helpful" snippet that mentions a different entity in a similar context often causes the model to flip to an incorrect answer.
Proposed Methods
The authors propose two distinct strategies to handle irrelevant context:
- NLI-based Filtering (The "Back-off" Strategy): Before the LLM generates an answer, a small, specialized Natural Language Inference (NLI) model checks if the retrieved passage actually entails (supports) the potential answer. If the NLI model flags the context as irrelevant, the system "backs off" and relies entirely on the LLM’s internal knowledge.
- Robust Fine-tuning (SA-RetRobust): Instead of merely filtering out bad data, the authors train the model to evaluate context more intelligently. They automatically generate a small dataset of roughly 1,000 examples where the model is prompted with a mix of relevant "gold" passages and irrelevant "noisy" passages. To handle complex, multi-step questions, they utilize the Self-Ask format, which breaks a complex question into intermediate sub-questions and retrieves information for each step.
Key Insights and Results
The researchers evaluated their methods across five diverse open-domain question-answering (ODQA) benchmarks, including single-hop (Natural Questions), explicit multi-hop (2WikiMQA, Bamboogle), and implicit multi-hop (StrategyQA, Fermi) datasets.
- Retrieval is a Double-Edged Sword: For datasets requiring implicit reasoning like StrategyQA, adding standard retrieval actually hurts performance compared to a model with no retrieval at all.
- The "Copying" Trap: Analysis revealed that when models fail due to irrelevant context, they often simply copy an entity found in the noise, even if it does not logically answer the prompt.
- NLI is Effective but Conservative: While the NLI filter successfully prevents the model from being misled, it is often too strict, discarding passages that might have been helpful and thereby limiting potential performance gains.
The fine-tuned SA-RetRobust model emerged as the most effective solution.
- Massive Gains on Multi-hop: On the 2WikiMQA dataset, the robust model improved accuracy by over 30 points compared to the no-retrieval baseline.
- Resilience to Noise: When tested with purely random retrieval, the fine-tuned model maintained its performance, effectively ignoring the junk data. In contrast, standard prompted models saw their accuracy cut in half.
- Efficiency: Fine-tuning on just 1,000 diverse examples was sufficient to make the model significantly more robust. Furthermore, a fine-tuned 13B parameter model (Llama-2-13B) outperformed a much larger 70B model on the NQ dataset when both faced noisy retrieval.
Limitations and Future Work
While highly effective, the study primarily focuses on Wikipedia-based QA. How these models handle irrelevant context in highly specialized domains, such as legal or medical fields, remains an open question. Additionally, the paper addresses irrelevant context, but a more complex challenge is conflicting context—where retrieved information is relevant but contradicts the model's internal memory. Future work could explore retriever-model co-design, training the retriever and the language model jointly so the retriever learns exactly what kind of noise trips up the LLM.
Summary updated