- The paper introduces the LLMFI framework to systematically study fault injection and error propagation across diverse LLM architectures.
- It reveals that early inference stages and dimension-reducing projections are highly vulnerable, causing significant accuracy drops in various tasks.
- Mitigation strategies such as mixed-precision inference and dual first-token generation are proposed to enhance error resilience in high-performance settings.
Systematic Analysis of Error Propagation in LLM Inference
Introduction and Motivation
The vulnerability of LLM inference to soft errors, especially in high-performance computing (HPC) environments, is of significant practical concern due to the scaling of hardware and increased deployment of LLMs for scientific and decision-making workflows. The paper "Not All Errors Are Equal: A Systematic Study of Error Propagation in LLM Inference" (2606.02430) addresses key technical challenges in understanding and mitigating the propagation of hardware-induced transient faults within LLM inference workflows. Central to the study is LLMFI, a configurable, deterministic, and fine-grained fault injection framework designed for task- and model-agnostic evaluation of error propagation dynamics.
Three primary challenges are identified: (1) architectural diversity across LLM implementations, (2) variability in task structures and resilience profiles, and (3) the complex, multi-stage inference pipeline characteristic of autoregressive LLMs. The paper empirically explores these dimensions and extracts 17 actionable insights, contributing a comprehensive methodology for modeling, evaluating, and mitigating error propagation in LLM inference.

Figure 1: The main modeling challenges for LLM error resilience include architectural and implementation diversity, task variety, and intricate inference pipelines with cross-stage dependencies.
LLMFI Fault Injection Framework
LLMFI is implemented atop PyTorch and HuggingFace Transformers to maximize flexibility and compatibility with diverse LLM architectures and task formats. It supports deterministic, location-, and stage-aware fault injection for both memory and computation errors, encompassing arbitrary bit-flip patterns. LLMFI achieves configurable injection via (i) an inspector for architectural parsing, (ii) a scheduler for injection timing (prefill, first-token, arbitrary decode iteration), and (iii) an injector for computation or memory perturbation. Deterministic decoding is enforced by disabling stochastic sampling.

Figure 2: The LLMFI workflow illustrating configuration-driven fault injection across arbitrary models, tasks, inference stages, and error types.
The runtime wrapper decouples the LLM inference into fine-grained stages and supports the injection pipeline at high temporal and spatial resolution.

Figure 3: Pseudocode for the LLMFI runtime wrapper capturing precise injection and output collection across inference stages.
Empirical Exploration of Error Propagation
Stage- and Task-Level Sensitivity
The study systematically injects faults across three representative open-weighted LLMs (Phi, DeepSeek, Gemma) and thirteen diverse benchmarks, spanning reasoning, mathematics, code generation, and multilinguality. Strong, systematic accuracy degradation is observed in all evaluated tasks under single-bit fault models—multi-choice reasoning shows up to 4.25% drop, while generative tasks (code, mathematics) can reach 5% or more. Critically, the inference stage is found to control resilience: prefill and first-token are the most sensitive, while errors in later decode stages are typically masked in multi-choice tasks.

Figure 4: The canonical Prefill-Decode LLM inference pipeline showing tokenization, context prefill, cache initialization, iterative decode, and output processing.

Figure 5: Schematic showing how errors propagate between layers, stages, and through the autoregressive generation loop.
Layer- and Submodule-Level Dynamics
A key technical contribution is the analysis of error propagation across Transformer blocks. Early and middle layers display strong self-correction, attributable to activation nonlinearities and residual connections. Error impact accumulates and becomes unrecoverable primarily in the final blocks. Submodule granularity studies reveal that dimension-reducing projections (e.g., mlp.down_proj) manifest the highest vulnerability, as noise from expanded activations is contracted and amplified. In contrast, dimension-expanding projections mitigate the impact via dilution, and non-linear activations/non-residuals further aid in self-correction.

Figure 6: Accuracy trend by layer—final Transformer blocks show the greatest sensitivity to faults, highlighting risk amplification near model output.

Figure 7: Structural breakdown of a Phi Transformer block, detailing where vulnerability concentrates within submodules and projections.

Figure 8: Submodule-level granularity demonstrates highest vulnerability in down_proj, validating the identified dimension-reduction effect.
Stage-Wise Error Propagation and Decode Iterations
For generative tasks, where token-level dependencies exist, early decode iterations disproportionately influence final output correctness. Faults in critical reasoning steps (as determined by sample-level analysis) manifest non-recoverable error propagation, contrasting with high resilience in semantically non-essential positions.

