⚡ FlashPapers /
AI for Automated Scientific Discovery • April 2026

InferenceEvolve: Automated Causal Effect Estimators through Self-Evolving AI

Can Wang1 • Hongyu Zhao1 • Yiqun Chen1,2 1Department of Biostatistics, Johns Hopkins Bloomberg School of Public Health • 2Department of Computer Science, Johns Hopkins
TL;DR

InferenceEvolve treats causal inference algorithms as full, modifiable Python programs and iteratively refines them using an evolutionary LLM loop guided by MAP-Elites. Across four classic causal benchmarks, it systematically outperforms standard packages and human entries—placing on the Pareto frontier against 58 human submissions in the ACIC 2022 competition. Furthermore, using cross-fitted doubly robust surrogate metrics, it can evolve high-performing estimators entirely from observed data without ground-truth counterfactuals.

ACIC 2022 Standing
Pareto Frontier
Beat 51 of 58 human submissions with RMSE 14.41 & 90% coverage
IHDP Error Drop
-49.3% PEHE
Slashed ITE error from 2.411 (BART baseline) down to 1.222
Ground-Truth Free
Doubly Robust Proxy
Evolves via cross-fitted AIPW & R-loss pseudo-targets when counterfactuals are unobserved
Algorithmic Adaptation
Dataset-Specific
Spontaneously invents DiD differencing, X/R hybrids, and adaptive weighting
The Challenge

Why Causal Estimation Resists Automation

In observational science and policy, we rarely want to know just correlations; we want to know what happens if we intervene. For any individual $i$, their treatment effect is defined as $\tau_i = Y_i(1) - Y_i(0)$. Yet the fundamental problem of causal inference guarantees that we can only observe one of these potential outcomes:

$$Y_i = Z_i Y_i(1) + (1 - Z_i) Y_i(0)$$

Because the true counterfactual is forever hidden in real observational data, human statisticians must make a complex constellation of choices: identifying assumptions (ignorability, overlap), estimation strategies (propensity weighting, outcome regression, or doubly robust learners), nuisance model selection, and clustered confidence interval calibration. A slight mistake in any component can lead to extreme bias or dangerously misleading confidence intervals.

Simultaneously, evaluating whether a novel estimator works is deeply paradoxical: how do you grade an algorithm when the ground truth can never be measured? While previous AI attempts have focused on narrow subtasks—like extracting causal graphs from text—none have tackled the open-ended design of complete, executable statistical programs that optimize identification, estimation, and uncertainty quantification simultaneously.

The Big Idea

Scientific Programs as Evolving Genomes

InferenceEvolve casts causal estimation not as fixed parameter optimization, but as an evolutionary search across executable Python programs. Starting from zero-shot LLM-generated code templates, it leverages an ensemble of frontier LLMs (e.g., GPT-5, Gemini 3 Flash, Claude Sonnet) as intelligent mutation operators. Guided by a Quality-Diversity evolutionary algorithm (MAP-Elites) and evaluated through a fast two-stage cascade on replicated benchmark draws, the system iteratively evolves sophisticated estimators tailored to each dataset's unique latent mechanics. To bridge the gap to real-world applications where true counterfactuals do not exist, it derives cross-fitted doubly robust pseudo-outcomes as proxy reward signals, creating a closed-loop scientific discovery engine.

Representation: Deterministic Python Mutators: LLM Code Synthesis Archive: 4 Islands • 60 Pop • 25 Archive
Architecture & Method

Inside the InferenceEvolve Engine

How LLMs navigate the combinatorial space of statistical estimation without overfitting or cheating.

1 The MAP-Elites Evolutionary Search Engine

Rather than maintaining a single line of descent, InferenceEvolve implements Multi-dimensional Archive of Phenotypic Elites (MAP-Elites). It partitions candidates into multi-island archives based on behavioral niches (balancing primary accuracy against secondary targets like coverage calibration or ATE precision). In each iteration, a parent is sampled from the archive alongside high-performing and diverse inspiration programs to construct a rich context prompt for candidate generation.

