Introduction
The proliferation of Internet of Things (IoT) devices has significantly expanded the network attack surface. Traditional Intrusion Detection Systems (IDS) often rely on signature-based detection or supervised machine learning. However, these approaches struggle with "zero-day" attacks—novel threats for which no signatures or labeled training data exist. Supervised models, while accurate on known threats, often experience a catastrophic drop in performance when encountering unknown attack vectors.
To address these challenges, the SAFE framework introduces a self-supervised approach. By learning the inherent "latent structure" of normal network traffic, SAFE can identify anomalies without requiring prior exposure to specific attack patterns.
The SAFE Methodology
The SAFE framework repurposes computer vision techniques for tabular network data through a four-stage pipeline designed to capture complex spatial correlations within network flows.
- Feature Selection: Principal Component Analysis (PCA) is employed to reduce noise and computational complexity by selecting the most significant features that explain the majority of data variance (e.g., top 31 features).
- Vector-to-Image Mapping: Using the DeepInsight technique, tabular features are mapped into a 2D grid. This process preserves statistical relationships by placing correlated features in close spatial proximity, effectively creating a "synthetic image" of network flows.
- Masked Autoencoder (MAE) Training: A Vision Transformer-based MAE is trained exclusively on "normal" traffic images. By masking 75% of the input pixels and requiring the model to reconstruct them, the MAE learns a robust latent representation of legitimate network behavior.
- Novelty Detection: Rather than relying on reconstruction error, SAFE extracts latent features from the MAE encoder and passes them to a Local Outlier Factor (LOF) model. This lightweight detector identifies anomalies based on density deviations in the latent space.
Evaluation and Datasets
The framework was evaluated across four diverse benchmark datasets representing modern IoT and Industrial IoT (IIoT) environments: MQTTset (IoT protocols), WUSTL-IIoT (industrial control), X-IIoTID (diverse IIoT), and Edge-IIoTset (edge computing vulnerabilities).
Performance Analysis
SAFE demonstrates significant improvements over existing state-of-the-art (SOTA) methods. It outperformed the SLAD framework by up to 26.2% and the self-supervised Anomal-E by up to 23.5% in F1-score.
Key results include:
- High Accuracy: The model achieved F1-scores of 99.95% on Edge-IIoTset and 96.41% on X-IIoTID.
- Real-time Viability: With an inference time of just 0.18 ms per sample, the computational overhead is approximately 3.65% of the median network flow duration, making it suitable for high-speed environments.
- Zero-Day Resilience: Unlike supervised models (such as XGBoost or DNNs) that fail when faced with unknown attacks, SAFE maintains high performance because its detection logic is based on deviations from "normal" rather than matching known "attack" signatures.
Conclusion
SAFE effectively bridges the gap between tabular network data and advanced visual self-supervised learning. By leveraging spatial correlations through image mapping and the representational power of Masked Autoencoders, it provides a robust defense against evolving cyber threats. Future work will explore more complex pre-training tasks and evaluate performance on higher-throughput backbone networks beyond the IoT context.
Summary updated