[Paper Review] AnoShift: A Distribution Shift Benchmark for Unsupervised Anomaly Detection
AnoShift introduces a chronologically structured benchmark for unsupervised anomaly detection using the Kyoto-2006+ network traffic dataset, demonstrating significant distribution shifts over 10 years. The framework evaluates models on IID, NEAR, and FAR test splits based on temporal distance from training data, showing that awareness of distribution shift and simple distillation techniques improve performance by up to 3% compared to standard IID training.
Analyzing the distribution shift of data is a growing research direction in nowadays Machine Learning (ML), leading to emerging new benchmarks that focus on providing a suitable scenario for studying the generalization properties of ML models. The existing benchmarks are focused on supervised learning, and to the best of our knowledge, there is none for unsupervised learning. Therefore, we introduce an unsupervised anomaly detection benchmark with data that shifts over time, built over Kyoto-2006+, a traffic dataset for network intrusion detection. This type of data meets the premise of shifting the input distribution: it covers a large time span ($10$ years), with naturally occurring changes over time (eg users modifying their behavior patterns, and software updates). We first highlight the non-stationary nature of the data, using a basic per-feature analysis, t-SNE, and an Optimal Transport approach for measuring the overall distribution distances between years. Next, we propose AnoShift, a protocol splitting the data in IID, NEAR, and FAR testing splits. We validate the performance degradation over time with diverse models, ranging from classical approaches to deep learning. Finally, we show that by acknowledging the distribution shift problem and properly addressing it, the performance can be improved compared to the classical training which assumes independent and identically distributed data (on average, by up to $3\%$ for our approach). Dataset and code are available at https://github.com/bit-ml/AnoShift/.
Motivation & Objective
- To address the lack of benchmarks for unsupervised anomaly detection under distribution shift in real-world streaming data.
- To demonstrate that the Kyoto-2006+ dataset exhibits natural, gradual distribution shifts over a 10-year period due to evolving user behavior and system changes.
- To propose a chronology-based evaluation protocol with three test splits—IID, NEAR, and FAR—based on temporal distance from training data.
- To validate that acknowledging distribution shift leads to improved model generalization and robustness in real-world deployment scenarios.
- To provide a publicly available dataset and codebase for reproducible research in distribution shift-aware anomaly detection.
Proposed method
- The authors analyze the Kyoto-2006+ dataset using per-feature distribution analysis, t-SNE visualization, and Optimal Transport to quantify distribution shifts across years.
- They propose a three-way split protocol: training on 2006–2010 (4 years), NEAR on 2011–2013 (3 years), and FAR on 2014–2015 (2 years), based on temporal proximity to training data.
- The dataset is preprocessed by discretizing continuous features via exponential binning (233 bins) and scaling percentage features to 100 values, preserving original inlier-outlier ratios.
- Additional features such as IDS_detection, Malware_detection, and Ashula_detection are retained for anomaly signal representation.
- A basic knowledge distillation technique is applied to improve model generalization under distribution shift, compared to standard IID training.
- The benchmark is released with code, preprocessed data splits (300k train, 30k held-out per split), and full dataset versions on GitHub and Bitdefender’s shared repository.
Experimental results
Research questions
- RQ1Does the Kyoto-2006+ dataset exhibit measurable distribution shifts over its 10-year collection period?
- RQ2How does model performance degrade when tested on data from increasingly distant time horizons (IID vs. NEAR vs. FAR)?
- RQ3Can awareness of distribution shift lead to improved anomaly detection performance compared to standard IID training assumptions?
- RQ4To what extent can a simple distillation technique mitigate performance degradation due to temporal distribution shift?
- RQ5Can a chronology-based evaluation protocol better reflect real-world model generalization than standard IID evaluation?
Key findings
- The Kyoto-2006+ dataset exhibits significant non-stationary behavior over 10 years, confirmed by per-feature distribution shifts, t-SNE visualization, and Optimal Transport-based distance measurements.
- Anomaly detection models show consistent performance degradation when tested on data from farther time horizons, with the largest drop observed on the FAR split (2014–2015).
- The proposed chronology-based benchmark (IID, NEAR, FAR) effectively captures temporal performance degradation, offering a more realistic evaluation protocol than standard IID splits.
- By acknowledging distribution shift and applying a basic knowledge distillation technique, model performance improves by up to 3% on average compared to classical IID training.
- The benchmark demonstrates that shift-aware training leads to better robustness and generalization in real-world deployment scenarios where data evolves over time.
- The preprocessed dataset and code are publicly available at https://github.com/bit-ml/AnoShift/, enabling reproducible research and future benchmarking.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.