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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hsieh, Cheng-Yu, Chuang, Yung-Sung, Li, Chun-Liang, Wang, Zifeng, Le, Long T., Kumar, Abhishek, Glass, James, Ratner, Alexander, Lee, Chen-Yu, Krishna, Ranjay, Pfister, Tomas
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914857048080384
author Hsieh, Cheng-Yu
Chuang, Yung-Sung
Li, Chun-Liang
Wang, Zifeng
Le, Long T.
Kumar, Abhishek
Glass, James
Ratner, Alexander
Lee, Chen-Yu
Krishna, Ranjay
Pfister, Tomas
author_facet Hsieh, Cheng-Yu
Chuang, Yung-Sung
Li, Chun-Liang
Wang, Zifeng
Le, Long T.
Kumar, Abhishek
Glass, James
Ratner, Alexander
Lee, Chen-Yu
Krishna, Ranjay
Pfister, Tomas
contents 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 a 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 15 percentage points. These findings open up future directions in understanding LLM attention bias and its potential consequences.
format Preprint
id arxiv_https___arxiv_org_abs_2406_16008
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization
Hsieh, Cheng-Yu
Chuang, Yung-Sung
Li, Chun-Liang
Wang, Zifeng
Le, Long T.
Kumar, Abhishek
Glass, James
Ratner, Alexander
Lee, Chen-Yu
Krishna, Ranjay
Pfister, Tomas
Computation and Language
Artificial Intelligence
Machine Learning
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 a 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 15 percentage points. These findings open up future directions in understanding LLM attention bias and its potential consequences.
title Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2406.16008