A hybrid eBPF/ML intrusion detection system with two-model heterogeneous ensemble learning and real-time gateway-mode network blocking

Network intrusion detection systems (IDS) face a persistent trade-off between detection accuracy and processing latency. Conventional ML-based IDS implementations operate entirely in user space, introducing per-packet overhead from kernel-to-user-space context switches and memory copies which becomes the dominant cost at moderate-to-high traffic rates. We present a hybrid architecture that pushes 23-dimensional flow-feature extraction into the Linux kernel using an eXpress Data Path (XDP) eBPF program, and combines it with a heterogeneous, calibrated two-model ensemble in user space. The kernel program parses Ethernet/IP/TCP/UDP headers, maintains bidirectional per-flow state in an LRU hash map, and submits cumulative features to user space through a 4 MB lock-free ring buffer. A sliding-window detector then feeds two complementary supervised models—a Deep Neural Network (DNN) and an isotonic-calibrated Random Forest (RF)—whose probabilities are blended through validation-selected weighted voting under a confidence gate and a consecutive-attack confirmation rule. We further describe a gateway-mode deployment that turns the IDS host into the network gateway for protected devices, enabling true device-level isolation through paired eBPF XDP_DROP and iptables-FORWARD blocking. To address methodological concerns of an earlier draft, the system is re-evaluated under a strict per-day, per-attack-type chronological train/validation/test split on CIC-IDS2018, with held-out hyperparameter selection (including a one-dimensional grid search over $$w_{\text {dnn}}$$ with $$w_{\text {rf}}=1-w_{\text {dnn}}$$ ), a component ablation matrix, $$\tau /k/$$ window sensitivity sweeps, a per-attack false-negative breakdown, 1 000-resample bootstrap 95% confidence intervals, and a cross-dataset evaluation on CIC-IDS2017 (same models, same pipeline, with explicit transfer experiments in both directions). On the CIC-IDS2018 chronological test fold (mean across three seeds) the validation-tuned DNN + RF ensemble achieves accuracy 0.9567, precision 0.9242, recall 0.8920, F1 0.9079, FPR 0.0230 and ROC-AUC 0.9707 (95% bootstrap CIs on F1: [0.9046, 0.9124]); the in-distribution F1 is statistically indistinguishable from a pure-RF model, but the cross-dataset transfer to CIC-IDS2017 illustrates the value of the heterogeneous blend. End-to-end kernel-to-decision latency is 1.4 ms median on a single Intel i7-12700H core. A web dashboard provides per-model vote visualisation, blocking controls, and operator telemetry. All code, models, hyperparameters, random seeds, and the full container recipe required to reproduce every reported number are released alongside the manuscript.

Authors

Institutions

Publication Details

Journal
Journal of King Saud University - Computer and Information Sciences
Published
2026-08-17
DOI
https://doi.org/10.1007/s44443-026-01098-3
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A hybrid eBPF/ML intrusion detection system with two-model heterogeneous ensemble learning and real-time gateway-mode network blocking

Hanaa F. Mahmood, Yahya Alnattaf
Journal of King Saud University - Computer and Information Sciences
Network Security and Intrusion Detection
article

A hybrid eBPF/ML intrusion detection system with two-model heterogeneous ensemble learning and real-time gateway-mode network blocking

Hanaa F. Mahmood, Yahya Alnattaf
article en

Abstract

Network intrusion detection systems (IDS) face a persistent trade-off between detection accuracy and processing latency. Conventional ML-based IDS implementations operate entirely in user space, introducing per-packet overhead from kernel-to-user-space context switches and memory copies which becomes the dominant cost at moderate-to-high traffic rates. We present a hybrid architecture that pushes 23-dimensional flow-feature extraction into the Linux kernel using an eXpress Data Path (XDP) eBPF program, and combines it with a heterogeneous, calibrated two-model ensemble in user space. The kernel program parses Ethernet/IP/TCP/UDP headers, maintains bidirectional per-flow state in an LRU hash map, and submits cumulative features to user space through a 4 MB lock-free ring buffer. A sliding-window detector then feeds two complementary supervised models—a Deep Neural Network (DNN) and an isotonic-calibrated Random Forest (RF)—whose probabilities are blended through validation-selected weighted voting under a confidence gate and a consecutive-attack confirmation rule. We further describe a gateway-mode deployment that turns the IDS host into the network gateway for protected devices, enabling true device-level isolation through paired eBPF XDP_DROP and iptables-FORWARD blocking. To address methodological concerns of an earlier draft, the system is re-evaluated under a strict per-day, per-attack-type chronological train/validation/test split on CIC-IDS2018, with held-out hyperparameter selection (including a one-dimensional grid search over $$w_{\text {dnn}}$$ with $$w_{\text {rf}}=1-w_{\text {dnn}}$$ ), a component ablation matrix, $$\tau /k/$$ window sensitivity sweeps, a per-attack false-negative breakdown, 1 000-resample bootstrap 95% confidence intervals, and a cross-dataset evaluation on CIC-IDS2017 (same models, same pipeline, with explicit transfer experiments in both directions). On the CIC-IDS2018 chronological test fold (mean across three seeds) the validation-tuned DNN + RF ensemble achieves accuracy 0.9567, precision 0.9242, recall 0.8920, F1 0.9079, FPR 0.0230 and ROC-AUC 0.9707 (95% bootstrap CIs on F1: [0.9046, 0.9124]); the in-distribution F1 is statistically indistinguishable from a pure-RF model, but the cross-dataset transfer to CIC-IDS2017 illustrates the value of the heterogeneous blend. End-to-end kernel-to-decision latency is 1.4 ms median on a single Intel i7-12700H core. A web dashboard provides per-model vote visualisation, blocking controls, and operator telemetry. All code, models, hyperparameters, random seeds, and the full container recipe required to reproduce every reported number are released alongside the manuscript.

Journal of King Saud University - Computer and Information SciencesVol. 38(7)
University of Mosul (IQ)
Openalex Percentile: Top 8%
Network Security and Intrusion Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.