# exathlonbenchmark/divad architecture

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

- Interactive diagram: https://gitdiagram.com/exathlonbenchmark/divad
- Repository: https://github.com/exathlonbenchmark/divad

## Overview

Exathlon is a benchmark and pipeline for unsupervised anomaly detection and explanation on multivariate time series, including Spark traces and ASD data. Users configure and launch pipeline steps; the runner sequences dataset preparation, feature building, windowing, model/scorer training and online detection, then evaluates detection and optionally trains and evaluates explainers. The repository also includes multiple detector families and point- and range-based metrics. Edges are limited to relationships named by the README or SOURCE INDEX; some implementation details are unsampled, so those links are omitted.

Main entry points: [`exathlon/run.py`](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/run.py) (Pipeline runner), [`exathlon/detection/detectors`](https://github.com/exathlonbenchmark/divad/tree/main/exathlon/detection/detectors) (Detector families), [`exathlon/detection/metrics/evaluation.py`](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluation.py) (Detection metrics), [`exathlon/detection/detectors/divad.py`](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/divad.py) (DIVAD detector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Pipeline orchestration"]
  node_runner["Pipeline runner<br/>[run.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_results[("Pipeline outputs")]
end

subgraph group_data["Data preparation"]
  node_dataset["Dataset creation<br/>[make_datasets.py]"]
  node_managers["Dataset managers"]
  node_datahelpers["Sequence data helpers<br/>[helpers.py]"]
  node_features["Feature building<br/>[build_features.py]"]
  node_transformers["Feature transformers<br/>[transformers.py]"]
  node_windows["Window datasets<br/>[window_manager.py]"]
  node_shareddata[("Prepared data files")]
end

subgraph group_detection["Anomaly detection"]
  node_detectorfamilies["Detector families"]
  node_divad["DIVAD detector<br/>[divad.py]"]
  node_detectorbase["Detector base<br/>[base.py]"]
  node_detectorhelpers["Detector helpers<br/>[general.py]"]
  node_tfhelpers["TensorFlow helpers<br/>[tf_helpers.py]"]
  node_windowtraining["Window model training"]
  node_scorertraining["Scorer training"]
  node_onlinetraining["Online training"]
  node_scoring["Online scoring"]
end

subgraph group_evaluation["Evaluation"]
  node_detectionevaluation["Detection evaluation"]
  node_scorerevaluation["Scorer evaluation"]
  node_metricengine["Detection metrics<br/>[evaluation.py]"]
  node_pointevaluator["Point evaluator<br/>[point.py]"]
  node_rangeevaluator["Range evaluator<br/>[range.py]"]
end

subgraph group_explanation["Anomaly explanation"]
  node_explainertraining["Explainer training<br/>[train_explainer.py]"]
  node_explainers["Explainer methods"]
  node_macrobase["MacroBase explainer<br/>[macrobase.py]"]
  node_explainerevaluation["Explanation evaluation"]
  node_explanationmetrics["Explanation metrics"]
end

node_user(("Researcher"))

node_user -->|"runs steps"| node_runner
node_runner -->|"loads settings"| node_config
node_runner -->|"dispatches"| node_dataset
node_runner -->|"dispatches"| node_features
node_runner -->|"dispatches"| node_windows
node_runner -->|"dispatches"| node_windowtraining
node_runner -->|"dispatches"| node_scorertraining
node_runner -->|"dispatches"| node_onlinetraining
node_runner -->|"dispatches"| node_scoring
node_runner -->|"dispatches"| node_detectionevaluation
node_runner -->|"dispatches"| node_scorerevaluation
node_runner -->|"dispatches"| node_explainertraining
node_runner -->|"dispatches"| node_explainerevaluation
node_dataset -->|"uses"| node_managers
node_managers -->|"saves sequences"| node_shareddata
node_features -->|"uses"| node_transformers
node_features -.->|"writes features"| node_shareddata
node_windows -.->|"reads sequences"| node_shareddata
node_windowtraining -.->|"trains models"| node_detectorfamilies
node_detectorfamilies -->|"extends"| node_detectorbase
node_divad -->|"extends"| node_detectorbase
node_divad -->|"uses"| node_tfhelpers
node_divad -->|"uses"| node_detectorhelpers
node_scorertraining -.->|"trains scorer"| node_detectorfamilies
node_onlinetraining -.->|"trains detector"| node_detectorfamilies
node_scoring -.->|"scores sequences"| node_detectorfamilies
node_detectionevaluation -->|"computes metrics"| node_metricengine
node_scorerevaluation -->|"computes metrics"| node_metricengine
node_metricengine -->|"uses"| node_pointevaluator
node_metricengine -->|"uses"| node_rangeevaluator
node_explainertraining -->|"loads inputs"| node_shareddata
node_explainers -->|"includes method"| node_macrobase
node_explainerevaluation -->|"selects method"| node_explainers
node_explainerevaluation -->|"evaluates explanations"| node_explanationmetrics
node_runner -.->|"writes outputs"| node_results

click node_runner "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/run.py"
click node_config "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/utils/config.py"
click node_dataset "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/data/make_datasets.py"
click node_managers "https://github.com/exathlonbenchmark/divad/tree/main/exathlon/data/managers"
click node_datahelpers "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/data/helpers.py"
click node_features "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/features/build_features.py"
click node_transformers "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/features/transformers.py"
click node_windows "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/windows/window_manager.py"
click node_detectorfamilies "https://github.com/exathlonbenchmark/divad/tree/main/exathlon/detection/detectors"
click node_divad "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/divad.py"
click node_detectorbase "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/base.py"
click node_detectorhelpers "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/helpers/general.py"
click node_tfhelpers "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/helpers/tf_helpers.py"
click node_windowtraining "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_window_model.py"
click node_scorertraining "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_window_scorer.py"
click node_onlinetraining "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_online_detector.py"
click node_scoring "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_online_scorer.py"
click node_detectionevaluation "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/evaluate_online_detector.py"
click node_scorerevaluation "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/evaluate_online_scorer.py"
click node_metricengine "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluation.py"
click node_pointevaluator "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluators/point.py"
click node_rangeevaluator "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluators/range.py"
click node_explainertraining "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/train_explainer.py"
click node_explainers "https://github.com/exathlonbenchmark/divad/tree/main/exathlon/explanation/explainers"
click node_macrobase "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/explainers/data_explainers/macrobase.py"
click node_explainerevaluation "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/evaluate_explainer.py"
click node_explanationmetrics "https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/metrics/evaluators/base_explainer_evaluator.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_runner,node_config,node_results toneBlue
class node_dataset,node_managers,node_datahelpers,node_features,node_transformers,node_windows,node_shareddata toneAmber
class node_detectorfamilies,node_divad,node_detectorbase,node_detectorhelpers,node_tfhelpers,node_windowtraining,node_scorertraining,node_onlinetraining,node_scoring toneMint
class node_detectionevaluation,node_scorerevaluation,node_metricengine,node_pointevaluator,node_rangeevaluator toneRose
class node_explainertraining,node_explainers,node_macrobase,node_explainerevaluation,node_explanationmetrics,node_user toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/run.py): `exathlon/run.py`
- [Configuration](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/utils/config.py): `exathlon/utils/config.py`
- **Pipeline outputs**

### Data preparation

- [Dataset creation](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/data/make_datasets.py): `exathlon/data/make_datasets.py`
- [Dataset managers](https://github.com/exathlonbenchmark/divad/tree/main/exathlon/data/managers): `exathlon/data/managers`
- [Sequence data helpers](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/data/helpers.py): `exathlon/data/helpers.py`
- [Feature building](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/features/build_features.py): `exathlon/features/build_features.py`
- [Feature transformers](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/features/transformers.py): `exathlon/features/transformers.py`
- [Window datasets](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/windows/window_manager.py): `exathlon/detection/windows/window_manager.py`
- **Prepared data files**

### Anomaly detection

- [Detector families](https://github.com/exathlonbenchmark/divad/tree/main/exathlon/detection/detectors): `exathlon/detection/detectors`
- [DIVAD detector](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/divad.py): `exathlon/detection/detectors/divad.py`
- [Detector base](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/base.py): `exathlon/detection/detectors/base.py`
- [Detector helpers](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/helpers/general.py): `exathlon/detection/detectors/helpers/general.py`
- [TensorFlow helpers](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/detectors/helpers/tf_helpers.py): `exathlon/detection/detectors/helpers/tf_helpers.py`
- [Window model training](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_window_model.py): `exathlon/detection/train_window_model.py`
- [Scorer training](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_window_scorer.py): `exathlon/detection/train_window_scorer.py`
- [Online training](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_online_detector.py): `exathlon/detection/train_online_detector.py`
- [Online scoring](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/train_online_scorer.py): `exathlon/detection/train_online_scorer.py`

### Evaluation

- [Detection evaluation](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/evaluate_online_detector.py): `exathlon/detection/evaluate_online_detector.py`
- [Scorer evaluation](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/evaluate_online_scorer.py): `exathlon/detection/evaluate_online_scorer.py`
- [Detection metrics](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluation.py): `exathlon/detection/metrics/evaluation.py`
- [Point evaluator](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluators/point.py): `exathlon/detection/metrics/evaluators/point.py`
- [Range evaluator](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/detection/metrics/evaluators/range.py): `exathlon/detection/metrics/evaluators/range.py`

### Anomaly explanation

- [Explainer training](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/train_explainer.py): `exathlon/explanation/train_explainer.py`
- [Explainer methods](https://github.com/exathlonbenchmark/divad/tree/main/exathlon/explanation/explainers): `exathlon/explanation/explainers`
- [MacroBase explainer](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/explainers/data_explainers/macrobase.py): `exathlon/explanation/explainers/data_explainers/macrobase.py`
- [Explanation evaluation](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/evaluate_explainer.py): `exathlon/explanation/evaluate_explainer.py`
- [Explanation metrics](https://github.com/exathlonbenchmark/divad/blob/main/exathlon/explanation/metrics/evaluators/base_explainer_evaluator.py): `exathlon/explanation/metrics/evaluators/base_explainer_evaluator.py`

### Other components

- **Researcher**

## Connections

- Researcher → Pipeline runner: runs steps (evidence: `exathlon/run.py`)
- Pipeline runner → Configuration: loads settings (evidence: `exathlon/run.py`)
- Pipeline runner → Dataset creation: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Feature building: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Window datasets: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Window model training: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Scorer training: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Online training: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Online scoring: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Detection evaluation: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Scorer evaluation: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Explainer training: dispatches (evidence: `exathlon/run.py`)
- Pipeline runner → Explanation evaluation: dispatches (evidence: `exathlon/run.py`)
- Dataset creation → Dataset managers: uses (evidence: `exathlon/data/make_datasets.py`)
- Dataset managers → Prepared data files: saves sequences (evidence: `exathlon/data/managers/base_manager.py`)
- Feature building → Feature transformers: uses (evidence: `exathlon/features/build_features.py`)
- Feature building → Prepared data files: writes features
- Window datasets → Prepared data files: reads sequences
- Window model training → Detector families: trains models
- Detector families → Detector base: extends (evidence: `exathlon/detection/detectors/base.py`)
- DIVAD detector → Detector base: extends (evidence: `exathlon/detection/detectors/divad.py`)
- DIVAD detector → TensorFlow helpers: uses (evidence: `exathlon/detection/detectors/divad.py`)
- DIVAD detector → Detector helpers: uses (evidence: `exathlon/detection/detectors/divad.py`)
- Scorer training → Detector families: trains scorer
- Online training → Detector families: trains detector
- Online scoring → Detector families: scores sequences
- Detection evaluation → Detection metrics: computes metrics (evidence: `exathlon/detection/evaluate_online_detector.py`)
- Scorer evaluation → Detection metrics: computes metrics (evidence: `exathlon/detection/evaluate_online_scorer.py`)
- Detection metrics → Point evaluator: uses (evidence: `exathlon/detection/metrics/evaluation.py`)
- Detection metrics → Range evaluator: uses (evidence: `exathlon/detection/metrics/evaluation.py`)
- Explainer training → Prepared data files: loads inputs (evidence: `exathlon/explanation/train_explainer.py`)
- Explainer methods → MacroBase explainer: includes method (evidence: `exathlon/explanation/explainers/data_explainers/macrobase.py`)
- Explanation evaluation → Explainer methods: selects method (evidence: `exathlon/explanation/evaluate_explainer.py`)
- Explanation evaluation → Explanation metrics: evaluates explanations (evidence: `exathlon/explanation/evaluate_explainer.py`)
- Pipeline runner → Pipeline outputs: writes outputs
