Stall Events as Spike Trains: Online Zero-Day Detection from Hardware Telemetry

Every time a processor pipeline stalls — an instruction waiting for data that was not ready, a branch guessed wrong, a cache miss — the hardware emits a small, timestamped event. One research tradition treats these events as noise to be engineered away. A second, in security, treats coarse summaries of them (performance-counter histograms) as a signal for catching malware, because malicious code changes how a chip behaves even when its bytes are packed or encrypted beyond recognition by antivirus signatures. This proposal treats the stall events themselves, in their raw temporal order, as the signal: we convert them into spike trains — streams of discrete, timestamped pulses — and let a small network of spiking neurons learn, online and without labels, the recurring temporal motifs of normal execution, so that novel, zero-day behavior stands out as a pattern no learned motif can explain.

The proposal borrows its segmentation logic from speech, where it is proven. Michel et al. showed that a predictor tracking continuous audio produces sharp error spikes exactly at phoneme boundaries, yielding unsupervised segmentation of unsegmented speech; we ask whether the same surprise signal partitions a telemetry stream into variable-length execution phases. The learning mechanism comes from neuroscience theory: Nessler et al. proved that a competitive spiking circuit governed by spike-timing-dependent plasticity (STDP — a rule that strengthens a synapse when the input spike precedes the output spike and weakens it otherwise) is mathematically an online Expectation-Maximization procedure, so the circuit discovers recurring hidden causes of its input without supervision. And the deployment constraint comes from the microarchitecture literature itself: an always-on detector must not stall the very pipeline it monitors, and its own weight-update path is full of the read-after-write and write-after-write hazards that shadow-register techniques were invented to remove.

Core Claim

A small Winner-Take-All (WTA) spiking network — a layer where the first neuron to fire inhibits its neighbors — governed by STDP, fed with pipeline-hazard event trains and segmented by prediction-error boundaries rather than fixed time windows, can do two things that current hardware malware detectors cannot. First, it can isolate short, episodic malicious bursts at event granularity, where detectors like XMD aggregate telemetry over fixed 40-second windows and let sub-window attacks execute undetected. Second, it can produce a novelty score for zero-day malware families that reflects a genuine generative mismatch rather than classifier confusion, addressing the documented failure of ensemble-entropy methods to separate "never seen this before" from "noisy sensors." The whole system is small enough to run as an in-order coprocessor whose STDP update pipeline is kept bubble-free by the same hazard-elimination techniques used in microcontrollers.

Research Program

The first work package is the encoding and segmentation layer. We define a hazard taxonomy — read-after-write stalls, write-after-write stalls, structural stalls, branch-flush penalties, cache-miss stalls — following the hazard categories analyzed by Hu et al. in their out-of-order microcontroller design and the counter events used in hardware malware detection. Each hazard event becomes a spike on its channel at its timestamp. A lightweight next-event predictor then computes a surprise value per step, and local maxima of the surprise curve mark phase boundaries. This is a direct transfer of the method Michel et al. validated on TIMIT (F-score 73.9%, R-value 76.4), where prediction error stays low inside a stable phonetic unit and spikes at articulatory transitions; our hypothesis is that execution phases behave the same way — stall patterns within a render loop or a UI idle cycle are predictable, and transitions are not. The output is variable-length execution-phase segments, replacing the arbitrary fixed slicing that Kumar et al.'s multiple-instance detector still relies on.

The second package is the STDP-WTA generative layer. Per synapse from input channel $i$ (one hazard type) to neuron $j$, the weight update follows the standard STDP window:

$$\Delta w_{ij}=\begin{cases} A^{+}e^{-\Delta t/\tau^{+}}, & \Delta t=t_{j}-t_{i}>0\\[2pt] -A^{-}e^{\Delta t/\tau^{-}}, & \Delta t<0 \end{cases}$$

where $t_i$ and $t_j$ are the pre- and post-synaptic spike times, so an input hazard that causally precedes a neuron's firing is strengthened and a non-causal one is weakened. Lateral inhibition, which Saunders et al. showed yields non-redundant feature dictionaries, keeps neurons from collapsing onto the same motif, and homeostatic threshold scaling guards against the runaway excitation that otherwise plagues STDP. By Nessler et al.'s equivalence, this circuit estimates a generative model of the hazard-motif distribution: familiar execution phases trigger a winner quickly with high likelihood, while a phase whose hazard ordering matches no learned motif fails to trigger any winner within a window $\tau$. That failure is our epistemic novelty score. Unlike the ensemble Shannon-entropy score of Chawla et al., which they themselves admit entangles out-of-distribution behavior with intrinsic sensor noise, a generative match score is only inflated by patterns the model has actually seen — benign noise stays inside learned motifs, and only structurally new behavior scores as novel.

