Foundations to Frontier
Tests

Radiation Effects and Bit Flips

Energetic particles from space and from radioactive traces in chip packaging can flip bits in memory and logic. In orbit, at altitude and in large data centres such soft errors are routine, and neural network accelerators hold millions of weights in memory. This page explains where upsets come from and how hardware deals with them, then measures what bit flips do to a trained network: which bits matter, how many flips a network survives, and how cheap protections compare, from activation range restriction and exponent parity to int8 quantisation and replica voting.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

When a particle flips a bit

A computer stores numbers as patterns of ones and zeros. A cosmic-ray particle passing through a chip can leave enough charge to flip one of them. Most flips do nothing noticeable, but a flip in the wrong place can turn a small number into an enormous one. Spacecraft see this often, aircraft sometimes and phones rarely, but large computer fleets see it every day. For a neural network, the question is which flips matter and how to stop the dangerous ones cheaply.

🎮 Reliability lab

Purple: sign (bit 31); blue: exponent (bits 30–23); grey: mantissa. Click a bit to flip it (red).

Stored weight -0.708900 becomes -2.412e+38 after flipping bit 30.

Mean test accuracy with k random bit flips (M3-2 study, seed 0; clean 0.971)

kfloat32range restrictionint8TMR vote
10.9710.9710.9710.971
30.9160.9240.9710.971
100.9120.9700.9710.971
300.6310.8640.9640.816

In the study every critical single flip was in bit 30, the top exponent bit: it multiplies a weight below 2 in magnitude by 2¹²⁸.

Why engineers care

A single bit flip in the exponent of a float32 weight can multiply it by 2¹²⁸, about 3 × 10³⁸.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A soft error is…
  2. 2. The dangerous flips in a float32 weight are mostly in…
  3. 3. Soft errors are most frequent…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Single-event effects (SEE): effects of one particle strike: single-event upsets (SEU, a flipped memory or register bit), multiple-bit upsets, single-event transients in logic, functional interrupts (SEFI) and destructive latch-up or burnout.
  • Sources: galactic cosmic rays and solar particles in space; atmospheric neutrons on Earth, increasing with altitude; alpha particles from package materials.
  • Total ionising dose and displacement damage: gradual degradation from accumulated radiation, which limits mission life.
  • Mitigation in hardware: radiation-hardened processes and cells, ECC on memories with periodic scrubbing, TMR in FPGA designs, watchdogs and power cycling.
  • IEEE 754 float32: 1 sign bit, 8 exponent bits (bias 127) and 23 mantissa bits; flipping the top exponent bit of a number below 2 in magnitude multiplies it by 2¹²⁸.
  • Silent data corruption (SDC): a wrong output with no error raised; the most dangerous outcome, as opposed to a detected error or a crash.
  • Software mitigation for networks: range restriction of activations (Ranger), parity or checksums on weights, quantisation, selective redundancy and output checks.
📝 Quick check (Level 1)
0/3 answered
  1. 1. ECC with scrubbing protects…
  2. 2. Silent data corruption is…
  3. 3. A float32 has how many exponent bits?

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Fault injection in a network

Exercise 1.

  • A 10-class Gaussian task in 20 dimensions and a ReLU network with two hidden layers of 32 units, trained in float64 and stored in float32.
  • Exact bit flips through the integer view of float32 parameters; random multi-flip injection over weights and biases.
  • Range restriction: hidden activations above their training maximum, or not finite, are set to zero.
  • Symmetric per-tensor int8 quantisation and bit flips in int8 weights.

Practice.

  • Inject faults before you trust a model in a harsh environment: measure accuracy and silent-corruption rates per bit, per layer and per fault count.
  • Protect the exponent and the output layer first: they cause almost all critical failures.
  • Use cheap checks: activation ranges from calibration data, ReLU outputs that must be non-negative, logit bounds, and parity on weight exponents.
  • Prefer ECC memory with scrubbing, and quantised integer weights, which cannot explode.
  • Reserve full replication or TMR for the parts that remain critical after cheap protection, since it triples cost.
def flip(L, layer, index, bit, part=0):
    L2 = copy of L
    a = L2[layer][part].reshape(-1).view(uint32)       # reinterpret float32 bits
    a[index] ^= 1 << bit                               # bit 31 sign, 30-23 exponent
    return L2

def forward(L, X, clip=None):
    for i, (W, b) in enumerate(hidden layers of L):
        X = relu(X @ W + b)
        if clip: X = where(isfinite(X) and X <= clip[i], X, 0)   # range restriction
    return X @ W_out + b_out
🐍 Exercise 1: bit flips, range restriction and int8
Implement exact bit-flip injection into float32 networks, range restriction of activations, and int8 quantisation with bit flips.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Which parts of a network should be protected first?
  2. 2. Activation bounds are set from…
  3. 3. Why are int8 weights robust to flips?

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why one bit dominates. A float32 value is (−1)^s · 1.m · 2^(e − 127). Trained weights and activations are small, so their exponent field e is below 128 and its top bit (bit 30) is 0. Flipping it adds 128 to e, multiplying the value by 2¹²⁸ ≈ 3.4 × 10³⁸. One such weight feeding a ReLU unit makes its activation enormous or infinite, and the error propagates to every logit; products of infinity and zero give NaN. Flips in lower exponent bits change the value by factors of 2 to 2⁶⁴ but leave most weights small enough to be absorbed, and mantissa flips change a value by at most a factor of 2.

