ADR: Attention Head Detection and Reweighting Enhance RAG Performance in a Positional-Encoding-Free Paradigm
Retrieval-augmented generation (RAG) has established a new search paradigm, in which large language models integrate external resources to compensate for their inherent knowledge limitations. However, limited context awareness reduces the performance of large language models in RAG tasks. Existing solutions incur additional time and memory overhead and depend on specific positional encodings. In this paper, we propose Attention Head Detection and Reweighting (ADR), a lightweight and general framework. Specifically, we employ a recognition task to identify RAG-suppressing heads that limit the model’s context awareness. We then reweight their outputs with learned coefficients to mitigate the influence of these RAG-suppressing heads. After training, the weights are fixed during inference, introducing no additional time overhead and remaining agnostic to the choice of positional embedding. Experiments on PetroAI further demonstrate that ADR enhances the context awareness of fine-tuned models.
Authors
- Xingbang Liu
- Mingwei Wang
- Minghao Yang (ORCID: https://orcid.org/0000-0003-3243-0569)
- Zhiyun Jia (ORCID: https://orcid.org/0000-0003-1886-5654)
- Xiaobo Li (ORCID: https://orcid.org/0000-0001-9944-3642)
- Qian Zeng (ORCID: https://orcid.org/0009-0003-8655-3916)
Institutions
- Research Institute of Petroleum Exploration and Development (CN)
Publication Details
- Journal
- Information
- Published
- 2025-10-15
- DOI
- https://doi.org/10.3390/info16100900
- Primary Topic
- EEG and Brain-Computer Interfaces
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Key Research and Development Program of China