Skip to main content

Python

IDS Evaluation Framework

A comprehensive, modular, and configurable framework for evaluating Machine Learning-based Intrusion Detection Systems (IDS).

evaluation_pipeline

Features

  • Modular Plugin Architecture: Easily extend the framework with custom IDS models, metrics, and adversarial attacks
  • Flexible Data Pipeline: Load, preprocess, and split datasets with configurable preprocessing steps and feature selection
  • Multiple Evaluation Modes: Support for intra-dataset, cross-dataset, and k-fold cross-validation evaluation
  • Comprehensive Metrics: Built-in static metrics (accuracy, F1, precision, recall, ROC-AUC, etc.) and runtime metrics (CPU, RAM, training time)
  • Adversarial Robustness Testing: Evaluate model robustness against adversarial attacks (FGSM, noise perturbation, junk data injection)
  • Reproducible Results: Hash-based output organization ensures consistent experiment tracking
  • Flexible Deployment: Run natively with Python or via Docker

Installation

Prerequisites

  • Python 3.13+
  • uv (recommended) or pip

Python Installation

pip3 install ids-evaluation-framework

Native Installation

# Install dependencies (uv should be in your $PATH)
uv sync

# Verify installation
uv run ids-eval version

Docker Installation

# Configure environment variables
cp .env.example .env
# Edit .env to set your data paths

# Build and run via Docker Compose
docker compose build
docker compose run --rm ids-eval version

The image is built locally from the provided Dockerfile.

Quick Start

1. Create a Configuration File

Copy the example configuration and adjust it to your needs:

cp examples/run_config/example.config.yml examples/run_config/my_config.yml

2. Prepare Your Data

Run the data preparation pipeline:

uv run ids-eval dataset <run_config>

3. Run Evaluation

Execute the evaluation pipeline:

uv run ids-eval evaluate <run_config>

Usage

CLI Commands

The framework provides two main commands:

Command Description
ids-eval dataset <config.yml> Run dataset pipeline
ids-eval evaluate <config.yml> Run evaluation pipeline

Evaluation Flags

Flag Description
--train-only Only train models, skip testing phase
--force-train Force retraining, ignore saved models
--force-model Load saved models without config hash validation
--clear-checkpoints Clear evaluation checkpoints before running

Makefile Targets

make dataset CONFIG=<config.yml>          # Run dataset pipeline
make evaluate CONFIG=<config.yml>         # Run evaluation pipeline
make docker-dataset CONFIG=<config.yml>   # Run dataset pipeline via Docker
make docker-evaluate CONFIG=<config.yml>  # Run evaluation via Docker
make help                                 # Show all available targets

Configuration

The framework uses YAML configuration files. See examples/run_config/example.config.yml for a fully documented example.

Key Configuration Sections

  • general: Run name, paths, random seed
  • data_manager: Dataset loading, preprocessing, feature selection, train/test split
  • evaluation: IDS models, metrics, adversarial attacks

Output Structure

All outputs are organized in hash-based directories for reproducibility:

out/
├── processed_datasets/<hash>/    # Preprocessed datasets
├── saved_models/<hash>/          # Trained models
└── reports/<hash>/               # Evaluation reports
    ├── config.yaml               # Configuration used
    ├── dataset_report.yaml       # Dataset statistics
    ├── ids_report.yaml           # Detailed evaluation results
    └── evaluation_summary.yaml   # Aggregated summary

The configuration hash is displayed at startup:

Your config hash is: a1b2c3d4

Plugin Development

The framework supports four types of plugins:

Plugin Type Directory Base Class
IDS Models plugin_ids/ AbstractIDSConnector
Static Metrics plugin_static_metric/ AbstractStaticMetric
Runtime Metrics plugin_runtime_metric/ AbstractRuntimeMetric
Adversarial Attacks plugin_adversarial/ AbstractAdversarialAttack

See the existing plugins in each directory for implementation examples.

Development

make setup      # Install dependencies
make test       # Run tests
make lint       # Check code style
make format     # Format code

Tests

The test suite lives in tests/ and is run with pytest:

uv run pytest          # run all tests
make test              # equivalent target

tests/test_metrics.py contains two tests that verify the mathematical correctness of two static metrics:

Test Checks
test_pr_auc_average_precision PR-AUC (Average Precision) against a known reference value
test_robustness_index_normalized_area Robustness Index equals the normalized area under the accuracy–perturbation curve

Run a single test:

uv run pytest tests/test_metrics.py -k pr_auc

Additional Information

BibTeX entry

Please cite this project using the following bibtex entry:
Generic badge

@inproceedings{}

License

See LICENSE for details.

Metadata

Release files for ids-evaluation-framework 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ids-evaluation-framework 0.5.1
File Size Uploaded Provenance Actions
ids_evaluation_framework-0.5.1.tar.gz 68.2 kB With provenance Details for ids_evaluation_framework-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ids-evaluation-framework 0.5.1
File Interpreter ABI Platform Actions
ids_evaluation_framework-0.5.1-py3-none-any.whl Python 3 none any Details for ids_evaluation_framework-0.5.1-py3-none-any.whl

Total release size: 154.9 kB

Release files / ids_evaluation_framework-0.5.1.tar.gz

Download URL ids_evaluation_framework-0.5.1.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8dcc8567e60883cca2cbad09084bdd21d6447d8a8754675d3a8b8be33b5cc7
BLAKE2b-256 checksum
How to use checksums
7709138bff5b12b84057b1f77684f55e4bf61024576604353951e6fda4a2324c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Release files / ids_evaluation_framework-0.5.1-py3-none-any.whl

Download URL ids_evaluation_framework-0.5.1-py3-none-any.whl
Size 86.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14600343b3b44c3ec493ac23a8332bc4f58539d02b215328da93a86504f35b5c
BLAKE2b-256 checksum
How to use checksums
8346e7f508343ea18d0dc9270eac796233c3e1b546c2171322feff417b29e3cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

Security for ids-evaluation-framework 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ids_evaluation_framework-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page