When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings

Hugging Face Daily Papers Papers

Summary

This paper identifies a numerical underflow failure mode in ALiBi positional encodings that can zero out attention weights, analyzes its impact, and evaluates mitigation strategies for training models with ALiBi.

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.
Original Article
View Cached Full Text

Cached at: 08/05/26, 01:45 PM

Paper page - When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings

Source: https://huggingface.co/papers/2608.03994 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.

Similar Articles

Flat Score, Amplified Failures: How the Error Budget Masks Damage in Quantized LLM Agents

arXiv cs.LG

This paper investigates the claim that 4-bit weight quantization is nearly lossless for LLM agents, showing that while aggregate benchmark scores stay flat, quantization amplifies existing tool-call failures (e.g., hallucination), hidden by the benchmark's error budget. The authors suggest reporting per-channel error rates and success under shrinking budgets to reveal the masked damage.