Spiking Evidence Accumulators for Packet-Level Threat Containment

Automated network defenses lose to fast attacks less often because they misclassify and more often because they act too late. Commercial IoT safeguards notify users 30 seconds to 3 minutes after an attack. Even a well-engineered software-defined network (SDN), in which a central controller programs switches on the fly, takes 7.5 to 17.6 ms to install a blocking rule. At gigabit rates, thousands of attack packets get through in that window. Every learned containment policy in the literature decides at fixed intervals using dense floating-point networks, so it pays full compute cost on every observation, even though most traffic is benign and unchanging. Spiking neural networks (SNNs) work differently. These are networks whose neurons communicate by sparse binary pulses and whose internal voltage, the "membrane potential," integrates inputs over time. They have exactly the property this problem needs. A neuron fires only once its accumulated evidence crosses a threshold, and it costs almost nothing while it stays silent.

We propose to make the membrane potential itself the containment clock. A per-flow spiking policy advances one step per arriving packet rather than per clock tick. Its output neurons correspond to SDN actions graded by how hard they are to undo: copy to forensics, reflect to a honeypot, drop, and isolate the host. Each action has its own firing threshold. Weak evidence triggers only cheap, reversible actions, and strong evidence triggers quarantine. The decision is therefore "anytime": clear attacks are contained after a few packets, ambiguous flows are watched rather than cut, and benign steady traffic produces almost no spikes and almost no computation. The question we test is whether this design reduces the number of malicious packets forwarded before enforcement, at a matched rate of wrongly disrupted benign flows, and at far lower operation counts than learned alternatives that decide at fixed intervals.

Core Claim

Our central claim is specific. When SNN time steps are tied to packet arrivals and residual potential is carried across packets, the spiking policy behaves like a learned sequential test. We expect it to trace a better frontier between packets leaked and false containment than fixed-interval policies. We also expect it to match a conventional sequential test built from a recurrent ANN while using one to two orders of magnitude fewer energy-weighted operations on benign-dominated traffic.

This claim resolves, rather than sidesteps, a tension the literature leaves open. Multi-timestep spiking inference is usually treated as added latency: 6 steps in Going Deeper With Directly-Trained Larger Spiking Neural Networks and 10 in Deep Spiking Neural Networks for Large Vocabulary Automatic Speech Recognition. Whether such accumulation widens the leak window measured by Bridging the Gap Between Security Tools and SDN Controllers has never been quantified. If the time steps are the packets themselves, accumulation stops being overhead and becomes the evidence that decides.

Relation to Prior Work

The closest work, Neuromorphic Cybersecurity with Semi-supervised Lifelong Learning, builds a two-stage spiking intrusion detector. A static SNN filters benign traffic, and a plastic SNN classifies attack types on UNSW-NB15, reaching 85.3% accuracy at spike rates of 0.0008 to 0.002 per neuron. That work motivates ours: it shows spiking sparsity survives on network data. But it is an open-loop classifier with a label per record. It has no actions, no notion of when to decide, and no cost for wrongly quarantining a host. We keep the sparsity argument and discard the classification framing. What matters for us is the time of the first correct action, not the accuracy of a label.

Spiking reinforcement learning supplies the training method. CaRe-BN stabilizes the normalization statistics of SNN policies under the shifting state distributions of online RL. It reports 16.48 nJ versus 1775.36 nJ per inference against ANNs on MuJoCo. PopSAN encodes continuous inputs through populations of neurons with learned receptive fields and ran on Loihi at 140x less energy than a Jetson TX2. We reuse CaRe-BN for training and population coding for continuous packet features such as sizes and inter-arrival gaps. Both papers evaluate only physics and game environments, where decisions come on a fixed clock.

Error Amplification Limits ANN-to-SNN Conversion in Continuous Control plays two roles. It constrains us, because converted policies compound small errors over steps. It also supplies a mechanism: carrying scaled residual membrane potential across decision steps, which it calls CRPI, decorrelates those errors. We adopt that carry-over deliberately, as per-flow persistent state, and test whether it helps or hurts in adversarial traffic.

