InferenceEvolve: Towards Automated Causal Effect Estimators through Self-Evolving AI
Authors: Can Wang, Hongyu Zhao, Yiqun Chen
Organizations: Department of Biostatistics, Johns Hopkins Bloomberg School of Public Health, Baltimore, MD 21205, USA · Department of Computer Science, Johns Hopkins University, Baltimore, MD 21218, USA
Causal inference is central to scientific discovery, yet choosing appropriate methods remains challenging because of the complexity of both statistical methodology and real-world data. Inspired by the success of artificial intelligence in accelerating scientific discovery, we introduce InferenceEvolve, an evolutionary framework that uses large language models to discover and iteratively refine causal methods. Across widely used benchmarks, InferenceEvolve yields estimators that consistently outperform established baselines: against 58 human submissions in a recent community competition, our best evolved estimator lay on the Pareto frontier across two evaluation metrics. We also developed robust proxy objectives for settings without semi-synthetic outcomes, with competitive results. Analysis of the evolutionary trajectories shows that agents progressively discover sophisticated strategies tailored to unrevealed data-generating mechanisms. These findings suggest that language-model-guided evolution can optimize structured scientific programs such as causal inference, even when outcomes are only partially observed.
Figures & tables
Dataset
Baseline
Mode
Best
Mean ± SE
% beat
Best Δ (%)
IHDP PEHE
2.411 (BART)
True
1.222
1.392±0.021
100%
49.3%
Proxy
1.034
1.632±0.311
83%
57.1%
ATE error
0.110 (BART)
True
0.063
0.081±0.005
100%
42.9%
Proxy
0.074
0.084±0.003
100%
33.0%
ACIC 2016 PEHE
1.283 (Causal forest)
True
0.858
1.011±0.042
100%
33.1%
Proxy
1.504
2.037±0.196
0%
− 17.2%
Table 1: Best evolved estimators versus baseline methods. The baseline column gives the candidate used for each row: the strongest package baseline in Fig. 2 . Best evolved and best Δ (%) refer to the single best final program under each guidance mode, where positive best Δ indicates percent error reduction relative to the row-specific baseline comparator. Mean ± SE and % beat summarize the performance across all parameter settings for InferenceEvolve .
Dataset
Dominant family
Typical refinements during evolution
Within-dataset TF-IDF
Closest official reference
Median closest-ref. emb. cosine
ACIC 2022
TWFE / DiD / panel fixed-effects estimators
Pre-period anchoring, detrending, patient weighting, clustered or small-sample inference, and coverage-oriented calibration
0.336±0.110
IPW
0.585
ACIC 2016
Meta-learners with boosting and DR correction
Cross-fitting, propensity clipping, one-hot encoding of mixed covariates, X-learner or DR-learner structures, and AIPW-style aggregation
0.353±0.173
DR-learner
0.678
IHDP
T-/X-learners with boosted or forest nuisance models
Outcome-model tuning, DR pseudo-outcome refinement, ATE calibration, and more stable nuisance estimation
0.415±0.244
Causal forest
0.691
LaLonde
Weighting and DR hybrids for observational bias correction
Propensity weighting, AIPW/DR correction, adaptive regularization, and ensemble smoothing under small-sample instability
0.331±0.116
DR-learner
0.707
Table 2: Representative solution families discovered by evolution. Final programs cluster into dataset-specific estimator families with recognizable refinement patterns. Similarity values report mean within-dataset TF-IDF cosine similarity among final programs ( ± s.d.) and the median closest official-reference embedding cosine. The “closest official reference” column should be interpreted as the nearest single wrapper in embedding space rather than as a second family label: for example, ACIC 2022’s weighting-heavy panel estimators sit nearest the IPW wrapper, whereas IHDP’s tree- and forest-based nuisance structure pulls that benchmark closest to the causal-forest wrapper.
Parameter
Value
Evolutionary search
Maximum iterations
100
Population size (MAP-Elites)
60
Number of islands
4
Archive size per island
25
Elite selection ratio
0.3
Supplementary Table 1: Complete hyperparameter configuration. Parameters held constant across the 96-run factorial experiment unless noted. Factorial factors indicated with † .
Model
Attempts
RMSE
Coverage
Method
Claude Sonnet 4
2
89.24
0.12
Weighted AIPW w/ RF
GPT-5
1
33.05
0.40
Patient-weighted TWFE DiD
GPT-4o
1
39.21
0.36
DiD + regression adjustment
Grok 4 Fast
3
89.24
0.22
Diff-in-means w/ bootstrap
Qwen3-Coder
1
68.93
0.30
Weighted TWFE (clustered)
DeepSeek v3.1
2
19.44
0.02
Weighted FE w/ clustered SEs
Supplementary Table 2: Full zero-shot results on ACIC 2022 (50 replicates). Seven LLMs evaluated under identical conditions. Each model was given the same structured prompt containing the data schema, causal assumptions, evaluation criteria, and a six-row data preview. Models were allowed up to five attempts to produce a valid program passing a 180 s warm-up test on a single replicate.
Model
Attempts
PEHE
∣ATE error∣
Claude Sonnet 4
1
2.40±0.55
0.103±0.013
GPT-5
1
5.68±0.73
0.292±0.030
GPT-4o
1
1.86±0.38
0.104±0.014
Grok 4 Fast
1
1.86±0.38
0.106±0.014
Qwen3-Coder
2
3.11±0.73
0.489±0.141
DeepSeek v3.1
2
2.02±0.34
0.103±0.018
Supplementary Table 3: Full zero-shot results on IHDP (50 replicates). Seven LLMs evaluated under identical conditions. Method sketches are determined by inspecting the generated code. Means ± SE are computed across 50 replicates with ground-truth potential outcomes.
One final snippet per run from the zero-shot baseline pool, the true-score final-program pool, and the proxy-score final-program pool. The exact 172-program manifest is archived alongside the analysis outputs.
Translation
GPT-5, Gemini 2.5 Pro, Claude Sonnet 4.5
Shared system and user template shown below; each prompt supplied the dataset name, source label, and full program text, and asked for a single manuscript-style methods paragraph.
Judge panel
GPT-5, Gemini 2.5 Pro, Claude Sonnet 4.5
Shared JSON-returning review template shown below; each prompt asked for family assignment, nearest known method, complexity, pipeline steps, and novel components before cross-model aggregation.
Embedding sensitivity
OpenAI main; Qwen sensitivity
All manuscript figures and tables use text-embedding-3-large . The same nearest-reference and within/between-program summaries were rerun with Qwen3-Embedding-0.6B only as a sensitivity analysis.
Supplementary Table 4: Program-analysis inputs and prompt summaries. Exact code sources and shared prompt templates for the program-analysis pipeline.
Supplementary Table 5: Commit-pinned upstream sources for the official reference library. Each normalized estimate(df) wrapper used in the reference-matching analysis was adapted from the corresponding maintainer example at the listed commit-pinned URL.
Comparison
Mean ± SD
n pairs
Within ACIC 2022
0.336±0.110
276
Within ACIC 2016
0.353±0.173
276
Within IHDP
0.415±0.244
276
Within LaLonde
0.331±0.116
276
ACIC 2022 vs. IHDP
0.140±0.053
576
ACIC 2016 vs. IHDP
0.352±0.186
576
Supplementary Table 6: Code similarity among final programs. TF-IDF cosine similarity between pairs of final evolved programs. Within-dataset similarity is consistently higher than between-dataset similarity, confirming genuine dataset-specific adaptation.
Dataset
Correlation
n
p -value
IHDP
0.97
4
0.03
LaLonde-Norm
0.77
4
0.23
ACIC 2016 ∗
0.50
3
0.67
ACIC 2022 (DR-DID hit-rate vs. true coverage)
0.99
76
1.3×10−67
Supplementary Table 7: Proxy metric validation. For IHDP, LaLonde-Norm, and ACIC 2016, values report Pearson correlation between matched final-run proxy combined scores and true combined scores. For ACIC 2022, values report Spearman correlation between the DR-DID hit-rate component and true coverage across checkpoint reevaluations.
Iter.
RMSE
Cov.
Ridge
Cov. enc.
Pre-mean
Trend
Post-only
CI adj.
0 (init)
33.1
0.40
—
—
—
—
—
—
2
31.7
0.55
✓
✓
—
—
—
—
14
28.7
0.55
—
✓
✓
—
—
—
16
27.1
0.75
—
✓
✓
—
—
✓
22
18.5
0.95
—
✓
✓
—
✓
✓
52
15.3
0.90
—
✓
✓
✓
✓
✓
Supplementary Table 8: ACIC 2022 feature progression. Each row is a new-best checkpoint. The agent progressively discovers DiD logic, pre-mean adjustment, and trend correction.
Iter.
Method
PEHE
∣ATE error∣
Combined
Init
X-Learner (GBM, cross-fitted)
1.225
—
baseline
Early
X-Learner + RF propensity (local weighting)
1.028
0.105
0.579
Final
X-Learner (GBM + RF PS)
1.028
0.105
0.579
Supplementary Table 9: ACIC 2016 evolution checkpoints. Best-run trajectory (Gemini, λ=0.2 , split 20:80). The agent refines a simple X-learner into a random-forest propensity-weighted X-learner with local blending.
Iter.
Method
PEHE
∣ATE error∣
Init
X-Learner (GBM, cross-fitted, constant g )
1.613
0.116
Early
GBM+Ridge ensemble ( 0.7/0.3 ) + polynomial features
≈ 1.4
≈ 0.10
Mid
+ MLP treatment effect models (TARNet-style)
≈ 1.3
≈ 0.10
Final
TARNet-style X-learner + ensemble + adaptive- g
1.253
0.115
Supplementary Table 10: IHDP evolution checkpoints. Best-run trajectory (GPT-5, λ=0.2 , split 20:80). The agent augments the X-learner with an ensemble backbone, neural network treatment effect models, and adaptive propensity weighting.
Iter.
Method
PEHE
∣ATE error∣
Init
X-Learner (GBM, cross-fitted, constant g )
—
—
Early
+ Cross-fitted propensity model + DR pseudo-outcomes
≈ 1.5
≈ 0.20
Mid
X-learner + R-learner blend with AIPW
≈ 1.4
≈ 0.17
Final
CF X+R blend, AIPW-calib (GBR+Ridge)
1.359
0.161
Supplementary Table 11: LaLonde evolution checkpoints. Best-run trajectory (GPT-5, λ=0.2 , split 20:80). The agent blends X-learner and R-learner components with AIPW calibration.