Network Intrusion Detection Adaptability under Spurious Labels: A Noise-Aware Few-Shot Class-Incremental Learning Framework

Zijian Zhao, Davide Di Monda, Domenico Ciuonzo, Yipeng Wang, Antonio PescapèarXiv 2026 · DOI · arXiv

TL;DR

NAFN is a novel framework for Network Intrusion Detection Systems (NIDS) that solves the "triple threat" of modern network security: the need to learn new attacks incrementally, with very few examples (few-shot), and in the presence of significant labeling errors (noise). By combining a teacher-student distillation approach with a "Noise-Aware Module" that filters bad data and synthesizes clean features, NAFN improves detection performance by up to 52% in high-noise environments.

What Problem Does This Paper Address?

Modern NIDS face a constant arms race. New "zero-day" attacks emerge weekly, requiring systems to adapt without being completely retrained from scratch—a process known as Class-Incremental Learning (CIL). However, two major hurdles remain:

  1. Data Scarcity: When a new attack is first spotted, we might only have a handful of samples (the Few-Shot problem).
  2. Spurious Labels: Unlike carefully curated research datasets, real-world "few-shot" samples are often labeled by automated scripts or heuristic rules. This leads to "label noise," where a malicious flow might be incorrectly labeled as benign (or vice versa). In a few-shot scenario, even a single mislabeled sample can catastrophically distort the model's understanding of a new attack.

While previous research has tackled few-shot learning and incremental learning separately, NAFN is among the first to address both while explicitly accounting for the "messiness" of real-world labels.

Methods

The NAFN framework (Overview in Fig. 1) operates in two main stages: a Base Training Phase on well-labeled data and an Incremental Learning Phase for new attacks.

Fig. 1: Overview of the NAFN framework. It consists of three main perspectives: (i) NIDS Workflow (horizontal process): from flow processing and feature encoding to the attack-traffic classifier; (ii) Learning Procedure (vertical process): including base training and incremental learning phases with Mem+-based memory selection; (iii) Noise-Aware Module: operating during the incremental learning phase. It detects mislabeled traffic samples and synthesizes feature embeddings.

The NIDS Workflow

The system processes raw network traffic into "biflows" (bidirectional flows) and extracts features from the first 20 packets to ensure "early detection." These are fed into a U-Net-based feature encoder that can be pretrained using reconstruction, contrastive, or hybrid strategies.

The Noise-Aware Module

This is the core innovation. When new, potentially mislabeled samples arrive, NAFN uses a two-step process:

  • Noise Detection: It evaluates the samples using algorithms like Prototype-Margin, which identifies outliers that don't fit the expected cluster of a class. These "noisy" samples are discarded.
  • Feature Sampling: To compensate for the lost data, NAFN estimates the statistical distribution (mean and covariance) of the remaining clean samples. Crucially, it uses Distribution Calibration, borrowing statistical "shapes" from well-known base classes to refine the distribution of the tiny new-class sample set. It then generates synthetic "clean" features to restore the training set size.

Stability via Distillation

To prevent "catastrophic forgetting" (where the model forgets old attacks while learning new ones), NAFN uses the Rethink Few-Shot (RFS) paradigm. The model from the previous phase acts as a "teacher," guiding the current "student" model to maintain consistent feature representations.

Datasets

The authors evaluated NAFN on three diverse, modern benchmarks:

  • CSE-CIC-IDS2018: A large-scale enterprise network dataset.
  • Edge-IIoT: Focused on industrial IoT protocols (Modbus, MQTT).
  • IoT-NID: Captured from a smart home environment with devices like Wi-Fi cameras.

These datasets provide a rigorous testbed for cross-network adaptability, as the traffic patterns in a smart home differ wildly from an industrial plant.

Key Insights and Ideas

  • Filtering is better than Correcting: In few-shot settings, trying to "fix" a label is dangerous because you have so little evidence. The authors found that simply filtering out suspicious samples and synthesizing new ones based on class-conditional distributions is far more robust.
  • Leveraging Prior Knowledge for Calibration: A key "aha" moment is that even if a new attack is unique, its feature distribution likely shares characteristics (like variance) with previously learned classes. Using base-class statistics to "calibrate" new class distributions prevents the model from over-fitting to a tiny, potentially biased sample set.
  • The FSCIL Gap: As shown in Table I, NAFN fills a critical gap in the literature by being the only framework to combine Few-Shot Class-Incremental Learning (FSCIL) with cross-network analysis and noise-aware denoising.
TABLE I: Related studies focusing on network intrusion detection with FSCIL and noisy labels. Papers are listed in chronological order by publication year. The final row provides an overview of the current work. The meaning of acronyms is provided at the bottom of the table.

Key Results

  • Resilience to Noise: Under 50% label noise, NAFN maintained strong performance while standard baselines collapsed. It improved F1-scores for new classes by up to +52%.
  • Efficiency: The system is designed for high-speed networks. Inference takes between 7.45 and 33.25 microseconds per biflow, allowing it to process tens of thousands of flows per second.
  • Cross-Network Robustness: NAFN successfully detected attacks even when the "base" knowledge came from a completely different type of network (e.g., training on IoT-NID and adapting to CSE-CIC-IDS2018).

Limitations and Future Work

  • Noise Detection Triggering: Currently, NAFN assumes the presence of noise is known. Future iterations could benefit from a "self-triggering" mechanism that detects when a denoising pipeline is necessary.
  • Symmetric Noise Assumption: The study assumes noise is distributed evenly across classes. In reality, certain attacks might be more frequently confused with benign traffic than others (asymmetric noise).
  • Explainability: While the system is effective, providing "why" a flow was flagged as an attack (especially a new one) remains a challenge for future research in Explainable AI (XAI) for security.

Summary updated

Abstract

Network Intrusion Detection Systems (NIDSs) must incrementally adapt to emerging attacks, even when only a limited amount of labeled network traffic is available. Consequently, Few-Shot Class-Incremental Learning (FSCIL)-based NIDSs have gained growing attention. However, existing FSCIL-based NIDSs are highly vulnerable to label noise in newly-observed attack classes. To address this limitation, we propose NAFN, a noise-aware FSCIL-based NIDS framework that reduces the impact of mislabeled data during incremental adaptation. NAFN consists of two components: (i) Noise Detection, which identifies and removes mislabeled biflows using noise-detection algorithms, and (ii) Feature Sampling, which estimates class-conditional embeddings from clean biflows, calibrates them with base-class statistics, and resamples synthetic features to recover the original biflow count. The framework follows the Rethink Few-Shot (RFS) teacher-student paradigm with lightweight nearest-neighbor or logistic regression classifiers, and various pretraining & memory selection strategies. Experiments on CSE-CIC-IDS2018, Edge-IIoT, and IoT-NID datasets show that NAFN effectively preserves prior knowledge and maintains strong incremental performance even under 50% label noise, consistently improving new-class F1-scores over non-denoised baselines, up to +52%, while being time-efficient and robust in cross-network and high-noise incremental settings. The implementation is publicly available to foster reproducibility.
BibTeX
@misc{zhao2026network,
  author = {Zijian Zhao and Davide Di Monda and Domenico Ciuonzo and Yipeng Wang and Antonio Pescapè},
  title = {{Network Intrusion Detection Adaptability under Spurious Labels: A Noise-Aware Few-Shot Class-Incremental Learning Framework}},
  year = {2026},
  eprint = {2611.21473},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21473},
}
Figure