arXiv:2603.00185cs.CRcs.AI2026-03

基于Transformer的入侵检测模型,兼顾零日攻击泛化与可解释性。

ThreatFormer-IDS: Robust Transformer Intrusion Detection with Zero-Day Generalization and Explainable Attribution

  • 将流量记录转为时间窗口,结合加权监督与自监督学习提升鲁棒性
  • 零日攻击下仍保持AUC-PR 0.721,召回率@1%误报率0.783
  • 通过梯度归因技术定位关键时间步与特征,辅助安全分析

物联网与工业网络的入侵检测需在低误报率下识别罕见攻击,并在流量演变、标签稀缺条件下保持可靠。现有方案常在分布内表现良好,但在未来流量、零日攻击族或对抗性特征扰动下性能下降,且缺乏可解释支持。本文提出ThreatFormer-IDS,一种基于Transformer的序列建模框架,将流量记录转化为时间有序窗口,学习上下文表征以实现稳健检测。方法融合四点:(i) 加权监督学习应对数据不平衡;(ii) 掩码自监督学习增强漂移与稀疏标签下的表征稳定性;(iii) 基于PGD的对抗训练,采用尺度归一化扰动提升对特征级逃避的鲁棒性;(iv) 使用集成梯度归因突出每个告警中的关键时间步与特征。在按时间顺序评估的ToN IoT基准上,ThreatFormer-IDS取得AUCROC 0.994、AUC-PR 0.956、Recall@1%FPR 0.910,优于强基线。在未见协议与攻击家族的零日测试中,仍保持优异泛化能力(AUC-PR 0.721,Recall@1%FPR 0.783)。对抗测试显示,随着扰动预算增加,其AUC-PR下降更慢,验证了在有限扰动下的稳定性。整体上,ThreatFormer-IDS提供统一、面向部署的入侵检测流程,平衡检测质量、零日行为、鲁棒性与可解释性。

原文摘要 · Abstract (English)

Intrusion detection in IoT and industrial networks requires models that can detect rare attacks at low false-positive rates while remaining reliable under evolving traffic and limited labels. Existing IDS solutions often report strong in-distribution accuracy, but they may degrade when evaluated on future traffic, unseen (zero-day) attack families, or adversarial feature manipulations, and many systems provide limited evidence to support analyst triage. To address these gaps, we propose ThreatFormer- IDS, a Transformer-based sequence modeling framework that converts flow records into time-ordered windows and learns contextual representations for robust intrusion screening. The method combines (i) weighted supervised learning for imbalanced detection, (ii) masked self-supervised learning to improve representation stability under drift and sparse labels, (iii) PGDbased adversarial training with scale-normalized perturbations to strengthen resilience against feature-level evasion, and (iv) Integrated Gradients attribution to highlight influential time steps and features for each alert. On the ToN IoT benchmark with chronological evaluation, ThreatFormer-IDS achieves AUCROC 0.994, AUC-PR 0.956, and Recall@1%FPR 0.910, outperforming strong tree-based and sequence baselines. Under a zero-day protocol with held-out attack families, it maintains superior generalization (AUC-PR 0.721, Recall@1%FPR 0.783). Robustness tests further show slower degradation in AUCPR as the adversarial budget increases, confirming improved stability under bounded perturbations. Overall, ThreatFormer- IDS provides a unified, deployment-oriented IDS pipeline that balances detection quality, zero-day behavior, robustness, and explainability.

入侵检测Transformer零日攻击可解释性

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