arXiv:2512.22179cs.LGcs.CR2025-12中稿 · publication in the…

通过重构隐空间结构提升零样本异常检测能力,有效识别未知攻击。

Latent Sculpting for Zero-Shot Generalization: A Manifold Learning Approach to Out-of-Distribution Anomaly Detection

  • 先用新型损失函数训练编码器,让正常流量在隐空间聚成紧凑簇
  • 在隐空间上拟合流模型,实现校准的异常评分,零样本OOD F1达0.867
  • 对隐蔽入侵和低频拒绝服务攻击均表现优异,适合安全防护场景

基于机器学习的入侵检测系统在面对未见过的攻击时仍面临重大挑战。深度模型在已知攻击上表现良好,但在分布外变化下性能下降,因决策边界紧密依赖训练数据分布。本文提出潜空间塑形(Latent Sculpting)框架,分两阶段提升鲁棒性:第一阶段使用新型二值潜空间塑形损失训练基于Transformer的表格编码器,促使良性流量在隐空间形成紧凑聚类,同时与异常模式保持分离;第二阶段在所得隐空间上拟合掩码自回归流(Masked Autoregressive Flow),生成校准的概率异常分数。在CIC-IDS-2017基准上的严格零样本评估中,第一阶段在已知攻击上达到0.98的F1分数;第二阶段在平衡阈值(85百分位)下,零样本分布外(OOD)F1为0.867,AUROC达0.913。模型成功检测了包括隐蔽渗透攻击(召回率78.7%,峰值达97.2%)和低频拒绝服务变体(召回率>94%)在内的复杂分布偏移,传统方法常在此类场景失效。结果表明,将潜空间几何学习与密度建模显式解耦,是应对零日网络威胁的稳定策略。

原文摘要 · Abstract (English)

Detecting previously unseen attacks remains a major challenge for machine learning-based intrusion detection systems. Deep models trained on network traffic often achieve high accuracy on known attacks but fail under distributional shift because their decision boundaries are tightly coupled to the training data distribution. We introduce Latent Sculpting, a two-stage anomaly detection framework that improves robustness by explicitly structuring the latent representation before density estimation. The first stage trains a Transformer-based tabular encoder using a novel Binary Latent Sculpting loss, which encourages benign traffic to form a compact latent cluster while enforcing separation from anomalous patterns. The second stage fits a Masked Autoregressive Flow to the resulting latent space to produce calibrated probabilistic anomaly scores. Under a strict zero-shot evaluation protocol on the CIC-IDS-2017 benchmark, Stage 1 attains an F1-score of 0.98 on known attacks, while Stage 2 -- evaluated at the balanced threshold (85th-percentile) -- achieves a zero-shot OOD F1-score of 0.867 and AUROC of 0.913. The model successfully detects difficult distribution shifts including stealthy infiltration attacks (78.7% recall, peaking at 97.2%) and low-volume DoS variants (>94% recall), scenarios where conventional approaches often fail. Our results suggest that explicitly separating latent geometry learning from density modeling provides a stable approach for detecting zero-day cyber threats.

异常检测零样本隐空间网络安全

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