Skip to content
项目

关于

A framework for building intrusion detection systems with neural networks (KDD'26, USENIX Sec'25)

系统与基础设施

这些数字如何统计

实测星标增长

24小时
+1
7天
+1
15天
+6
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

PIDSMaker logo

Build, run and customize ML-based intrusion detection systems

Docs Release Tests Python Hugging Face DOI License Discord Stars

📘 Documentation  |  📄 Experiments Paper  |  📄 Framework Paper  |  🎙️ NDSS PRISM'26 Tutorial  |  ⚙️ Installation


The first framework to build and experiment with deep learning intrusion detection systems, on host provenance (PIDSs) and network events (NIDSs). A single codebase and pipeline runs 17 state-of-the-art systems on 17 datasets of both families, and makes them easy to customize into new variants.

💻 Installation (Linux/macOS)

Since v5.0.0, PIDSMaker is installed via pip, without Docker and Postgres. Its datasets are downloaded automatically from Hugging Face and read in place with DuckDB: nothing else to set up.

conda create -n pids python=3.11 && conda activate pids
pip install pidsmaker
pidsmaker velox CADETS_E3

PIDSMaker runs on Linux (GPU or CPU), and on macOS (Apple Silicon) on CPU. See installation guide.

Required configuration

For most datasets: a laptop with 32 GB of RAM is ideal. The largest datasets (e.g. TRACE datasets) run more smoothly on a server with GPU.

We detail the memory, runtime and disk usage required by each system and dataset in this benchmark.

Release notes

Version Date Highlights
5.0.0 Nov 2026 pip install pidsmaker and the pidsmaker command. Datasets as Parquet files from Hugging Face, read with DuckDB: no database server or Docker. ShadeWatcher and ProGrapher. Network intrusion detection: Euler, Argus, Jbeil, LARES, E-GraphSAGE and Anomal-E, on LANL and OpTC flows. Faster, leaner pipeline with identical results (Orthrus on THEIA_E5: ~3.4 h → ~61 min, 370 → 16.6 GB of RAM). Runs on macOS (Apple Silicon, on CPU)
4.0.0 Nov 2026 Unified tokenization (featurization.tokenization, renamed tokenizer arguments), configurable graph cleaning (construction.cleaning), fixed queue, time-window and node-time-window evaluations, MAGIC kNN fix
3.0.0 Oct 2026 Pretrained encoders (SPIDER, CyberGFM, language models, self-supervised GNNs) as node featurization for any PIDS, stable_optim to reduce instability, upgrade many packages including torch 1.13.1 (CUDA 11.7) => 2.1.2 (CUDA 12.1)
2.2.0 Jul 2026 Interactive 3D embedding viewer, ThreaTrace ground truth
2.1.1 May 2026 State of the repo for the KDD'26 paper, improved Velox
2.1.0 Apr 2026 Carbanak v2 and Atlas v2 datasets, dataset download script, Docker and W&B fixes
2.0.0 Jan 2026 FIVEDIRECTIONS and TRACE datasets, tuned hyperparameters, simplified pipeline stages (renamed arguments)
1.0.1 Oct 2025 Deterministic graph construction and word2vec, REAPr labels, Apptainer installation, dataset preprocessing scripts
1.0.0 Jun 2025 Initial release, with 8 PIDSs and the DARPA TC and OpTC datasets

See the releases for the full notes.

Supported Systems

The framework currently integrates the following provenance-based (PIDS) and network (NIDS) intrusion detection systems. They are described with the same components, and most of them run on both kinds of datasets.

System Family Venue Paper
Velox Provenance USENIX Security 2025 Link
Orthrus Provenance USENIX Security 2025 Link
OCR-APT Provenance ACM CCS 2025 Link
R-Caid Provenance IEEE S&P 2024 Link
Flash Provenance IEEE S&P 2024 Link
Kairos Provenance IEEE S&P 2024 Link
Magic Provenance USENIX Security 2024 Link
NodLink Provenance NDSS 2024 Link
ProGrapher Provenance USENIX Security 2023 Link
ThreaTrace Provenance IEEE TIFS 2022 Link
ShadeWatcher Provenance IEEE S&P 2022 Link
LARES Network ACSAC 2026 Link
Argus Network IEEE S&P 2024 Link
Jbeil Network IEEE S&P 2024 Link
Euler Network NDSS 2022 Link
E-GraphSAGE Network IEEE/IFIP NOMS 2022 Link
Anomal-E Network Knowledge-Based Systems 2022 Link

Supported Datasets

Provenance datasets

System events of hosts, with the attack nodes as ground truth, available as preprocessed datasets downloaded with pidsmaker download (size of their Parquet files below).

