AE-pvalues
This is the implementation of AE-pvalues proposed in the paper Towards Understanding Alerts raised by Unsupervised Network Intrusion Detection Systems, RAID2023 (https://doi.org/10.1145/3607199.3607247). The method allows you to obtain explanations of the anomalies identified by an auto-encoder (AE).
Authors
Installation
Pip Installation
You can install it through pip
pip install ae-pvalues
Usage/Examples
from ae_pvalues import ae_pvalues
model = # Any autoencoder
x_train = np.load("./demo/example/x_train.npy") # Normal data
x_test = np.load("./demo/example/x_test.npy") # Data to explain
order, pvalues = ae_pvalues(model, normal_data=x_train, data_to_explain=x_test)
If you installed the module then you can use ae-pvalues directly from the command line :
ae-pvalues -v ./demo/example/x_train.npy ./demo/example/rec_x_train.npy ./demo/example/x_test.npy ./demo/example/rec_x_test.npy -o outputs
-v : verbose mode
-o : output folder
This produces two output files namely:
- dimensions_abnormal_order.npy : order of dimension by abnormality
- dimensions_abnormal_pvalues.npy : raw pvalue scores
Demo
A notebook is available in the demo folder to show an example of use. Please note that the notebook requires the following dependencies :
- scikit-learn
- tensorflow
- seaborn
- plotly
which can be installed with pip using the following comand line :
python3 -m pip install scikit-learn tensorflow seaborn plotly
Release files for ae-pvalues 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ae_pvalues-1.0.tar.gz | 306.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ae_pvalues-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 616.4 kB
Release files / ae_pvalues-1.0.tar.gz
| Download URL | ae_pvalues-1.0.tar.gz |
|---|---|
| Size | 306.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6c640e8109589d7087c9b8deef0dcc99bedbb45ff8a2335a39aa253c8d6adb9
|
|
BLAKE2b-256 checksum How to use checksums |
d51d9852ea59faa4560abb195e7ed29c35d37599ab375e4ecc6d24ba04743f05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / ae_pvalues-1.0-py3-none-any.whl
| Download URL | ae_pvalues-1.0-py3-none-any.whl |
|---|---|
| Size | 310.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25b7ceffc4bc89190a6216d9c76149b3f01a704665ca23f1a649c6c5ed0c561a
|
|
BLAKE2b-256 checksum How to use checksums |
e6cde3c1fc3943c3ba57b52b92d201ecc06a46203d5837f8cae4990e169cffac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|