Why range restriction works, and where it stops. On fault-free inputs a hidden activation never exceeds its maximum on representative data, so replacing larger or non-finite values by zero changes nothing in normal operation. After a top-exponent flip the corrupted unit is silenced, which costs about as much as losing one unit. The check cannot help when the flipped weight sits in the output layer, whose result is not bounded, which is why logit checks or ECC are needed there.

Why int8 and voting behave differently. An int8 weight is q·s with |q| ≤ 128, so any flip changes it by at most 128 scale steps, about the size of the largest weight: errors are bounded by construction. Voting over three replicas fails only when two replicas are wrong on the same input; with a few faults this almost never happens, but as faults accumulate in each replica the chance that two are corrupted grows quickly, so voting needs repair or scrubbing, as in topic M3-1.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Flipping bit 30 of a float32 below 2 in magnitude multiplies it by…
  2. 2. Range restriction cannot protect…
  3. 3. A flip in an int8 weight changes it by at most…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

Which bit positions of float32 parameters cause critical errors when flipped, and how do range restriction, int8 weights and replica voting compare as flips accumulate?

History.

  • T. May and M. Woods (1979) traced soft errors in memories to alpha particles from packaging; J. Ziegler and W. Lanford (1979) predicted errors from cosmic-ray neutrons at ground level.
  • Spacecraft computers have used radiation-hardened parts, ECC and redundancy since the 1960s; the RAD6000 and RAD750 processors of the Mars rovers are radiation-hardened PowerPC designs.
  • J. Ziegler and colleagues at IBM (1996) summarised two decades of terrestrial soft-error studies; data-centre studies at Google and Facebook (2021) reported silent data corruption in CPUs at fleet scale.
  • G. Li and colleagues (2017) characterised soft errors in deep learning accelerators; Z. Chen and colleagues (2021) proposed range restriction (Ranger) as a low-cost protection.

Exercise 2.

  • One network per seed (test accuracy 0.971, 0.964 and 0.949 for seeds 0, 1 and 2); int8 quantisation lost no accuracy.
  • Bit sensitivity: for each of the 32 bits, 40 single flips at random weights or biases; a fault is critical if accuracy falls by more than 5 points.
  • Accumulated faults: 1, 3, 10 and 30 random flips at random bits, 40 faulty copies each, for the float32 network, the same with range restriction, the int8 network, and a majority vote of three float32 replicas with independent faults.

Seed 0, single flips (mean accuracy, share critical; with range restriction): bit 30: 0.567, 0.850; 0.831, 0.250. Every other bit: mean accuracy at least 0.970 and no critical fault, with or without range restriction.

Seed 0, mean accuracy with k random flips:

k float32 range restriction int8 TMR vote
1 0.971 0.971 0.971 0.971
3 0.916 0.924 0.971 0.971
10 0.912 0.970 0.971 0.971
30 0.631 0.864 0.964 0.816

Seeds 1 and 2: again only bit 30 produced critical faults (shares 0.825 and 0.750, falling to 0.225 and 0.100 with range restriction). At 30 flips: float32 0.671 and 0.668, range restriction 0.852 and 0.886, int8 0.925 and 0.940, TMR vote 0.853 and 0.774.

Findings.

  • All critical single faults came from one bit, the top exponent bit, in every seed; it made 75% to 85% of single flips critical.
  • Range restriction cut critical top-exponent faults from 85% to 25% (seed 0; 22.5% and 10% in seeds 1 and 2) at no cost in clean accuracy; what remains is mostly in the output layer (Practice 2).
  • int8 weights were the most robust with many faults (0.925 to 0.964 at 30 flips), because a flipped int8 weight stays bounded.
  • Voting held up with few faults but fell behind with many (0.774 to 0.853 at 30 flips per replica), when two replicas are often wrong on the same input.
  • The test accuracy drop with 3 flips (0.971 to 0.916) shows that even a handful of upsets matters when one of them lands in an exponent.
🐍 Exercise 2 (research): which bit positions of float32 parameters cause critical errors when flipped, and how do range restriction, int8 weights and replica voting compare as flips accumulate?
Measure the sensitivity of each float32 bit position and compare protections as bit flips accumulate.

Radiation effects in practice

  • Testing: devices are characterised in particle beams (proton, heavy-ion and neutron facilities) to measure upset cross-sections; JEDEC JESD89 describes terrestrial soft-error testing.
  • Space-grade AI: missions increasingly fly commercial accelerators and FPGAs with mitigation in software and system design (scrubbing, watchdogs, redundancy, safe modes), trading cost and performance against radiation tolerance (topic M4-5).
  • Fleet-scale reliability: large training clusters detect silent corruption with checksums, gradient-norm monitors and redundant computation, since a single bad accelerator can corrupt a training run.

References

  1. T. May and M. Woods (1979). “Alpha-particle-induced soft errors in dynamic memories.” IEEE Transactions on Electron Devices.
  2. J. Ziegler and W. Lanford (1979). “Effect of cosmic rays on computer memories.” Science.
  3. R. Baumann (2005). “Radiation-induced soft errors in advanced semiconductor technologies.” IEEE Transactions on Device and Materials Reliability.
  4. G. Li, S. Hari, M. Sullivan and colleagues (2017). “Understanding error propagation in deep learning neural network (DNN) accelerators and applications.” SC.
  5. Z. Chen, G. Li and K. Pattabiraman (2021). “A low-cost fault corrector for deep neural networks through range restriction.” DSN.
  6. P. Hochschild and colleagues (2021). “Cores that don’t count.” HotOS.