Interactive Architecture Diagram Hover blocks to inspect mechanics
Causal Task Spec • Schema: $Z, Y, X_j$ • Ident. Assumptions • Split: $D_{\text{train}}$ vs $D_{\text{val}}$ estimate(df) sig Seed Program $P_0$ LLM Mutator Ensemble Primary: 80% GPT-5 or Gemini 3 Secondary: 20% Claude Sonnet 4 Full Program Rewrite Two-Stage Cascade Eval Stage 1: Fail-Fast 10% $D_{\text{train}}$ • Cutoff 0.001 Stage 2: Batch Scoring All $D_{\text{train}}$ Replicates RMSE • PEHE • Cov Timeout 1,800s • Penalize MAP-Elites Archive 4 Islands • Niche Bins Top 3 + 2 Diverse Elite Select: 0.3 Final Frozen $P^*$ Single Eval on $D_{\text{val}}$ Archive Feedback: Parent + Inspirations + Score Diffs
Click or tap any component above to inspect its implementation parameters

The framework operates over 100 iterations. Search-time scoring is strictly restricted to training replicates $D_{\text{train}}$, ensuring zero information leakage to held-out test replicates $D_{\text{val}}$.

Fail-Fast Cascade & Timeouts

To prevent slow or crashing code from halting the evolution, candidates pass through a two-stage cascade:

  • Stage 1 (Filter): Runs on $\approx 10\%$ of replicates with 180s timeout. Scores $<0.001$ (syntax errors, NaN returns, dimension mismatches) are instantly pruned.
  • Stage 2 (Full): Surviving candidates evaluate on all training replicates with an enforced 1,800s hard process termination.
Scalarized Selection Scores

MAP-Elites guides candidate insertion using a scalarized multi-objective criterion balancing primary estimation against secondary stability:

$S_{\text{ITE}} = \frac{1}{1 + \log(1 + \overline{\sqrt{\text{PEHE}}}) + \lambda \log(1 + \overline{|\text{ATE err}|})}$

Regularization factor $\lambda \in \{0.2, 1.0, 5.0\}$ penalizes ATE error while preserving unit-level heterogeneity discovery.

2 Proxy Objectives: Evolving Without Ground Truth

In the real world, $Y_i(1)$ and $Y_i(0)$ are never observed concurrently. How can InferenceEvolve navigate toward high-fidelity estimators when true labels don't exist?

The authors derive cross-fitted doubly robust pseudo-outcomes following Kennedy (2024). Data is split into $K=2$ cross-fitting folds. Nuisance outcome functions $\hat{\mu}_t(x) = \mathbb{E}[Y \mid X=x, T=t]$ are fitted with Ridge & Gradient Boosting, while propensity scores $\hat{e}(x)$ are estimated via clipped logistic regression. The transformed pseudo-target for unit $i$ is:

$$\tilde{\tau}_i = \hat{\mu}_1(x_i) - \hat{\mu}_0(x_i) + \frac{T_i(Y_i - \hat{\mu}_1(x_i))}{\hat{e}(x_i)} - \frac{(1 - T_i)(Y_i - \hat{\mu}_0(x_i))}{1 - \hat{e}(x_i)}$$

The surrogate optimization objective combines three complementary signals: (1) DR pseudo-outcome distance $\sqrt{\text{PEHE}_{\text{proxy}}}$, (2) absolute error against the cross-fitted AIPW average treatment effect, and (3) normalized R-loss ($R_{\text{loss,norm}}$):

$$\mathcal{L}_{\text{ITE-proxy}} = 0.5 \cdot \phi(\sqrt{\text{PEHE}_{\text{proxy}}}) + 0.3 \lambda_{\text{ATE}} \cdot \phi(|\bar{\hat{\tau}} - \hat{\tau}_{\text{AIPW}}|) + 0.2 \cdot \phi(R_{\text{loss,norm}})$$

where $\phi(x) = \frac{\log(1+x)}{1 + \log(1+x)}$ provides robust monotonic compression.

Interactive Exploration Suite

Live Exploration of Evolution & Results

Hands-on tools to inspect evolved program code mutations, cross-benchmark tradeoffs, and proxy fidelity.

