Can Transformers Learn Full Bayesian Inference in Context?
Not on the map. Why?
Abstract (arXiv)
Transformers have emerged as the dominant architecture in the field of deep learning, with a broad range of applications and remarkable in-context learning (ICL) capabilities. While not yet fully understood, ICL has already proved to be an intriguing phenomenon, allowing transformers to learn in context -- without requiring further training. In this paper, we further advance the understanding of ICL by demonstrating that transformers can perform full Bayesian inference for commonly used statistical models in context. More specifically, we introduce a general framework that builds on ideas from prior fitted networks and continuous normalizing flows and enables us to infer complex posterior distributions for models such as generalized linear models and latent factor models. Extensive experiments on real-world datasets demonstrate that our ICL approach yields posterior samples that are similar in quality to state-of-the-art MCMC or variational inference methods that do not operate in context. The source code for this paper is available at https://github.com/ArikReuter/ICL_for_Full_Bayesian_Inference.
Key facts. Cited by 31 papers in the map (data through 14 Oct 2026). First posted on arXiv 28 Jan 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 15; 2026: 16.
31 papers.
Sort:
By area:
- 2025Do-PFN: In-Context Learning for Causal Effect Estimationcited by 51
- 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learningcited by 22
- 2025Position: The Future of Bayesian Prediction Is Prior-Fittedcited by 20
- 2025TabPFN: One Model to Rule Them All?cited by 14
- 2025Distribution Transformers: Fast Approximate Bayesian Inference With On-The-Fly Prior Adaptationcited by 13
- 2025Effortless, Simulation-Efficient Bayesian Inference using Tabular Foundation Modelscited by 13
- 2025The Bayesian Geometry of Transformer Attentioncited by 13
- 2025Early Stopping Tabular In-Context Learningcited by 12
- 2025Simplifying Bayesian Optimization Via In-Context Direct Optimum Samplingcited by 7
- 2025Uncertainty Quantification for Prior-Data Fitted Networks using Martingale Posteriorscited by 5
- 2025Efficient Autoregressive Inference for Transformer Probabilistic Modelscited by 4
- 2025Meta-Statistical Learning: Supervised Learning of Statistical Estimatorscited by 3
19 more
- 2026MapPFN: Learning Causal Perturbation Maps in Contextcited by 3
- 2026Position: agentic AI orchestration should be Bayes-consistentcited by 3
- 2025Predictable Compression Failures: Order Sensitivity and Information Budgeting for Evidence-Grounded Binary Adjudicationcited by 2
- 2025metabeta -- A fast neural model for Bayesian mixed-effects regressioncited by 2
- 2026Scalable Simulation-Based Model Inference with Test-Time Complexity Controlcited by 2
- 2026Large language models reorganize representational geometry during in-context learningcited by 2
- 2026Partition, Prompt, Aggregate: Statistical Self-Consistency in Language Modelscited by 2
- 2026Universal priors: solving empirical Bayes via Bayesian inference and pretrainingcited by 1
- 2026Transformers Learn Robust In-Context Regression under Distributional Uncertaintycited by 1
- 2026Hypothesis generation and updating in large language modelscited by 1
- 2026Multi-Task Bayesian In-Context Learningcited by 1
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?cited by 0
- 2026Amortising Inference and Meta-Learning Priors in Neural Networkscited by 0
- 2026Uncertainty Estimation in Instance Segmentation of Affordances via Bayesian Visual Transformerscited by 0
- 2026Amortized Factor Inference Networks for Posterior Inferencecited by 0
- 2026A Decision-Theoretic View of Test-Time Training: When, How Far, and Which Directions to Adaptcited by 0
- 2026Bayesian Wind Tunnels for Model Selectioncited by 0
- 2026Unifying ICL, SFT, KL-Regularized RL Through a Bayesian Lenscited by 0
- 2026PDE-PFN: Prior-Data Fitted Neural PDE Solvercited by 0
- 2026PDE-PFN: Prior-Data Fitted Neural PDE Solver9 Oct 2026
- 2026Unifying ICL, SFT, KL-Regularized RL Through a Bayesian Lens4 Sep 2026
- 2026Partition, Prompt, Aggregate: Statistical Self-Consistency in Language Models16 Jul 2026
- 2026Bayesian Wind Tunnels for Model Selection1 Jul 2026
- 2026Multi-Task Bayesian In-Context Learning18 Jun 2026
- 2026A Decision-Theoretic View of Test-Time Training: When, How Far, and Which Directions to Adapt14 Jun 2026
- 2026Amortized Factor Inference Networks for Posterior Inference26 May 2026
- 2026Large language models reorganize representational geometry during in-context learning16 May 2026
- 2026Hypothesis generation and updating in large language models7 May 2026
- 2026Uncertainty Estimation in Instance Segmentation of Affordances via Bayesian Visual Transformers5 May 2026
- 2026Position: agentic AI orchestration should be Bayes-consistent1 May 2026
- 2026Transformers Learn Robust In-Context Regression under Distributional Uncertainty19 Mar 2026
19 more
- 2026Scalable Simulation-Based Model Inference with Test-Time Complexity Control16 Mar 2026
- 2026Universal priors: solving empirical Bayes via Bayesian inference and pretraining16 Feb 2026
- 2026Amortising Inference and Meta-Learning Priors in Neural Networks9 Feb 2026
- 2026MapPFN: Learning Causal Perturbation Maps in Context28 Jan 2026
- 2025The Bayesian Geometry of Transformer Attention27 Dec 2025
- 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning13 Oct 2025
- 2025Efficient Autoregressive Inference for Transformer Probabilistic Models10 Oct 2025
- 2025metabeta -- A fast neural model for Bayesian mixed-effects regression8 Oct 2025
- 2025Predictable Compression Failures: Order Sensitivity and Information Budgeting for Evidence-Grounded Binary Adjudication14 Sep 2025
- 2025Can Transformers Break Encryption Schemes via In-Context Learning?13 Aug 2025
- 2025Early Stopping Tabular In-Context Learning26 Jun 2025
- 2025Do-PFN: In-Context Learning for Causal Effect Estimation6 Jun 2025
- 2025Position: The Future of Bayesian Prediction Is Prior-Fitted29 May 2025
- 2025Simplifying Bayesian Optimization Via In-Context Direct Optimum Sampling29 May 2025
- 2025TabPFN: One Model to Rule Them All?26 May 2025
- 2025Uncertainty Quantification for Prior-Data Fitted Networks using Martingale Posteriors16 May 2025
- 2025Effortless, Simulation-Efficient Bayesian Inference using Tabular Foundation Models24 Apr 2025
- 2025Meta-Statistical Learning: Supervised Learning of Statistical Estimators17 Feb 2025
- 2025Distribution Transformers: Fast Approximate Bayesian Inference With On-The-Fly Prior Adaptation4 Feb 2025
- 2025Do-PFN: In-Context Learning for Causal Effect Estimationcited by 51
- 2025In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learningcited by 22
- 2025Position: The Future of Bayesian Prediction Is Prior-Fittedcited by 20
- 2025TabPFN: One Model to Rule Them All?cited by 14
- 2025Distribution Transformers: Fast Approximate Bayesian Inference With On-The-Fly Prior Adaptationcited by 13
- 2025Effortless, Simulation-Efficient Bayesian Inference using Tabular Foundation Modelscited by 13
- 2025The Bayesian Geometry of Transformer Attentioncited by 13
- 2025Early Stopping Tabular In-Context Learningcited by 12
- 2025Simplifying Bayesian Optimization Via In-Context Direct Optimum Samplingcited by 7
- 2025Uncertainty Quantification for Prior-Data Fitted Networks using Martingale Posteriorscited by 5
- 2025Efficient Autoregressive Inference for Transformer Probabilistic Modelscited by 4
- 2025Meta-Statistical Learning: Supervised Learning of Statistical Estimatorscited by 3
12 most cited of 28 All 28 (JSON)
- 2026PDE-PFN: Prior-Data Fitted Neural PDE Solver9 Oct 2026
- 2026Bayesian Wind Tunnels for Model Selection1 Jul 2026
- 2026Multi-Task Bayesian In-Context Learning18 Jun 2026
- 2026A Decision-Theoretic View of Test-Time Training: When, How Far, and Which Directions to Adapt14 Jun 2026
- 2026Amortized Factor Inference Networks for Posterior Inference26 May 2026
- 2026Large language models reorganize representational geometry during in-context learning16 May 2026
- 2026Hypothesis generation and updating in large language models7 May 2026
- 2026Uncertainty Estimation in Instance Segmentation of Affordances via Bayesian Visual Transformers5 May 2026
- 2026Transformers Learn Robust In-Context Regression under Distributional Uncertainty19 Mar 2026
- 2026Scalable Simulation-Based Model Inference with Test-Time Complexity Control16 Mar 2026
- 2026Universal priors: solving empirical Bayes via Bayesian inference and pretraining16 Feb 2026
- 2026Amortising Inference and Meta-Learning Priors in Neural Networks9 Feb 2026
12 newest of 28 All 28 (JSON)