Homeostatic Inhibition Against Rowhammer Bit Flips in DRAM-Resident Neural Networks

As DRAM cells shrink, the number of activations needed to make charge leak into a neighboring row — the Rowhammer threshold — has dropped nearly 30x over eight years, and commodity DDR4 modules can now be made to flip bits in adjacent, unaccessed rows by an unprivileged program Scalable and Secure Row-Swap. When the flipped bits land in neural network weights stored in DRAM, the damage is surgical: flipping the most significant bit of one weight turns it into an extreme outlier whose contribution explodes through every subsequent layer, and search algorithms can find such bits with gradients — 13 flipped bits out of 93 million collapse a ResNet-18 on ImageNet from 70% to 0.1% top-1 accuracy Bit-Flip Attack, and a full physical pipeline with kernel memory massaging does the same on real hardware DeepHammer. Yet the biological cortex, which is also a dense, noisy, scaled physical substrate, degrades gracefully under constant cell loss and thermal noise. The mechanism neuroscience points to is not static hardening but continuous homeostatic rebalancing of excitation and inhibition, and — strikingly — weak external current can bias that balance in either direction: anodal transcranial direct current stimulation depolarizes neurons toward firing and measurably reduces local inhibitory GABA tone, transiently unmasking silenced cortical memories Unmasking Latent Inhibitory Connections.

This proposal takes that mechanism as an engineering principle. Transcranial direct current stimulation (tDCS) — applying a weak constant current across the scalp that shifts neurons' resting potentials without forcing them to fire — works because it is a sub-threshold, continuously adjusted bias on a population, not a discrete intervention on individual units. We propose to build exactly such a runtime bias into deep networks deployed on Rowhammer-vulnerable DRAM: a lightweight homeostatic inhibitory controller that continuously renormalizes layer activations, suppressing the runaway "winner-group" saturation that bit flips induce DeepHammer while leaving legitimate representations intact. To our knowledge, no existing work ports dynamic excitation–inhibition homeostasis, or any tDCS-inspired biasing mechanism, to hardware-fault tolerance in neural networks; the neuromorphic work that comes closest explicitly assumes fault-free silicon Excitation-Inhibition Balanced Neural Networks.

Core Claim

The claim is twofold. First, a runtime controller that maintains each layer's activation distribution near a learned reference — by applying a divisive inhibitory gain, adjusted continuously from streaming activation statistics — can absorb targeted bit-flip corruption far more effectively than statically fixed defenses, because it adapts to the actual fault instead of the average fault. Second, and more fundamentally, architectures that already operate in a balanced excitation–inhibition regime, where no single unit dominates the population code, should degrade gracefully under parameter corruption by construction, echoing how cortical circuits survive ongoing noise and cell death. If both hold, the tDCS literature's central lesson — that function can be restored or protected by shifting a population-level sub-threshold bias rather than repairing individual elements — becomes a practical design rule for memory-insecure edge AI.

The mechanism is deliberately minimal. For layer $\ell$ with pre-activation vector $a_\ell$, we replace the usual pass-through with

$$\tilde{a}_\ell = \frac{a_\ell - \mu_\ell}{1+\lambda_\ell}, \qquad \lambda_\ell \leftarrow \lambda_\ell + \eta\left(\frac{\mathrm{MAD}(a_\ell)}{\mathrm{MAD}_{\mathrm{ref},\ell}} - 1\right),$$

where $\mu_\ell$ and $\mathrm{MAD}(a_\ell)$ are the running mean and median-absolute-deviation of the current batch's activations, $\mathrm{MAD}_{\mathrm{ref},\ell}$ is the spread of the clean reference distribution recorded at deployment, and $\eta$ is a step size. The intuition is direct: a flipped most-significant bit injects an outlier that inflates the observed spread, so $\lambda_\ell$ rises — the cathodal analog of hyperpolarization, suppressing runaway excitation — and it falls back once the disturbance passes, the anodal analog that keeps legitimate large activations alive. Unlike clipped activations, which zero out any value beyond a fixed threshold and thereby destroy genuine high-confidence features FT-ClipAct, divisive renormalization rescales the whole population and never discards a unit outright.

