Organizations: Cornell University, New York City, NY · University of Washington, Seattle, WA · Columbia University, New York City, NY · Recursion Pharmaceuticals, Inc., Salt Lake City, UT · Microsoft Research, Redmond, WA
Longitudinal causal effect estimation is complicated by time-varying confounding and treatment-confounder feedback loops. Existing methods generally require data-specific nuisance-model fitting, and many are tailored to prespecified treatment sequences or prediction horizons, leading to time-consuming computation at deployment. We introduce Policy In-Context Longitudinal causal Effect estimation with Prior-data Fitted Networks (PICLE-PFN), the first foundation model for longitudinal causal effect estimation that supports dynamic treatment policies. PICLE-PFN represents target policies through in-context history-decision demonstrations, providing a unified interface for a broad class of treatment policies. Pretrained over synthetic data sampled from longitudinal structural causal models, PICLE-PFN amortizes causal effect estimation across datasets, policies, and horizons. Given a new observational dataset and target policy, it directly predicts conditional average potential outcomes (CAPOs) in one forward pass without task-specific training or hyperparameter tuning. Across synthetic and semi-synthetic longitudinal benchmarks, PICLE-PFN achieves competitive RMSE and substantially improved uncertainty calibration with a fraction of deployment runtime, compared to state-of-the-art conventional estimators trained and tuned separately for each dataset.
Figures & tables
Capability
RMSN
CRN
TE-CDE
CT
G-Net
IGC-Net
DeepACE
DeepLTMLE
D 3 -Net
PICLE-PFN
Dynamic treatment policy
✗
✗
✗
✗
✗
✓
✗
✓
✓
✓
Multidimensional treatment
✓
✓
✓
✓
✓
✓
✗
✗
✗
✓
No retraining across horizons/policies
✓
✓
✓
✓
✓
✗
✗
✗
✗
✓
Table 1: Flexibility of existing methods: RMSN ( Lim, 2018 ) ; CRN ( Bica et al., 2020 ) ; TE-CDE ( Seedat et al., 2022 ) ; CT ( Melnychuk et al., 2022 ) ; G-Net ( Li et al., 2021 ) ; IGC-Net ( Hess et al., 2026 ) ; DeepACE ( Frauen et al., 2023 ) ; DeepLTMLE ( Shirakawa et al., 2024 ) ; D 3 -Net ( Chen et al., 2026a ) . ✓ indicates that the capability is supported by the method’s released implementation.
Figure 1: PICLE-PFN Architecture . Feature pooling encodes longitudinal covariates and treatments into embeddings processed by a shared backbone with causal temporal attention and row-attention. Window-specific readouts combine window indices, initial policy demonstrations, and factual outcomes (masked for queries). They cross-attend to trajectory-specific backbone representations under window-specific masks: query readouts access only pre-intervention history, while context readouts access factual data through e and additionally attend to target policy demonstrations. Row-attention uses only context keys and values and operates separately within each readout window. Query readouts yield CAPO predictions across admissible windows in one forward pass.
Dataset
(dA,dL,dB)
Policy type
cancer
(2,1,1)
Static
mimic_y1
(3,27,3)
Static
mimic_y2
(3,27,3)
Static
mimic_1t
(1,27,3)
Static
mimic_1t_hdp0.5
(1,27,3)
Dynamic
mimic_1t_hdp1
(1,27,3)
Dynamic
Table 2: Dataset characteristics.
Method
Cancer
MIMIC
Y1
Y2
1T
1T-HDP0.5
1T-HDP1
1T-HDP2
PICLE-PFN
0.190 ± 0.03
0.958 ± 0.50
0.603 ± 0.23
0.583 ± 0.20
0.527 ± 0.13
0.534 ± 0.13
0.555 ± 0.15
IGC-Net
0.297 ± 0.02
0.901 ± 0.49
0.604 ± 0.18
0.699 ± 0.11
0.546 ± 0.13
0.580 ± 0.13
0.622 ± 0.17
CT
0.217 ± 0.06
0.851 ± 0.29
0.886 ± 0.82
0.660 ± 0.40
—
—
—
RMSN
0.357 ± 0.04
1.242 ± 0.70
0.830 ± 0.13
0.786 ± 0.21
—
—
—
G-Net
0.661 ± 0.04
1.333 ± 0.86
0.984 ± 0.14
1.127 ± 0.20
—
—
—
Table 3: Longitudinal CAPO benchmark across datasets. Each cell reports the mean ± SD normalized RMSE over 20 runs, with RMSE averaged across horizons within each repeat. Bold and underlined values denote the best and second-best methods in each column, respectively.
Method
τ=2
τ=3
τ=4
τ=5
PICLE-PFN
0.730 ± 0.030
0.737 ± 0.032
0.754 ± 0.026
0.767 ± 0.037
IGC-Net
0.736 ± 0.040
0.740 ± 0.038
0.762 ± 0.031
0.779 ± 0.028
PICLE-PFN wins
7/10
5/10
8/10
8/10
Table 4: Factual Outcome Prediction on MIMIC. Normalized RMSE of the factual diastolic blood pressure on the held-out test patients of 10 sampled cohorts.
Figure 2: RMSE across horizons of the top-3 methods in each setting. Points are the normalized RMSE averaged over the 20 tasks, error bars are ±1 SD across tasks
Figure 3: RMSE rank (y-axis) versus inference runtime (x-axis; log scale) across datasets.
Figure 4: Uncertainty Calibration Analysis. Left: empirical coverage against its nominal level, averaged across horizons and 20 tasks; dashed diagonal = perfect calibration. Middle: coverage of the 95% interval per horizon (dashed line = nominal). Right: 95% interval width per horizon.
Figure S.1: Ablation study on the target policy demonstration channel. Supplying the differences between demonstrated and factual treatments accelerates convergence.
Table S.2: Longitudinal CAPO benchmark, per horizon. Each cell reports the normalized RMSE, mean ± SD across the 20 repeats; values in parentheses are the mean ± SD of the method’s per-task RMSE ranking ( ↓ better). The best and second best methods per benchmark and horizon are highlighted.
Method
Type
Cancer
MIMIC_Y1
MIMIC_1T
train
infer
total
train
infer
total
train
infer
total
PICLE-PFN
amortised
—
0.13 ± 0.00
0.13 ± 0.00
—
0.14 ± 0.00
0.14 ± 0.00
—
0.14 ± 0.00
0.14 ± 0.00
IGC-Net
fit per horizon
525 ± 11
0.08 ± 0.00
525 ± 11
582 ± 5
0.08 ± 0.01
582 ± 5
725 ± 10
0.09 ± 0.02
725 ± 10
CT
fit once
23.84 ± 0.57
0.25 ± 0.03
24.09 ± 0.57
78.82 ± 0.47
1.08 ± 0.02
79.90 ± 0.46
66.46 ± 2.04
1.26 ± 0.11
67.72 ± 1.96
RMSN
fit once
65.62 ± 1.36
0.10 ± 0.01
65.71 ± 1.35
33.96 ± 0.55
0.07 ± 0.00
34.03 ± 0.55
6.26 ± 0.49
0.08 ± 0.00
6.34 ± 0.50
G-Net
fit once
4.31 ± 0.42
6.58 ± 0.73
10.88 ± 0.47
12.00 ± 0.45
6.62 ± 0.18
18.62 ± 0.40
4.87 ± 0.37
8.45 ± 0.56
13.32 ± 0.41
Appendix
Table S.3: Runtime(seconds) at deployment. One evaluation task per setting (1000 context, 1000 queries), one A100 GPU, mean ± SD over 5 timing repeats. Baselines are measured on their tuned HPs. CT, RMSN, G-Net, CRN, and TE-CDE is trained once then evaluated on all five horizons; runtime is computed as total time of one training and five inference calls, divided by five); IGC-net, D3, DLTMLE, and DeepACE train one model per horizon; runtime is measured as one training and one inference call. PICLE-PFN is pretrained and only runs inference.
Method
Hyperparameter
Search space
CRN, TE-CDE, G-Net
learning rate
logU[10−4,10−2]
number of layers
{1,2,3}
batch size
{32,64,128,256}
sequence hidden units
{0.5,1,2,3,4}× input dim
balanced representation size
{0.5,1,2,3,4}× input dim
FC hidden units
{0.5,1,2,3,4}× input dim
Appendix
Table S.4: Hyperparameter search spaces for the baselines. Each space is searched with Optuna for 2 h on one A100, selecting by held-out factual RMSE. U and logU denote uniform and log-uniform ranges; braces denote categorical choices.
Figure S.2: Coverage against overlap Overlap (x-axis) is measured as the proportion of observed trajectories that exactly match the target policy, and coverage (y-axis) is evaluated using nominal 95% intervals. Hollow points denote tasks with zero empirical overlap. Tasks with positive overlap generally achieve coverage above 0.9, whereas zero-overlap tasks exhibit the largest deviation from nominal coverage, in either direction.
mimic_extract_1t
mimic_extract_1t_hdp1
Horizon
n context
PICLE-PFN
CT
IGC-Net
D3
PICLE-PFN
IGC-Net
D3
h=2
100
0.456 ± 0.145
0.631 ± 0.195
0.447 ± 0.079
0.596 ± 0.301
0.403 ± 0.132
0.406 ± 0.108
0.486 ± 0.131
300
0.382 ± 0.091
0.385 ± 0.082
0.387 ± 0.077
0.498 ± 0.124
0.347 ± 0.107
0.355 ± 0.104
0.399 ± 0.111
1000
0.377 ± 0.125
0.374 ± 0.198
0.435 ± 0.309
0.409 ± 0.086
0.324 ± 0.100
0.337 ± 0.096
0.355 ± 0.101
h=4
100
0.621 ± 0.204
0.838 ± 0.210
0.698 ± 0.178
0.745 ± 0.217
0.574 ± 0.181
0.661 ± 0.148
0.687 ± 0.159
300
0.537 ± 0.133
0.578 ± 0.142
0.645 ± 0.202
0.596 ± 0.133
0.500 ± 0.151
0.539 ± 0.148
0.575 ± 0.161
Appendix
Table S.5: Context sample size under a static and a history-dependent target policy. RMSE on the query split (size=1000), mean ± SD over 20 tasks ( ↓ better).CT cannot handle dynamic policies and is not run on the history-dependent setting.
Normalized RMSE ↓
Runtime (s) ↓
Horizon τ
PICLE-PFN
CausalLongPFN
PICLE-PFN
CausalLongPFN
1
0.275 ± 0.026
0.195 ± 0.020
0.039
6.67
2
0.308 ± 0.030
0.278 ± 0.025
0.051
12.49
3
0.298 ± 0.037
0.306 ± 0.026
0.065
18.80
4
0.264 ± 0.038
0.298 ± 0.030
0.085
24.75
5
0.216 ± 0.032
0.278 ± 0.035
0.100
31.18
Appendix
Table S.6: Our PFN vs. CausalLongPFN on cancer : normalized RMSE (mean ± std over 20 tasks) and inference runtime per task (1000 context / 1000 query trajectories, one A100).
School of Medicine, Tehran University of Medical Sciences, Tehran, Iran. · Department of Electrical and Computer Engineering, Yale University, New Haven, CT, USA. · School of Medicine, Shiraz University of Medical Sciences, Shiraz, Iran. +2
National University of Singapore · Department of Mathematics, Centre for Quantitative Finance, Risk Management Institute, National University of Singapore