중간에서 발견된 것: 위치 주의 편향 보정을 통해 긴 문맥 활용 개선
Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization
June 23, 2024
저자: Cheng-Yu Hsieh, Yung-Sung Chuang, Chun-Liang Li, Zifeng Wang, Long T. Le, Abhishek Kumar, James Glass, Alexander Ratner, Chen-Yu Lee, Ranjay Krishna, Tomas Pfister
cs.AI
초록
대규모 언어 모델(LLMs)은 긴 입력 문맥을 처리하도록 특별히 훈련되었더라도 입력 중간에 위치한 관련 정보를 포착하는 데 어려움을 겪습니다. 이러한 현상은 '중간에서 사라지는 문제(lost-in-the-middle problem)'로 알려져 있습니다. 본 연구에서는 세 가지 주요 기여를 합니다. 첫째, 이 현상을 유발하는 요인을 이해하기 위해 노력했습니다. 이를 통해 LLMs의 내재적 주의 편향과 '중간에서 사라지는 문제' 사이의 연관성을 규명했습니다: LLMs는 입력의 시작과 끝에 위치한 토큰이 관련성과 무관하게 더 높은 주의를 받는 U자형 주의 편향을 보입니다. 둘째, 이러한 위치 편향을 완화하기 위해 '중간에서 찾기(found-in-the-middle)'라는 보정 메커니즘을 제안합니다. 이 메커니즘은 모델이 중간에 위치한 문맥이라도 관련성에 따라 충실히 주의를 기울일 수 있도록 합니다. 셋째, '중간에서 찾기'가 긴 문맥 내에서 관련 정보를 찾는 데 더 나은 성능을 달성할 뿐만 아니라, 다양한 작업에서 검색 증강 생성(retrieval-augmented generation, RAG) 성능을 최대 15% 포인트까지 향상시키며 기존 방법을 능가함을 보여줍니다. 이러한 발견은 LLM의 주의 편향과 그 잠재적 영향을 이해하는 데 있어 미래 연구 방향을 제시합니다.
English
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.Summary
AI-Generated Summary