mlsanityData to 7 Oct 2026

When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings

arXiv 2608.03994 ↗First posted 4 Aug 2026cs.CLcited by 0

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  6. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  7. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  8. 2020Longformer: The Long-Document Transformercited by 3,362
  9. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  10. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  11. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
  12. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
26 more
  1. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  2. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  3. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
  4. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  5. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
  6. 2023BloombergGPT: A Large Language Model for Financecited by 923
  7. 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 851
  8. 2017Crowdsourcing Multiple Choice Science Questionscited by 742
  9. 2016Neural Combinatorial Optimization with Reinforcement Learningcited by 600
  10. 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 553
  11. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
  12. 2018WiC: the Word-in-Context Dataset for Evaluating Context-Sensitive Meaning Representationscited by 370
  13. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  14. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
  15. 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
  16. 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 111
  17. 2023Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documentscited by 103
  18. 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
  19. 2024LongEmbed: Extending Embedding Models for Long Context Retrievalcited by 47
  20. 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 39
  21. 2023MosaicBERT: A Bidirectional Encoder Optimized for Fast Pretrainingcited by 33
  22. 2023Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encodingcited by 32
  23. 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
  24. 2023BTLM-3B-8K: 7B Parameter Performance in a 3B Parameter Modelcited by 19
  25. 2025Wavelet-based Positional Representation for Long Contextcited by 6
  26. 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provablycited by 6

Built on by

Not cited yet.