idps-escape

Detector folder

A detector is the object that is used to perform detection. In the specific case of anomaly detection via the MTAD-GAT algorithm, it must include for example a trained ML model, along with all the configuration used, and POT object. In the ADBox implementation, detectors are formed as a collection of files stored under a unique ID, which is also the name of the subfolder of siem_mtad_gat/assets/detector_models containing such files.

├── a77c773c-9e6f-4700-92f2-53c0e682f290
│   ├── input
│   │   ├── detector_input_parameters.json
│   │   └── training_config.json
│   ├── prediction
│   │   ├── uc-16_predicted_anomalies_data-1_2024-08-12_13-48-42.json
│   │   └── uc-16_predicted_data-1_2024-08-12_13-48-42.json
│   └── training
│       ├── losses_train_data.json
│       ├── model.pt
│       ├── scaler.pkl
│       ├── spot
│       │   ├── spot_feature-0.pkl
│       │   ├── spot_feature-1.pkl
│       │   ├── spot_feature-2.pkl
│       │   ├── spot_feature-3.pkl
│       │   ├── spot_feature-4.pkl
│       │   └── spot_feature-global.pkl
│       ├── test_output.pkl
│       ├── train_losses.png
│       ├── train_output.pkl
│       └── validation_losses.png

Input

The input folder contains the following files:

Training

The training folder contains:

Prediction

The prediction folder stores an output JSON file for each time a prediction is run specifying the number of the use case and a timestamp indicating when was run. Each run would generate two files as output, one file having the predicted data for all the data points and the other having the predicted data only for the points which were predicted as anomalies.

The contents of both of these files would be in a similar format only varying in the anomaly flag being true or false. The uc-{use_case}_predicted_anomalies_data-{n}_{timestamp}.json file contains all the points that have the is_anomaly flag true, whereas uc-{use_case}_predicted_data-{n}_{timestamp}.json would have points with is_anomaly flag true and false both.

For a detailed example we refer to the ADBox Result Visualizer Notebook.