SurvivalPFN: Amortized Bayesian Survival Prediction via In-Context Learning

Shi-ang Qi, Vahid Balazadeh, Michael Cooper, Russell Greiner, Rahul G KrishnanNeurIPS 2026

TL;DR

Modeling when something will happen—a patient relapsing, a customer churning, or an engine failing—usually requires picking from a dizzying menu of specialized statistical models and painstakingly tuning them. SurvivalPFN turns this entire process into a single forward pass of a Transformer. Pretrained on millions of synthetic datasets, it acts as an "out-of-the-box" foundation model for survival analysis, beating 20 established baselines in accuracy while running nearly as fast as simple linear models.

What Problem Does This Paper Address?

Imagine running a five-year clinical trial to see when patients experience a heart attack. When the trial ends, many patients haven't had one—and others moved away halfway through. You don't know when their event will happen, only that it didn't happen while you were watching. In statistics, this missing-data puzzle is called right-censoring, and solving it is the core of survival analysis.

Practitioners face a tough trade-off when modeling right-censored data:

  • Classical models (like Cox Proportional Hazards) are fast, but make rigid assumptions—like assuming risk ratios stay constant over time.
  • Deep learning and tree-based ensembles are flexible, but require heavy hyperparameter tuning for every new dataset and still bake in structural assumptions (like forcing predictions into parametric curves).
  • Bayesian survival models gracefully average over plausible mechanisms instead of committing to one, but require slow, intractable math (like MCMC sampling) that must be rerun from scratch for every dataset.
Figure 2: Traditional survival analysis vs. SurvivalPFN. (Left): Traditional survival analysis re- quires an analyst to select and fit a suitable estimator for the observational data. (Right): SurvivalPFN pre-trains on diverse synthetic, identifiable DGPs. At inference, an observed dataset is provided as context, and the survival distributions for query instances are obtained with a single forward pass.

The authors ask: Can we get the flexibility and uncertainty calibration of Bayesian inference without per-dataset training, tuning, or rigid assumptions?

Methods

To pull this off, the authors build on Prior-Data Fitted Networks (PFNs)—Transformers trained on synthetic tasks to perform amortized Bayesian inference via in-context learning. Instead of fitting a model to a dataset at test time, you shift all the heavy computation offline during pretraining.

Here is what is standard versus what is novel in SurvivalPFN:

  • Standard PFN Backbone: Following tabular PFNs (like TabDPT and CausalPFN), each row of an observed dataset (features, observed time, and whether the event occurred) is embedded as a context token. New test points are query tokens. An asymmetric attention mask ensures predictions don't depend on row order.
  • Novel Identifiable Synthetic Prior: You can't just feed random synthetic numbers to a survival model. If the hidden event time and censoring time are tangled up in the wrong way, it becomes mathematically impossible to tell them apart from observed data—an issue called non-identifiability. Using randomly initialized MLPs, the authors design a synthetic simulator strictly constrained to identifiable mechanisms (specifically, conditional independent censoring, where event and censoring times share observed features $X$ but are otherwise independent). To maximize diversity, they use a "kitchen-sink" meta-prior mixing raw MLP outputs, smooth monotone maps, parametric mixtures, and four distinct censoring regimes.
  • Dual-Target Control Input: During training, the simulator knows both the true latent event time and the true censoring time. SurvivalPFN introduces a binary control flag ($\widetilde{\delta}^*$) in the query token: setting it to $1$ asks for the event-time distribution, while $0$ asks for the censoring-time distribution—allowing the network to learn shared structure between both processes. It outputs a discretized probability histogram over 1,024 monotone-transformed time bins.
Figure 3: Training SurvivalPFN. At each iteration, we sample an identifiable survival DGP and use it to generate context tokens (X, T, ∆) together with query covariates X∗. Query tokens are formed by pairing X∗with query indicators e∆∗, and SurvivalPFN predicts the requested event- or censoring-time distribution. The model is trained by minimizing the likelihood loss.

At test time, you feed your real dataset as context, set $\widetilde{\delta}^* = 1$ for your test queries, and get full survival curves in one forward pass.

