ACL 2025finding0 citations

Making RALM Robust to Irrelevant Contexts via Layer Knowledge Guided Attention

Weijie Shi, Hao Chen, Jiaming Li, Yao Zhao, Yazhong Zhang, Qijin Chen, Jipeng Zhang, Ruiyuan Zhang

Abstract

Retrieval-augmented language models (RALMs) aim to incorporate external knowledge to address the issues of factual hallucination and knowledge obsolescence faced by large language models (LLMs). Inevitably, the retrieved passages based on similarity search may be irrelevant to the given question, and the aggregation of these passages can confuse the model to give a correct answer. To improve the performance of RALM in such conditions, we propose layer-knowledge guided attention for RALMs, which harnesses the layer-wise knowledge of LLMs to optimize per-layer attention on useful passages, making the model pay attention to the most relevant content and ignore irrelevant ones. Specifically, we first systematically study LLM’s attention patterns and their relationship with the accuracy of RALM responses, where middle-focus attentions play a crucial role in selectively gathering relevant information. Based on this, a layer-wise passage estimator leverages the varied knowledge encoded across LLM layers to assess not only passage relevance scores but also associated confidences. Finally, a relevance-aware passage fusion enables selective attention to relevant passages, mitigating distractibility and positional bias of causal attention. Experiments show that our method outperforms existing methods on RALM benchmarks.

BibTeX
@inproceedings{shi-etal-2025-making,
    title = "Making {RALM} Robust to Irrelevant Contexts via Layer Knowledge Guided Attention",
    author = "Shi, Weijie  and
      Chen, Hao  and
      Li, Jiaming  and
      Zhao, Yao  and
      Zhang, Yazhong  and
      Chen, Qijin  and
      Zhang, Jipeng  and
      Zhang, Ruiyuan  and
      Zhu, Jia  and
      Xu, Jiajie  and
      Zhou, Xiaofang",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2025",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.findings-acl.188/",
    doi = "10.18653/v1/2025.findings-acl.188",
    pages = "3652--3668",
    ISBN = "979-8-89176-256-5"
}
Making RALM Robust to Irrelevant Contexts via Layer Knowledge Guided Attention · ACL 2025