alibi-detect is an open source Python library focused on outlier, adversarial and concept drift detection. The package aims to cover both online and offline detectors for tabular data, images and time series. The outlier detection methods should allow the user to identify global, contextual and collective outliers.
alibi-detect can be installed from PyPI:
pip install alibi-detect
This will install alibi-detect
with all its dependencies:
creme
fbprophet
matplotlib
numpy
pandas
scipy
scikit-learn
tensorflow>=2
tensorflow_probability>=0.8
The following table shows the advised use cases for each algorithm. The column Feature Level indicates whether the outlier scoring and detection can be done and returned at the feature level, e.g. per pixel for an image:
Detector | Tabular | Image | Time Series | Text | Categorical Features | Online | Feature Level |
---|---|---|---|---|---|---|---|
Isolation Forest | ✔ | ✘ | ✘ | ✘ | ✔ | ✘ | ✘ |
Mahalanobis Distance | ✔ | ✘ | ✘ | ✘ | ✔ | ✔ | ✘ |
AE | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✔ |
VAE | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✔ |
AEGMM | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ |
VAEGMM | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ |
Prophet | ✘ | ✘ | ✔ | ✘ | ✘ | ✘ | ✘ |
Spectral Residual | ✘ | ✘ | ✔ | ✘ | ✘ | ✔ | ✔ |
Seq2Seq | ✘ | ✘ | ✔ | ✘ | ✘ | ✘ | ✔ |
-
Isolation Forest (FT Liu et al., 2008)
- Documentation
- Examples: Network Intrusion
-
Mahalanobis Distance (Mahalanobis, 1936)
- Documentation
- Examples: Network Intrusion
-
Auto-Encoder (AE)
- Documentation
- Examples: CIFAR10
-
Variational Auto-Encoder (VAE) (Kingma et al., 2013)
- Documentation
- Examples: Network Intrusion, CIFAR10
-
Auto-Encoding Gaussian Mixture Model (AEGMM) (Zong et al., 2018)
- Documentation
- Examples: Network Intrusion
-
Variational Auto-Encoding Gaussian Mixture Model (VAEGMM)
- Documentation
- Examples: Network Intrusion
-
Prophet Time Series Outlier Detector (Taylor et al., 2018)
- Documentation
- Examples: Weather Forecast
-
Spectral Residual Time Series Outlier Detector (Ren et al., 2019)
- Documentation
- Examples: Synthetic Dataset
-
Sequence-to-Sequence (Seq2Seq) Outlier Detector (Sutskever et al., 2014; Park et al., 2017)
- Documentation
- Examples: ECG, Synthetic Dataset
Advised use cases:
Detector | Tabular | Image | Time Series | Text | Categorical Features | Online | Feature Level |
---|---|---|---|---|---|---|---|
Adversarial VAE | ✔ | ✔ | ✘ | ✘ | ✘ | ✘ | ✘ |
- Adversarial Variational Auto-Encoder (paper coming soon)
- Documentation
- Examples: MNIST
The integrations folder contains various wrapper tools to allow the alibi-detect algorithms to be used in production machine learning systems with examples on how to deploy outlier and adversarial detectors with KFServing.