Research Program

The program has three parts. The first builds the controller above for standard quantized feedforward networks (ResNet-18, VGG-16, MobileNet, matching the architectures used in the attack literature) and characterizes it against fault injection spanning the full spectrum from random single-bit flips to worst-case gradient-directed search Bit-Flip Attack. The second takes the defense to physical DDR4 hardware, reproducing the memory-massaging pipeline of DeepHammer — exhausting the Linux per-cpu pageset, releasing pages adjacent to victim rows, and hammering — so that the defense is evaluated against real flip profiles, including the unintended "extra" flips that physical hammering produces and that can paradoxically restore accuracy. The third part asks whether the defense is needed at all for networks that are natively balanced: we take the non-leaky integrate-and-fire balanced architecture of Excitation-Inhibition Balanced Neural Networks — corrected: Excitation-Inhibition Balanced Neural Networks, whose coupling scales as $J \sim 1/\sqrt{N}$ so that no single synapse dominates, and inject weight bit flips to measure whether population coding absorbs them. That paper motivates the premise (balanced states track signals with negligible lag at 40,000 fps) but never tested faults; our experiment closes that gap and either confirms the biological-resilience intuition or bounds it.

Baselines

The naive reference point is the unprotected network. On it, the attack literature fixes the bar to beat: Bit-Flip Attack reports that 13 flipped bits out of 93 million drop an 8-bit quantized ResNet-18 from 70% to 0.1% ImageNet top-1 accuracy, and DeepHammer reports collapsing a VGG-16 on CIFAR-10 with 13 bits out of 138 million parameters, placing victim pages in under 100 seconds of massaging. Any defense must move this "bits-to-collapse" number by orders of magnitude to matter.

The strongest existing software defense is Aegis, a multi-exit shallow-deep network with auxiliary internal classifiers and randomized exit selection, which Aegis reports reduces attack success rate from nearly 100% to below 10–20% on CIFAR-10 and CIFAR-100, forces roughly 35x more bit flips, and costs under 2% benign accuracy while cutting inference latency by 46–59%. We will reimplement Aegis on our architectures and give it the same tuning budget, the same attack suite, and the same flip-budget sweep, so the comparison is a pure contest of mechanisms. Beating Aegis means exceeding its 35x flip-cost multiplier at equal or better benign accuracy — but we will also report a second criterion Aegis does not address: robustness of the shared early backbone and of compiled executables, where Compiled Models, Built-In Exploits shows an average of just 1.4 flips collapses models by targeting .text code rather than weights.

Two further baselines calibrate the static-defense landscape. FT-ClipAct, which replaces unbounded activations with profiled clipped ones, reports a 68.92% accuracy improvement over an unprotected VGG-16 on CIFAR-10 at a fault rate of $1\times10^{-5}$ FT-ClipAct; we run it with its prescribed offline profiling stage on the same data. And the training-time defense of On Mitigating Random and Adversarial Bit Errors, which combines robust quantization, weight clipping, and random bit-error training and tolerates up to a 1% random bit error rate, is included to show the gap between random-fault and targeted-fault regimes. Finally, and most decisively for our own claim, we run an ablation of our controller with the feedback loop frozen: the same divisive form with a fixed $\lambda_\ell$ tuned offline. If the frozen version matches the adaptive one, our contribution collapses to another static defense and we will say so; if the adaptive version wins — especially under distribution shift or faults injected mid-stream — the homeostatic ingredient is what does the work.

Why not just…?

Why not just use ECC memory or memory-controller row-swap defenses? Three facts in the literature argue these are insufficient alone. Standard SECDED error-correcting code fixes only one bit per word, while targeted Rowhammer patterns routinely induce multi-bit flips in the same row, escaping it DeepHammer. Row-swap defenses are themselves attackable: the Juggernaut attack weaponizes the "unswap" mechanism of Randomized Row-Swap and triggers flips in under 4 hours at $T_{RH}=4800$ Scalable and Secure Row-Swap. And as thresholds fall toward 512–1200 activations, hardware defenses carry storage and power costs prohibitive for edge devices, which is precisely the deployment regime we target. A related and honestly stronger suggestion — periodically checksum the weights and reload from disk — does defeat static weight corruption on a server, and we concede it. Our defense targets the regime where verification is too expensive or too slow: continuous edge inference on large quantized models, fault windows between checks, and corruption that lands in compiled code rather than weights Compiled Models, Built-In Exploits.