On the containment side, SecControl defines the action vocabulary we use (Forward, Drop, Reflect, Isolate, Copy) and measures its installation delays. RL defenders decide at coarse environment steps with dense networks. Autonomous Network Defence using Reinforcement Learning uses hierarchical PPO in CybORG. Reinforcement Learning for Autonomous Defence in Software-Defined Networking uses DDQN and A3C on a 32-node Mininet topology. ARCS uses a dual-stream policy with a 23.5 s average response time. None of these asks at which packet the defender should act, which is our question. The Mininet work also constrains us through a negative result: manipulated state inputs collapse preserved nodes from about 20 to 3.3 (DDQN) and 4.9 (A3C). A threshold-based accumulator could be more or less fragile under the same attack, so we test it.

Research Program

The policy runs one small spiking network per active flow, or per host for host-level actions. Each packet, or each short burst for high-rate flows, contributes one time step. Header and timing features enter through population-coded input neurons. Hidden neurons are leaky integrate-and-fire units, meaning their potential decays toward rest between inputs. Their potential is not reset between packets; it is carried forward with a learned decay. Four action neurons, for Copy, Reflect, Drop and Isolate, have separately learned thresholds. The first to fire issues the corresponding SDN primitive. Escalation is allowed: a flow already reflected can later be dropped. Silence means Forward.

The per-flow training objective is

$$\mathcal{L} = c_{\text{leak}} \sum_{k < \tau} m_k + \sum_{a} c_a \, \mathbb{1}[\text{action } a \text{ on a benign flow}],$$

where $m_k \in \{0,1\}$ indicates that packet $k$ is malicious and was forwarded. Here $\tau$ is the packet index at which effective blocking begins, which is the decision packet plus the packets arriving during rule installation. The costs $c_a$ increase from Copy to Isolate, so that reversible actions are cheap to use early.

We train in two stages. First, we train directly with surrogate gradients, which are smooth stand-ins for the spike's zero-or-infinite derivative, on replayed labeled packet streams. Timing enters through $\tau$ via a soft first-firing relaxation. Second, we fine-tune the policy in closed loop with CaRe-BN-stabilized actor-critic RL in an emulated SDN, where containment actions change what traffic arrives next.

Energy is reported three ways. We count synaptic operations and weight them by the 0.9 pJ accumulate and 4.6 pJ multiply-accumulate figures used in SpikingBERT. We run the network in the Lava simulator, as the closest prior work did. As a stretch goal, if hardware access permits, we deploy on Loihi. We treat operation-count energy as an estimate, not a measurement, and report it separately for benign-only and attack periods.

Baselines

The naive reference is a fixed signature-and-threshold pipeline. Snort-style rules plus a per-source rate limiter feed SecControl-style Drop and Isolate primitives, with the thresholds tuned on the same training split. It establishes how many packets leak with no learning at all. ARCS reports that learned response cuts average response time by 48.5% relative to rule-based approaches. Those figures are in seconds, however, and no packet-level leak count for rule systems appears in the file.

The strongest learned competitor for the timing question is a conventional sequential test. A small GRU, a recurrent network with gated memory, reads the same packet features. Its per-packet log-likelihood ratio is summed and compared against graded thresholds, a sequential probability ratio test that gives it the same anytime-decision capability as our model. We run it quantized to int8, with matched training data, a matched hyperparameter search budget of 50 trials, and parameter counts within 2x of the spiking model. Beating it means matching its leak-versus-false-containment frontier within confidence intervals while using at least 10x fewer energy-weighted operations on benign traffic. Being strictly better on the frontier is a bonus, not a requirement.

For fixed-interval learned containment we use hierarchical PPO as in Autonomous Network Defence using Reinforcement Learning and DDQN as in Reinforcement Learning for Autonomous Defence in Software-Defined Networking, each retrained on our environments. The reported reference points are an average score of −8.43 for the hierarchical agent in CAGE Challenge 1 (against −37.6 for chance), and about 20 to 21 preserved nodes out of 32 for DDQN and A3C on the Mininet topology. For detection quality alone, the spiking detector of Neuromorphic Cybersecurity with Semi-supervised Lifelong Learning reports 85.3% on UNSW-NB15, and Intrusion Detection in IoT Using Deep Residual Networks with Attention Mechanisms reports 89.23%. We attach each of these detectors to the same action mapping. No reported result was found on Lacuna for packets leaked before enforcement for any method, so we measure this ourselves for all systems.

