Bit-Flip Attacks on Quantized Neural Networks without Knowledge of Model Parameters

Mahmoud Abumandour, Srinija Ramichetty, Guru Venkataramani, Alaa R. AlameldeenarXiv 2026

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:

  1. White-box knowledge: Attackers needed the exact model weights and test data to calculate gradients and find a specific "chain" of ultra-sensitive bits.
  2. 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.
  3. 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.

Fig. 2. Overview of CoarseHammer on ResNet8. Offline, architecture recovery yields the operator graph with bit widths, shapes and allocation order (1). A flip in a bias T spreads through every later operator to the logits (2). Templating DRAM finds frames with flippable cells (3). Online, a planter thread pushes a templated frame Fi and then n−1 filler frames onto the page frame cache (PFC) list, which is last-in, first-out, so the fillers occupy the victim’s next n−1 faulted pages and Fi occupies the n-th, which is the target page (4). The attacker then hammers the aggressor rows of Fi (5) until accuracy reaches chance (6), shown as the mean of 1000 runs.

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 int8 weights, so uniform random flips almost always hit resilient targets. However, a single flip in a median int32 CNN bias causes 65 to 12,000 times more change in output logits than a flip in an int8 weight, 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.
Fig. 1. Activation Change Coverage (ACC) at τ = 10% against degradation under random bit flips, showing the accuracy drop in points for four CNNs (top), and the perplexity increase on WikiText for four LLMs (bottom). Each point is one fault trial with a single bit flip, injected into the high-precision tensors (red) or into the quantized tensors (blue).
  • "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 int8 inference 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

Abstract

We show that quantization asymmetry concentrates bit-flip vulnerability in small tensors retained at high precision. CoarseHammer targets these tensors and accepts flips at any bit, without parameter values, gradients, or data. It remains effective under continued fine-tuning. Under ideal placement, CoarseHammer reaches chance accuracy in at least 81.5% of runs on each of ten evaluated models, including four large language models, with median successful runs requiring at most 24 flips. On simulated DRAM with 0.01 flippable bits per million, it outperforms three prior attacks on every evaluated convolutional network, succeeding in up to 83.6% of runs while they never succeed. On a real system, CoarseHammer steers heap-allocated tensors onto vulnerable frames despite address space layout randomization, without accessing the model file. With 16 templated frames, median accuracy reaches chance for all four language models and approximately chance for four convolutional networks.
BibTeX
@misc{abumandour2026bit,
  author = {Mahmoud Abumandour and Srinija Ramichetty and Guru Venkataramani and Alaa R. Alameldeen},
  title = {{Bit-Flip Attacks on Quantized Neural Networks without Knowledge of Model Parameters}},
  year = {2026},
  eprint = {2611.32128},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32128},
}
Figure