Datasets

  • Pretraining: 100% synthetic data—millions of simulated data-generating processes sampled on the fly from the custom survival prior.
  • Evaluation: One of the largest survival benchmarks assembled to date, comprising 91 real-world datasets drawn from SurvSet, textbooks, software packages, and recent papers (spanning medicine, finance, e-commerce, and engineering). The authors use 20 datasets strictly to pick their model checkpoint and hold out 71 datasets for final evaluation across varying sizes and censoring rates.

Key Insights and Ideas

  • Theoretical Consistency Guides Simulator Design: The authors prove mathematically that if the synthetic prior only generates identifiable mechanisms, the Bayesian posterior predictive distribution converges to the true survival curve as context grows. Theory directly dictated how they built their data generator.
  • Generic Tabular Foundation Models Fall Short: What happens if you take off-the-shelf tabular foundation models (like TabPFN or TabICL) and train them only on uncensored rows? They underperform badly. Throwing away censored rows introduces bias; pretraining explicitly on right-censored mechanics is essential.
  • Pretraining Shines in Low-Data Regimes: When downstream datasets are small (fewer than 500 samples) or training split ratios are tiny, traditional flexible models overfit or collapse. Because SurvivalPFN brings rich inductive biases from millions of prior tasks, it stays remarkably stable even with minimal context.

Key Results

Evaluated across 71 held-out datasets, 21 survival models, and 5 metrics (measuring calibration, discrimination, and time-prediction accuracy):

  • Best Overall Performance: SurvivalPFN achieves the #1 overall median rank (around 6 out of 21), leading the pack on Integrated Brier Score (IBS), Mean Absolute Error (MAE), and Log-Rank reliability, while remaining competitive on Concordance Index (CI) and D-calibration.
  • Classical Speed, Deep Accuracy: Total runtime (inference across all 71 datasets, since it requires zero training) is slightly over 10 seconds—nearly matching CoxNet (the fastest linear baseline) and running orders of magnitude faster than tree ensembles and deep survival networks (even excluding their hyperparameter tuning time).
Figure 1: Computational efficiency vs. performance across 71 datasets and 5 metrics. SurvivalPFN achieves the best median rank while matching classical models in speed.
  • Context Verification: Permuting the survival outcomes in the context set (breaking the feature-outcome link) drops SurvivalPFN's mean CI across datasets from 67.15% to 51.00% (random guessing), confirming it genuinely learns in-context relationships rather than memorizing marginal statistics.

Limitations and Future Work

  • Dependent Censoring: SurvivalPFN assumes conditional independent censoring ($E \perp C \mid X$). If a patient drops out of a study because they are about to experience the event (for reasons not captured in $X$), the problem isn't nonparametrically identifiable, and SurvivalPFN isn't valid. Extending the prior using mathematical tools like copulas is a key next step.
  • Table Size Scalability: Like other Transformer-based PFNs, attention over rows gets heavy—and relative performance dips—as datasets grow large (e.g., >5,000 samples), where traditional tree ensembles or deep models have enough data to fit from scratch. Improving long-context scaling remains open future work.

Summary updated

Abstract

Survival analysis provides a powerful statistical framework for modeling time-to-event outcomes in the presence of censoring. However, selecting an appropriate estimator from the many specialized survival approaches often requires substantial methodological and domain expertise. We introduce SurvivalPFN, a prior-data fitted network that amortizes Bayesian inference for censored observations through in-context learning. SurvivalPFN is pretrained on a diverse family of synthetic, identifiable, and right-censored data-generating processes, enabling it to amortize survival analysis in a single forward pass during inference. As a result, the model adapts to the effective complexity of each dataset without task-specific training or hyperparameter tuning, avoids restrictive parametric assumptions, and produces calibrated survival distributions. In a large-scale benchmark spanning 71 datasets, 21 methods, and 5 evaluation metrics, SurvivalPFN achieves strong predictive performance and often improves upon established survival models. These results suggest that SurvivalPFN offers a principled and practical foundation model for survival analysis, with potential applications in high-impact domains such as healthcare, finance, and engineering (https://github.com/rgklab/SurvivalPFN).
BibTeX
@inproceedings{qi2026survivalpfn,
  author = {Shi-ang Qi and Vahid Balazadeh and Michael Cooper and Russell Greiner and Rahul G Krishnan},
  title = {{SurvivalPFN: Amortized Bayesian Survival Prediction via In-Context Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bJ348fNOVg},
}
Figure