To maximize the efficiency of Large Language Models (LLMs), the machine learning field has pushed aggressively along two axes: expanding context windows to hundreds of thousands of tokens, and compressing numerical representations down to BFloat16, FP8, or even FP4.
While these techniques drastically reduce computational overhead, their intersection exposes a critical vulnerability: precision-induced positional drift. When forced into low-precision formats, the mathematical mechanisms designed to track relative distances across long sequences begin to degrade, causing models to lose their structural awareness and, in severe cases, suffer late-stage training divergence.
How Relative Encodings Revert to Absolute Encodings
To understand why this degradation occurs, we must look at how modern models understand position. Mechanisms like the Rotary Positional Embedding (RoPE) are designed to be shift-invariant. This means that the attention score between two tokens should depend strictly on their relative distance from one another, regardless of where they appear in a document. Mathematically, this relies on computing precise rotation angles based on a token's position index $m$.
However, floating-point representations have a limited number of mantissa bits. As the absolute position index $m$ grows large (e.g., exceeding tens of thousands of tokens), the gap between consecutive representable floating-point numbers widens.
As demonstrated by Chao Du et al. in When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Training, limited numerical precision in formats like BFloat16 causes rounding errors to accumulate rapidly as sequence length increases. When $m$ is sufficiently large, the lower bits of the mantissa cannot resolve small differences. This disruption breaks the shift-invariance of the embedding: the relative distance properties collapse, and the embeddings inadvertently begin to behave like absolute positional encodings. Consequently, the model loses its ability to generalize to sequence lengths beyond those seen during training.
Ideal RoPE (Infinite Precision):
Token Position m ---------> Shift-Invariant Rotation ---------> Pure Relative Distance
Actual RoPE (Low Precision, Large m):
Large Position m ---------> Mantissa Rounding Error ---------> Absolute Position Drift
This precision bottleneck is a recurring theme in long-context scaling. Chen Wu et al. noted that precision constraints in RoPE calculations consistently trigger failures when processing very long sequences, requiring careful numerical management to maintain stability (Scaling Context, Not Parameters: Training a Compact 7B Language Model for Efficient Long-Context Processing). Similarly, standard absolute positional encodings suffer from floating-point inaccuracies at large sequence indices, which degrades the model's capacity to represent relative distances accurately, as detailed by Haibo Tong et al. in Disentangle to Decay: Linear Attention with Trainable Decay Factor.
The Underflow and Rounding Trap
The risk is not confined to explicit positional encodings; it also compromises architectures that rely on recurrent state tracking or exponential decay to model sequence history.
In architectures utilizing recursive forgetting mechanisms, such as the Fixed-Size Ordinally-Forgetting Encoding (FOFE), a decay factor is applied repeatedly over a sequence. Shiliang Zhang et al. warned that scaling these models to long sequences or large vocabularies introduces severe numerical precision risks (The Fixed-Size Ordinally-Forgetting Encoding Method for Neural Network Language Models). As the forgetting factor compounds, the mathematical contributions of earlier tokens diminish below the representational limits of standard floating-point arithmetic, resulting in numerical underflow.
Even modern alternatives to the Transformer face this boundary. In Mamba-2's Structured State Space Duality (SSD) framework, high-precision floating-point representations exhibit numerical instability and fluctuating error rates when processing sequences exceeding 10,000 tokens (SSDi8: Accurate and Efficient 8-bit Quantization for State Space Duality by Hyunwoo Kim et al.). When executing distributed training across long sequences, 16-bit floating-point formats continuously accumulate rounding errors that threaten final model convergence (FoldMoE: Efficient Long Sequence MoE Training via Attention-MoE Pipelining by Guichao Zhu).
The Long-Horizon Mirage
The most dangerous aspect of precision-induced degradation is that it remains completely hidden during short-term validation. A quantization recipe or positional scheme can appear highly performant during initial testing, only to fail catastrophically later in the training lifecycle.
As Maxim Fishman et al. discovered when scaling FP8 training to two trillion tokens, numerical instabilities often remain latent for billions of tokens (Scaling FP8 training to trillion-token LLMs). At the trillion-token mark, long-term weight evolution can trigger a sudden "weight alignment" phenomenon in activation functions like SwiGLU, causing catastrophic divergence.
This creates a deceptive gap between short-term throughput optimizations and long-term convergence stability. Anjulie Agrusa et al. demonstrated that performance rankings of low-precision pre-training recipes (such as FP4) shift significantly over long horizons (What Matters for NVFP4 Training? A Scaling Study of Low-Precision Pre-Training Recipes). Configurations that appear superior or stable within the first 150 billion tokens frequently underperform or diverge entirely when scaled further.
This convergence-throughput decoupling complicates the validation of aggressive system optimizations. Whether evaluating low-precision attention kernels like FlashAttention-3 (Jay Shah et al.), extreme 4-bit quantization frameworks like Metis (Hengjie Cao et al.), approximate backpropagation techniques (Yuchen Yang et al.), or decentralized pipeline parallelism over slow networks (Binhang Yuan et al.; Guangxin He et al.), short-term benchmarks fail to guarantee long-horizon stability. High throughput does not guarantee a converging model.
Restoring Stability through Architectural Anchors
To prevent relative encodings from degrading into absolute ones and to protect models from late-stage divergence, researchers have introduced targeted mathematical corrections that isolate or anchor precision-sensitive terms.
AnchorAttention
To resolve the breakdown of RoPE in long contexts, the authors of When Precision Meets Position proposed AnchorAttention. This method treats the very first token in a sequence as a shared global "anchor" and applies strategic cross-document attention masking. By anchoring the attention reference point, it bypasses the cumulative rounding errors of distant relative positions, stabilizing long-context training in BF16 while significantly reducing computational overhead.
Disentangled Decay
In linear attention models where trainable decay factors are prone to numerical collapse over long sequences, Haibo Tong et al. developed the Disentangle to Decay (D2D) framework (Disentangle to Decay: Linear Attention with Trainable Decay Factor). D2D splits the decay factor into two distinct components:
- A fixed, mathematically stable global component that ensures long-range sequence extrapolation without underflow.
- A trainable local component that allows the model to dynamically learn short-range dependencies.
This separation prevents the gradient instabilities and precision loss that typically cause trainable decay architectures to collapse.
Smooth-SwiGLU
For extreme-scale low-precision training, Maxim Fishman et al. mitigated late-stage FP8 divergence by introducing Smooth-SwiGLU alongside the first-ever quantization of both Adam optimizer moments (Scaling FP8 training to trillion-token LLMs). This modification prevents the catastrophic weight alignment that occurs over trillions of tokens, ensuring that low-precision representations remain numerically bounded throughout the entire training lifecycle.
Key Foundational Work
The Fixed-Size Ordinally-Forgetting Encoding Method for Neural Network Language Models (2015) — contributed 1 concept elements to this direction.
Decentralized Training of Foundation Models in Heterogeneous Environments (2022) — contributed 1 concept elements to this direction.