Attention Basin: Why Contextual Position Matters in Large Language Models
Not on the map. Why?
Abstract (arXiv)
The performance of Large Language Models (LLMs) is significantly sensitive to the contextual position of information in the input. To investigate the mechanism behind this positional bias, our extensive experiments reveal a consistent phenomenon we term the attention basin: when presented with a sequence of structured items (e.g., retrieved documents or few-shot examples), models systematically assign higher attention to the items at the beginning and end of the sequence, while neglecting those in the middle. Crucially, our analysis further reveals that allocating higher attention to critical information is key to enhancing model performance. Based on these insights, we introduce Attention-Driven Reranking (AttnRank), a two-stage framework that (i) estimates a model's intrinsic positional attention preferences using a small calibration set, and (ii) reorders retrieved documents or few-shot examples to align the most salient content with these high-attention positions. AttnRank is a model-agnostic, training-free, and plug-and-play method with minimal computational overhead. Experiments on multi-hop QA and few-shot in-context learning tasks demonstrate that AttnRank achieves substantial improvements across 10 large language models of varying architectures and scales, without modifying model parameters or training procedures.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 22 of its 34 references that are in the map. First posted on arXiv 7 Aug 2025.
Builds on
22 of 34 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,282
- 2020Quantifying Attention Flow in Transformerscited by 775
- 2024A Survey on Recent Advances in LLM-Based Multi-turn Dialogue Systemscited by 170
10 more
- 2024Make Your LLM Fully Utilize the Contextcited by 119
- 2021MultiWOZ 2.4: A Multi-Domain Task-Oriented Dialogue Dataset with Essential Annotation Corrections to Improve State Tracking Evaluationcited by 88
- 2025ViDoRAG: Visual Document Retrieval-Augmented Generation via Dynamic Iterative Reasoning Agentscited by 66
- 2019How Does BERT Answer Questions? A Layer-Wise Analysis of Transformer Representationscited by 63
- 2022The Past Mistake is the Future Wisdom: Error-driven Contrastive Probability Optimization for Chinese Spell Checkingcited by 56
- 2024Attend First, Consolidate Later: On the Importance of Attention in Different LLM Layerscited by 25
- 2024From Training-Free to Adaptive: Empirical Insights into MLLMs' Understanding of Detection Informationcited by 16
- 2025DeepSieve: Information Sieving via LLM-as-a-Knowledge-Routercited by 13
- 2024Compressing KV Cache for Long-Context LLM Inference with Inter-Layer Attention Similaritycited by 10
- 2025DetailMaster: Can Your Text-to-Image Model Handle Long Prompts?cited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.