Dataset OS Attacks Nodes Events Size (GB)
CADETS_E3 FreeBSD 3 2.68M 36.5M 1.3
THEIA_E3 Linux 2 1.26M 44.4M 0.71
CLEARSCOPE_E3 Android 1 369K 18.3M 0.51
FIVEDIRECTIONS_E3 Windows 2 1.38M 78.9M 2.3
TRACE_E3 Linux 3 44.5M 284M 9.4
CADETS_E5 FreeBSD 2 15.2M 1.08B 32.9
THEIA_E5 Linux 1 2.29M 141M 3.9
CLEARSCOPE_E5 Android 2 501K 199M 5.0
FIVEDIRECTIONS_E5 Windows 4 18.8M 1.09B 30.3
TRACE_E5 Linux 1 72.3M 2.64B 74.3
optc_h201 Windows 1 5.27M 38.2M 1.6
optc_h501 Windows 1 3.96M 28.0M 1.2
optc_h051 Windows 1 4.62M 31.6M 1.3
ATLASV2_EDR Windows 10 664K 2.70M 0.16
CARBANAKV2_EDR Windows + Linux 1 4.15M 17.1M 1.1

Network datasets

Authentications or flows between hosts, with labelled malicious events, built from the preprocessed files of LARES (details), and downloaded the same way.

Dataset Events Hosts Malicious events Size (GB)
LANL 49.3M NTLM authentications 15,610 705 0.40
OPTC_NET 1.86B network flows 625 5,165 11.8

Pretrained Encoders

Any provenance-based system can replace its node featurization (e.g. word2vec) by an encoder pretrained on provenance data.

Encoder Description
SPIDER (NeurIPS 2026) transformer entity encoder distilled from a GNN teacher, with pretrained weights
CyberGFM BERT pretrained on random walks, then fine-tuned as a detector
GPT-2, Llama 3.2, OPT General-purpose language models fine-tuned on entity labels
BERT, RoBERTa, ModernBERT, LogBERT, Llama Language models trained from scratch on random walks
GraphMAE, GAE, DGI, DeepWalk, node2vec Self-supervised GNNs and walk embeddings

See the documentation to download the weights, pretrain an encoder and fine-tune it as a detector.

📄 Documentation

A comprehensive documentation is available, explaining all possible arguments and providing examples on how integrating new systems.

Pipeline

The framework integrates a pipeline composed of seven stages, shared by provenance and network systems, each parameterizable via configurable arguments, enabling flexible customization of new systems.

flowchart TB
    db[("Database<br/>provenance or network events")] --> prep
    subgraph prep ["Graph preparation"]
        direction LR
        C["<b>1#160;·#160;Construction</b><br/>time-window graphs"] --> T["<b>2#160;·#160;Transformation</b><br/>optional"] --> F["<b>3#160;·#160;Featurization</b><br/>node & edge features"] --> B["<b>4#160;·#160;Batching</b><br/>features & batches"]
    end
    prep --> det
    subgraph det ["Detection"]
        direction LR
        TR["<b>5#160;·#160;Training</b><br/>self-supervised model"] --> E["<b>6#160;·#160;Evaluation</b><br/>threshold & metrics"] --> TG["<b>7#160;·#160;Triage</b><br/>optional"]
    end
    det --> out(["Alerts, metrics & figures"])

    classDef stage fill:#e5602a1f,stroke:#e5602a,stroke-width:1.5px;
    classDef optional fill:#e5602a0d,stroke:#e5602a,stroke-width:1.5px,stroke-dasharray:5 4;
    classDef io fill:#5f708022,stroke:#5f7080,stroke-width:1.5px;
    class C,F,B,TR,E stage;
    class T,TG optional;
    class db,out io;

🧪 Basic usage of the framework

Once you have followed the installation guidelines, you can experiment in multiple ways. Replace SYSTEM by a provenance system (velox, orthrus, nodlink, threatrace, kairos, rcaid, flash, magic, ocrapt) or a network system (euler, argus, jbeil, lares, egraphsage, anomal_e), and DATASET by a provenance (e.g. CADETS_E3) or network (LANL, OPTC_NET) dataset.

  1. Run in the shell:

    pidsmaker SYSTEM DATASET
    
  2. Run in the shell, monitored to weights & biases (W&B):

    pidsmaker SYSTEM DATASET --wandb
    
  3. Run in background, monitored to W&B (recommended for multiple parallel runs and for research):

    pidsmaker SYSTEM DATASET --wandb --background
    

    The command prints the log file of the run (pidsmaker_SYSTEM_DATASET_<time>.log, in the current folder): follow it with tail -f.