Widget 1

Benchmark Performance & Pareto Frontier Explorer

Showing 58 Human Competition Submissions vs. InferenceEvolve (Target: Min RMSE & Coverage $\to 0.90$).

Human Submission Zero-Shot LLM Evolved Estimator
Target Coverage: 90% 90% Interval Coverage RMSE (Lower is Better) 0.2 0.4 0.6 0.8 1.0 15 25 35 45 55 Zero-Shot (33.1, 0.40) Backdoor Baseline ★ Best Evolved (14.4, 0.90)
Median Human Submission RMSE: 23.2 • Cov: 57% Severely undercovered
Evolved Fleet Median (n=12) RMSE: 18.8 • Cov: 84% Beat 67% human submissions
Best Evolved Run RMSE: 14.41 • Cov: 90% Strict Pareto dominance
Widget 2

Evolutionary Trajectory & Code Diff Inspector

Method Identity Patient-weighted TWFE DiD
Primary Benchmark Metric RMSE: 33.10
Key Architectural Discovery Basic two-way fixed effects baseline
code_evolution.py • Listing Inspection Executable Python Block
# Loading diff...
Widget 3

Regularization $\lambda$ & Multi-Objective Selection Simulator

Live Equation $S_{\text{ITE}}$ Evaluation

The search objective scalarizes primary heterogeneous treatment effect accuracy ($\sqrt{\text{PEHE}}$) with secondary average calibration error ($|\text{ATE err}|$):

Regularization Weight $\lambda$: 1.0 Options tested: 0.2, 1.0, 5.0
Estimated $\sqrt{\text{PEHE}}$: 1.25
Estimated $|\text{ATE Error}|$: 0.08
Calculated MAP-Elites Fitness
0.512 Score $\in (0, 1]$
$\log(1 + \sqrt{\text{PEHE}})$ penalty: 0.811
$\lambda \cdot \log(1 + |\text{ATE error}|)$ penalty: 0.077
Paper insight: Lower $\lambda$ (0.2) generally gave the best held-out $\sqrt{\text{PEHE}}$ on IHDP and ACIC 2016, preventing the search from over-sacrificing unit-level heterogeneity to satisfy the average estimand.
Empirical Findings

Consistent Reductions in Error Across Benchmarks

All results evaluated on disjoint, untouched held-out validation replicates ($D_{\text{val}}$).

Dataset Metric Strongest Package Baseline Guidance Mode Best Evolved Mean ± SE % Beat Baseline Best Error Reduction $\Delta$
IHDP $\sqrt{\text{PEHE}}$ 2.411 (BART) True Score 1.222 1.392 ± 0.021 100% +49.3%
Proxy (No Truth) 1.034 1.632 ± 0.311 83% +57.1%
ATE Error 0.110 (BART) True Score 0.063 0.081 ± 0.005 100% +42.9%
Proxy (No Truth) 0.074 0.084 ± 0.003 100% +33.0%
ACIC 2016 $\sqrt{\text{PEHE}}$ 1.283 (Causal Forest) True Score 0.858 1.011 ± 0.042 100% +33.1%
Proxy (No Truth) 1.504 2.037 ± 0.196 0% -17.2%
ATE Error 0.147 (Causal Forest) True Score 0.087 0.114 ± 0.011 100% +40.6%
Proxy (No Truth) 0.156 0.170 ± 0.008 0% -5.7%
LaLonde Norm $\sqrt{\text{PEHE}}$ 0.765 (BART) True Score 0.598 0.704 ± 0.016 83% +21.8%
Proxy (No Truth) 0.693 0.754 ± 0.017 67% +9.4%
Norm ATE 0.048 (Diff-in-means) True Score 0.033 0.057 ± 0.004 17% +30.8%
Proxy (No Truth) 0.054 0.070 ± 0.005 0% -12.6%
ACIC 2022 SATT RMSE 23.40 (Backdoor adj.) True Score 14.41 22.58 ± 2.39 50% +38.4%
Proxy (No Truth) 16.85 19.72 ± 1.33 83% +28.0%

Code & Conceptual Complexity Growth

