Tackling the Inherent Difficulty of Noise Filtering in RAG
Jingyu Liu, Jiaen Lin, Yong Liu
TL;DR
This work addresses the problem that noisy retrieved documents in retrieval-augmented generation can degrade LLM performance and induce hallucinations. It argues that filtering irrelevant content is inherently difficult for limited-capacity retrievers and that linear fine-tuning distorts attention patterns; to overcome this, the authors introduce a nonlinear attention rectification mechanism that adds a custom g(·) function to the attention update, enabling aggressive noise suppression while preserving useful reasoning. The approach is analyzed theoretically (the triple-wise nature of relevance) and validated empirically across five benchmarks, using LoRA fine-tuning and a query-before-document arrangement; results show robust improvements in noise robustness and overall accuracy. The work offers a practical path to strengthen RAG systems in real-world scenarios, by decoupling noise filtering from semantic reasoning through a carefully designed nonlinear attention update, and it highlights the potential benefits and limitations of tuning pre-trained LLMs rather than training from scratch.
Abstract
Retrieval-Augmented Generation (RAG) has become a widely adopted approach to enhance Large Language Models (LLMs) by incorporating external knowledge and reducing hallucinations. However, noisy or irrelevant documents are often introduced during RAG, potentially degrading performance and even causing hallucinated outputs. While various methods have been proposed to filter out such noise, we argue that identifying irrelevant information from retrieved content is inherently difficult and limited number of transformer layers can hardly solve this. Consequently, retrievers fail to filter out irrelevant documents entirely. Therefore, LLMs must be robust against such noise, but we demonstrate that standard fine-tuning approaches are often ineffective in enabling the model to selectively utilize relevant information while ignoring irrelevant content due to the structural constraints of attention patterns. To address this, we propose a novel fine-tuning method designed to enhance the model's ability to distinguish between relevant and irrelevant information within retrieved documents. Extensive experiments across multiple benchmarks show that our approach significantly improves the robustness and performance of LLMs.
