Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

KnowML: Improving Generalization of ML-NIDS with Attack Knowledge Graphs

About

Anomaly-based ML-NIDS (A-NIDS) model normal network behavior from benign data and classify deviations from this baseline as anomalies, theoretically enabling the detection of evolving attack variants without labeled attack data. The ability of A-NIDS to generalize critically depends on the quality of the feature space representing network behavior. However, the requirement for feature spaces that encode attack-relevant semantics has received little attention and remains poorly understood. As a consequence, these systems still struggle to meet practical operational constraints (low false positive rates without compromising detection performance and generalization to attack variants). We identify two limitations in the current feature spaces. First, Out-of-Dimension Blindness, where features do not capture essential attack mechanism properties. Second, Attack Strategy Aggregation Failure, where features cannot encode composite attack behaviors. Moreover, we demonstrate that two SotA data-driven generalization frameworks (based on incremental and contrastive learning) cannot compensate for these feature-level shortcomings. To bridge this gap, we present KnowML, a framework that encodes attack domain knowledge directly into the feature space. For each attack family, our method employs LLMs to construct a corresponding Knowledge Graph (KG) from attack implementations. Symbolic reasoning is then applied over the KG to enumerate potential attack strategies and their compositions. The resulting Knowledge-Augmented Feature Space enables effective generalization even when trained exclusively on benign traffic, a capability beyond current approaches. Systematic empirical evaluations show that KnowML achieves up to 99% detection rates while maintaining false positive rates at or below 0.0137%, substantially outperforming contemporary feature-based baselines across diverse attack variants.

Xin Fan Guo, Xinran Zheng, Albert Merono Penuela, Lorenzo Cavallaro, Sergio Maffeis, Fabio Pierazzi• 2025

Related benchmarks

TaskDatasetResultRank
Network Intrusion DetectionCAP Generalization
F1 Score99.85
42
Network Intrusion DetectionCIC-IoT-23 Generalization
F1 Score100
33
Attack DetectionCIC-IDS 2017
F1 Score (DoS Hulk)96.79
12
Attack DetectionCICIoT 2023
F1 (DoS-SYN)98.35
12
Network Intrusion DetectionCon Generalization
F1-score99.98
6
Network Intrusion DetectionCIC-IDS Generalization 2017
F1-score98.18
6
Network Intrusion DetectionKIT sub-sampled (test)
F1-score (Low rate TCP, SIM)0.9247
4
Showing 7 of 7 rows

Other info

Follow for update