Transformers Can Do Bayesian Inference
By Samuel G. Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, Frank Hutter. International Conference on Learning Representations, 2021
351 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence
View Paper: https://www.semanticscholar.org/paper/d88a5ae1673f2009704186acf2890163e6ddf4ca
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Percy Liang
- Frank Hutter
- Colin White
- Katharina Eggensperger
- Quoc V. Le
- Micah Goldblum
- Mohit Bansal
- Dimitris Tsipras
Citations in the corpus
- When Do Neural Nets Outperform Boosted Trees on Tabular Data? (2023, methodology): “We give additional experiments, including dataset statistics (Appendix D.1), additional results from Section 2.1 (Appendix D.2), and additional results from Section 2.2 (Appendix D.3).”
- TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second (2022, methodology): “Attention Adaption The original PFN architecture (Müller et al., 2022) uses a single multi-head selfattention module (Vaswani et al.”
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes (2022, methodology): “Müller et al. [44] introduce a “Prior-data fitted transformer network” that is trained to approximate Bayesian inference with priors such as Gaussian processes and Bayesian neural networks, and use it to perform downstream tasks such as tabular dataset classification and few-shot image…”