TLDR: This research paper investigates the effectiveness of non-contrastive self-supervised learning (SSL) methods for network intrusion detection (NID), addressing the limitations of traditional supervised approaches that require extensive labeled data. The study systematically compares five non-contrastive SSL models, three encoder architectures, and six data augmentation strategies across two NID datasets. It reveals that certain augmentation methods like Gaussian Noise and Mixup, when properly tuned, can significantly enhance performance, while simpler encoder architectures often prove more viable than complex ones. Although non-contrastive SSL models outperform DeepSVDD, a well-tuned Autoencoder still achieves superior results, suggesting that future work should focus on NID-specific augmentations and more sophisticated unsupervised detectors.
Network intrusion detection (NID) is a critical component of cybersecurity, constantly evolving to combat sophisticated threats. For decades, NID systems have largely relied on supervised learning, which requires vast amounts of labeled data to identify known attack patterns. However, this approach struggles with detecting new, unknown anomalies and incurs significant costs and time for data labeling. This challenge has spurred interest in self-supervised learning (SSL), a paradigm that learns meaningful data representations without explicit labels.
While previous research in NID has explored contrastive SSL methods, the effectiveness of non-contrastive SSL—a subset of SSL that avoids comparing negative sample pairs—remained largely unexplored, especially concerning different encoder architectures and data augmentation strategies. A recent study delves into this gap, systematically investigating the performance of various non-contrastive SSL methods for network intrusion detection.
A Novel Approach to Unsupervised Intrusion Detection
The research paper, titled “An Investigation into the Performance of Non-Contrastive Self-Supervised Learning Methods for Network Intrusion Detection,” proposes a two-stage pipeline. The first stage focuses on learning an informative representation of normal network traffic data using non-contrastive SSL models, without any labels. This involves experimenting with different data augmentation techniques and encoder architectures. In the second stage, the pre-trained encoder’s weights are frozen, and a simple K-means detector is employed to distinguish between benign and attack data, making the entire detection process label-free.
The study rigorously compared five non-contrastive SSL models: BYOL, SimSiam, Barlow Twins, VICReg, and W-MSE. These models were tested with three distinct encoder architectures—Convolutional Neural Networks (CNN), Multi-Layer Perceptrons (MLP), and Feature Tokenizer Transformers (FT-Transformer)—and six data augmentation strategies. The augmentation methods included Swap Noise, Zero Out Noise, Gaussian Noise, Random Shuffle, Subsets, and Mixup. A total of ninety unique combinations were systematically evaluated across two widely recognized NID datasets: UNSW-NB15 and 5G-NIDD.
Key Findings and Insights
The extensive experiments yielded several significant insights into the optimal configurations for non-contrastive SSL in NID:
-
Augmentation Matters: The study found that the “Random Shuffle” augmentation consistently performed poorly across all SSL models and encoders. Surprisingly, “Gaussian Noise,” previously considered unsuitable for NID, delivered the best results for the BYOL model on the UNSW-NB15 dataset. This suggests that with proper hyperparameter tuning, certain augmentations can be highly effective. “Mixup,” which operates in the representation space rather than the input space, also showed competitive performance on both datasets, highlighting its potential as an alternative augmentation strategy. The “Subsets” augmentation, while achieving competitive performance with models like VICReg on UNSW-NB15, also introduced high uncertainty in performance metrics and was computationally intensive.
-
Encoder Performance: While the FT-Transformer encoder showed competitive performance for BYOL and SimSiam models on the UNSW-NB15 dataset, simpler architectures like MLP and CNN generally outperformed it in other scenarios. This indicates that the choice and optimization of augmentation techniques and hyperparameters might have a more significant impact than using deeper or more complex encoder architectures.
-
Top-Performing SSL Models: VICReg and Barlow Twins consistently achieved higher average performance metrics compared to the other non-contrastive SSL models. The architectural differences in SimSiam and BYOL, such as the absence of an estimated moving average in SimSiam, did not provide a clear advantage over VICReg and Barlow Twins.
Also Read:
- Securing Smart Grids: A New Approach to Detecting Silent Cyber Threats
- Protecting Connected Devices: CST-AFNet’s Intelligent Security for IoT
Comparison with Baselines and Future Directions
The research also compared the best-performing non-contrastive SSL models against two well-known unsupervised baselines: DeepSVDD and a vanilla Autoencoder (AE). The non-contrastive SSL models generally outperformed DeepSVDD. However, a well-tuned Autoencoder consistently achieved higher average performance metrics than the non-contrastive SSL models on both datasets. This suggests that while non-contrastive SSL is competitive, the choice of the unsupervised detector (K-means in this case) might be a limiting factor.
The authors, Hamed Fard, Tobias Schalau, and Gerhard Wunder, conclude that future research should focus on designing NID-specific augmentation methods that are function-preserving and satisfy domain constraints, avoiding the generation of unrealistic samples. Additionally, exploring improved distance metrics, such as Mahalanobis distance, or incorporating more sophisticated unsupervised detectors like Isolation Forest or OCSVM in the classification stage could further bridge the performance gap with reconstruction-based approaches like Autoencoders. The code for this research is available at https://github.com/renje4z335jh4/non_contrastive_SSL_NIDS.


