Papers › AnoShift: A Distribution Shift Benchmark for Unsupervised Anomaly Detection

AnoShift: A Distribution Shift Benchmark for Unsupervised Anomaly Detection

30 Jun 2022arXiv:2206.15476archive 2025-07-28

Marius Dragoi, Elena Burceanu, Emanuela Haller, Andrei Manolache, Florin Brad

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/.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2206.15476")

Code

Syntology Ran 0 of 13 code samples harvested from 1 repository linked to this paper; 13 have no recorded run.

By repository: official repository: 13 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

bit-ml/anoshift officialmentioned in papermentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 0 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from bit-ml/anoshift. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

anomaly_score_bert bit-ml/anoshift/language_models/evaluation_utils.py official repository unverified BSD-3-Clause (permissive) · ab5ca7b7355911f2 · report
configure_model bit-ml/anoshift/language_models/model_utils.py official repository unverified BSD-3-Clause (permissive) · 5a538b08c1e8471b · report
configure_tokenizer bit-ml/anoshift/language_models/tokenizer_utils.py official repository unverified BSD-3-Clause (permissive) · 9122185befcd3a48 · report
eval_rocauc_ds bit-ml/anoshift/language_models/evaluation_utils.py official repository unverified BSD-3-Clause (permissive) · d2e17a1b030b09e0 · report
load_test_year bit-ml/anoshift/baselines_ID_setup/load_anoshift.py official repository unverified BSD-3-Clause (permissive) · 67544ef8ead6799f · report
load_test_year bit-ml/anoshift/baselines_OOD_setup/load_anoshift.py official repository unverified BSD-3-Clause (permissive) · d7ad456b5c436b34 · report
load_train_year bit-ml/anoshift/baselines_ID_setup/load_anoshift.py official repository unverified BSD-3-Clause (permissive) · 9cefe75d6c8660e7 · report
load_train_year bit-ml/anoshift/baselines_OOD_setup/load_anoshift.py official repository unverified BSD-3-Clause (permissive) · 5e56d43d0e9f0785 · report
prepare_set bit-ml/anoshift/baselines_ID_setup/baseline_BERT.py official repository unverified BSD-3-Clause (permissive) · 65311fdf0a3bbd77 · report
prepare_test_ds_split bit-ml/anoshift/language_models/data_utils.py official repository unverified BSD-3-Clause (permissive) · 2d42553a00d0c824 · report
rename_columns bit-ml/anoshift/baselines_ID_setup/load_anoshift.py official repository unverified BSD-3-Clause (permissive) · c44561799320572b · report
tokenize_function bit-ml/anoshift/language_models/data_utils.py official repository unverified BSD-3-Clause (permissive) · 184f64ac20617dd0 · report
train_df_to_ds bit-ml/anoshift/language_models/data_utils.py official repository unverified BSD-3-Clause (permissive) · 750b967b13d190fc · report

Tasks

Intrusion DetectionNetwork Intrusion DetectionUnsupervised Anomaly Detection

Datasets

Introduced by this paper, per the archive.

AnoShift

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Unsupervised Anomaly Detection AnoShift COPOD ROC-AUC FAR 50.42 #5 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift COPOD ROC-AUC IID 85.62 #5 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift COPOD ROC-AUC NEAR 54.24 #5 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift COPOD ROC-AUC-ID (In-Distribution setup) 80.89 #5 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift OC-SVM ROC-AUC FAR 49.57 #6 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift OC-SVM ROC-AUC IID 76.86 #6 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift OC-SVM ROC-AUC NEAR 71.43 #6 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift OC-SVM ROC-AUC-ID (In-Distribution setup) 68.73 #6 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift SO-GAAL ROC-AUC FAR 49.35 #7 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift SO-GAAL ROC-AUC IID 50.48 #7 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift SO-GAAL ROC-AUC NEAR 54.55 #7 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift SO-GAAL ROC-AUC-ID (In-Distribution setup) 49.90 #7 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift ECOD Li et al. (2022) ROC-AUC FAR 49.19 #8 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift ECOD Li et al. (2022) ROC-AUC IID 84.76 #8 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift ECOD Li et al. (2022) ROC-AUC NEAR 44.87 #8 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift ECOD Li et al. (2022) ROC-AUC-ID (In-Distribution setup) 79.41 #8 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LOF ROC-AUC FAR 34.96 #9 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LOF ROC-AUC IID 91.5 #9 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LOF ROC-AUC NEAR 79.29 #9 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LOF ROC-AUC-ID (In-Distribution setup) 87.61 #9 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift deepSVDD ROC-AUC FAR 34.53 #10 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift deepSVDD ROC-AUC IID 92.67 #10 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift deepSVDD ROC-AUC NEAR 87.00 #10 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift deepSVDD ROC-AUC-ID (In-Distribution setup) 88.24 #10 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LUNAR ROC-AUC FAR 28.19 #11 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LUNAR ROC-AUC IID 85.75 #11 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LUNAR ROC-AUC NEAR 49.03 #11 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift LUNAR ROC-AUC-ID (In-Distribution setup) 78.53 #11 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift BERT ROC-AUC FAR 28.15 #12 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift BERT ROC-AUC IID 84.54 #12 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift BERT ROC-AUC NEAR 86.05 #12 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift BERT ROC-AUC-ID (In-Distribution setup) 79.62 #12 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift IsoForest ROC-AUC FAR 27.16 #13 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift IsoForest ROC-AUC IID 86.09 #13 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift IsoForest ROC-AUC NEAR 75.26 #13 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift IsoForest ROC-AUC-ID (In-Distribution setup) 81.27 #13 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift Internal Contrastive Learning ROC-AUC FAR 22.45 #14 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift Internal Contrastive Learning ROC-AUC IID 84.86 #14 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift Internal Contrastive Learning ROC-AUC NEAR 52.26 #14 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift Internal Contrastive Learning ROC-AUC-ID (In-Distribution setup) 66.99 #14 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift AE for anomalies ROC-AUC FAR 19.96 #15 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift AE for anomalies ROC-AUC IID 81 #15 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift AE for anomalies ROC-AUC NEAR 44.06 #15 of 15 Archive leaderboard report
Unsupervised Anomaly Detection AnoShift AE for anomalies ROC-AUC-ID (In-Distribution setup) 64.08 #15 of 15 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections