Modern processors speed themselves up by guessing: when a branch or memory access is slow to resolve, the CPU executes ahead of the answer and rolls back if it guessed wrong. The rollback erases the architectural state, but not the fingerprints the wrong-path work left in caches, branch predictors, and execution queues — and attackers can read those fingerprints to steal secrets, as the Spectre family of attacks showed (Spectre attacks: exploiting speculative execution). A leading line of defense assumes such attacks are loud: to leak a secret, the attacker must repeatedly mistrain branch predictors and trigger transient faults, producing dense bursts of mispredictions and exceptions that hardware performance counters can catch. SPECULARIZER, which aligns Intel Processor Trace with performance-counter events and feeds them to an LSTM trained on attack phases, reports a true positive rate exceeding 99% for exception-based attacks when at least four exceptions occur within a monitoring window (Specularizer : Detecting Speculative Execution Attacks via Performance Tracing).
This proposal tests that density assumption directly. In two very different sequential domains — video classifiers with recurrent memory and reinforcement-learning agents in games — a body of work has shown that dense interference is an artifact of naive attacks, not a law of nature: perturbing a single frame out of 40 fools a recurrent video classifier nearly 60% of the time because the corrupted hidden state propagates through clean frames (Sparse Adversarial Perturbations for Videos), and a reinforcement-learning attacker that learns when to strike degrades game agents to their minimum scores using a fraction of the interventions any human heuristic needs (Learning key steps to attack deep reinforcement learning agents). Nobody has asked whether the same sparsity principle holds for microarchitectural state. We propose to build a budget-constrained planner that chooses, at runtime, when to invoke a known transient-execution leak gadget against a live victim process, with the explicit objectives of maximizing leaked bits while keeping per-window misprediction and exception counts below detector thresholds. If the plan works, the detector's core premise fails; if it does not, we will have the first quantitative evidence that sparse timing cannot help in hardware, which is itself a result the defense community needs.
Core Claim
The claim is two-part. First, a mechanism claim: microarchitectural predictor state — branch history tables, pattern history tables, and cache replacement state — behaves like the recurrent hidden state of an LSTM, in that a single, brief adversarial "seed" (one mistraining sequence, one transient load) leaves a persistent trace that degrades or leaks across many subsequent, otherwise clean execution windows. Sparse Adversarial Perturbations for Videos demonstrated exactly this contagion in software models, and Speculative interference attacks: breaking invisible speculation schemes showed that transient instructions can leave permanent changes in cache LRU state on a Kaby Lake i7-7700 — but only via manually constructed gadgets, never as a measured temporal decay process. Second, an evasion claim: a planner that exploits this persistence can sustain a useful leak rate while holding exception density below the four-per-window style thresholds that Specularizer and its LSTM rely on, whereas a dense attacker at the same leak rate is detected near-certainly.
The closest existing work, SpecRL, trains a PPO agent in a Gymnasium environment to write x86 assembly instruction-by-instruction and finds Spectre-style leaks in programs up to 150 instructions long in an average of 7 minutes, scaling roughly linearly where the Revizor fuzzer scales exponentially (Towards Reinforcement Learning for Exploration of Speculative Execution Vulnerabilities). But SpecRL is an offline discovery tool: it searches for any program that leaks, against no running victim, under no budget, with no adversary present and no detector to evade. Our proposal is the opposite regime — a runtime attack against a concurrent victim, where the gadget is known (found by SpecRL or Revizor-style testing) and the entire problem is when, how rarely, and in what state-conditioned pattern to fire it. That question — temporal allocation under a detection constraint — is precisely what the sparse-perturbation literature has solved in other domains and what no paper in this space has touched.
Research Program
The first deliverable is a runtime attack environment, built by extending the SpecEnv scaffolding from SpecRL from offline program synthesis to a two-agent setting: a victim thread running SPEC CPU2006 workloads (the same suite SPECULARIZER evaluates on) with a secret in memory, and an attacker thread that is co-resident on the core and already possesses a working leak gadget — either a classic Spectre-v1 style gadget or a speculative-interference gadget in the style of Speculative interference attacks, which turns transient resource contention into permanent cache footprints. At each decision point the attacker observes cheap microarchitectural proxies (Prime+Probe cache traces, misprediction counters, victim branch density, as SpecRL already instruments) and takes a binary action: invoke the gadget now, or wait. The optimization problem is a budget-constrained one, and we solve it exactly the way Learning key steps to attack deep reinforcement learning agents solved the Atari version — Lagrange relaxation, turning the constrained problem into an unconstrained one with a per-invocation penalty:
$$\max_\pi \; \mathbb{E}\left[\sum_t \big(\ell_t - \lambda\, a_t\big)\right]$$
where $\ell_t$ is the expected number of secret bits recoverable from the cache state if the gadget fires at step $t$, $a_t \in \{0,1\}$ is the invoke/wait decision, and $\lambda$ prices invocations so that the learned policy spends them only when the expected leak per invocation is high. By sweeping $\lambda$ we trace an entire density-versus-throughput curve rather than a single attack point. The training loop reuses PPO as SpecRL does, but the reward now includes a detection term: a penalty whenever a simulated monitoring window would contain enough mispredictions or exceptions to trip a SPECULARIZER-style threshold. The one known cost of this family of methods — the Lagrange multiplier $\lambda$ needs manual tuning per environment, a limitation Yu et al. themselves flag — we accept and handle by sweeping, since hardware episodes are cheap once the environment exists.
The second deliverable is the mechanism measurement: a contagion half-life for microarchitectural state. We prime a branch predictor or cache LRU state once, then run clean victim code and measure how misprediction rates and cache-access ordering decay over subsequent windows. This is the hardware analog of the single-frame seed experiment in Sparse Adversarial Perturbations for Videos, and it determines whether sparse attacks in hardware rest on a real propagation mechanism or only on threshold arithmetic. If the half-life is short — if hardware state flushes itself quickly, unlike an LSTM cell — the evasion claim must survive on timing alone, and the proposal's scope narrows honestly to that.
The third deliverable is defensive: sparse-aware detector training data. Whatever planner we learn becomes the generator for attack traces that a SPECULARIZER-style LSTM can be retrained on, testing whether detection survives once the density prior is removed. We will release both.
Proposed Experiments
The primary testbed is the AMD Matisse (Ryzen 5 3600) bare-metal setup SpecRL already uses, with cache state reset between episodes via WBINVD as that paper does; the speculative-interference gadget is additionally validated on the Intel Core i7-7700 used by Speculative interference attacks to confirm cross-vendor behavior. Victim workloads are SPEC CPU2006 programs holding a secret buffer; the attacker leaks it bit-by-bit through the cache channel. Three measurements decide the proposal.
First, the evasion frontier: leaked bits per second as a function of invocations per 10,000 retired instructions, for the learned planner, for a tuned periodic schedule, and for the dense attacker, each evaluated against the SPECULARIZER detector at its published operating point. The published numbers to beat or duck under are concrete: SPECULARIZER reports a true positive rate exceeding 99% for exception-based attacks when at least four exceptions occur within a monitoring window, detected 117 of 120 previously unseen attack variants, and incurred a 14.36% geometric-mean tracing overhead on SPEC benchmarks (Specularizer : Detecting Speculative Execution Attacks via Performance Tracing). No reported result found on Lacuna for detection accuracy against attacks whose exception density is deliberately held below that threshold — which is the point. The decisive comparison is learned sparse versus tuned periodic at matched leak rate: if the detector's true positive rate on the learned policy is high while its rate on periodic is also high, timing adaptivity buys nothing; if the learned policy sustains, say, half the dense attacker's bits per second at a true positive rate below 10% at a fixed 1% false-positive budget, the density premise is broken.
Second, the contagion experiment: after a single priming event, misprediction elevation and cache-ordering deviations measured over the following windows, reported as a decay curve. The software precedent is quantitative — one perturbed frame in forty yields roughly a 60% fooling rate, eight in forty reaches 100% (Sparse Adversarial Perturbations for Videos) — and we report the hardware analog; no reported result found on Lacuna for any such measurement on branch history or LRU state.
Third, the detector hardening check: retrain the SPECULARIZER LSTM on a mixed corpus of dense, periodic, and learned-sparse traces, and measure how much its false-positive rate on clean SPEC CPU2006 workloads rises as thresholds and window sizes shrink to close the sparse gap. This quantifies the defense-side cost of the attack we build.
Baselines
The "do nothing" reference point is the dense attacker: the same gadget fired at every opportunity, which is what an unoptimized exploit looks like. It should leak fast and be caught almost surely — SPECULARIZER's >99% true positive rate at four exceptions per window (Specularizer) predicts this — and it fixes the throughput ceiling against which sparse policies are judged. The strongest existing attacker-side competitor is SpecRL (Towards Reinforcement Learning for Exploration of Speculative Execution Vulnerabilities), which we run for what it actually does — discovering the leak gadget — and then, since it has no runtime timing policy, we invoke its discovered gadget densely and periodically; this isolates discovery capability from timing capability. For the timing question itself, the strongest fair competitor is a tuned periodic schedule: the same gadget fired at a fixed period, with the period swept on the same hardware, same victim workloads, and same total invocation budget as the learned policy, so any advantage of the planner is attributable to state-conditioned timing rather than to more compute or more attempts. We also run two heuristic timings from the RL-attack literature — fire when the victim's branch density is highest, and fire when misprediction counters are lowest — since Learning key steps showed such heuristics are the standard non-learned alternative. The key ablation removes the proposal's central ingredient in two halves: the same planner with $\lambda = 0$ (dense, no budget pressure) isolates sparsity, and the periodic-sparse schedule at matched budget isolates adaptivity. Beating the baselines means, concretely, a higher bits-per-second at a detector true positive rate at or below 10%, or an equal leak rate at strictly lower invocation density, with the dense and periodic schedules given the same gadget, hardware, and tuning budget (period sweep cost matched to the planner's training episodes).
Why not just…?
Why not just fuzz with Revizor and its accelerated variants? Revizor and Hide and Seek with Spectres answer a different question: whether a leaking instruction sequence exists on a given CPU (Revizor finds contract violations within minutes; the accelerated variant found SCO and ZDI leaks and compressed a two-month campaign to 16 hours). They do not allocate interventions over time against a live victim or under a detection constraint, and random generation cannot systematically control persistent predictor state — the accelerated paper itself lists branch-target-buffer control as an open limitation. We reuse fuzzing for gadget discovery and treat it as a collaborator, not a competitor, on the timing question.
Why not just use a periodic schedule with long gaps? This is the real threat, and we do not argue around it: a fixed period that keeps exceptions below four per window might leak adequately, and if the learned policy's advantage over a swept periodic schedule is within noise at matched budget, the planning machinery is unjustified and we will say so in the results. The evidence for expecting otherwise is indirect but consistent: in closed-loop settings, greedy and unconditioned timing fails where state-conditioned planning succeeds — the look-ahead LAS attack crashes Lunar Lander at budget $B=3$ where the greedy per-step MAS attack causes negligible damage (Spatiotemporally Constrained Action Space Attacks on Deep Reinforcement Learning Agents), and heuristic timings can even help the victim (Learning key steps). Whether that transfers to hardware, where leak yield plausibly depends on victim branch phase and predictor occupancy, is exactly what the head-to-head experiment settles.
Why not just shrink the detector's windows and thresholds instead? That is the obvious defense fix, and the third experiment tests it: the cost is false positives and overhead. SPECULARIZER already pays a 14.36% geometric-mean overhead for tracing (Specularizer), and pushing thresholds below four exceptions per window pushes benign SPEC workloads — which naturally contain mispredictions — across the line. If our retraining experiment shows the hardened detector closes the sparse gap at, say, under a 5% false-positive rate, the defense story wins and the attack contribution becomes the training corpus; if false positives explode, the attack result stands. Either outcome is publishable, and we will report whichever occurs.
Why not just attack densely and accept detection, since detection is offline forensics anyway? Partially fair: SPECULARIZER parses traces offline. But a forensic detector still deters, because dense attacks leave a permanent record with >99% true positives and 117/120 generalization to unseen variants (Specularizer), and nothing prevents the same LSTM from running online as hardware gets faster. An attack that leaves no threshold-crossing window at equal leak rate removes even the forensic record, which is a categorically stronger adversary and the right stress test for this defense family.
Decisive Checks and Scope
The proposal succeeds if the learned sparse planner operates on a point of the density-throughput frontier that both the dense and tuned-periodic baselines cannot reach — matched leak rate at materially lower detection, quantified against the published SPECULARIZER operating point — and if the contagion decay measurement explains why in terms of persistent microarchitectural state. It fails informatively if hardware state turns out to have a short half-life and periodic timing matches the planner; that negative result would be the first hard evidence that the sparsity lessons from recurrent-model and RL-agent attacks do not transfer to CPUs, and would materially strengthen the case for density-based defenses. All work is red-team measurement on our own hardware with our own secrets; gadgets and attack traces are disclosed to detector maintainers and released alongside the hardened-detector retraining corpus.
References
- Spectre Attacks: Exploiting Speculative Execution
- Specularizer : Detecting Speculative Execution Attacks via Performance Tracing
- Sparse Adversarial Perturbations for Videos
- Learning key steps to attack deep reinforcement learning agents
- Speculative interference attacks: breaking invisible speculation schemes
- Towards Reinforcement Learning for Exploration of Speculative Execution Vulnerabilities
- Revizor: testing black-box CPUs against speculation contracts
- Hide and Seek with Spectres: Efficient discovery of speculative information leaks with random testing
- Spatiotemporally Constrained Action Space Attacks on Deep Reinforcement Learning Agents