cs.CRFeb 26, 2026

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

Authors: Srikumar Nayak

Organizations: Incedo Inc, USA

Abstract

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.

Figures & tables

Explore similar work

CardsList
  1. Do Transformers Actually Help Intrusion Detection? A Temporal Sequence Evaluation on CIC-IDS2017

    Jun 9, 2026Zach Moczkodan, Hany RagabData LeakageNetwork Intrusion Detection

  2. Collaborative Zone-Adaptive Zero-Day Intrusion Detection for IoBT

    Feb 18, 2026Amirmohammad Pasdar, Shabnam Kasra Kermanshahi, Nour Moustafa +1Network Intrusion DetectionInternet of Things

  3. Boundary-Seeking GAN-Augmented TabTransformer for Adversarially Robust Intrusion Detection

    Jul 17, 2026Raihan Sultan Pasha Basuki, Aliyah KurniasihSynthetic Data AugmentationTransformer