The third package is the coprocessor, and it is where pipeline-stall research stops being motivation and becomes design constraint. On-chip STDP creates exactly the hazards Hu et al. solved: a post-synaptic spike must read synaptic weights while a concurrent pre-synaptic update is writing them — a read-after-write hazard on weight memory — and two updates targeting the same synapse form a write-after-write hazard. We adapt their shadow registers and single-cycle waiting queues to the STDP update pipeline, and stream synaptic rows through an SSR-style autonomous address generator where access patterns are regular, while acknowledging the limit documented in the Stream Semantic Registers work: irregular, winner-selected row accesses cannot use streams and must go through the queued path. This matters because the closest existing spiking accelerator, E3NE, is inference-only with an explicitly unpipelined decoder; nobody has built an on-chip plasticity pipeline, so its stall profile is an open question we will measure directly.

Baselines

The naive reference point is signature-based antivirus: on the malware samples used in the STD-Dataset evaluation, the top signature-based engine on VirusTotal reached an 80% detection rate, as reported by Kumar et al. in the XMD paper. This anchors the cost of the closed-world assumption — packed or novel samples slip through — but it is not the competitor that matters.

The strongest existing system is XMD, the expansive-telemetry detector of Kumar et al., which monitors 15 system-on-chip channels on a bare-metal Google Pixel 3 and, on the STD-Dataset (1,033 Android malware samples across 54 families and 723 benign apps), reports an 86.54% detection rate, a 2.9% false-positive rate, and an F1-score of 0.90–0.93 — a 32.91% improvement over traditional CPU-counter-only detectors, which reach only 0.66–0.76. We will reimplement the XMD feature pipeline and classifier on the same dataset, the same splits, and the same channel set, and give it an equal tuning budget. Crucially, we will evaluate it under a family-holdout protocol it never faced: train on a subset of the 54 malware families, test on the held-out remainder. Beating XMD means higher held-out-family detection at an equal or lower false-positive rate, plus a detection latency measured in milliseconds from burst onset — a metric on which XMD has a structural floor of one 40-second window plus roughly 1.4 seconds of inference compute, per its own reported figures.

The strongest competitor on temporal isolation is RT-HMD, the multiple-instance formulation of Kumar et al., which mutes benign segments inside malware traces and reports precision of 0.90 and AUC of 0.952 (up from 0.937) on the same platform — but still over pre-sliced windows. We will run it both with its original slicing and with our predicted phase boundaries, so the comparison isolates the segmentation question. On zero-day rejection, the competitor is the online uncertainty estimator of Chawla et al., which rejected over 95% of unknown workloads at a below-5% false-rejection rate on a DVFS dataset using an entropy threshold of 0.40; we will port it to the STD-Dataset channels and compare its rejection curve against our novelty score at matched false-rejection operating points. Finally, we will implement a classical change-point baseline (cumulative-sum detection on the telemetry channels); no reported result found on Lacuna for change-point detectors on hardware telemetry, so we treat it as an unbenchmarked threat to be measured, not dismissed.

The ablation that isolates our key ingredient replaces spike timing with spike counts: the identical WTA-STDP network, the same size and update rule, but driven by rate-coded (binned event-count) features rather than timestamped spike trains, following the encoding comparison drawn in the E3NE work between rate coding and temporal radix coding. If the rate-coded network matches the timing-driven one on family holdout, timing is not the signal and the core claim is wrong.

Why not just…?

Why not just train a Random Forest on the telemetry features? This is a real threat, and we will not argue around it: XMD does essentially this and reaches an F1 of 0.90–0.93 on known malware. But two documented failures bound what more of the same can buy. Chawla et al. showed that standard classifiers on counter features are overconfident black boxes that force zero-day inputs into known classes, and that raw CPU-counter distributions for benign and malicious workloads overlap severely — producing high uncertainty even on known data. And the closed-set trap is the starting point of the zero-day detection literature. So the decisive comparison is not in-distribution F1, where we may lose to XMD; it is held-out-family detection and burst-level latency, on which XMD reports nothing. If XMD's classifier matches our zero-day rejection at equal false-rejection rates, the proposal's contribution collapses to the latency and on-device energy story, and we will say so.

