Network Traffic Anomaly Detection Based on Dynamic Multi-Loss Collaborative Optimization
DOI:
https://doi.org/10.70695/IAAI202602A5Keywords:
Network Traffic Analysis; Anomaly Detection; Dynamic Loss Balance; Autoencoder; DMCOAbstract
This paper proposes a dynamic multi-loss collaborative optimization (DMCO) method for network traffic anomaly detection in high-dimensional and imbalanced scenarios. The core innovation leverages a Transformer-based encoder to extract discriminative spatio-temporal representations for anomaly detection. We introduce three synergistic loss functions: Feature correlation loss is used to enforce feature independence through scaled cosine similarity, reconstruction loss is used to preserve essential patterns via autoencoding, and classification loss is used to handles extreme class imbalance. These losses are dynamically balanced via a meta-weight controller that adaptively adjusts loss weights based on real-time validation performance. The experimental results on NSL-KDD and CIC-IoT2017 datasets show that F1 can achieve 98.52% and false positive rate can achieve 1.05%, demonstrating superior robustness against concept drift and adversarial evasion attacks in 5G-IoT environments.