paper-with-me

홈 › Papers

Transformers Can Do Bayesian Inference

2021-12-20 · ICLR 2022 4 · Samuel Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, Frank Hutter

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.

📄 PDF Abstract BibTeX arXiv:2112.10510

Code (1)

automl/transformerscandobayesianinference 공식 구현 pytorch

Tasks

AutoMLBayesian InferenceFew-Shot Image ClassificationGaussian Processesimage-classificationImage ClassificationIn-Context Learning

Methods 이 논문이 사용한 방법론

Gaussian Process Gaussian Processes are non-parametric models for approximating functions. They rely upon a measure of similarity between points (the kernel function) to predict the value for…

Similar Papers 제목 키워드 기반

Pathologies in priors and inference for Bayesian transformers

2021-10-08 · NeurIPS Workshop ICBINB 2021 12 · Tristan Cinquin, Alexander Immer, Max Horn, Vincent Fortuin

In recent years, the transformer has established itself as a workhorse in many applications ranging from natural language processing to reinforcement learning. Similarly, Bayesian deep learning has become the gold-standa…

Bayesian InferenceVariational Inference

Can Transformers Learn Full Bayesian Inference in Context?

2025-01-28 · Arik Reuter, Tim G. J. Rudner, Vincent Fortuin, David Rügamer

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 alre…

Bayesian InferenceIn-Context LearningVariational Inference

In-Context Learning through the Bayesian Prism

2023-06-08 · Madhur Panwar, Kabir Ahuja, Navin Goyal

In-context learning (ICL) is one of the surprising and useful features of large language models and subject of intense research. Recently, stylized meta-learning-like ICL setups have been devised that train transformers …

Bayesian InferenceIn-Context LearningInductive BiasLanguage Modelling+2

The Bayesian Geometry of Transformer Attention

2025-12-27 · Naman Agarwal, Siddhartha R. Dalal, Vishal Misra arxiv

Transformers often appear to perform Bayesian reasoning in context, but verifying this rigorously has been impossible: natural data lack analytic posteriors, and large models conflate reasoning with memorization. We addr…

Bayesian Inference

Distribution Transformers: Fast Approximate Bayesian Inference With On-The-Fly Prior Adaptation

2025-02-04 · George Whittle, Juliusz Ziomek, Jacob Rawling, Michael A Osborne

While Bayesian inference provides a principled framework for reasoning under uncertainty, its widespread adoption is limited by the intractability of exact posterior computation, necessitating the use of approximate infe…

Bayesian InferenceSensor Fusion