When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings
Not on the map. Why?
Abstract (arXiv)
We identify a previously overlooked failure mode of ALiBi positional encoding: its linear bias scaling underflows floating-point precision, which zeroes out a large fraction of attention weights and renders the affected attention heads partially blind. We analyze this failure mode, characterize its impact, and examine four mitigation strategies. We further demonstrate its occurrence in state-of-the-art pretrained models based on ALiBi. Comprehensive pretraining experiments with 148M-parameter decoder models help us to disentangle its effects from out-of-context degradation. We find that ALiBi's failure mode can substantially impair token retrieval while having only a minor effect on standard decoder benchmarks. We propose four training-time mitigation strategies and evaluate them individually and in combinations, finding that log-scaled distances yield the most consistent improvements in passkey retrieval. Despite this problem, default ALiBi slopes remain a surprisingly strong baseline, particularly for needle-in-a-haystack retrieval. Based on these findings we provide concrete recommendations on how to train models with ALiBi.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 38 of its 56 references that are in the map. First posted on arXiv 4 Aug 2026.
Builds on
38 of 56 references.
References · 38
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
26 more
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2023BloombergGPT: A Large Language Model for Financecited by 923
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 851
- 2017Crowdsourcing Multiple Choice Science Questionscited by 742
- 2016Neural Combinatorial Optimization with Reinforcement Learningcited by 600
- 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 553
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
- 2018WiC: the Word-in-Context Dataset for Evaluating Context-Sensitive Meaning Representationscited by 370
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 111
- 2023Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documentscited by 103
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2024LongEmbed: Extending Embedding Models for Long Context Retrievalcited by 47
- 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 39
- 2023MosaicBERT: A Bidirectional Encoder Optimized for Fast Pretrainingcited by 33
- 2023Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encodingcited by 32
- 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
- 2023BTLM-3B-8K: 7B Parameter Performance in a 3B Parameter Modelcited by 19
- 2025Wavelet-based Positional Representation for Long Contextcited by 6
- 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provablycited by 6
Built on by
Not cited yet.