Synthetic temporal structural causal models with interventions for causal foundation models
Project description
DoTime
A synthetic benchmark generator for interventional and counterfactual time series.
dotime samples multivariate temporal structural causal models (SCMs),
applies interventions to them, and produces paired observational / interventional
trajectories together with exact counterfactual targets.
Where most time-series causal benchmarks are observational (recover a graph from
passive dynamics), DoTime is interventional / counterfactual: it answers
do(...) queries over time and ships frozen suites to measure how well a model
estimates interventional effects.
Highlights
- Four intervention regimes — hard, soft, time-varying, and continuous-time intervention windows.
- Four counterfactual sampling modes —
prior,observed_discrete,observed_normal,observed_uniform, with a positivity guard. - Regime-switching SCMs as a strict generalization of interrupted-time-series.
- Eight named identification structures (back-door, front-door, IV, …) with exact counterfactual ground truth.
- Reference baselines and four frozen evaluation suites (released with Zenodo DOIs and Croissant metadata).
Install
pip install dotime # core generator + suite loaders (CPU, no GPU needed)
pip install 'dotime[baselines]' # classical / Bayesian baselines
pip install 'dotime[all]' # everything except dev tooling
Requires Python ≥ 3.10. The core install runs on CPU with no GPU dependency.
Quickstart
from dotime import DoTime
prior = DoTime(seed=42)
X_obs, X_int, intervention, scm = prior.generate_pair(T=100)
# X_obs, X_int: (T, N) tensors; intervention: InterventionSpec; scm: TemporalSCM
Command-line:
dotime-generate -n 1000 -T 200 -o data/sample.pt # sample paired trajectories
dotime-benchmark --list # list frozen benchmark suites
Hosted artifacts
Four frozen suites, on the Hugging Face Hub (discovery) and Zenodo (citable
archive). load_benchmark("dot-Identifiability-v1") pulls and md5-verifies them.
| Suite | Episodes | Hugging Face | Zenodo DOI |
|---|---|---|---|
dot-Identifiability-v1 |
10,800 | thummd/dot-Identifiability-v1 | 10.5281/zenodo.20846064 |
dot-RegimeSwitch-v1 |
9,999 | thummd/dot-RegimeSwitch-v1 | 10.5281/zenodo.20846074 |
dot-Continuous-v1 |
9,999 | thummd/dot-Continuous-v1 | 10.5281/zenodo.20845981 |
dot-Generic-100k |
100,000 | thummd/dot-Generic-100k | 10.5281/zenodo.20845983 |
Trained Do-Over-Time-PFN checkpoints: thummd/do-over-time-pfn.
Documentation
Full docs at https://dotime.readthedocs.io. See docs/quickstart.md and
docs/benchmarks.md to get started locally.
Citation
If you use DoTime, please cite the paper and the software (see
CITATION.cff).
License
Apache-2.0 (code). Released benchmark suites are distributed under CC-BY-4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotime-0.1.1.tar.gz.
File metadata
- Download URL: dotime-0.1.1.tar.gz
- Upload date:
- Size: 121.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c74ce7189464ac62ffa2ba946a0d870b5fda8fdab4fd7bcc79c4fdadcc5573
|
|
| MD5 |
6ccf1f9606c8b371018780638a987008
|
|
| BLAKE2b-256 |
10b978211ac0f8927c0f74bd9a5570adf32e56660a3084cde8e860a73cdf2703
|
Provenance
The following attestation bundles were made for dotime-0.1.1.tar.gz:
Publisher:
release.yml on thummd/dotime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotime-0.1.1.tar.gz -
Subject digest:
48c74ce7189464ac62ffa2ba946a0d870b5fda8fdab4fd7bcc79c4fdadcc5573 - Sigstore transparency entry: 1966433410
- Sigstore integration time:
-
Permalink:
thummd/dotime@2f0d92df9f57d389ad5d367e7edca2e76dafec66 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/thummd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f0d92df9f57d389ad5d367e7edca2e76dafec66 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dotime-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dotime-0.1.1-py3-none-any.whl
- Upload date:
- Size: 132.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19fa89191248f5b96c8f3c59f79bbc8c3234198bccccb675e6026c99058f3a16
|
|
| MD5 |
734dcb119fe72a4052e007d06db7cf97
|
|
| BLAKE2b-256 |
63ffad19ffcea57e69d45a254697f18f279a9a6713cbfd5491ce71ad770a9b72
|
Provenance
The following attestation bundles were made for dotime-0.1.1-py3-none-any.whl:
Publisher:
release.yml on thummd/dotime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dotime-0.1.1-py3-none-any.whl -
Subject digest:
19fa89191248f5b96c8f3c59f79bbc8c3234198bccccb675e6026c99058f3a16 - Sigstore transparency entry: 1966433878
- Sigstore integration time:
-
Permalink:
thummd/dotime@2f0d92df9f57d389ad5d367e7edca2e76dafec66 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/thummd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f0d92df9f57d389ad5d367e7edca2e76dafec66 -
Trigger Event:
push
-
Statement type: