Paper | GitHub | HF Demo | PyPI | Citation | Quickstart | Reproduce paper
Estimate heterogeneous treatment effects even when treatment and outcome share hidden confounders, by leveraging front-door identification through an observed mediator.
Front-door identification uses an observed mediator on the path from cause to outcome to recover causal effects when hidden confounding makes ordinary adjustment unreliable. This paper extends that idea to personalized causal inference, introducing FD-DR and FD-R for heterogeneous effects.
- Hidden confounding usually breaks individualized causal inference.
- Front-door structure can restore identification when an observed mediator is available.
- FD-DR and FD-R remain more accurate than FD-PI even when nuisance noise and hidden-variable effects are strong.
- Researchers studying heterogeneous treatment effects beyond standard back-door assumptions.
- Practitioners with an observed mediator but no credible no-unmeasured-confounding story.
- Readers who want a runnable method showcase, not only a paper supplement.
python -m pip install fd-cate
fdcate demo --outdir ./fdcate-demoOutputs:
synthetic.csvresults.jsondiagnostics.jsoneffects.csv
- Debiased front-door learners:
FD-DRandFD-R - Plug-in baseline:
FD-PI - One-command demo plus CLI and Python API
- Synthetic robustness benchmarks and a FARS case study
- Reproducible artifacts for effects, diagnostics, and benchmark summaries
The synthetic benchmarks visualize the core message of the paper: when hidden-variable influence and nuisance noise get stronger, the debiased learners stay substantially more accurate than the plug-in estimator. That is the point of this repository: not just that front-door identification is possible, but that personalized front-door estimation can be made robust and runnable.
Paper: Debiased Front-Door Learners for Heterogeneous Effects
Run the installable demo:
fdcate demo --outdir /tmp/fdcate-demoRun the benchmark profile used for regression and smoke validation:
fdcate benchmark --profile multiseed --n 120 --d 6 --seed 2026 --n-seeds 20 --nuisance-learner xgb --out /tmp/fdcate-benchmark.jsonRun the original paper-oriented scripts:
python FDCATE.py --help
python analyze_fars_2000_fd.py --helpThe repository preserves both paths:
fdcate ...for package-style usageFDCATE.pyandanalyze_fars_2000_fd.pyfor legacy paper reproduction
Software citation metadata is in CITATION.cff.
@article{jung2025fdcate,
title = {Debiased Front-Door Learners for Heterogeneous Effects},
author = {Jung, Yonghan},
year = {2025},
url = {https://arxiv.org/abs/2509.22531}
}- Paper: https://arxiv.org/abs/2509.22531
- PyPI: https://pypi.org/project/fd-cate/
- Repository: https://github.com/yonghanjung/FD-CATE
- Hugging Face demo: https://huggingface.co/spaces/yonghanjung/fdcate-demo
- Release checklist: RELEASE_RUNBOOK.md
from fd_cate import FDCATE
from FDCATE import simulate_fd_data_md
data = simulate_fd_data_md(n=500, d=10, seed=0)
est = FDCATE(method="fd-dr", nuisance_learner="xgb", random_state=0)
est.fit(data.C, data.Y, t=data.X, m=data.Z)
tau = est.effect(data.C)
print(est.ate_)
print(est.summary())# Generate a synthetic CSV
fdcate synthetic --n 300 --d 8 --seed 42 --out synthetic.csv
# Fit and write standard artifacts
fdcate fit --data synthetic.csv --outcome y --treat t --med m --outdir out/
# Run diagnostics only
fdcate doctor --data synthetic.csv --outcome y --treat t --med mStandard artifacts under out/:
summary.txtresults.jsondiagnostics.jsoneffects.csvmodel.pkl
Primary path:
fdcate demo --outdir /tmp/fdcate_live_demoLegacy helper script:
bash scripts/run_demo_quick.shExpected demo artifacts:
/tmp/fdcate_live_demo/synthetic.csv/tmp/fdcate_live_demo/fit_out/summary.txt/tmp/fdcate_live_demo/fit_out/results.json/tmp/fdcate_live_demo/fit_out/diagnostics.json/tmp/fdcate_live_demo/fit_out/effects.csv/tmp/fdcate_live_demo/fit_out/model.pkl/tmp/fdcate_live_demo/benchmark_quick.json
Supported:
- binary treatment
T in {0,1} - binary mediator
M in {0,1} - numeric covariates
- continuous or binary outcome
Not supported:
- non-binary
TorM - automatic categorical encoding pipelines
python -m pip install -e .[dev]
python -m pytest -q
python -m buildSlow tests:
python -m pytest -q -m "slow"- If
fdcateis not found, reopen the shell or usepython -m fd_cate --help. - If XGBoost has import issues, reinstall in a clean environment with
python -m pip install --force-reinstall fd-cate. - If writes fail, point
--outdirto a writable location such as/tmp/fdcate-demo.

