ACL 2024findings18 citations

Found in the middle: Calibrating Positional Attention Bias Improves Long Context Utilization

Cheng-Yu Hsieh, Yung-Sung Chuang, Chun-Liang Li, Zifeng Wang, Long Le, Abhishek Kumar, James Glass, Alexander Ratner

Abstract

Large language models (LLMs), even when specifically trained to process long input contexts, struggle to capture relevant information located in the middle of their input. This phenomenon has been known as the lost-in-the-middle problem. In this work, we make three contributions. First, we set out to understand the factors that cause this phenomenon. In doing so, we establish a connection between lost-in-the-middle to LLMs’ intrinsic attention bias: LLMs exhibit an U-shaped attention bias where the tokens at the beginning and at the end of its input receive higher attention, regardless of their relevance. Second, we mitigate this positional bias through a calibration mechanism, found-in-the-middle, that allows the model to attend to contexts faithfully according to their relevance, even though when they are in the middle. Third, we show found-in-the-middle not only achieves better performance in locating relevant information within a long context, but also eventually leads to improved retrieval-augmented generation (RAG) performance across various tasks, outperforming existing methods by up to 10 percentage point. These findings open up future directions in understanding LLM attention bias and its potential consequences.

BibTeX
@inproceedings{hsieh-etal-2024-found,
    title = "Found in the middle: Calibrating Positional Attention Bias Improves Long Context Utilization",
    author = "Hsieh, Cheng-Yu  and
      Chuang, Yung-Sung  and
      Li, Chun-Liang  and
      Wang, Zifeng  and
      Le, Long  and
      Kumar, Abhishek  and
      Glass, James  and
      Ratner, Alexander  and
      Lee, Chen-Yu  and
      Krishna, Ranjay  and
      Pfister, Tomas",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.890/",
    doi = "10.18653/v1/2024.findings-acl.890",
    pages = "14982--14995"
}
Found in the middle: Calibrating Positional Attention Bias Improves Long Context Utilization · ACL 2024