Three ablations isolate the key ingredients. The first resets membrane potential at every packet, which removes accumulation. The second uses a single shared threshold with one action, removing graded containment. The third uses an ANN-to-SNN conversion of the GRU policy with and without CRPI, which tests whether direct training matters.

Why not just…?

Why not just run a small quantized recurrent network with a sequential test? This is the real threat, and it is why that system is our main baseline rather than a straw man. The GRU with a sequential test achieves anytime decisions without spikes. If it matches our frontier at comparable energy, then the neuromorphic contribution reduces to nothing, and we will report that. Our bet rests on per-packet cost. The GRU performs dense multiply-accumulates on every packet of every flow. The spiking accumulator performs sparse accumulates, and those vanish when inputs are stationary. The spike rates of 0.0008 to 0.002 per neuron reported on UNSW-NB15 by Neuromorphic Cybersecurity with Semi-supervised Lifelong Learning suggest the gap could be large. The benign-period operation counts in our experiments settle the question directly.

Why not just gate a dense model behind a cheap benign-traffic filter? A gate recovers much of the sparsity argument, and the two-stage design of the closest prior work is exactly such a gate. A gate makes a hard, one-shot decision about whether to look, though. Slow, low-and-slow attacks that look benign packet by packet fall through the gate. A leaky accumulator can integrate weak evidence across many packets. We include a gated GRU baseline and report results separately for fast attacks such as scans and floods and for slow ones such as exfiltration and backdoor traffic. The gate should be competitive on fast attacks and worse on slow ones. If it is not worse on slow attacks, the accumulation argument fails.

Why not just train a standard RL policy and convert it to spikes? Error Amplification Limits ANN-to-SNN Conversion in Continuous Control shows that converted policies compound errors across steps. It also shows the problem is partly fixable with CRPI, reaching 98.09% of ANN performance at 4 steps on MuJoCo. Conversion is therefore a credible competitor. Our conversion ablation, with and without CRPI, measures whether conversion survives adversarial, bursty packet streams. If converted-plus-CRPI matches direct training, we adopt conversion because it is simpler.

Why not just speed up rule installation, since that delay dominates? Installation delay (7.5 to 17.6 ms in SecControl) adds the same leaked packets to every method, and hardware improvements reduce it for everyone. We report decision-side and enforcement-side leakage separately so that gains are not credited to the wrong component. Our claim concerns only the decision side, which in fixed-interval RL defenders is currently measured in environment steps or seconds.

Proposed Experiments

We run three evaluation tiers. The first replays packet streams from CICIDS2017 and UNSW-NB15 where raw captures are available, for open-loop measurement of the decision packet index. The second is closed-loop containment on the 32-node, 48-link Mininet/OpenDaylight topology of Han et al. Attack traffic there is generated by scanning and exploitation tools, as in the SecControl testbed, and rule installation delays are drawn from the reported SecControl latencies. The third tier uses CybORG CAGE Challenge 1 to check that the policy remains competitive at the coarse host level against B_lineAgent and RedMeanderAgent, including their cross-play.

The primary metrics are three. We measure malicious packets forwarded before effective blocking, reported as median and 95th percentile per attack family. We measure false containment rate, weighted by action severity. We measure energy-weighted operations per packet during benign-only and attack periods. We also report preserved nodes on Mininet and episode score on CybORG, averaged over at least five seeds, with bootstrap confidence intervals.

Four results are decisive. The first is the leak-versus-false-containment frontier of the spiking policy against the int8 GRU sequential test at matched false containment. The second is the benign-period operation ratio between them, which must reach 10x for the energy claim to stand. The third is the reset-per-packet ablation, which must lose on slow attacks for accumulation to matter. The fourth is a robustness replication of the Han et al. state-manipulation attack, comparing preserved nodes for the spiking policy against DDQN's 3.3.

If the spiking policy loses the frontier comparison and wins only on operation counts, the claim narrows to efficiency. If it loses both, we will report that packet-clocked spiking containment offers no advantage over a quantized recurrent sequential test.