Transformers Simulate MLE for Sequence Generation in Bayesian Networks
Not on the map. Why?
Abstract (arXiv)
Transformers have achieved significant success in various fields, notably excelling in tasks involving sequential data like natural language processing. Despite these achievements, the theoretical understanding of transformers' capabilities remains limited. In this paper, we investigate the theoretical capabilities of transformers to autoregressively generate sequences in Bayesian networks based on in-context maximum likelihood estimation (MLE). Specifically, we consider a setting where a context is formed by a set of independent sequences generated according to a Bayesian network. We demonstrate that there exists a simple transformer model that can (i) estimate the conditional probabilities of the Bayesian network according to the context, and (ii) autoregressively generate a new sample according to the Bayesian network with estimated conditional probabilities. We further demonstrate in extensive experiments that such a transformer does not only exist in theory, but can also be effectively obtained through training. Our analysis highlights the potential of transformers to learn complex probabilistic models and contributes to a better understanding of large language models as a powerful class of sequence generators.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 5 Jan 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 3; 2026: 2.
5 papers.
- 2025Do Large Language Models (Really) Need Statistical Foundations?cited by 5
- 2025Distributional Biases in Post-Training: A Markovian Analysis of Reasoning Trajectoriescited by 3
- 2025Towards Understanding Transformers in Learning Random Walkscited by 1
- 2026Universal priors: solving empirical Bayes via Bayesian inference and pretrainingcited by 0
- 2026Small transformers track Bayesian evidence for latent common causes via a context-invariant mechanismcited by 0
- 2026Small transformers track Bayesian evidence for latent common causes via a context-invariant mechanism28 Sep 2026
- 2026Universal priors: solving empirical Bayes via Bayesian inference and pretraining16 Feb 2026
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Distributional Biases in Post-Training: A Markovian Analysis of Reasoning Trajectories10 Nov 2025
- 2025Do Large Language Models (Really) Need Statistical Foundations?25 May 2025