How bihype-timeseriesanalysis/bihype-tsad-anomaly-transformer works
BiHyPE is presented as a time-series anomaly-detection research implementation built around the Anomaly Transformer, with training and test modes over benchmark datasets. Its workflow loads and windows data, runs the model through the Solver, and supports checkpoint-based training or evaluation. The repository also contains a distinct VUS anomaly-detection and evaluation toolkit, including detector implementations, interval metrics, and robustness analysis. README capabilities are included where source excerpts were unavailable; uncertain internal wiring is omitted.
Main entry points: solver.py Experiment solver · metrics.py Range and VUS metrics · models Detector implementations · AnomalyTransformer.py Anomaly Transformer
Components 19
Experiment Workflow
- CLI entry
main.py - Experiment solver
solver.py - Benchmark datasets
- Windowed data loaders
data_factory/data_loader.py - Model checkpoints
Transformer Model
- Anomaly Transformer
model/AnomalyTransformer.py - Data and position embedding
model/embed.py - Association attention
model/attn.py
VUS Detectors
- Detector base
vus/models/detectorA.py - Detector implementations
vus/models - Model utilities
vus/utils/utility.py - Distance scoring
vus/models/distance.py
VUS Evaluation
- Basic metrics
vus/basic_metrics.py - Range and VUS metrics
vus/utils/metrics.py - Affiliation metrics
vus/affiliation/metrics.py - Interval calculations
vus/affiliation/_integral_interval.py - Score computation
vus/analysis/score_computation.py - Robustness evaluation
vus/analysis/robustness_eval.py
Other components
- Researcher
Connections 16
- Researcher → CLI entry: starts run
- CLI entry → Experiment solver: creates solver
- Experiment solver → Windowed data loaders: requests data
- Benchmark datasets → Windowed data loaders: supplies series
- Experiment solver → Anomaly Transformer: trains or tests
- Anomaly Transformer → Data and position embedding: embeds windows
- Anomaly Transformer → Association attention: computes attention
- Experiment solver → Model checkpoints: saves or loads
- Detector implementations → Detector base: extends base
- Detector implementations → Model utilities: uses utilities
- Detector implementations → Distance scoring: uses measures
- Basic metrics → Range and VUS metrics: provides range metrics
- Range and VUS metrics → Interval calculations: integrates intervals
- Affiliation metrics → Interval calculations: uses interval math
- Robustness evaluation → Range and VUS metrics: evaluates scores
- Score computation → Range and VUS metrics: computes metrics