TL;DR
When GPU silicon quietly glitches during LLM inference, a single bad matrix calculation can ripple through the network and ruin the output. This paper shows that LLMs can be trained to shrug off these hardware hiccups—reducing performance degradation by 60×—provided you make one counterintuitive choice: don't force the model to repair the corrupted internal layer. Instead, let the internal activations drift and only require the final output probabilities to stay consistent.
What Problem Does This Paper Address?
If you run enough GPUs for long enough, you inevitably meet the ghost in the machine: Silent Data Corruption (SDC). Unlike a crash, which announces itself and lets you reload a checkpoint, an SDC happens when a defective arithmetic unit quietly returns the wrong number with zero error flags. Error-correcting codes protect memory, not compute math. In LLM inference, billions of parameters stream through Tensor Core matrix multiplications (GEMMs) at every step, meaning one bad $16 \times 16$ output tile can poison everything downstream.
Can a Transformer learn to absorb these hardware faults on its own? And if we train it to be fault-tolerant, where in the network should we enforce stability—right at the site of the damage to stop it from spreading, or only at the very end?
Methods
The authors introduce Consistency-Aware Training (CAT), a deliberately minimal tweak to standard fine-tuning (structurally similar to R-Drop, a dropout-consistency method, but driven by simulated hardware faults).
During training, half the minibatches undergo a second, "faulted" forward pass where a vulnerable $16 \times 16$ GEMM tile is replaced with Gaussian noise (modeling bounded math errors) or zeros (modeling an erasure). The loss function combines clean cross-entropy, faulted cross-entropy, and a consistency penalty matching the faulted run to the clean run.
What's new here isn't fault-injection training itself, but systematic placement analysis (testing whether the consistency term belongs on intermediate hidden states vs. output logits) and a detection-to-erasure pipeline. Because raw bit-flips occasionally create NaN or Inf values that break neural networks, the authors pair CAT with Algorithm-Based Fault Tolerance (ABFT)—lightweight matrix checksums that catch bad tiles and zero them out, turning unbounded bit-flips into clean erasures that CAT can easily digest.
Datasets
- Training & Primary Evaluation: WikiText-103 (used to fine-tune GPT-2 Small, LLaMA-3.1-8B, and TinyLlama-1.1B).
- Out-of-Distribution Robustness: WikiText-2, Penn Treebank (PTB), and LAMBADA. No new text benchmarks are introduced; rather, existing corpora are evaluated under simulated hardware-fault channels.
Key Insights and Ideas
Fault degradation across alignment targets, showing a spike at early hidden layers and optimal tolerance at the output.
- Don't micromanage the repair: Intuitively, fixing a corrupted representation right where it happens (layers 0–2) should stop errors from snowballing. Instead, a hidden-only objective at the fault site wrecks the model, making degradation 2.5× worse than doing nothing. Even with fair, bounded mathematical controls, early hidden alignment trails output alignment.
- The geometry of forgiveness: Why is output alignment better? Because the final softmax layer is shift-invariant—adding a constant to all logits doesn't change the output probabilities. Geometrically, matching hidden states traps the model inside a rigid sphere, whereas matching output KL divergence gives it an open-ended ellipsoid with "free" null directions. The network can route around damage in hidden space without paying a penalty at the output.
- Cooperative gradients: When aligning at the output, gradients from the task loss and consistency loss point in similar directions (cosine similarity of $0.36$ to $0.55$ on GPT-2). At the fault site, hidden-alignment gradients are nearly orthogonal ($\approx 0$) to the task loss, creating unstable, high-curvature optimization landscapes.
- Erasures beat errors by a landslide: Zeroing out a bad tile is 4–8× more tolerable than leaving noisy values in place—beating the classic $2\times$ rule of thumb from coding theory. In a Transformer, a zeroed attention tile safely falls back to uniform attention, and a zeroed MLP tile acts like harmless neuron pruning. Noise, by contrast, gets non-linearly amplified into chaos.
- Generic robustness won't save you: Standard regularization tricks like Sharpness-Aware Minimization (SAM), dropout consistency (R-Drop), or clamping weights (SAF) are 29–47× worse than CAT-Output. You have to train on the actual fault structure.
Key Results
- GPT-2 Small (124M): Under single-tile attention faults, CAT-Output slashes perplexity degradation from 12.9% (unprotected baseline) to 0.21%—a 60× improvement—at a modest clean perplexity cost (+1.11). Direct fault-site hidden alignment degrades by 32.7%, while fair bounded early-hidden controls at a matched 80k-step horizon reach 1.74–1.76% vs. 0.84% for output KL.
- LLaMA-3.1-8B Scale-up: Deeper networks compound errors, leaving the unprotected 8B baseline with a massive 41.7% degradation at 5k steps. CAT-Output cuts this to 4.6% at 5k steps and 2.1% (vs. 27.2% baseline, a 12.8× gain) at 50k steps.
- Surviving Raw Bit-Flips: With 1,024 corrupted tiles under raw bit-flips, unprotected models immediately hit
NaNon 63–73% of sequences. Pairing ABFT checksum detection (which zeros out bad tiles) with CAT-Output yields a smooth 1.10× perplexity ratio instead of a total crash.
Limitations and Future Work
- Hardware detection is still mandatory: CAT cannot survive raw exponent bit-flips (
10^38orNaN) on its own; it relies on upstream checksums/hardware to catch corruption with high recall ($r \gtrsim 0.9$) and convert it into bounded noise or zero-fill erasures. - Hotspot bias: Training targeted the three most vulnerable early attention (QK) tiles. While protection generalizes to unseen operators, the advantage shrinks to 1.5–2× on unvisited positions, pointing toward operator-balanced sampling for future work.
- Simulation & Architecture Caveats: Fault channels were simulated rather than run on physically defective silicon, CAT adds $1.5\times$ forward-pass training overhead, and the cheap "null-direction" head geometry observed in GPT-2 and LLaMA-3.1-8B was absent in TinyLlama's unembedding head. Exploring learned projectors or contrastive hidden losses may also narrow the hidden-vs.-output gap.
Summary updated