paper

Numerical Fragility in Transformers: A Layer-wise Theory for Risk Estimation and Selective Stabilization

arXiv:2510.21770

Abstract

Low-precision execution can induce substantial forward discrepancies in Transformers even for fixed weights and input, yet these discrepancies are usually monitored only at the output and lack a layer-wise theoretical account. We develop a first-order decomposition of output mismatch into layer-local attention, LayerNorm, and residual-transport terms, and derive from it a practical causal risk estimator and a budgeted controller, Bound-Guided Selective Stabilization (BGSS). Controlled sweeps verify the predicted local sign, monotonicity, and transport structure. On GPT-2, the transport-aware combined predictor is positively correlated with FP32-reference mismatch in all runs and improves over a no-transport ablation in runs. Reference-patch attribution shows that the same score preserves useful layer ordering information (mean Spearman ). In budget-matched mitigation, BGSS outperforms random same-budget control in onset events ( vs. ), final mismatch ( vs. ), and worst-case mismatch ( vs. ), while matching a risk-only same-budget controller on onset suppression and sharply reducing worst-case mismatch ( vs. ). These results support a theory-to-algorithm account of Transformer numerical fragility in which finite-precision risk can be analyzed, estimated, localized, and selectively stabilized.

22 pages, 10 figures. Accepted at the 29th International Conference on Artificial Intelligence and Statistics (AISTATS 2026). Camera-ready version

Numerical Fragility in Transformers: A Layer-wise Theory for Risk Estimation and Selective Stabilization · wovepaper