Evolved code did not suffer from bloat or generic drift. While baseline programs had a median size of 54 lines (2,004 characters), true-evolved programs scaled up to a median of 104 lines (3,922 characters). Translating raw code into scientific methods paragraphs via GPT-5 confirmed that this represented genuine conceptual depth: methods descriptions grew from 172 words up to 263 words, describing cross-fitting, winsorization, and local propensity smoothing.

Convergence to Dataset-Specific Families

Rather than collapsing to a single generic template, the agents specialized:

  • • ACIC 2022 (Panel): 21/24 converged on Two-Way Fixed Effects & DiD differencing.
  • • ACIC 2016 (Cross-Section): 18/24 converged on X-Learners with random forest propensity weighting.
  • • LaLonde (Observational): 13/24 synthesized DR-Learners, frequently hybridizing them with R-Learner residuals.
Critical Discussion

Limitations & Open Questions

The authors transparently discuss several key constraints and methodological boundaries:

Simulation-to-Reality Gap

Semi-synthetic benchmarks like IHDP or ACIC 2016 model synthetic response surfaces over real covariates. Exceptional performance on these benchmarks does not guarantee immunity to unmeasured confounding or extreme covariate overlap violations in real unconstrained data.

Proxy Objective Failure Modes

While proxy-guided optimization succeeded on IHDP, ACIC 2022, and LaLonde, it struggled on ACIC 2016 (-17.2% vs baseline). Optimal proxy surrogate design when true counterfactuals are inaccessible remains an active, unsolved challenge.

Baseline Tuning Scope

Baselines were standard package implementations (EconML, bartpy2). The study did not perform exhaustive benchmark-by-benchmark AutoML hyperparameter tuning for baseline packages; future work must evaluate evolved algorithms against tuned AutoML stacks.

Multimodal Data Absence

Existing causal benchmark suites are strictly tabular. Benchmarks covering multimodal confounders (medical imaging, free-text clinical notes, genomics) remain scarce, preventing evolutionary search over high-dimensional unstructured estimators.

Reference Index

Glossary of Causal & Evolutionary Terminology

PEHE (Precision in Estimation of Heterogeneous Effect)
A granular root-mean-squared error metric evaluating unit-level treatment effect estimates: $\sqrt{\text{PEHE}} = \sqrt{\frac{1}{N}\sum_{i=1}^N (\hat{\tau}_i - \tau_i)^2}$. Unlike aggregate ATE error, it penalizes misidentifying individual response differences across patients.
MAP-Elites (Multi-dimensional Archive of Phenotypic Elites)
An evolutionary algorithm (Mouret & Clune, 2015) that illuminates search spaces by maintaining high-performing programs across distinct behavioral feature niches (e.g., trading off bias vs. uncertainty interval width), preventing premature convergence to local optima.
Doubly Robust (DR) Estimator & Pseudo-Outcomes
A statistical framework (Bang & Robins, 2005) combining propensity score weighting and outcome regression. It remains statistically consistent and asymptotically unbiased if either the propensity model or the outcome regression model is correctly specified.
X-Learner vs. R-Learner
X-Learner (Künzel et al., 2019) is an imputation-based meta-learner designed for unbalanced treatment groups, modeling imputed counterfactual residuals. R-Learner (Nie & Wager) is a residual-on-residual regression based on Robinson's transformation. InferenceEvolve spontaneously hybridized these two distinct paradigms on the LaLonde dataset.
SATT (Sample Average Treatment Effect on the Treated)
The causal estimand targeted in the ACIC 2022 panel benchmark: the patient-weighted mean difference in health spending caused by intervention specifically among treated medical practice units across post-rollout periods.
Citation

BibTeX Reference

Wang et al. (2026)
@article{wang2026inferenceevolve,
  title={InferenceEvolve: Automated Causal Effect Estimators through Self-Evolving AI},
  author={Wang, Can and Zhao, Hongyu and Chen, Yiqun},
  journal={arXiv preprint arXiv:2604.04274},
  year={2026},
  url={https://arxiv.org/abs/2604.04274}
}
Made with Flash Papers — make your own ↗