Conference · 2025
NI-Diff: Zero-Day and Adversarial Network Intrusion Detection with Diffusion Models
Abstract
While Deep Learning (DL) has achieved remarkable success in Network Intrusion Detection System (NIDS), its inherent data-driven nature makes it vulnerable to distribution shift. This limitation exposes DL-based NIDS to both adversarial attacks that are crafted by adding subtle change to original samples and zero-day attacks that are out-of-distribution (OOD) data unseen during training. However, existing work focusing on adversarial detection often fails to identify zero-day attacks and vice versa, leaving a security gap in DL-based NIDS. We propose NI-Diff, a novel detection approach that can effectively identify both adversarial network flow as well as zero-day intrusion by estimating their distribution with generative models. More specifically, we leverage a variational auto-encoder to map the network flow into a latent space and use a diffusion model to reconstruct the likely-hood from noise. Our key intuition is that the in-distribution data and the reconstructed data will have a similar likelyhood which results in similar inference output in the DL classifier. Extensive experiments on two large-scale NIDS datasets demonstrate that our approach can effectively identify 97% adversarial network flow and 92% zero-day threat with less than 2% false positive rate, outperforming state-of-the-art adversarial detection and OOD detection baselines.
BibTeX
@inproceedings{zhang202nidiff,
title={NI-Diff: Zero-Day and Adversarial Network Intrusion Detection with Diffusion Models},
author={Milin Zhang and Michael De Lucia and Ananthram Swami and Jonathan Ashdown and Nathaniel D. Bastian and Francesco Restuccia},
booktitle={MILCOM 2025-2025 IEEE Military Communications Conference (MILCOM)},
year={2025}
}