arXiv:2506.19802cs.CRcs.IR2025-06中稿 · EuroS&P 2026被引 1

用攻击知识图谱增强特征空间,让模型仅用正常流量就能识别新型攻击。

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

  • 用大模型构建攻击家族知识图谱,通过符号推理生成攻击策略组合。
  • 在仅训练正常流量下实现99%检测率,误报率低于0.0137%。
  • 适合需要高泛化、低误报的网络入侵检测系统开发者。

基于异常的机器学习网络入侵检测系统(A-NIDS)从良性数据中学习正常网络行为,并将偏离该基线的行为视为异常,理论上可无需标注攻击数据即可检测演化的攻击变种。其泛化能力关键取决于特征空间对网络行为的表征质量。然而,当前特征空间缺乏对攻击相关语义的编码,尚未被充分重视。为此,我们识别出两大缺陷:一是“维度盲区”,特征无法捕捉关键攻击机制属性;二是“攻击策略聚合失败”,特征难以表达复合攻击行为。我们进一步证明,现有两种前沿数据驱动泛化框架(增量学习与对比学习)无法弥补这些特征层面的不足。为此,我们提出KnowML,将攻击领域知识直接嵌入特征空间。针对每个攻击家族,利用大模型从攻击实现中构建知识图谱(KG),再通过符号推理枚举潜在攻击策略及其组合。由此生成的知识增强特征空间,使模型在仅训练正常流量时仍具备有效泛化能力,超越现有方法。系统性实验证明,KnowML在多种攻击变种上最高达到99%检测率,且误报率始终低于0.0137%,显著优于当前基于特征的基准方法。

原文摘要 · Abstract (English)

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.

入侵检测知识图谱攻击泛化LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。