Welcome to the supplementary material for the paper:
- Daniel Popovic, Edouard Fouché and Klemens Böhm. 2019. Unsupervised Artificial Neural Networks for Outlier Detection in High-Dimensional Data. In 23rd European Conference on Advances in Databases and Information Systems (ADBIS' 19), September 8-11, 2019, Bled, Slovenia. Springer International Publishing. https://doi.org/10.1007/978-3-030-28730-6_1
This repository contains the reference implementation of the three approaches Autoencoder, Restricted Boltzmann Machine, and Self-Organising Map for outlier detection with details to reproduce the experiments in the paper. In addition, it contains all our experimental results, which are only partially shown in the paper due to space restrictions.
This repository is released under the AGPLv3 license. Please see the LICENSE file for details.
If you use this repository, please cite our paper:
@InProceedings{10.1007/978-3-030-28730-6_1,
author="Popovic, Daniel and Fouch{\'e}, Edouard and B{\"o}hm, Klemens",
title="Unsupervised Artificial Neural Networks for Outlier Detection in High-Dimensional Data",
booktitle="Advances in Databases and Information Systems",
year="2019",
publisher="Springer International Publishing",
pages="3--19",
isbn="978-3-030-28730-6",
doi="10.1007/978-3-030-28730-6_1"
}
Download this repository to your local machine. It is recommended to use virtual environment to manage Python dependencies.
$ pip3 install -r requirements.txtTo re-enact the experiments, download the data sets as ZIP files at Datasets Download and unpack them.
The outlier detector runs in four different modes, using either Autoencoder, Restricted Boltzmann Machine, or Self-Organising Map alone, or run all three methods together. The detector supports two globally used optional parameters:
-w: Writes the outlier detection results into CSV files. For each outlier detection method, a separate file is saved. The files contain an incremented data object ID, the real outlier label provided in the data set, and the method's respective outlier score.-d: The column delimiter for data sets in CSV format. The default delimiter is;.
To run the Autoencoder alone, use the command line positional parameter ae to specify the method, and as the second positional parameter, the path and file name of the data set.
$ python detector.py ae mypath/mydataset.arffFor the Autoencoder, the following optional parameters exist:
-a: The number of training epochs. Default is 20.-e: The encoding factor. Default is 0.8.
To run the Restricted Boltzmann Machine alone, use the positional parameter rbm to specify the method, and the data set path and file name as a second positional parameter.
For the Restricted Boltzmann Machine, the following optional parameters exist:
-r: The number of training epochs. Default is 100.-n: The proportion of hidden neurons. Default is 0.8.
To run the Self-Organising Map alone, use the positional parameter som to specify the method, and the data set path and file name as a second positional parameter.
$ python detector.py som mypath/mydataset.arffFor the Self-Organising Map, the following optional parameters exist:
-s: The number of training epochs. Default is 100.-g: The grid size or the number of neuron rows and columns in the quadratic SOM grid. Default is 2.
To run all three methods at once, use the positional parameter all to specify all three methods, and the data set path and file name as the second positional parameter.
$ python detector.py all mypath/mydataset.arffEach optional parameter that exists for one of the three methods (see above) is also valid to use with all three methods at once. If an optional parameter is not specified, the default value is used.
The outlier detector supports three file types for data sets: ARFF files (.arff), CSV files (.csv), and MATLAB files < version 7.3 (.mat).
ARFF files are expected to have a number of feature attribute definitions and a label attribute definition at the end, which can either be the attribute 'class' with possible values {0,1} or the attribute 'outlier' with possible values {'no','yes'}
Example (with 'class' attribute):
@RELATION musk
@ATTRIBUTE 'att1' real
...
@ATTRIBUTE 'att166' real
@ATTRIBUTE 'class' {0,1}
@DATA
46.,-108.,60.,...,-50.,-112.,96.,1
...
43.,64.,41.,...,-69.,-270.,-6.,0
Example (with 'outlier' attribute):
@RELATION musk
@ATTRIBUTE 'att1' real
...
@ATTRIBUTE 'att166' real
@ATTRIBUTE 'outlier' {'no','yes'}
@DATA
46.,-108.,60.,...,-50.,-112.,96.,'yes'
...
43.,64.,41.,...,-69.,-270.,-6.,'no'
CSV files are expected to consist of of character-separated rows of features, with the label as the row's last value, and without a header row. The default column delimiter is ;, but any other reasonable delimiter can be used as passed as parameter delimiter to the detector.
Example:
46.;-108.;60.;...;-50.;-112.;96.;1.
...
43.;64.;41.;...;-69.;-270.;-6.;0.
MATLAB .mat files (< version 7.3) are expected to have the following structure:
- X: Feature matrix
- y: Label vector
Example (.mat file loaded with scipy.io.loadmat):
{'__header__': b'MATLAB 5.0 MAT-file, written by Octave 3.8.0, 2015-07-05 13:16:13 UTC',
'__version__': '1.0',
'__globals__': [],
'X': array([[ 46., -108., -60., ..., -50., -112., 96.],
...,
[ 43., 64., 41., ..., -69., -270., -6.]]),
'y': array([[1.],
...,
[0.]])}
Folders:
nnohd: The implementation of the unsupervised neural networks for outlier detection.images: Contains images for this README.datasets: The data sets used for evaluation.
Files:
README.mdLICENSE: The license file. This repository is published under GNU AFFERO GENERAL PUBLIC LICENSE Version 3.requirements.txt: Refers toapp/requirements.txt.
nnohd/
├── requirements.txt
├── ae.py
├── rbm.py
├── som.py
├── utils
│ └── preprocessing.py
- Python 3.6+
- Keras 2.2.4
- Matplotlib 2.2.2
- NumPy 1.16.2
- Pandas 0.24.2
- Scikit-learn 0.20.3
- SciPy 1.2.1
- Somoclu 1.7.5
- Tensorflow 1.13.1
This section contains the complete data for the sections of the paper that are only partially filled due to space limitations.
In this section we list the complete set of evaluated data sets. The evaluated high-dimensional data sets can be found as ZIP files at Datasets Download.
Show Table
| Data Set | Dimensions | Data Objects | Outliers | Outlier Ratio |
|---|---|---|---|---|
| Arrhythmia-2 | 259 | 248 | 4 | 1.61% |
| Arrhythmia-5 | 259 | 256 | 12 | 4.69% |
| Arrhythmia-10 | 259 | 271 | 27 | 9.96% |
| Arrhythmia-20 | 259 | 305 | 61 | 20.00% |
| Arrhythmia-46 | 259 | 450 | 206 | 45.78% |
| Cardio | 21 | 1,831 | 176 | 9.61% |
| Ecoli | 7 | 336 | 9 | 2.68% |
| InternetAds-2 | 1,555 | 1,630 | 32 | 1.96% |
| InternetAds-5 | 1,555 | 1,682 | 84 | 4.99% |
| InternetAds-10 | 1,555 | 1,775 | 177 | 9.97% |
| InternetAds-19 | 1,555 | 1,966 | 368 | 18.72% |
| ISOLET-2 | 617 | 2,449 | 50 | 2.00% |
| ISOLET-4 | 617 | 2,499 | 100 | 4.00% |
| ISOLET-8 | 617 | 2,599 | 200 | 7.70% |
| ISOLET-14 | 617 | 2,799 | 400 | 14.29% |
| ISOLET-20 | 617 | 2,999 | 600 | 20.00% |
| Lympho | 18 | 148 | 6 | 4.05% |
| MNIST | 100 | 7,603 | 700 | 9.21% |
| Musk | 166 | 3,062 | 97 | 3.12% |
| Optdigits | 64 | 5,216 | 150 | 2.88% |
| P53 | 5,408 | 16,592 | 143 | 0.86% |
| Pendigits | 16 | 6,870 | 156 | 2.27% |
| Seismic | 11 | 2,584 | 170 | 6.58% |
| Thyroid | 6 | 3,772 | 93 | 2.4% |
| Waveform | 21 | 3,509 | 166 | 4.73% |
| Yeast | 8 | 1,364 | 65 | 4.77% |
Show Table
| Data Set | AE | SOM | RBM | HiCS | LOF | FastABOD | LoOP | OC-SVM | KNN |
|---|---|---|---|---|---|---|---|---|---|
| Arrhythmia-2 | 80.22 | 76.33 | 49.04 | 50.56 | 76.74 | 76.84 | 75.00 | 77.66 | 71.88 |
| Arrhythmia-5 | 78.16 | 81.49 | 50.36 | 58.81 | 80.46 | 49.51 | 79.99 | 81.47 | 68.72 |
| Arrhythmia-10 | 83.84 | 83.74 | 48.23 | 65.12 | 83.45 | 83.35 | 84.24 | 83.26 | 76.20 |
| Arrhythmia-20 | 71.01 | 71.33 | 49.93 | 50.71 | 70.47 | 71.14 | 71.70 | 72.38 | 67.52 |
| Arrhythmia-46 | 74.93 | 74.79 | 46.99 | 58.96 | 74.41 | 74.17 | 74.10 | 74.13 | 70.72 |
| InternetAds-2 | 43.36 | 66.12 | 46.93 | 99.84 | 71.64 | 76.49 | 77.14 | 64.18 | 81.23 |
| InternetAds-5 | 40.14 | 73.36 | 50.27 | 99.87 | 78.63 | 78.75 | 82.56 | 74.76 | 69.35 |
| InternetAds-10 | 39.38 | 69.42 | 49.75 | 79.25 | 74.71 | 74.41 | 77.73 | 71.25 | 65.21 |
| InternetAds-19 | 36.32 | 69.69 | 50.14 | 47.33 | 74.01 | 72.40 | 69.78 | 62.43 | 59.54 |
| ISOLET-2 | 96.85 | 99.28 | 92.28 | 79.71 | 99.58 | 93.09 | 98.23 | 92.05 | 94.66 |
| ISOLET-4 | 94.72 | 98.49 | 87.24 | 79.79 | 99.34 | 86.44 | 95.08 | 89.75 | 83.89 |
| ISOLET-8 | 95.16 | 98.29 | 87.19 | 78.14 | 83.81 | 75.37 | 68.71 | 89.19 | 82.90 |
| ISOLET-14 | 92.67 | 94.96 | 85.50 | 78.16 | 65.61 | 75.60 | 62.16 | 81.61 | 80.00 |
| ISOLET-20 | 90.16 | 87.13 | 87.19 | 77.82 | 60.04 | 73.28 | 55.00 | 77.06 | 77.40 |
| MNIST | 82.06 | 81.07 | 49.87 | 51.74 | 80.34 | 54.35 | 71.66 | 76.46 | 72.74 |
| Musk | 100.00 | 100.00 | 95.60 | 99.60 | 84.00 | 5.11 | 51.86 | 67.60 | 7.11 |
| P53 | 60.63 | 67.17 | 64.76 | 62.09 | 61.99 | 62.92 | 61.99 | 61.27 | 62.56 |
Show Table
| Data Set | AE | SOM | RBM | HiCS | LOF | FastABOD | LoOP | OC-SVM | KNN |
|---|---|---|---|---|---|---|---|---|---|
| Arrhythmia-2 | 29.37 | 27.94 | 1.66 | 1.64 | 3.83 | 3.98 | 3.51 | 4.90 | 3.04 |
| Arrhythmia-5 | 30.61 | 36.15 | 5.00 | 4.14 | 30.62 | 29.53 | 29.85 | 30.56 | 22.37 |
| Arrhythmia-10 | 48.54 | 48.24 | 10.31 | 13.84 | 45.36 | 42.49 | 45.55 | 40.55 | 33.24 |
| Arrhythmia-20 | 51.97 | 50.62 | 20.35 | 15.78 | 49.12 | 48.14 | 48.90 | 49.92 | 46.98 |
| Arrhythmia-46 | 75.32 | 74.54 | 44.98 | 44.67 | 74.36 | 72.83 | 71.63 | 73.68 | 71.50 |
| InternetAds-2 | 1.58 | 32.78 | 1.91 | 94.52 | 34.86 | 32.79 | 3.51 | 4.90 | 3.04 |
| InternetAds-5 | 5.12 | 45.86 | 5.21 | 97.67 | 52.56 | 40.25 | 51.12 | 33.54 | 32.87 |
| InternetAds-10 | 7.69 | 47.89 | 10.12 | 41.13 | 51.93 | 35.74 | 46.09 | 29.40 | 35.11 |
| InternetAds-19 | 14.29 | 54.67 | 18.91 | 1.44 | 55.24 | 41.86 | 44.48 | 29.46 | 33.64 |
| ISOLET-2 | 44.45 | 66.93 | 29.51 | 4.47 | 70.95 | 29.54 | 51.78 | 25.65 | 42.91 |
| ISOLET-4 | 49.97 | 69.76 | 33.59 | 9.08 | 74.21 | 24.07 | 47.62 | 47.61 | 23.96 |
| ISOLET-8 | 59.60 | 78.61 | 40.50 | 14.36 | 43.81 | 21.71 | 31.45 | 46.55 | 28.59 |
| ISOLET-14 | 64.48 | 75.40 | 53.84 | 29.06 | 40.03 | 33.68 | 27.15 | 47.53 | 36.62 |
| ISOLET-20 | 64.26 | 63.55 | 40.50 | 36.92 | 34.56 | 37.72 | 25.59 | 48.72 | 41.45 |
| MNIST | 30.13 | 27.40 | 9.26 | 9.99 | 33.95 | 14.05 | 24.74 | 25.49 | 27.96 |
| Musk | 100.00 | 100.00 | 85.58 | 97.46 | 14.68 | 1.65 | 3.71 | 4.54 | 1.91 |
| P53 | 1.04 | 1.29 | 1.20 | 1.25 | 1.06 | 1.13 | 1.06 | 1.06 | 1.30 |
In this section we present the complete tables of parameter evaluation values for Autoencoder, Restricted Boltzmann Machine, and Self-Organising Map.
Show Table
Show Table
Show Table
This repository features code and data sets from other projects. We would like to acknowledge the following contributions:
-
ELKI Data Mining Toolkit by Erich Schubert, Alexander Koos, Tobias Emrich, Andreas Züfle, Klaus Arthur Schmid, Arthur Zimek. A Framework for Clustering Uncertain Data. Proceedings of the VLDB Endowment, 8(12): pp.1976–1979 (2015). VLDB.
-
Somoclu by Peter Wittek, Shi Chao Gao, Ik Soo Lim, Li Zhao. Somoclu: An Efficient Parallel Library for Self-Organizing Maps. Journal of Statistical Software, 78(9), pp.1-21 (2017). DOI:10.18637/jss.v078.i09. arXiv:1305.1422.
-
DAMI by Guilherme O. Campos, Arthur Zimek, Jörg Sander, Ricardo J. G. B. Campello, Barbora Micenková, Erich Schubert, Ira Assent, Michael E. Houle (2016). On the Evaluation of Unsupervised Outlier Detection: Measures, Datasets, and an Empirical Study. Data Mining and Knowledge Discovery 30(4), Springer Nature, pp.891-927 (2016). DOI:10.1007/s10618-015-0444-8
-
ODDS Library by Shebuti Rayana. Stony Brook University, Department of Computer Sciences, Stony Brook, NY (2016).
-
UCI Machine Learning Repository by Dheeru Dua, Casey Graff. University of California, Irvine, School of Information and Computer Sciences (2017).
























