vix.ing · top · new · best · stats · spec

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

2025/10/17 by Jinwoo Baek, Baek, Jinwoo
#cs.LG #cs.NA #math.NA

paper · pdf · doi:10.48550/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 18 runs and improves over a no-transport ablation in 17/18 runs. Reference-patch attribution shows that the same score preserves useful layer ordering information (mean Spearman 0.362). In budget-matched mitigation, BGSS outperforms random same-budget control in onset events (10.67 vs. 11.67), final mismatch (1.243× 10-3 vs. 1.284× 10-3), and worst-case mismatch (3.14× 10-3 vs. 8.49× 10-3), while matching a risk-only same-budget controller on onset suppression and sharply reducing worst-case mismatch (3.14× 10-3 vs. 5.71× 10-3). 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.

Citations

Related