Statistical inference with synthetic data via task exchangeability.
task-exchangeable-inference provides valid statistical inference when your data are synthetic. It tests whether real and synthetic tasks are exchangeable, builds a kernel‑reweighted reference distribution, applies bias correction, and returns confidence intervals with proper coverage.
pip install git+https://github.com/Automate-Capture/task-exchangeable-inference.gitRequires Python ≥ 3.10. To work on the project locally:
git clone https://github.com/Automate-Capture/task-exchangeable-inference.git
cd task-exchangeable-inference
pip install -e ".[dev]"
pytest -qimport numpy as np
from task_exchangeable_inference import ExchangeableInference
rng = np.random.default_rng(0)
X = rng.standard_normal((100, 3))
y = X @ np.array([1.0, -0.5, 0.3]) + rng.standard_normal(100) * 0.1
# Fit the exchangeability-corrected estimator on synthetic data
engine = ExchangeableInference()
engine.fit(X, y)
# Predict with calibrated 95% intervals
result = engine.predict_interval(rng.standard_normal((5, 3)), confidence=0.95)
print(result)- Exchangeability testing between real and synthetic tasks
- Kernel‑reweighted reference distribution
- Bias correction for synthetic‑data estimates
- Confidence intervals with diagnostics
| Module | Description |
|---|---|
bias_correction |
Martingale-based bias correction for synthetic estimators. |
cli |
Command-line interface for task_exchangeable_inference. |
diagnostics |
Runtime diagnostics for exchangeability assumptions. |
exchangeability |
Formal exchangeability model with de Finetti representation. |
inference |
Main inference engine for task-exchangeability with synthetic data. |
kernel |
Exchangeability kernel via Kernel Mean Matching. |
repository |
Task repository for storing and sampling historic tasks. |
utils |
Utility functions for task-exchangeability inference. |
📖 Full documentation: https://automate-capture.github.io/task-exchangeable-inference/
📄 Technical paper: see paper/ for the LaTeX source and compiled PDF.
This is a reference implementation produced by an autonomous research pipeline. It is not published to PyPI; install from source as shown above.
MIT © Andrew Young / Automate Capture Research
