AutoCause
Automated expert decisions for environmental time-series causal discovery: method selection, lag choice, CI-test selection, sample-size adequacy, FDR correction, and evidence grading.
Ruiz, M.¹, Arana-Catania, M.², Ardila, D. R.³ & Ventura, R.¹ (2026). Environmental Modelling & Software.
¹ ISR-Lisbon, Instituto Superior Técnico, Lisbon ² Digital Scholarship at Oxford, University of Oxford ³ Jet Propulsion Lab., Caltech
Contents
Install
Users
Install the released package with uv (recommended) or pip:
uv pip install autocause
# or
pip install autocause
The optional causal-audit pre-discovery module is currently installed from its source repository (it is not available on PyPI):
uv pip install "git+https://github.com/marcoruizrueda/causal-audit.git"
Contributors
Clone the repository and install an editable copy into a fresh environment:
git clone https://github.com/marcoruizrueda/autocause.git
cd autocause
uv venv .venv --python 3.13
source .venv/bin/activate
uv pip install -e .
For development with the pre-discovery audit, clone causal-audit beside
autocause and install both editable packages:
git clone https://github.com/marcoruizrueda/causal-audit.git ../causal-audit
uv pip install -e ../causal-audit -e '.[causal-audit]'
The uv source configuration and lockfile use that sibling checkout. The
supported interpreter is Python 3.13, including the companion audit package.
numba is a required dependency for the CMIknn transfer-entropy estimator;
LiNGAM brings its own dependencies, including psy, through the resolver.
Quickstart
import pandas as pd
from autocause.core.run_workflow import run_causal_discovery_workflow
# DataFrame with a DatetimeIndex and one column per variable
df = pd.read_csv("data.csv", index_col=0, parse_dates=True)
result = run_causal_discovery_workflow(
data_df=df,
output_dir="results/",
enable_causal_audit=True,
apply_audit_recommendation=True,
enable_consensus=True,
)
print(result["success"])
This enables the companion audit and consensus alongside the default workflow stages. The audit fills unset configuration fields; review saved warnings and evidence before interpreting links. See Usage for configured runs.
Run the quickstart notebook for the complete workflow and its figures. Use the independent walkthrough for configuration, statistical interpretation, and auditing. See Quickstart validation for reproducible checks.
Usage
import pandas as pd
from autocause.core.run_workflow import run_causal_discovery_workflow
# Input: DataFrame with DatetimeIndex, one column per variable, NaN for missing
df = pd.read_csv("data.csv", index_col=0, parse_dates=True)
results = run_causal_discovery_workflow(
data_df=df,
output_dir="results/",
target_var="FCH4",
alpha=0.05,
sampling_days=1,
deseasonalize=True, # subtract rolling mean before discovery
true_edges={
("X", "Y")
}, # optional: if ground truth available, computes F1, AUROC, AUPRC
enable_consensus=True, # multi-method voting
enable_causal_audit=True, # run causal-audit assumption diagnostics first
method_config={
"granger": {"enabled": True}, # conditional VAR-based Granger (statsmodels)
"transfer_entropy": {
"enabled": True
}, # CMIknn nearest-neighbour estimator (tigramite)
"pcmci": {
"enabled": True,
"test_method": "parcorr",
}, # PCMCI+ constraint-based (tigramite)
"varlingam": {"enabled": True}, # ICA-based VAR-LiNGAM (lingam)
"lpcmci": {"enabled": False}, # LPCMCI for latent confounders (tigramite)
"correlation": {
"enabled": True
}, # lagged Pearson/Spearman (non-causal baseline)
"predictive_baseline": {
"enabled": True
}, # Random Forest permutation importance (scikit-learn)
"ci_sensitivity": {
"enabled": True
}, # compare ParCorr vs RobustParCorr vs CMIknn
},
)
For detailed options (audit-only mode, adaptive CI-test selection, sample size adequacy, PCMCI vs PCMCI+, graph recovery metrics), see docs/USAGE.md.
Methods
| Method | Paradigm | CI test / engine | Library |
|---|---|---|---|
| VAR-based Granger | Regression (conditional) | F-test on multivariate VAR | statsmodels |
| Transfer entropy | Information-theoretic | CMIknn surrogates | tigramite |
| PCMCI+ | Constraint-based | Auto: ParCorr / RobustParCorr / CMIknn | tigramite |
| LPCMCI | Constraint-based (latent confounders) | Auto | tigramite |
| VAR-LiNGAM | Score-based (ICA) | Bootstrap pruning | lingam |
| RF-baseline | Predictive (non-causal) | Permutation importance | scikit-learn |
The first five are causal discovery methods from the dominant paradigms. The RF-baseline is a predictive reference included to answer: "does causal discovery find something different from feature importance?"
Framework & pipeline
The end-to-end architecture figure and the full 21-step workflow (data and assumptions, discovery, validation and synthesis) are documented in FRAMEWORK.md.
Reproducing the paper experiments
All experiment scripts, configurations, and reproduction instructions are in
experiments/README.md.
Citation
@article{ruiz2026autocause,
title={AutoCause: A Python framework that automates expert decisions in environmental time-series causal discovery},
author={Ruiz, Marco and Arana-Catania, Miguel and Ardila, David R and Ventura, Rodrigo},
journal={arXiv preprint arXiv:2608.00198},
year={2026}
}
# APA:
Ruiz, M., Arana-Catania, M., Ardila, D. R., & Ventura, R. (2026). AutoCause: A Python framework that automates expert decisions in environmental time-series causal discovery. arXiv preprint arXiv:2608.00198.
License
AGPL-3.0-or-later. Depends on Tigramite (GPL-3.0-or-later), which remains under its original license.
Metadata
Release files for autocause 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autocause-0.2.1.tar.gz | 261.5 kB | Without provenance | Details for autocause-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autocause-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for autocause-0.2.1-py3-none-any.whl |
Total release size: 543.4 kB
Release files / autocause-0.2.1.tar.gz
| Download URL | autocause-0.2.1.tar.gz |
|---|---|
| Size | 261.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38a26003a8a550ae884f758dd91923fba4e36b142bca1eed172fb9f4ff5b86c9
|
|
BLAKE2b-256 checksum How to use checksums |
ad98ecfbd77a07ecc52eb0fe66e4dddb267f9b72b5fb0557689d6e8b7d4bd13c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / autocause-0.2.1-py3-none-any.whl
| Download URL | autocause-0.2.1-py3-none-any.whl |
|---|---|
| Size | 281.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
993d21401cfd3841b11fddf9ff0eb2a2f7db89f1e37c452b2b8ca89a6495ffac
|
|
BLAKE2b-256 checksum How to use checksums |
748debd9fd5210f43c4f9f7a62ea5f3df4480fe81641235a02aedbe90a1338f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for autocause 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.