How lorenzo9uerra/graphids works
GraphIDS trains and evaluates a self-supervised network-intrusion detector: a user supplies dataset and experiment settings, the application prepares graph splits, trains an E-GraphSAGE-plus-Transformer model, then flags flows using reconstruction errors and reports metrics. The map also preserves temporal and shift-aware splitting, checkpointing, and experiment tracking. Source excerpts establish the main calls and model/trainer internals; preprocessing and cache details are supported by README documentation, while unsampled implementation details are not expanded.
Main entry points: main.py Experiment runner · trainers.py Training loop · dataloaders.py NetFlow dataset · graphids.py GraphIDS model
Components 14
Application entry
- CLI options
utils/parser.py - Experiment runner
main.py
Data preparation
- NetFlow dataset
utils/dataloaders.py - Temporal splits
utils/shift_segments.py - Graph splits and cache
utils/dataloaders.py
Detection model
- GraphIDS model
models/graphids.py - E-GraphSAGE encoder
models/graphids.py - Transformer autoencoder
models/graphids.py
Training and evaluation
- Training loop
utils/trainers.py - Validation threshold
utils/trainers.py - Model checkpoint
models/graphids.py - Anomaly evaluation
utils/trainers.py
Other components
- Researcher
- Weights & Biases
Connections 17
- Researcher → CLI options: sets options
utils/parser.py - CLI options → Experiment runner: configures
main.py - Experiment runner → NetFlow dataset: loads dataset
main.py - NetFlow dataset → Temporal splits: resolves segments
utils/dataloaders.py - NetFlow dataset → Graph splits and cache: prepares and caches
README.md - Experiment runner → GraphIDS model: creates model
main.py - GraphIDS model → E-GraphSAGE encoder: owns encoder
models/graphids.py - GraphIDS model → Transformer autoencoder: owns autoencoder
models/graphids.py - Experiment runner → Training loop: trains model
main.py - Training loop → E-GraphSAGE encoder: encodes batches
utils/trainers.py - Training loop → Transformer autoencoder: reconstructs windows
utils/trainers.py - Training loop → Validation threshold: selects threshold
utils/trainers.py - Training loop → Model checkpoint: saves best model
utils/trainers.py - Experiment runner → Model checkpoint: loads checkpoint
main.py - Experiment runner → Anomaly evaluation: tests model
main.py - Anomaly evaluation → Transformer autoencoder: scores reconstructions
utils/trainers.py - Experiment runner → Weights & Biases: initializes and logs
main.py