pidsmaker sets PYTHONHASHSEED=0 and CUBLAS_WORKSPACE_CONFIG=:4096:8 for reproducible runs.

We generally using using W&B for experiment monitoring and historization (see installation guidelines).

Warning: Before performing evaluations, you should tune all systems (see docs here).

Reproducing results

PIDSs and NIDSs exhibit significant instability—that is, high sensitivity to training perturbations—due to their self-supervised training nature. Running the same configuration with different random seeds or minor hyperparameter changes often yields substantially different results. Consequently, reproducing results as the framework evolves presents a real challenge.

We recommend running each system multiple times to increase the likelihood of obtaining a run with good metrics. Alternatively, you can perform hyperparameter tuning for each system.

--training.stable_optim=True (AdamW, warmup and cosine learning rate schedule, gradient clipping) is designed to reduce this instability.

Customize existing systems

The default configuration files in config/*.yml represent the architecture of existing PIDSs and NIDSs in YAML format. They contain the original hyperparameters used by each system.

The main strength of PIDSMaker is the customization of existing systems for easy experimentation. A few examples below.

From CLI

Running Kairos with embedding size of 128 instead of 100, and last neighbor sampling set to last 10 neighbors instead of 20.

pidsmaker kairos CADETS_E3 \
  --training.node_hid_dim=128 \
  --batching.intra_graph_batching.tgn_last_neighbor.tgn_neighbor_size=10

Running Orthrus with Doc2vec instead of word2vec, and 3 GraphSAGE layers instead of 2 attention layers.

pidsmaker orthrus CADETS_E3 \
  --featurization.used_method=doc2vec \
  --featurization.emb_dim=128 \
  --training.encoder.used_methods=tgn,sage \
  --training.encoder.sage.num_layers=3

From a new YAML config file

Want to create a new system? Create a new config under config/your_system.yml, inherit from existing systems and tune it as you want.

Magic with node type prediction instead of its hybrid masked feature reconstruction and structure prediction objective function, and use a 2-layer MLP with ReLU as decoder, and use NodLink's thresholding method.

_include_yml: magic

training:
  decoder:
    used_methods: predict_node_type
    predict_node_type:
      node_mlp:
        architecture_str: linear(0.5) | relu

evaluation:
  node_evaluation:
    threshold_method: nodlink

Interactive embedding viewer

PIDSMaker also ships an interactive 3D web viewer for exploring a run's node embeddings — temporal playback, per-node inspection, attack-graph overlays, and switching between the featurization and GNN-encoder spaces. Train a run with --save_for_viz to persist the artifacts it needs, then launch it (see the web viewer README):

python -m pidsmaker.vizgen.web.viz_server

PIDSMaker web embedding viewer

Hyperparameter tuning

PIDSMaker supports easy hyperparameter tuning for existing or new models. Follow the instructions available in our documentation.

You can specify the range of hyperparameters to search in a yaml config.

method: grid 

parameters:
  training.lr:
    values: [0.001, 0.0001]
  training.node_hid_dim:
    values: [32, 64, 128, 256]
  featurization.used_method:
    values: [fasttext, word2vec]

Then run the framework in tuning mode.

pidsmaker my_system CADETS_E3 --wandb --background --tuning_mode=hyperparameters

Once you find the best hyperparameters, store them in a yaml file and run your tuned model.

pidsmaker my_system CADETS_E3 --wandb --background --tuned

Citation

If you use this work, please cite the two following papers:

@inproceedings{bilot2026pidsmaker,
  title={PIDSMaker: Building and Evaluating Provenance-based Intrusion Detection Systems},
  author={Bilot, Tristan and Jiang, Baoxiang and Pasquier, Thomas},
  booktitle={Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD '26)},
  year={2026}
}
@inproceedings{bilot2025simpler,
	title={{Sometimes Simpler is Better: A Comprehensive Analysis of State-of-the-Art Provenance-Based Intrusion Detection Systems}},
	author={Bilot, Tristan and Jiang, Baoxiang and  Li, Zefeng and  El Madhoun, Nour and Al Agha, Khaldoun and Zouaoui, Anis and Pasquier, Thomas},
	booktitle={Security Symposium (USENIX Sec'25)},
	year={2025},
	organization={USENIX}
}

Contributing

Pull requests are welcome! Please follow the contribution guidelines.

Questions, ideas or feature requests? Join our Discord.

Support and Funding

Thomas Pasquier's Amazon Research Award UBC article on the NSERC Alliance grant with Amazon

License

See licence.

探索相关项目

加载中…