Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Reuter, Arik, Rudner, Tim G. J., Fortuin, Vincent, Rügamer, David
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:https://arxiv.org/abs/2501.16825
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913978327760896
author Reuter, Arik
Rudner, Tim G. J.
Fortuin, Vincent
Rügamer, David
author_facet Reuter, Arik
Rudner, Tim G. J.
Fortuin, Vincent
Rügamer, David
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2501_16825
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Can Transformers Learn Full Bayesian Inference in Context?
Reuter, Arik
Rudner, Tim G. J.
Fortuin, Vincent
Rügamer, David
Machine Learning
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.
title Can Transformers Learn Full Bayesian Inference in Context?
topic Machine Learning
url https://arxiv.org/abs/2501.16825