Figure 9: Token-step sensitivity analysis in decode loops: early and critical reasoning steps are disproportionately vulnerable to fault escalation.
KV Cache and Representation-Level Errors
Direct bit-flips in the GPU-resident KV cache result in smaller accuracy drops than analogous errors in weights. However, cache sensitivity is non-uniform across layers, reflecting architectural and attention-driven semantic dependencies rather than simple layer depth.

Figure 10: Cache memory faults: direct perturbations of KV cache yield less severe but more oscillatory impact compared to weight corruption.
Data Representation, Numerical Precision, and Multiple Bit-Flips
The paper precisely quantifies the impact of fault location within floating point encodings: exponent bits (e.g., bit 14 in float16) induce catastrophic propagation, while mantissa and sign bits are routinely corrected or masked. bfloat16 is shown to be more vulnerable than float16 due to its enlarged exponent field.

Figure 11: Impact of bit position: only exponent flips (esp. bit 14 in float16) routinely cause unrecoverable semantic errors in LLM outputs.

Figure 12: bfloat16's wider exponent field amplifies sensitivity, confirming the negative correlation between exponent width and error resilience.
Extension to multi-bit (double) memory faults exhibits further degradation, corroborating the nonlinear cascade risk from increasingly probable multi-bit upsets.

Figure 13: Multi-bit upsets further degrade accuracy—damage magnitude is not strictly additive, highlighting compounding numerical pathologies.
Mitigation Strategies
Based on the empirical findings, four mitigation strategies are instantiated:
- Mixed-precision inference: Selectively applying robust quantized computation (e.g., int8 GEMM) to the most fault-sensitive layers (dimension-reduction), balancing reliability with minimal accuracy loss.

Figure 14: Embedding quantized computation selectively in the inference path yields substantial error resilience improvement for vulnerable projections.
- Selective Checksum-based Protection: Adopting ABFT-like checksum protection only to identified critical layers (dimension-preserving/reducing), achieving up to 90% coverage of correctable faults at less than one-third of the computational cost.

Figure 15: Selective checksum achieves considerable fault coverage with tightly bounded computational overhead compared to full-layer ABFT.
- Dual First-token Generation: Replicating the critical first-token decode after context prefill, verifying determinism, and allowing fast, low-overhead error detection with a 3.37% mean latency increase and over 82% fault detection efficacy.

Figure 16: Dual inference of the first token with direct comparison enables effective detection of catastrophic faults at minimal runtime penalty.

Figure 17: Fault coverage and latency for dual first-token generation demonstrate highly granular control over inference reliability.
- Dynamic Shot Inference: Extending prompt context length mitigates soft error impact (for moderate shot counts), leveraging context amplification and redundancy without incurring architectural changes.



Figure 18: Increasing prompt shots improves resilience to injected faults, up to architectural and memory-bound practical limits.
Broader Implications and Future Directions
The results show that error resilience in LLM inference is not homogeneous. Sensitivity is strongly modulated by architectural (layer, submodule, and attention structure), representational (data type, dimensionality), and task (decode structure, prompt length) factors. Critically, error propagation is dominated by sensitive stages (prefill, first-token generation), dimension-reducing projections, and exponent field perturbations.
These insights have broad implications for reliability-aware LLM system design:
- Hardware: Prioritizing ECC and resilience mechanisms in memory regions and arithmetic units most responsible for critical projection and context operations.
- Software: Dynamic inference algorithms can leverage prompt engineering (dynamic shots), selective decoding redundancy, and fine-grained kernel-level ABFT or mixed-precision scheduling.
- Theory: The architectural self-correction and vulnerability patterns open new avenues for error-aware model architecture, data type selection, and context management.
Extending fault modeling beyond single-bit errors and expanding analysis to ultra-large and specialized LLMs with sparser attention and expert routing (e.g., mixture-of-experts) are highlighted as next steps.
Conclusion
"Not All Errors Are Equal: A Systematic Study of Error Propagation in LLM Inference" establishes a comprehensive, empirical foundation for understanding and mitigating soft error propagation in LLM inference. Through a suite of targeted experiments and the introduction of LLMFI, the study demonstrates that both model internals and inference pipeline structuring must be explicitly considered when designing reliable systems. The derived mitigation strategies are practical, low-overhead, and immediately actionable for LLM deployments in critical HPC contexts. This work provides both theoretical and experimental tools for the continued advancement of resilient AI inference systems.