Network intrusion detectors on IoT gateways face two problems at once. Attacks change over time, so a detector trained once goes stale. And gateways are small, passively cooled boxes, so retraining a neural network on the device is costly. Hyperdimensional computing (HDC) offers a different kind of classifier. Each input becomes a long random-looking vector, often binary, and each class is stored as a running sum of the vectors of its examples. Learning is a single addition and inference is a similarity lookup, with no backpropagation. In principle this makes continual on-device learning cheap.
We propose an HDC detector that reads the per-packet streaming statistics edge systems already compute. It encodes them into binary vectors using only integer operations, and keeps its class memories current under drift through a per-class forgetting rule. The question we want to settle is narrower than "is HDC good for intrusion detection." We ask whether this design holds accuracy on a chronologically ordered attack stream as well as a periodically retrained compact neural network does, while staying under a realistic thermal cap. We also ask whether the HDC encoding itself, rather than the streaming centroid update it enables, is responsible for any gain.
Core Claim
The building block on the networking side is damped incremental statistics. These are exponentially decayed means, variances and correlations of packet sizes and inter-arrival times. They are computed in constant time per packet, over several decay windows and several aggregation contexts (per source MAC–IP pair, per source IP, per channel, per socket). Kitsune introduced this extractor and feeds it to an ensemble of small autoencoders. Realguard feeds the same kind of features to a 5-layer, roughly 34k-parameter network.
These features have explicit structure: each one is a statistic, computed in a context, over a window. HDC can represent that structure directly. In HDC, "binding" (bitwise XOR for binary vectors) attaches a role to a value, and "bundling" (bitwise majority) superimposes many bound pairs into one vector that stays similar to each part, as reviewed in the HDC/VSA survey. We encode a packet's feature vector $x$ as
$$H(x) = \mathrm{maj}_{k,j,s}\big(R_k \oplus W_j \oplus S_s \oplus L(q(x_{kjs}))\big),$$
where $R_k$, $W_j$ and $S_s$ are fixed random binary vectors for context $k$, window $j$ and statistic $s$. The function $q$ quantizes a feature into one of a small number of levels, and $L$ maps each level to a binary "level vector": neighbouring levels share most bits, distant levels share few. The symbol $\oplus$ is XOR and $\mathrm{maj}$ is bitwise majority.
Each class $c$ keeps an integer accumulator $C_c$ that is updated as
$$C_c \leftarrow \gamma\, C_c + w(x)\, H(x).$$
Here $w(x)$ is CyberHD's similarity-weighted step: small when $x$ is already close to $C_c$, large when it is novel. The factor $\gamma<1$ is a forgetting factor applied only when class $c$ itself receives an update. That last detail is the drift mechanism. A class that stops appearing, such as a brute-force campaign that ends, is frozen rather than eroded, which preserves the independence of class memories that Clo-HDnn credits for HDC's resistance to forgetting. A class that keeps appearing with shifted behaviour tracks the shift.
Packets whose best similarity falls below a rejection threshold go to a small buffer. When the buffer grows coherent, it seeds a new unlabeled prototype for a possible unseen attack, which an analyst can name later.
The prediction is specific. On a stream ordered by capture time, this detector should approach the detection quality of a periodically retrained Realguard-style network. It should do so using integer-only work per packet, and with throughput that degrades less under a 60°C cap than a floating-point HDC encoder.
Relation to Prior Work
The closest work is CyberHD. It applies HDC to intrusion detection with a similarity-weighted update and regeneration of uninformative dimensions, and reaches competitive accuracy at 500 dimensions with 12.9× better bit-flip robustness than DNNs. It uses a floating-point radial-basis-function encoder over static flow tables, evaluates offline, and names concept drift as open. We reuse its weighted update. We replace its encoder with an integer role–filler encoding of streaming statistics, and evaluate under chronological drift on hardware. These are the two things CyberHD leaves out.
Clo-HDnn and FedUHD supply the method-level evidence that additive class or cluster vectors support continual and non-IID learning. Both evaluate only on image, speech and activity data, and both rely on neural feature extractors. Our encoder needs no neural backbone because the damped statistics already provide a usable input.
Genssler et al. constrains the design. They find that HDC training saturates a Raspberry Pi 4 CPU, reaches 84.2°C, and loses 62% of its throughput under a 60°C limit, against a 16% loss for a CNN. That result argues against floating-point, batch-style HDC on gateways. It also motivates our two hypotheses: an XOR/popcount pipeline at a few hundred to a few thousand dimensions avoids saturation, and per-packet streaming work is rate-limited by traffic rather than running flat out.
The sequential-ML study shows that temporal context matters, with an LSTM beating a feedforward network 95.7% to 91.5% F1 on CTU-13. We get temporal context from the multi-window damped statistics rather than from recurrence. That is a real assumption, and the experiments test it.
Research Program
We will build three things. The first is the encoder, with level-vector resolution and dimensionality $D\in\{500, 1000, 2000, 4000\}$ as the main knobs. The second is the drift-aware learner, including the rejection-and-spawn path. The third is a C implementation on a Raspberry Pi 4 that mirrors Realguard's deployment, measuring per-packet latency, CPU duty cycle, die temperature and power.
Labels on a real gateway are scarce and arrive late. The main setting therefore gives the learner a delayed label for a small fraction of packets, which we sweep from 0.1% to 10%. A fully supervised variant serves as the upper reference.
The analysis has two parts. The first asks where the gain comes from. We compare full role–filler binding against plain bundling of quantized features with no role vectors, and against a nearest-centroid classifier on the raw standardized statistics that uses the same decayed update. The second asks how the forgetting rule behaves. We compare per-class update-clocked forgetting against wall-clock forgetting and no forgetting, measuring both adaptation speed after a shift and retention of attack classes that have gone quiet.
Baselines
The naive reference point is a detector trained once on the first day of traffic and never updated. Any drift-handling method must clearly beat it on later days, and the size of its decay tells us how much drift the stream actually contains.
The strongest existing method is a Realguard-style pipeline: damped incremental statistics feeding a 5-layer network of about 34k parameters. On CIC-IDS2017 it reports 99.64% binary accuracy, 0.40% false-positive rate and about 10,600 packets per second at 36% CPU on a Raspberry Pi 4B (Realguard summary). Those figures come from a non-chronological split, so they are an upper reference rather than the drift setting. We will run it on the same features and the same chronological stream, with the same delayed-label budget. It will be retrained on accumulated labels at intervals of one hour, six hours and one day, with matched hyperparameter search. We will charge its retraining energy and CPU time to the same Pi 4. "Beating" it means equal or better per-day macro-F1, and especially recall on newly appearing attack classes, at lower total energy. We would also count matching it within one point of macro-F1 at a several-fold energy reduction under the thermal cap as a meaningful result.
Kitsune is the strongest label-free baseline, run online on the same statistics. It reports about 5,400 packets per second on a Pi 3B. Because it outputs only an anomaly score, we compare it on binary detection.
CyberHD is the strongest HDC baseline. It will receive the same dimensionality budget and the same forgetting rule. That isolates whether our integer encoder matters on accuracy and on heat. No dataset-specific accuracy for CyberHD is reported in the file, only an average 1.63% margin over SVMs across four benchmarks, so we will reimplement it.
The CNN-BiLSTM represents explicit temporal modelling at small size: 7,841 parameters and 96.91% multiclass accuracy on UNSW-NB15. We run it with periodic retraining like Realguard.
The key ablation is the decayed nearest-centroid on raw statistics. It is our method minus HDC.
Why not just…?
Why not just retrain the compact DNN periodically? This is the default practice. Realguard's own authors note that periodic retraining "can consume significant computational and network resources," but they do not quantify the cost against detection lag. The proposal measures exactly that trade-off. If frequent retraining on a Pi 4 is cheap enough and catches new attacks as fast as our learner, the energy argument for HDC is weak and we will say so.
Why not just keep a decayed class centroid on the raw features, or an online linear model? This is the most serious threat. An HDC class vector is, mechanically, a centroid in a randomized feature space. If the raw-feature centroid with the same forgetting rule matches our detector, then the gain comes from streaming centroid learning and not from hyperdimensional encoding. Our claim that binding matters is that it gives the centroid a nonlinear, interaction-aware geometry over context × window × statistic. The raw-centroid ablation and the bundling-without-roles ablation decide this directly. If they tie with our method, we will report HDC as unnecessary for accuracy and keep it only if the robustness or thermal results justify it.
Why not just run Kitsune, which is already online and unsupervised? Kitsune cannot name attack types, cannot use the scarce labels an operator does have, and is vulnerable to poisoning during its training phase. Still, on binary detection it may match us, and we report that comparison separately rather than folding it into multiclass scores.
Why not just use CyberHD with a forgetting term? Accuracy may be similar. Our hypothesis is that its floating-point encoder reproduces the thermal collapse Genssler et al. observed. The head-to-head under a 60°C cap is the test.
Proposed Experiments
The main stream is CIC-IDS2017 replayed in capture order: benign Monday, then brute force, DoS, web and infiltration, botnet and DDoS on later days. The ordering naturally introduces new classes and shifts. We report per-day macro-F1, recall on each class from the day it first appears, and retention of earlier classes on later days. Kitsune's IoT camera captures provide packet-level streams with Mirai and man-in-the-middle traffic. Cross-dataset transfer from CIC-IDS2017 to CIC-IDS-2018 tests longer-range drift. UNSW-NB15 tests rare-class retention, since Worms make up a tiny share of traffic.
On hardware, we replay traffic to the Pi 4 at increasing rates up to saturation, with and without a 60°C cap. We record sustained packets per second, latency percentiles, temperature and joules per packet for every method, including retraining cost. A separate experiment injects bit flips into class memories to check whether CyberHD's robustness carries over to integer accumulators with forgetting.
Three outcomes would be decisive. The proposal succeeds if our detector holds macro-F1 within a point of hourly-retrained Realguard across the chronological stream at clearly lower energy, while beating the raw-centroid ablation. It fails on its central claim if the raw-centroid ablation matches it. The thermal hypothesis fails if the integer pipeline still loses more than half its throughput under the cap at the packet rates gateways actually see.
References
- Kitsune: An Ensemble of Autoencoders for Online Network Intrusion Detection
- Realguard: A Lightweight Network Intrusion Detection System for IoT Gateways
- A Survey on Hyperdimensional Computing aka Vector Symbolic Architectures, Part II: Applications, Cognitive Models, and Challenges
- Clo-HDnn: A 4.66 TFLOPS/W and 3.78 TOPS/W Continual On-Device Learning Accelerator with Energy-efficient Hyperdimensional Computing via Progressive Search
- Late Breaking Results: Scalable and Efficient Hyperdimensional Computing for Network Intrusion Detection
- FedUHD: Unsupervised Federated Learning using Hyperdimensional Computing
- Brain-Inspired Hyperdimensional Computing: How Thermal-Friendly for Edge Computing?
- On the Evaluation of Sequential Machine Learning for Network Intrusion Detection
- Lightweight CNN-BiLSTM based Intrusion Detection Systems for Resource-Constrained IoT Devices