Reproduce “Attention Basin: Why Contextual Position Matters in Large Language Models” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Zihao Yi, Delong Zeng, Zhenqing Ling, Haohao Luo, Zhe Xu, Wei Liu, Jian Luan, Wanxia Cao and 1 more
Researchers from Sun Yat-sen University and Xiaomi Inc. identified the "attention basin" phenomenon, a mechanistic root cause for Large Language Models' positional bias in long contexts, where models disproportionately attend to the beginning and end of structural blocks. Leveraging this insight, they developed Attention-Driven Reranking (AttnRank), a training-free method that improves multi-hop QA accuracy to 44.72% on HotpotQA and increases Joint Goal Accuracy by 1.58% in few-shot in-context learning by strategically reordering documents.
Key insights
- Large Language Models consistently exhibit an "attention basin" phenomenon, a U-shaped attention distribution where they systematically focus on the beginning and end of *structural blocks* within long input contexts.
- There is a direct mathematical and empirical relationship between the attention allocated to a correct document and the likelihood of the LLM generating the correct answer, providing a mechanistic explanation for positional bias.
- Shallow Transformer layers are the primary drivers of this positional bias, operating in a "position-dominated regime," making their attention patterns key indicators for reranking.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.