arXiv:2610.32863cs.AIOct 2026

Manuscript Offprint

arXiv:2610.32863

A Foundation Model for Policy In-Context Longitudinal Causal Effect Estimation

Wenxin Chen, Kyra Gan, Mingyu Lu, Zilin Jing, Fei Wang, Hoifung Poon, Tristan Naumann, Peniel Argaw

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Wenxin Chen ∗^{*}

Cornell University

New York City, NY

Kyra Gan

Cornell University

New York City, NY

Mingyu Lu

University of Washington

Seattle, WA

Zilin Jing

Columbia University

New York City, NY

Fei Wang

Cornell University

New York City, NY

Hoifung Poon

Recursion Pharmaceuticals, Inc.

Salt Lake City, UT

Tristan Naumann & Peniel Argaw

Microsoft Research

Redmond, WA

ABSTRACT

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.

1 INTRODUCTION

Clinical care often involves a sequence of treatment decisions that evolve with a patient's changing condition (Murphy, 2003; Chakraborty & Moodie, 2013). Estimating the effects of these time-varying treatments is therefore essential for guiding effective care. Doing so from observational data is particularly challenging: covariates can simultaneously be consequences of earlier treatments and determinants of later treatment decisions and outcomes, creating treatment–confounder feedback that complicates causal effect estimation (Robins, 1986; Hernán & Robins, 2010).

Existing methods decompose the longitudinal counterfactual target into a sequence of local nuisance regressions, which are fitted to each target dataset and combined through a causal estimation procedure (Robins, 1986; 2000; Bang & Robins, 2005). This decomposition introduces two practical challenges. First, estimation errors can propagate and accumulate over the intervention horizon (Chen et al., 2026a). Second, existing methods face a trade-off between flexibility across causal queries and estimation variance. Some estimators fit nuisance models that can be reused across many policies and horizons, but this flexibility can come at the cost of high variance, e.g., through products of inverse propensities or by modeling the full longitudinal data-generating process (Li et al., 2021; Frauen et al., 2025). Other estimators reduce variance by fitting only the outcome regressions needed for a particular policy and horizon, but changing the query then requires retraining and potentially new hyperparameter tuning (Hess et al., 2026; Shirakawa et al., 2024). Moreover, many existing methods (Lim, 2018; Bica et al., 2020; Melnychuk et al., 2022; Seedat et al., 2022) are designed

∗^{*}This study was done during a summer internship at Microsoft Research

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^{3} -Net (Chen et al., 2026a). √ indicates that the capability is supported by the method's released implementation.

CapabilityRMSNCRNTE-CDECTG-NetIGC-NetDeepACEDeepLTMLED3D^3-NetPICLE-PFN
Dynamic treatment policy✕✕✕✕✕✓✕✓✓✓
Multidimensional treatment✓✓✓✓✓✓✕✕✕✓
No retraining across horizons/policies✓✓✓✓✓✕✕✕✕✓

for static treatment sequences, which apply prescribed fixed treatment decisions throughout the trajectory without considering time-varying covariates. Yet clinically relevant counterfactual questions may involve treatment regimes that adapt decisions to time-varying patient characteristics. There is a need for an estimator that supports both static and dynamic policies across different horizons, without retraining for each new target.

To address these challenges, we explore an alternative approach based on in-context learning (ICL). Recent tabular foundation models demonstrate that pretraining on synthetic tasks can produce models that adapt in context to new datasets and prediction problems without parameter updates (Hollmann et al., 2023; 2025; QU et al., 2025; 2026). This paradigm offers two opportunities for longitudinal causal estimation. First, in synthetic data, we can intervene on a target policy and directly generate its corresponding multi-step potential outcome. This provides ground-truth supervision for the final causal estimand, avoiding the need to learn and compose a sequence of local nuisance models. Second, diverse pretraining priors can support adaptation to different datasets and causal queries. The remaining gap is representing target policies, including dynamic ones, as context for ICL, and directly learning conditional average potential outcome (CAPO) across different horizons.

To meet these gaps, we introduce PICLE-PFN, the first foundation model for longitudinal CAPO estimation supporting both static and dynamic policies. Our contributions are three-fold: (i) Policy representation and ICL formulation. We show that a target policy's decisions on factual histories across the entire observed dataset preserve the policy information needed for CAPO identification. This motivates an ICL formulation that combines observational data with policy demonstrations, providing a unified interface for static and dynamic policies over multi-step intervention windows. (ii) Architecture and amortized estimation. We design a novel transformer based on Prior-data Fitted Network (PFN). Direct pretraining on synthetic multi-step CAPO targets avoids full generative modeling and explicit nuisance-model composition at deployment. Pretraining across diverse datasets, policies, and horizons enables flexible causal queries in a single forward pass without task-specific optimization. (iii) Empirical performance. PICLE-PFN achieves the lowest RMSE in six of seven benchmark settings, with up to 12.2%12.2\% lower RMSE than the strongest baseline, while being about 100×100\times to 5000×5000\times faster at deployment than a comparably accurate method. It also provides substantially better calibrated uncertainty. Code is available at https://anonymous.4open.science/r/PICLE-02FE/.

References (35)