Why not just clip activations or train with random bit errors? Both are real competitors and we include them as baselines rather than dismiss them. FT-ClipAct works against random faults but needs an offline profiling stage tuned to a fault distribution, and it zeroes legitimate large activations along with rogue ones — a cost that shows up as benign-accuracy loss on confident inputs FT-ClipAct. Random bit-error training tolerates random corruption but is beaten by worst-case gradient-directed search, which finds the flips the training distribution never covered Bit-Flip Attack. The genuinely dangerous version of this objection is "your controller is just adaptive clipping with neuroscience branding." That may be true, and our frozen-gain ablation is designed to settle it: if per-batch adaptive renormalization beats an offline-tuned static threshold only under mid-stream faults and distribution shift, the contribution is real but narrower than the framing, and we will report it that way.

Why not just use Aegis's randomized exits? Aegis is the defense to beat, and we treat it as such rather than argue around it. Its known limits are structural: the randomized exits protect the classifier heads, not the shared early feature backbone, and compiled-executable attacks that corrupt control flow render multi-exit routing itself inoperable Compiled Models, Built-In Exploits. Our inhibitory controller sits inside every layer, including the early backbone, so it is complementary rather than redundant — and the decisive experiment is the stack: Aegis plus homeostatic inhibition should raise the flip cost above either alone. If it does not, the mechanisms overlap and we will characterize the overlap honestly.

Proposed Experiments

The first experiment is a simulation sweep on CIFAR-10, CIFAR-100, and ImageNet with the architectures above, sweeping flip budgets from 1 to 1000 bits under four attack models: random flips, Progressive Bit Search Bit-Flip Attack, DeepHammer's gradient-based ranking with flip-aware search DeepHammer, and the compiled-code "Superbit" attack Compiled Models, Built-In Exploits. The headline metric is bits-to-collapse, defined as flips needed to reach random-guess accuracy, alongside benign accuracy and attack success rate; the target is beating Aegis's 35x multiplier while keeping benign accuracy within 2% of the undefended model.

The second experiment moves to physical DDR4 modules. We reproduce the massaging-and-hammering pipeline, measure real flip profiles including unintended extra flips, and test two things the simulation cannot: whether the controller absorbs the messy multi-bit flip patterns of real silicon, and whether it counters the winner-group effect — the phenomenon where flips drive nearly all inputs into a single class DeepHammer — by renormalizing the saturating layer before the softmax. Recovery dynamics are measured by injecting faults mid-stream and counting samples until accuracy returns to 95% of clean performance, the regime where static thresholds should fail and the homeostatic loop should earn its keep.

The third experiment is the theory-motivated check on the balanced spiking architecture of Excitation-Inhibition Balanced Neural Networks: inject weight bit flips at several network sizes under the $J \sim 1/\sqrt{N}$ scaling and measure whether population-level signal tracking degrades gracefully or collapses. A fourth, smaller run tests composability: homeostatic inhibition stacked on Aegis, with both given the same budget, to see whether flip costs multiply. If experiment three shows graceful degradation, the biological premise is confirmed and the controller becomes a way to buy that property for conventional networks; if it collapses, we will have learned that E/I balance alone does not explain cortical resilience to discrete parameter corruption, which would itself sharpen what tDCS's sub-threshold biasing can and cannot teach hardware design. For the clinical side, the mapping stays analogical throughout — the proposal borrows a mechanism, not a measurement, from Unmasking Latent Inhibitory Connections, whose demonstration that a global GABA reduction yields selective functional unmasking is the existence proof that population-level inhibitory bias can have precise functional consequences.