Transformers Can Do Bayesian Inference
Not on the map. Why?
Abstract (arXiv)
Currently, it is hard to reap the benefits of deep learning for Bayesian methods, which allow the explicit specification of prior knowledge and accurately capture model uncertainty. We present Prior-Data Fitted Networks (PFNs). PFNs leverage in-context learning in large-scale machine learning techniques to approximate a large set of posteriors. The only requirement for PFNs to work is the ability to sample from a prior distribution over supervised learning tasks (or functions). Our method restates the objective of posterior approximation as a supervised classification problem with a set-valued input: it repeatedly draws a task (or function) from the prior, draws a set of data points and their labels from it, masks one of the labels and learns to make probabilistic predictions for it based on the set-valued input of the rest of the data points. Presented with a set of samples from a new supervised learning task as input, PFNs make probabilistic predictions for arbitrary other data points in a single forward propagation, having learned to approximate Bayesian inference. We demonstrate that PFNs can near-perfectly mimic Gaussian processes and also enable efficient Bayesian inference for intractable problems, with over 200-fold speedups in multiple setups compared to current methods. We obtain strong results in very diverse areas such as Gaussian process regression, Bayesian neural networks, classification for small tabular data sets, and few-shot image classification, demonstrating the generality of PFNs. Code and trained PFNs are released at https://github.com/automl/TransformersCanDoBayesianInference.
Key facts. Cited by 360 papers in the map (data through 14 Oct 2026). Builds on 40 of its 67 references that are in the map. First posted on arXiv 20 Dec 2021.
Builds on
40 of 67 references.
References · 40
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
- 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
- 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,897
- 2020Exploring Simple Siamese Representation Learningcited by 2,866
- 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,269
28 more
- 2018DARTS: Differentiable Architecture Searchcited by 1,798
- 2016Variational Inference: A Review for Statisticianscited by 1,472
- 2017Learning Transferable Architectures for Scalable Image Recognitioncited by 1,101
- 2019AugMix: A Simple Data Processing Method to Improve Robustness and Uncertaintycited by 901
- 2017A Distributional Perspective on Reinforcement Learningcited by 765
- 2016Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithmcited by 507
- 2019The frontier of simulation-based inferencecited by 502
- 2018Conditional Neural Processescited by 426
- 2018Pyro: Deep Universal Probabilistic Programmingcited by 380
- 2018Neural Processescited by 311
- 2021What Are Bayesian Neural Network Posteriors Really Like?cited by 308
- 2019Attentive Neural Processescited by 283
- 2017One-Shot Visual Imitation Learning via Meta-Learningcited by 228
- 2018Neural Architecture Search with Bayesian Optimisation and Optimal Transportcited by 195
- 2018Bayesian Model-Agnostic Meta-Learningcited by 194
- 2021Benchmarking Simulation-Based Inferencecited by 162
- 2021Bayesian Neural Network Priors Revisitedcited by 121
- 2018Meta-Learning Probabilistic Inference For Predictioncited by 110
- 2019An Open Source AutoML Benchmarkcited by 85
- 2020PACOH: Bayes-Optimal Meta-Learning with PAC-Guaranteescited by 85
- 2017Meta-Learning by Adjusting Priors Based on Extended PAC-Bayes Theorycited by 76
- 2020Meta-Learning Stationary Stochastic Process Prediction with Convolutional Neural Processescited by 76
- 2019Meta-learning of Sequential Strategiescited by 70
- 2019BayesNAS: A Bayesian Approach for Neural Architecture Searchcited by 68
- 2020Neural Ensemble Search for Uncertainty Estimation and Dataset Shiftcited by 56
- 2018A Likelihood-Free Inference Framework for Population Genetic Data using Exchangeable Neural Networkscited by 31
- 2016Deep Amortized Inference for Probabilistic Programscited by 23
- 2017Analysis of dropout learning regarded as ensemble learningcited by 15
Built on by
Citing papers per year: 2022: 9; 2023: 28; 2024: 61; 2025: 93; 2026: 169.
360 papers.
Sort:
By area:
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 674
- 2025TabICL: A Tabular Foundation Model for In-Context Learning on Large Datacited by 289
- 2023When Do Neural Nets Outperform Boosted Trees on Tabular Data?cited by 223
- 2023Embers of Autoregression: Understanding Large Language Models Through the Problem They are Trained to Solvecited by 178
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2022Transformer Neural Processes: Uncertainty-Aware Meta Learning Via Sequence Modelingcited by 127
- 2024TabDPT: Scaling Tabular Foundation Models on Real Datacited by 113
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 105
- 2023ForecastPFN: Synthetically-Trained Zero-Shot Forecastingcited by 104
- 2022Towards Learning Universal Hyperparameter Optimizers with Transformerscited by 81
38 more
- 2023PFNs4BO: In-Context Learning for Bayesian Optimizationcited by 73
- 2022Learning to Induce Causal Structurecited by 68
- 2023Statistical Foundations of Prior-Data Fitted Networkscited by 65
- 2023The No Free Lunch Theorem, Kolmogorov Complexity, and the Role of Inductive Biases in Machine Learningcited by 63
- 2024Position: Bayesian Deep Learning is Needed in the Age of Large-Scale AIcited by 62
- 2024Retrieval & Fine-Tuning for In-Context Tabular Modelscited by 59
- 2023In-Context Learning Learns Label Relationships but Is Not Conventional Learningcited by 51
- 2025Do-PFN: In-Context Learning for Causal Effect Estimationcited by 51
- 2025CausalPFN: Amortized Causal Effect Estimation via In-Context Learningcited by 49
- 2024TuneTables: Context Optimization for Scalable Prior-Data Fitted Networkscited by 47
- 2024Retrieval Augmented Time Series Forecastingcited by 46
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2023Modeling rapid language learning by distilling Bayesian priors into artificial neural networkscited by 42
- 2022TACTiS: Transformer-Attentional Copulas for Time Seriescited by 38
- 2023Efficient Bayesian Learning Curve Extrapolation using Prior-Data Fitted Networkscited by 37
- 2025Representation Learning for Tabular Data: A Comprehensive Surveycited by 36
- 2024Mixture of In-Context Prompters for Tabular PFNscited by 33
- 2023End-to-End Meta-Bayesian Optimisation with Transformer Neural Processescited by 32
- 2025Foundation Models for Causal Inference via Prior-Data Fitted Networkscited by 32
- 2026Toto 2.0: Time Series Forecasting Enters the Scaling Eracited by 30
- 2025TimePFN: Effective Multivariate Time Series Forecasting with Synthetic Datacited by 29
- 2024TabPFGen -- Tabular Data Generation with TabPFNcited by 28
- 2023Emergence of In-Context Reinforcement Learning from Noise Distillationcited by 27
- 2024In-Context Freeze-Thaw Bayesian Optimization for Hyperparameter Optimizationcited by 26
- 2024Drift-Resilient TabPFN: In-Context Learning Temporal Distribution Shifts on Tabular Datacited by 25
- 2023Neuralizer: General Neuroimage Analysis without Re-Trainingcited by 24
- 2023From Supervised to Generative: A Novel Paradigm for Tabular Deep Learning with Large Language Modelscited by 24
- 2024Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformerscited by 24
- 2024Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyondcited by 24
- 2024In-context Time Series Predictorcited by 23
- 2024Amortized Probabilistic Conditioning for Optimization, Simulation and Inferencecited by 23
- 2023ExPT: Synthetic Pretraining for Few-Shot Experimental Designcited by 22
- 2023A General Framework for User-Guided Bayesian Optimizationcited by 22
- 2023Context-Aware Meta-Learningcited by 21
- 2024Position: Leverage Foundational Models for Black-Box Optimizationcited by 21
- 2024Amortized Bayesian Experimental Design for Decision-Makingcited by 21
- 2025GraphPFN: A Prior-Data Fitted Graph Foundation Modelcited by 21
- 2024Estimating the Hallucination Rate of Generative AIcited by 20
50 most cited of 360 All 360 (JSON)
- 2026Learning by Examples: Power Grid Steady State Analysis with a Tabular Foundation Model14 Oct 2026
- 2026When Does Depth Help? Understanding Layerwise Inference in Tabular Foundation Models14 Oct 2026
- 2026Learning Source Structure: Bayesian Prediction with Transformers13 Oct 2026
- 2026When Repeated Measurements Hurt Tabular Foundation Models12 Oct 2026
- 2026Relational Learning as World Modeling12 Oct 2026
- 2026TabMosaic: Unified In-Context Diffusion for Tabular Generative Tasks11 Oct 2026
- 2026Prior-Fitted and Frozen Scorers for Multimodal Contrastive Learning10 Oct 2026
- 2026How Well Do Prior-Data Fitted Networks Amortize Bayesian Inference?9 Oct 2026
- 2026PDE-PFN: Prior-Data Fitted Neural PDE Solver9 Oct 2026
- 2026GIST: Generator-state-Informed Supervision for Tabular Foundation Models9 Oct 2026
- 2026Test-Time Compute for Tabular Foundation Models: Mechanisms, Gains, and Limits8 Oct 2026
- 2026Spatial Induction Heads: In-Context Learning of Multidimensional Cellular Automata6 Oct 2026
38 more
- 2026GeneICL: A Tabular Foundation Model for Bulk Transcriptomics6 Oct 2026
- 2026How High Is 0.6? Floors, Ceilings, and Headroom in Interpretability Probing6 Oct 2026
- 2026Adaptive Mean Estimation by In-Context Learning: A Gradient-Flow Analysis6 Oct 2026
- 2026LinearPFN: Amortized Variable Selection for Linear Models with Interactions5 Oct 2026
- 2026Learning to Learn a Language5 Oct 2026
- 2026RepICL: Reusable In-Context Prediction Across Heterogeneous Representation Spaces5 Oct 2026
- 2026Distillation of Tabular Foundation Models into Efficient Predictors1 Oct 2026
- 2026IQS-BO: In-Context Query Selection for Bayesian Optimisation1 Oct 2026
- 2026T2SPO: Trajectory-to-Step Policy Optimization for Agentic Reinforcement Learning30 Sep 2026
- 2026NodeGround: A Node Classification Benchmark in the Graph Foundation Model Era30 Sep 2026
- 2026CIDER-FM: Foundation Models for Causal Inference from Diverse Experimental Regimes30 Sep 2026
- 2026Molecular Property Prediction under Structural Shift with Tabular Foundation Models30 Sep 2026
- 2026TabFM-Auto: Self-Evolving Pipelines for Tabular Foundation Models29 Sep 2026
- 2026TabFM: A Zero-Shot Foundation Model for Tabular Data29 Sep 2026
- 2026Message Passing Does More with Less for In-Context Learning on Graphs29 Sep 2026
- 2026What You Observe Determines How You Identify Causal Effects: Evaluating Causal Models across Observational Views29 Sep 2026
- 2026Adapting Linear-Time Architectures for Tabular In-Context Learning28 Sep 2026
- 2026LoopICL: Looping a single transformer block to solve tabular tasks28 Sep 2026
- 2026Small transformers track Bayesian evidence for latent common causes via a context-invariant mechanism28 Sep 2026
- 2026SwitchPFN: Shared Switching Dynamics for Frozen In-Context Time Series Classification24 Sep 2026
- 2026M2PFN: End-to-End Disentangled Alignment for Generalizable Multimodal In-Context Learning in Alzheimer's Disease23 Sep 2026
- 2026Support-Compiled Feature Folding: More Evidence at Lower Memory Across Tabular Foundation Models23 Sep 2026
- 2026NPBoost: Neural Processes with Gradient-Boosted Fixed Effects23 Sep 2026
- 2026What Do Tabular Foundation Models Compute In Context? In-Situ Representation Refinement through Attention-Gated Updates23 Sep 2026
- 2026In-Context Guidance: Learning Inter-Task Synergies via Numerical Foundational Models for Few-Shot Multitask Optimization22 Sep 2026
- 2026A JEPA Recipe for Tabular Foundation Models22 Sep 2026
- 2026Stealing profits: Spread-based temporal hierarchy forecasting for day-ahead electricity markets19 Sep 2026
- 2026Benchmarking Tabular Foundation Models as Surrogates in Expensive Evolutionary Optimization16 Sep 2026
- 2026LimiX-2: A Contextual Mechanism Network Towards General Structured-Data Intelligence15 Sep 2026
- 2026Distillation of Synthetic Data for Time Series Foundation Models9 Sep 2026
- 2026TabBench-Bio: A Living Benchmark for Machine Learning on High-Dimensional Biomedical Tables7 Sep 2026
- 2026When and Why LLM Causal Priors Help: Closed-Loop Prior Selection for Amortized Causal Inference7 Sep 2026
- 2026From Synthetic Priors to Model Behavior: Structural Coverage in Tabular Foundation Models7 Sep 2026
- 2026Scaling Laws, Tabular Data and Actuarial Ratemaking Models2 Sep 2026
- 2026Causal Foundation Models2 Sep 2026
- 2026TSPFN: A Temporal Tabular Foundation Model for Physiological Time Series Classification31 Aug 2026
- 2026Coarse composition suffices: tabular in-context learning for multi-activity antimicrobial peptide profiling31 Aug 2026
- 2026SOMTab: Set-Order Mamba for Efficient Tabular In-Context Learning28 Aug 2026
50 newest of 360 All 360 (JSON)
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learningcited by 14
- 2024N-Gram Induction Heads for In-Context RL: Improving Stability and Reducing Data Needscited by 7
- 2026Benchmarking the Limits of In-Context Reinforcement Learning for Ad-Hoc Teamworkcited by 2
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learningcited by 1
- 2026Reinforcement Learning Foundation Models Should Already Be A Thingcited by 0
- 2026Reinforcement Learning Foundation Models Should Already Be A Thing17 Jun 2026
- 2026Benchmarking the Limits of In-Context Reinforcement Learning for Ad-Hoc Teamwork23 May 2026
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learning6 Dec 2025
- 2024N-Gram Induction Heads for In-Context RL: Improving Stability and Reducing Data Needs4 Nov 2024
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learning13 Jun 2024
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
- 2025Transformers Pretrained on Procedural Data Contain Modular Structures for Algorithmic Reasoningcited by 9
- 2026Bayesian Elicitation with LLMs: Model Size Helps, Extra "Reasoning" Doesn't Alwayscited by 1
- 2026Test-Time Compute for Tabular Foundation Models: Mechanisms, Gains, and Limitscited by 0
- 2026Test-Time Compute for Tabular Foundation Models: Mechanisms, Gains, and Limits8 Oct 2026
- 2026Bayesian Elicitation with LLMs: Model Size Helps, Extra "Reasoning" Doesn't Always2 Apr 2026
- 2025Transformers Pretrained on Procedural Data Contain Modular Structures for Algorithmic Reasoning28 May 2025
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanism24 May 2024
- 2024One-shot World Models Using a Transformer Trained on a Synthetic Priorcited by 0
- 2026Can In-Context Learning Support Intrinsic Curiosity?cited by 0
- 2026A JEPA Recipe for Tabular Foundation Modelscited by 0
- 2026Relational Learning as World Modelingcited by 0
- 2026Relational Learning as World Modeling12 Oct 2026
- 2026A JEPA Recipe for Tabular Foundation Models22 Sep 2026
- 2026Can In-Context Learning Support Intrinsic Curiosity?17 Jun 2026
- 2024One-shot World Models Using a Transformer Trained on a Synthetic Prior21 Sep 2024
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2026SOMTab: Set-Order Mamba for Efficient Tabular In-Context Learningcited by 1
- 2026SOMTab: Set-Order Mamba for Efficient Tabular In-Context Learning28 Aug 2026
- 2024Is Mamba Capable of In-Context Learning?5 Feb 2024
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 674
- 2025TabICL: A Tabular Foundation Model for In-Context Learning on Large Datacited by 289
- 2023When Do Neural Nets Outperform Boosted Trees on Tabular Data?cited by 223
- 2023Embers of Autoregression: Understanding Large Language Models Through the Problem They are Trained to Solvecited by 178
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2022Transformer Neural Processes: Uncertainty-Aware Meta Learning Via Sequence Modelingcited by 127
- 2024TabDPT: Scaling Tabular Foundation Models on Real Datacited by 113
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 105
- 2023ForecastPFN: Synthetically-Trained Zero-Shot Forecastingcited by 104
- 2022Towards Learning Universal Hyperparameter Optimizers with Transformerscited by 81
12 most cited of 333 All 333 (JSON)
- 2026Learning by Examples: Power Grid Steady State Analysis with a Tabular Foundation Model14 Oct 2026
- 2026When Does Depth Help? Understanding Layerwise Inference in Tabular Foundation Models14 Oct 2026
- 2026Learning Source Structure: Bayesian Prediction with Transformers13 Oct 2026
- 2026When Repeated Measurements Hurt Tabular Foundation Models12 Oct 2026
- 2026TabMosaic: Unified In-Context Diffusion for Tabular Generative Tasks11 Oct 2026
- 2026Prior-Fitted and Frozen Scorers for Multimodal Contrastive Learning10 Oct 2026
- 2026How Well Do Prior-Data Fitted Networks Amortize Bayesian Inference?9 Oct 2026
- 2026PDE-PFN: Prior-Data Fitted Neural PDE Solver9 Oct 2026
- 2026GIST: Generator-state-Informed Supervision for Tabular Foundation Models9 Oct 2026
- 2026Spatial Induction Heads: In-Context Learning of Multidimensional Cellular Automata6 Oct 2026
- 2026GeneICL: A Tabular Foundation Model for Bulk Transcriptomics6 Oct 2026
- 2026How High Is 0.6? Floors, Ceilings, and Headroom in Interpretability Probing6 Oct 2026
12 newest of 333 All 333 (JSON)