Why not just use fixed windows plus statistical change-point detection? Honest answer: change-point detection may well find coarse phase boundaries, and because no published number exists for it on hardware telemetry, this must be settled empirically rather than by argument. What the analog field suggests is that it will underperform on variable-duration events: Michel et al. compared prediction-error segmentation against fixed-interval baselines on speech and found fixed slicing fails precisely where event durations vary. Our stronger claim is that the discriminative signal lives in hazard ordering, not just in level shifts — a burst of cache-miss stalls interleaved with branch flushes in an unusual sequence is invisible to a per-channel cumulative sum. The rate-coding ablation is the designed kill switch for this claim: if counts match timing, we concede the point.

Why not just dump the counters to a log and process them on a background core? For the algorithmic claims in phases one and two, this is exactly what we will do in simulation, so the critique lands on the hardware package only — and there it has force, because XMD's own measurements show the cost: 1.4 seconds of compute per 40-second window on a host processor, a lag during which a payload can run to completion or tamper with software logging hooks. The event-driven substrate is also the energy argument: E3NE demonstrates a multiplier-free spiking design with zero DSP slices and roughly 20% lower power. Our hardware experiment is framed as feasibility, not necessity: we measure LUT overhead (with Hu et al.'s 18.37% maximum overhead as the reference point for what hazard-elimination logic costs) and stall cycles per STDP update with and without shadow registers, and let those numbers decide whether the coprocessor is worth building.

Why not just train offline and freeze the weights? Frozen weights inherit the closed-set trap: the zero-day direction literature and Chawla et al.'s overconfidence findings both show that a model fixed at deployment assigns novel threats confidently to benign classes. Online backpropagation is the alternative, but as the spiking-learning survey notes, it needs global weight access, stored activations, and backward passes through non-differentiable thresholds — hardware cost that stalls the very pipeline we want to keep clean, whereas STDP needs only local pre- and post-spike timestamps. The genuine risk is stability: Nessler et al. proved convergence for WTA circuits with homeostasis, but on idealized Poisson inputs, and whether real hazard streams — bursty, correlated, non-stationary — stay stable is exactly the open question. The frozen-versus-online ablation on held-out families, plus weight-divergence monitoring across deployment-length runs, is how we find out.

Proposed Experiments and Decisive Checks

Experiment one uses the STD-Dataset for direct comparability: same 15 channels, same 1,033 malware and 723 benign apps, with the 54 malware families split so that roughly a quarter are held out entirely as the zero-day set. We report detection rate at XMD's 2.9% false-positive operating point, F1, AUC, and the zero-day rejection rate at a 5% false-rejection ceiling, against XMD, the ported Chawla ensemble-entropy method, and RT-HMD. Experiment two addresses temporal isolation on a corpus we must build, since no fine-grained hazard-event dataset exists on Lacuna: a cycle-accurate instrumented RISC-V core on FPGA emitting timestamped hazard events for benign apps and for workloads with short episodic malicious bursts, the regime RT-HMD documents. The headline metric is detection latency from burst onset, where the fixed-window floor is one 40-second window plus 1.4 seconds of inference; we also score boundary quality with the F-score and R-value metrics imported from speech segmentation, annotated against execution-phase ground truth on a labeled subset. Experiment three runs the ablation grid: timing versus rate coding, prediction-error versus fixed-window segmentation at equal compute, online versus frozen weights, homeostasis on and off. Experiment four synthesizes the coprocessor and reports LUT overhead, stall cycles per STDP update with and without the shadow-register path, and power, against E3NE's multiplier-free reference design.

Three checks can kill the proposal, and each maps to one ablation. If the rate-coded network matches the spike-timing network on held-out families, timing is not the signal. If change-point segmentation matches prediction-error segmentation at equal compute, the transfer from speech is decoration. If frozen weights match online plasticity on zero-day families, the STDP machinery is unjustified complexity over an offline dictionary of motifs. Each is run first, at small scale, before the hardware package is committed — because the coprocessor is only worth its LUT budget if the algorithm it accelerates survives its own ablations.