TL;DR
Conventional wisdom says quantizing neural networks (shrinking 32-bit weights down to 8-bit integers) protects them from random hardware bit-flips, while breaking them deliberately requires surgical, white-box knowledge of exact model weights. This paper shatters both assumptions by revealing an Achilles' heel in quantized models: a tiny fraction of parameters—like biases and normalization layers—are still kept at high precision. By blindly lobbing hardware faults into these specific memory regions, the authors' new attack, CoarseHammer, reduces massive models to random guessing without ever seeing a single weight, gradient, or test datapoint.
What Problem Does This Paper Address?
Imagine two programs sharing a cloud server. One is a neural network; the other is an unprivileged attacker. Using a well-known hardware quirk called Rowhammer, the attacker rapidly accesses their own memory rows until electrical charge leaks into adjacent rows, flipping bits in the victim's memory.
Historically, using Rowhammer for untargeted Bit-Flip Attacks (BFAs)—which aim to ruin a model's overall accuracy—required an unrealistic alignment of the stars:
- White-box knowledge: Attackers needed the exact model weights and test data to calculate gradients and find a specific "chain" of ultra-sensitive bits.
- Surgical DRAM placement: Vulnerable cells in physical RAM are rare and fixed in place. Landing a specific parameter bit onto a specific broken hardware cell is exceedingly difficult.
- Static weights: If the victim continuously fine-tunes the model in production, the attacker's pre-computed bit-chain goes stale.
Meanwhile, defenders assumed quantization inherently blunts random bit flips, because flipping a bit in a cramped int8 number limits how wildly its value can swing. The authors ask: Can an attacker destroy a quantized model on realistic, low-vulnerability hardware without knowing its parameters or landing exact-bit flips?
Methods
Instead of hunting for specific bits inside millions of int8 weights, CoarseHammer targets the tiny high-precision tensors (int32 biases in CNNs; float32 LayerNorm/RMSNorm weights and attention biases in LLMs) that frameworks retain to prevent numerical overflow and rounding offsets. Because CoarseHammer accepts a flip at any bit inside these tensors, it needs zero parameter values or gradients.
Here is what is standard versus what is new in their end-to-end attack:
- Standard: Recovering the model's architecture via side-channels or queries, and "templating" DRAM offline using existing fuzzers (Blacksmith) to map out physical memory frames with flippable cells, bypassing in-DRAM mitigations.
- New (Target Selection & Heap Steering): CoarseHammer ranks high-precision tensors statically by size and how many downstream operators read them. Unlike prior real-world attacks that require read access to the model file on disk, CoarseHammer attacks anonymous heap memory allocated dynamically by PyTorch. Even with Address Space Layout Randomization (ASLR) shuffling memory, tensor shapes dictate allocation order. By profiling a dummy model and monitoring
/proc/<pid>/stat, a co-located "planter" thread exploits Linux's Last-In, First-Out page frame cache—freeing vulnerable physical frames milliseconds before the victim faults, steering the target tensors right onto the hardware landmines.
Datasets
The authors evaluate six quantized CNNs and four quantized LLMs across standard benchmarks (no new datasets were introduced):
- CIFAR-10: ResNet8, ResNet18, ResNet50, DenseNet121
- Visual Wake Words: MobileNetV1
- Speech Commands: DS-CNN
- MMLU (reasoning) & WikiText (perplexity): Llama-3.2-3B, Gemma-2-2B, Qwen2.5-1.5B, Phi-4-Mini
Key Insights and Ideas
- Quantization's protection is an illusion of volume: Over 90% to 99.96% of a quantized model's bits live in
int8weights, so uniform random flips almost always hit resilient targets. However, a single flip in a medianint32CNN bias causes 65 to 12,000 times more change in output logits than a flip in anint8weight, driving entire channels to their clipping bounds on every input. - Damage spreads like wildfire: The authors measure Activation Change Coverage (ACC)—the fraction of intermediate activations perturbed by >10%. Flips in high-precision tensors corrupt a massive swath of downstream activations compared to quantized weights, directly driving catastrophic accuracy drops.
- "Any-bit" math beats rugged hardware: On DRAM with ultra-low vulnerability (0.01 flippable bits per million), the probability of landing a single exact bit in 1 GiB of templated memory is $0.0026$ (and $\approx 10^{-113}$ for a 28-bit chain). Accepting any bit in target tensors boosts placement probability to 94.8%–100%.
- Immunity to fine-tuning and defenses: Because continuous fine-tuning changes parameter values but not tensor shapes or bit-widths, CoarseHammer's targets never go stale. Furthermore, activation-clipping defenses (like Ranger) fail because
int8inference already clips activations to nearly identical bounds.
Key Results
- Ideal Placement: CoarseHammer reduces all 10 models to chance accuracy (random guessing) in 81.5% to 100% of runs, requiring a median of at most 14 flips for CNNs and 24 flips for LLMs.
- Ultra-Low Vulnerability DRAM: On simulated DRAM with 0.01 flippable bits per million, three prior attacks (BFA, DeepHammer, and B3FA) achieve a 0% success rate across all CNNs. CoarseHammer reaches chance accuracy in up to 84% of runs.
- Real Hardware Execution: On an Intel Coffee Lake desktop (Linux 7.0, PyTorch, DDR4 with TRR mitigations and ASLR enabled), using just 16 templated frames drops all four LLMs to 25% chance accuracy on MMLU. Four CNNs hit roughly chance accuracy, and ResNet50 plunges from 96.1% to 21.6%.
- Fine-Tuning & Sub-8-Bit Quantization: Even when models are quantized down to 4-bit/6-bit formats, CoarseHammer succeeds in 94.6%–98.7% of runs. During 50 epochs of active victim fine-tuning, four CNNs still hit chance accuracy in 100% of runs.
Limitations and Future Work
- Collateral crashes from ASLR: Because ASLR shifts heap layouts slightly, stray flips can occasionally hit memory allocator metadata or PyTorch objects instead of tensors. While LLMs had a 0% crash rate (their normalization tensors span full pages), CNNs experienced a crash rate of up to 3% (with 16 frames), alerting a perceptive defender.
- DRAM residency required: CoarseHammer relies on target tensors sitting in system DRAM. Hardware accelerators that lock small, high-precision biases and normalization weights permanently inside on-chip SRAM are immune to Rowhammer. Investigating how these high-precision tensors fare against on-chip fault injection—such as laser beams or shared-FPGA voltage glitching—remains an open avenue for future work.
Summary updated