# eddie-dk1/argus architecture

> Architecture diagram of the GitHub repository eddie-dk1/argus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eddie-dk1/argus
- Repository: https://github.com/eddie-dk1/argus

## Overview

Argus is a research prototype for reproducible anomaly-detection experiments, not a production IDS. Its main workflow generates synthetic events, splits data chronologically before fitting causal features, trains tabular and sequence models, selects thresholds on validation data, and compares results on a shared test cohort. Separate dataset contracts, inspection, and chunked loading prepare support for public datasets; storage-path handling and experiment tracking support reproducibility. The graph combines sampled source relationships with capabilities and flow documented in the README; some unsampled links are therefore documented rather than code-verified.

Main entry points: [`src/preprocessing.py`](https://github.com/eddie-dk1/argus/blob/main/src/preprocessing.py) (Preprocessing and splits), [`src/train_baseline.py`](https://github.com/eddie-dk1/argus/blob/main/src/train_baseline.py) (Forest models), [`src/train_lstm_autoencoder.py`](https://github.com/eddie-dk1/argus/blob/main/src/train_lstm_autoencoder.py) (LSTM autoencoder), [`src/evaluate.py`](https://github.com/eddie-dk1/argus/blob/main/src/evaluate.py) (Evaluation and metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_generator["Synthetic generator<br/>[generate_data.py]"]
  node_rawdata[("Raw event data")]
  node_preprocess["Preprocessing and splits<br/>[preprocessing.py]"]
  node_features["Causal features<br/>[features.py]"]
end

subgraph group_models["Modeling"]
  node_tabular["Forest models<br/>[train_baseline.py]"]
  node_lstm["LSTM autoencoder"]
  node_threshold["Validation thresholding<br/>[utils.py]"]
end

subgraph group_results["Evaluation and records"]
  node_evaluate["Evaluation and metrics<br/>[evaluate.py]"]
  node_explain["Anomaly explanations"]
  node_tracking["Run manifests and outputs"]
end

subgraph group_datasets["Dataset support"]
  node_contracts["Dataset contracts<br/>[contracts.py]"]
  node_inspection["Schema inspection<br/>[inspection.py]"]
  node_loading["Chunked CSV loading<br/>[loading.py]"]
end

subgraph group_foundation["Storage foundations"]
  node_paths["Data-root resolution<br/>[data_paths.py]"]
  node_storage["Scenario storage check"]
end

node_researcher(("Researcher"))
node_config["Experiment config"]

node_researcher -->|"configures"| node_config
node_config -->|"configures"| node_generator
node_generator -->|"writes events"| node_rawdata
node_rawdata -.->|"split and transform"| node_preprocess
node_preprocess -->|"builds features"| node_features
node_preprocess -->|"provides dataset"| node_tabular
node_preprocess -.->|"provides sequences"| node_lstm
node_tabular -->|"selects on validation"| node_threshold
node_lstm -->|"selects on validation"| node_threshold
node_tabular -.->|"produces scores"| node_evaluate
node_lstm -.->|"produces scores"| node_evaluate
node_evaluate -.->|"supports explanations"| node_explain
node_tabular -->|"records runs"| node_tracking
node_lstm -->|"records runs"| node_tracking
node_contracts -->|"defines schemas"| node_inspection
node_contracts -->|"defines sources"| node_loading
node_inspection -->|"resolves columns"| node_loading
node_researcher -->|"inspects datasets"| node_inspection
node_researcher -.->|"loads datasets"| node_loading
node_paths -->|"resolves paths"| node_storage
node_researcher -->|"checks capacity"| node_storage

click node_config "https://github.com/eddie-dk1/argus/blob/main/configs/synthetic_v0.2.json"
click node_generator "https://github.com/eddie-dk1/argus/blob/main/src/generate_data.py"
click node_preprocess "https://github.com/eddie-dk1/argus/blob/main/src/preprocessing.py"
click node_features "https://github.com/eddie-dk1/argus/blob/main/src/features.py"
click node_tabular "https://github.com/eddie-dk1/argus/blob/main/src/train_baseline.py"
click node_lstm "https://github.com/eddie-dk1/argus/blob/main/src/train_lstm_autoencoder.py"
click node_threshold "https://github.com/eddie-dk1/argus/blob/main/src/utils.py"
click node_evaluate "https://github.com/eddie-dk1/argus/blob/main/src/evaluate.py"
click node_explain "https://github.com/eddie-dk1/argus/blob/main/src/explain_anomalies.py"
click node_tracking "https://github.com/eddie-dk1/argus/blob/main/src/experiment_tracking.py"
click node_contracts "https://github.com/eddie-dk1/argus/blob/main/src/datasets/contracts.py"
click node_inspection "https://github.com/eddie-dk1/argus/blob/main/src/datasets/inspection.py"
click node_loading "https://github.com/eddie-dk1/argus/blob/main/src/datasets/loading.py"
click node_paths "https://github.com/eddie-dk1/argus/blob/main/src/data_paths.py"
click node_storage "https://github.com/eddie-dk1/argus/blob/main/src/check_data_storage.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_generator,node_rawdata,node_preprocess,node_features toneBlue
class node_tabular,node_lstm,node_threshold toneAmber
class node_evaluate,node_explain,node_tracking toneMint
class node_contracts,node_inspection,node_loading toneRose
class node_paths,node_storage,node_researcher toneIndigo
class node_config toneTeal
```

## Components

### Data preparation

- [Synthetic generator](https://github.com/eddie-dk1/argus/blob/main/src/generate_data.py): `src/generate_data.py`
- **Raw event data**
- [Preprocessing and splits](https://github.com/eddie-dk1/argus/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [Causal features](https://github.com/eddie-dk1/argus/blob/main/src/features.py): `src/features.py`

### Modeling

- [Forest models](https://github.com/eddie-dk1/argus/blob/main/src/train_baseline.py): `src/train_baseline.py`
- [LSTM autoencoder](https://github.com/eddie-dk1/argus/blob/main/src/train_lstm_autoencoder.py): `src/train_lstm_autoencoder.py`
- [Validation thresholding](https://github.com/eddie-dk1/argus/blob/main/src/utils.py): `src/utils.py`

### Evaluation and records

- [Evaluation and metrics](https://github.com/eddie-dk1/argus/blob/main/src/evaluate.py): `src/evaluate.py`
- [Anomaly explanations](https://github.com/eddie-dk1/argus/blob/main/src/explain_anomalies.py): `src/explain_anomalies.py`
- [Run manifests and outputs](https://github.com/eddie-dk1/argus/blob/main/src/experiment_tracking.py): `src/experiment_tracking.py`

### Dataset support

- [Dataset contracts](https://github.com/eddie-dk1/argus/blob/main/src/datasets/contracts.py): `src/datasets/contracts.py`
- [Schema inspection](https://github.com/eddie-dk1/argus/blob/main/src/datasets/inspection.py): `src/datasets/inspection.py`
- [Chunked CSV loading](https://github.com/eddie-dk1/argus/blob/main/src/datasets/loading.py): `src/datasets/loading.py`

### Storage foundations

- [Data-root resolution](https://github.com/eddie-dk1/argus/blob/main/src/data_paths.py): `src/data_paths.py`
- [Scenario storage check](https://github.com/eddie-dk1/argus/blob/main/src/check_data_storage.py): `src/check_data_storage.py`

### Other components

- **Researcher**
- [Experiment config](https://github.com/eddie-dk1/argus/blob/main/configs/synthetic_v0.2.json): `configs/synthetic_v0.2.json`

## Connections

- Researcher → Experiment config: configures (evidence: `README.md`)
- Experiment config → Synthetic generator: configures (evidence: `README.md`)
- Synthetic generator → Raw event data: writes events (evidence: `README.md`)
- Raw event data → Preprocessing and splits: split and transform
- Preprocessing and splits → Causal features: builds features (evidence: `src/preprocessing.py`)
- Preprocessing and splits → Forest models: provides dataset (evidence: `README.md`)
- Preprocessing and splits → LSTM autoencoder: provides sequences
- Forest models → Validation thresholding: selects on validation (evidence: `src/train_baseline.py`)
- LSTM autoencoder → Validation thresholding: selects on validation (evidence: `src/train_lstm_autoencoder.py`)
- Forest models → Evaluation and metrics: produces scores
- LSTM autoencoder → Evaluation and metrics: produces scores
- Evaluation and metrics → Anomaly explanations: supports explanations
- Forest models → Run manifests and outputs: records runs (evidence: `src/train_baseline.py`)
- LSTM autoencoder → Run manifests and outputs: records runs (evidence: `src/train_lstm_autoencoder.py`)
- Dataset contracts → Schema inspection: defines schemas (evidence: `src/datasets/inspection.py`)
- Dataset contracts → Chunked CSV loading: defines sources (evidence: `src/datasets/loading.py`)
- Schema inspection → Chunked CSV loading: resolves columns (evidence: `src/datasets/loading.py`)
- Researcher → Schema inspection: inspects datasets (evidence: `README.md`)
- Researcher → Chunked CSV loading: loads datasets
- Data-root resolution → Scenario storage check: resolves paths (evidence: `src/check_data_storage.py`)
- Researcher → Scenario storage check: checks capacity (evidence: `README.md`)
