Home

Awesome

skab

🛠🛠🛠The testbed is under repair right now. Unfortunately, we can't tell exactly when it will be ready and we be able to continue data collection. Information about it will be in the repository. Sorry for the delay.

❗️❗️❗️The current version of SKAB (v0.9) contains 34 datasets with collective anomalies. But the update to v1.0 will contain 300+ additional files with point and collective anomalies. It will make SKAB one of the largest changepoint-containing benchmarks, especially in the technical field.

About SKAB Maintenance DOI License: GPL v3.0

We propose the Skoltech Anomaly Benchmark (SKAB) designed for evaluating the anomaly detection core. SKAB allows working with two main problems (there are two markups for anomalies):

  1. Outlier detection (anomalies considered and marked up as single-point anomalies)
  2. Changepoint detection (anomalies considered and marked up as collective anomalies)

SKAB consists of the following artifacts:

  1. Datasets
  2. Proposed Leaderboard for outlier detection and changepoint detection problems
  3. Python modules for algorithms’ evaluation (now evaluation modules are being imported from TSAD framework, while the details regarding the evaluation process are presented here)
  4. Python core with algorithms’ implementation
  5. Python notebooks with anomaly detection pipeline implementation for various algorithms

All the details about SKAB are presented in the following artifacts:

Datasets

The SKAB v0.9 corpus contains 35 individual data files in .csv format (datasets). The data folder contains datasets from the benchmark. The structure of the data folder is presented in the structure file. Each dataset represents a single experiment and contains a single anomaly. The datasets represent a multivariate time series collected from the sensors installed on the testbed. Columns in each data file are following:

Exploratory Data Analysis (EDA) for SKAB is presented [here (tbd)]. Russian version of EDA is available on kaggle.

ℹ️We have also made a SKAB teaser that is a small dataset collected separately but from the same testbed. SKAB teaser is made just for learning/teaching purposes and contains only 4 collective anomalies. All the information is available on kaggle.

Proposed Leaderboard

This leaderboard shows performance of algorithms on test set, unlike leaderboard for SKAB v0.9 which evaluates both training and testing data all together. Moreover, the evaluated window of change points is to the right side of actual change point occurence which is in accordance with fact, that it should be impossible to capture event before it occurs. Lastly, the window size for the NAB detection algorithm is set to 60 seconds to reflect the dynamics of the transition as presented in the slides to enable detection of the start of the transition phase which is also marked as change-point.

You can present and evaluate your algorithm using SKAB on kaggle. Leaderboards are also available at paperswithcode.com: CPD problem.

Information about the metrics for anomaly detection and intuition behind the metrics selection can be found in this medium article.

Outlier detection problem

Sorted by F1; for F1 bigger is better; both for FAR (False Alarm Rate) and MAR (Missing Alarm Rate) less is better Evaluated as binary classification problem.

AlgorithmF1FAR, %MAR, %
Perfect detector100
Conv-AE0.7813.5528.02
MSET0.7839.7314.13
T-squared+Q (PCA-based)0.7626.6224.92
LSTM-AE0.7429.9625.92
T-squared0.6619.2142.6
LSTM-VAE0.569.1355.03
Vanilla LSTM0.5412.5459.53
MSCRED0.3649.9469.88
Vanilla AE0.392.5975.15
Isolation forest0.292.5682.89
Null detector00100

Changepoint detection problem

Sorted by NAB (standard); for NAB (standard), NAB (LowFP), NAB (LowFN) bigger is better, for Number of Missed CPs, Number of FPs lower is better The current leaderboard is obtained with the window size for the NAB detection algorithm equal to 60 sec and to the right side of true change point.

AlgorithmNAB (standard)NAB (LowFP)NAB (LowFN)Number of Missed CPsNumber of FPs
Perfect detector10010010000
MSCRED32.4216.5340.2855342
Isolation forest26.1619.530.8276135
T-squared+Q (PCA-based)25.3514.5131.3372232
Conv-AE23.6121.5427.558223
LSTM-AE23.5120.1125.918869
T-squared19.5410.224.3170106
MSET13.8410.2217.379666
Vanilla AE11.416.5313.91103106
Vanilla LSTM11.31-3.817.2590342
ArimaFD-0.09-0.17-0.061272
Null detector000--

Notebooks

The notebooks folder contains jupyter notebooks with the code for the proposed leaderboard results reproducing. We have calculated the results for following commonly known anomaly detection algorithms:

Additionally on the leaderboard were shown the externally calculated results of the following algorithms:

Details regarding the algorithms, including short description, references to scientific papers and code of the initial implementation is available in this readme.

Installation

  1. install Python 3.10+ (tested on 3.10.13)

  2. install poetry package manager

    • brew install poetry

    Poetry installs dependencies and locks versions for deterministic installs. Poetry uses Python's built-in venv module to create virtual environments. It also uses PEP 517 & 518 specifications to build packages without requiring setup.py or requirements.txt files.

  3. LightGBM base install

    • brew install lightgbm
  4. install SKAB dependencies, see pyproject.toml for details

    • poetry install
  5. confirm installation

    • poetry show --tree - shows all dependencies installed
    • poetry env info - displays information about the current environment (Python version, path, etc)
    • poetry list - lists all cli commands

Citation

Please cite our project in your publications if it helps your research.

@misc{skab,
  author = {Katser, Iurii D. and Kozitsin, Vyacheslav O.},
  title = {Skoltech Anomaly Benchmark (SKAB)},
  year = {2020},
  publisher = {Kaggle},
  howpublished = {\url{https://www.kaggle.com/dsv/1693952}},
  DOI = {10.34740/KAGGLE/DSV/1693952}
}

Notable mentions

SKAB is acknowledged by some ML resources.