Contextual Masking Distillation for Network Traffic Anomaly Detection
Xinglin Lian, Yu Zheng, Yan Liu, Fan Zhou, Chunlei Peng, Xinbo Gao
University of Electronic Science and Technology of China · Xidian University
Key points
From the paper's conclusion- Given the structural characteristics of network traffic, we also present a new anomaly scoring with multi-view awareness, which perceive comprehensive traffic patterns.
Abstract
Network traffic anomaly detection is critical for cybersecurity but faces challenges in accurately identifying malicious activities. Recent zero-positive approaches, which use only normal training data under the reconstruction paradigm, have shown progress. However, encrypted network traffic obscures normal–anomalous distinctions, causing confused modeling. In addition, the “identical shortcut” problem, where models reconstruct any input with similar fidelity, produces suboptimal representations and indistinguishable detection. To address these limitations, this paper introduces ConMD, a novel Contextual Masking Knowledge Distillation framework. ConMD features distillation paradigm for discriminative representations and then pursues two objectives: effective contextual information modeling and a comprehensive anomaly metric. Specifically, we introduce context-aware local-global attention mechanisms for the student network's backbone, which capture both intra-packet and inter-packet dependencies. Additionally, a context-enhanced masking training strategy is designed to facilitate contextual interactions in normal flows. Given the structural characteristics of network traffic, we also present a new anomaly scoring with multi-view awareness, which perceive comprehensive traffic patterns. ConMD combines insights from both packet- and flow-level views to highlight deviations in anomalous network flows, thereby improving detection accuracy. Extensive experiments on three real-world datasets validate the effectiveness of ConMD, yielding consistent improvements over state-of-the-art baselines, achieving up to 2.8% and 5.1% AUC gains on the DataCon2020 and CIC-IDS2017 datasets, respectively. Our model code will be released at https://github.com/ikun0124/ConMD.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- GraphINR-IDS: Graph-Topology-Aware implicit neural reconstruction for zero-day intrusion detection in encrypted network trafficJournal of King Saud University Computer and Information Sciences · 2026
- Reconstruction Before Contrast? A Matched-Control Study of Encoder Training in Graph-Based Intrusion Detection for IoT-Relevant TelemetryACM Transactions on Internet of Things · 2026
- Understanding Self-Supervised Representation Learning for Encrypted TrafficarXiv · 2026
- BGA: A noise-immune neural distillation framework for malicious signature extraction in high-entropy encrypted flowsarXiv · 2026
- Multi-scale attention fusion for enhanced transformer models in intrusion detection systemsComputer Networks · 2026
- Lightweight Multimedia Anomaly and Integrity Detection for Consumer IoT Using Knowledge DistillationIEEE Transactions on Consumer Electronics · 2025