Position: The Future of Bayesian Prediction Is Prior-Fitted

Samuel Müller, Arik Reuter, Noah Hollmann, David Rügamer, Frank Hutter

TL;DR

Prior-Data Fitted Networks (PFNs) represent a paradigm shift in Bayesian prediction by replacing slow, complex online inference with ultra-fast in-context learning. By pre-training transformers entirely on synthetic data generated from a chosen prior, PFNs can approximate the true posterior predictive distribution in a single forward pass. This position paper argues that PFNs are the future of Bayesian inference, effectively turning abundant pre-training compute into highly accurate predictions for data-scarce scenarios.

What Problem Does This Paper Address?

Traditional Bayesian inference methods, such as Markov Chain Monte Carlo (MCMC) and Variational Inference (VI), are mathematically rigorous but suffer from severe practical bottlenecks. They are computationally expensive at runtime, notoriously difficult to implement correctly, and strictly require mathematically tractable likelihood functions.

At the same time, the machine learning landscape is facing a paradox: while computational power for pre-training continues to scale exponentially, the availability of high-quality, real-world data is stagnating in many domains. The authors argue that traditional per-dataset inference methods fail to leverage this massive asymmetry. PFNs address this gap by shifting the heavy computational burden from online inference to offline pre-training using unlimited synthetic data.

Methods

The core idea behind a PFN is to bypass the traditional step of calculating a posterior distribution over latent variables. Instead, a PFN directly learns to approximate the Posterior Predictive Distribution (PPD) using a neural network (typically a Transformer architecture).

Prior-fitting and inference process in a PFN

The process operates in two distinct phases:

  1. Offline Prior-Fitting (Pre-training): The user defines a prior distribution over datasets. A generator repeatedly samples synthetic training sets ($D_{train}$) and corresponding test points ($x_{test}, y_{test}$) from this prior. The Transformer is trained via supervised learning to predict $y_{test}$ given $x_{test}$ and $D_{train}$. Minimizing the cross-entropy loss during this phase mathematically forces the network to minimize the KL-divergence to the true PPD.
  2. Online Inference: At test time, the pre-trained network is frozen. It ingests a completely new, real-world dataset directly into its context window and outputs probabilistic predictions for new queries in a single forward pass. This is known as In-Context Learning (ICL).

Datasets

Because PFNs learn entirely from a user's assumptions, they do not rely on real-world training datasets during pre-training. Instead, they use algorithmic data generators that act as implicit priors. The paper highlights several notable synthetic priors:

  • Bayesian Neural Network (BNN) Priors: Generated by sampling weights from a Gaussian prior and passing random inputs through the resulting multilayer perceptron (MLP).
  • Gaussian Process (GP) Priors: Generated by sampling functions from a GP with randomized hyperparameters (e.g., length scales, kernel types).
  • The TabPFN Prior: A highly sophisticated prior designed for tabular data, built using Structural Causal Models (SCMs) represented as complex computation graphs with randomized activation functions and noise.
  • Domain-Specific Priors: Specialized generators designed to mimic machine learning learning curves or common time-series patterns (seasonality, trends).

For evaluation and real-world validation, the paper references applications across tabular classification, time-series forecasting, RNA folding kinetics, computer-chip latencies, and metagenomics.

Key Insights and Ideas

  • Declarative Programming for ML: PFNs change how we design algorithms. Instead of writing imperative code to solve a problem, practitioners write a simulator (the prior data generator) that encodes their domain knowledge and assumptions. The PFN then automatically compiles this simulator into an optimized inference algorithm.
  • Bypassing Tractability Constraints: Traditional Bayesian methods require a likelihood function that can be explicitly computed. PFNs only require the ability to sample from the prior. This allows practitioners to use incredibly complex, non-differentiable, or simulation-based priors that were previously intractable.
  • Infinite Data and Zero Leakage: Because the training data is generated synthetically on-the-fly, the model has access to an infinite data stream. Furthermore, because it never sees real-world data during training, evaluation is completely immune to data leakage—a major issue for foundation models in fields like time-series forecasting.

Key Results

  • The TabPFN Breakthrough: TabPFN, the poster child of this methodology, became the first deep learning model to consistently outperform classic tree-based methods like XGBoost on tabular datasets with up to 10,000 samples. Remarkably, it achieves superior performance in less than 5 seconds, beating baselines that were tuned for 4 hours.
  • Orders-of-Magnitude Speedups: PFNs are shown to be over 200× faster than traditional Bayesian methods on small-scale data, and over 10,000× faster when applied to specialized tasks like learning curve extrapolation.

Limitations and Future Work

Despite their promise, the authors identify several open challenges for the PFN paradigm:

  • Scaling to Large Datasets: Standard Transformer architectures scale quadratically with the number of samples in the context window. While linear attention and architectures like the Perceiver mitigate this, PFNs still struggle to match traditional models on massive datasets.
  • Architectural Blind Spots: Current encoder-only PFNs struggle with basic token-counting tasks. For example, if given a sequence of identical inputs (like a string of coin flips), the network fails to update its internal beliefs correctly because it cannot count the duplicates.
  • The Black-Box Problem: Unlike traditional Bayesian methods that provide an explicit posterior over latent variables, PFNs hide this reasoning internally. The authors propose Latent Prediction as a key future direction to force PFNs to output their internal representations for better interpretability.
  • In-Context Interpreters: A thrilling future direction is the creation of PFNs that act as interpreters for Probabilistic Programming Languages (PPLs). This would allow a user to input a prior specified as code at inference time, eliminating the need for offline pre-training entirely.

Summary updated

Abstract

Training neural networks on randomly generated artificial datasets yields Bayesian models that capture the prior defined by the dataset-generating distribution. Prior-data Fitted Networks (PFNs) are a class of methods designed to leverage this insight. In an era of rapidly increasing computational resources for pre-training and a near stagnation in the generation of new real-world data in many applications, PFNs are poised to play a more important role across a wide range of applications. They enable the efficient allocation of pre-training compute to low-data scenarios. Originally applied to small Bayesian modeling tasks, the field of PFNs has significantly expanded to address more complex domains and larger datasets. This position paper argues that PFNs and other amortized inference approaches represent the future of Bayesian inference, leveraging amortized learning to tackle data-scarce problems. We thus believe they are a fruitful area of research. In this position paper, we explore their potential and directions to address their current limitations.
BibTeX
@inproceedings{muller2025position,
  author = {Samuel Müller and Arik Reuter and Noah Hollmann and David Rügamer and Frank Hutter},
  title = {{Position: The Future of Bayesian Prediction Is Prior-Fitted}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=5Hpm74b1Ga},
}
Figure