GitHub - Forgis-Labs/HEPA: HEPA: Self-supervised horizon-conditioned event predictive architecture for time series. Spotlight at FMSD @ ICML 2026. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Forgis-Labs
HEPA
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>4 Commits<br>4 Commits
artifacts
artifacts
assets
assets
hepa
hepa
papers/hepa-2026
papers/hepa-2026
scripts
scripts
tests
tests
.gitignore
.gitignore
LICENSE
LICENSE
README.md
README.md
REPRODUCIBILITY.md
REPRODUCIBILITY.md
pyproject.toml
pyproject.toml
View all files
Repository files navigation
HEPA: A Self-Supervised Horizon-Conditioned Event Predictive Architecture for Time Series
Team: Jonas Petersen, Gian-Alessandro Lombardi, Riccardo Maggioni, Camilla Mazzoleni, Federico Martelli, Philipp Petersen
Critical events in multivariate time series, from turbine failures to cardiac arrhythmias, demand accurate prediction, yet labeled data is scarce because such events are rare and costly to annotate. We introduce HEPA (Horizon-conditioned Event Predictive Architecture), built on two key principles. First, a causal Transformer encoder is pretrained via a Joint-Embedding Predictive Architecture (JEPA): a horizon-conditioned predictor learns to forecast future representations rather than future values, forcing the encoder to capture predictable temporal dynamics from unlabeled data alone. Second, we freeze the encoder and finetune only the predictor toward the target event, producing a monotonic survival cumulative distribution function (CDF) over horizons. With fixed architecture and optimiser hyperparameters across all benchmarks, HEPA handles water contamination, cyberattack detection, volatility regimes, and eight further event types across 11 domains, exceeding leading time-series architectures including PatchTST, iTransformer, MAE, and Chronos-2 on at least 10 of 14 benchmarks, with an order of magnitude fewer tuned parameters and, on lifecycle datasets, an order of magnitude less labeled data.
Spotlight at FMSD @ ICML 2026.
Contributions
One architecture, any event, any domain. A single 2.16M-parameter architecture with fixed hyperparameters, evaluated on 14 benchmarks across 11 domains. HEPA wins on 10 out of 14 while tuning 11x fewer parameters than PatchTST.
Predictor finetuning as the downstream recipe. Freezing the encoder and finetuning only the predictor and event head (~198K params). On C-MAPSS, HEPA retains 92% of full-label h-AUROC at just 2% of labels.
Results
Quick Start
pip install -e .
# 1. Get the data (prints per-dataset sources and the expected layout)<br>export HEPA_DATA_DIR=/path/to/data<br>python scripts/download_data.py FD001
# 2. Pretrain + finetune + evaluate on C-MAPSS FD001<br>python scripts/train.py --dataset FD001 --seed 42
PyTorch >= 2.0 required. CPU works for unit tests; a single GPU is recommended for full training (a few minutes per dataset on an A10G).
Two settings are chosen per dataset (handled automatically): C-MAPSS uses a global<br>z-score with no per-window RevIN and a fixed-epoch finetune; all other datasets use<br>RevIN with early-stopped finetuning. Horizons are dense unit-step (K=150 for<br>C-MAPSS/TEP, K=200 otherwise). See REPRODUCIBILITY.md for<br>the full protocol and expected h-AUROC per dataset.
Note: this repository's C-MAPSS h-AUROC values are higher than those in the arXiv<br>paper. There, the C-MAPSS finetune used validation-loss early stopping, whose stop<br>point is sensitive on these datasets; here it runs for a fixed epoch budget, which is<br>deterministic and reproducible. All other datasets are unchanged.
Supported Datasets
Dataset<br>Domain<br>Channels
FD001-004<br>Turbofan engine degradation<br>14
SMAP<br>Spacecraft telemetry<br>25
PSM<br>Server metrics<br>25
MBA<br>Cardiac ECG arrhythmia
GECCO<br>Drinking water quality
BATADAL<br>Water-distribution attacks<br>43
TEP<br>Chemical-plant faults<br>52
ETTm1<br>Electricity transformer load
Weather<br>Climate forecasting<br>21
BeijingAQ<br>Air quality / public...