mlsanityData to 14 Oct 2026

Learning Source Structure: Bayesian Prediction with Transformers

arXiv 2610.18725 ↗First posted 13 Oct 2026cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

A transformer trained on sequences whose source parameters are drawn afresh each time can learn only what the sequences share: the source family and its prior. The Bayesian predictor that knows both, which we call informed Bayes, is the unique minimizer of the training loss and is computable from the family alone; we use it as a quantitative, falsifiable reference. Where earlier work compared transformers with Bayes on sources whose contexts can be learned independently, we build Markov sources with up to 64 symbols in which observations in one context inform prediction in another: product sources with known or hidden encodings, transition rows sharing an unknown base law and depth, and a mixture of three families. Our main result is that informed Bayes predicts, from the family and prior alone, how a trained transformer behaves in four tests that go beyond the learning curve: the loss that remains under a source outside the training family (predicted 2.237 bits, measured 2.309), the doubling of the extra loss when two independent components change rather than one (0.345 predicted, 0.350 measured), the benefit of other contexts when a token appears for the first time, and the depth at which copying an earlier continuation starts to pay. On the learning curves themselves, small transformers match informed Bayes when the shared structure is visible in the tokens, and hidden structure needs more layers and training, with gaps below 0.01 bits per token for the largest models. We explain why the imitation is possible and where it must fail: informed Bayes decomposes into sufficient statistics that attention selects and accumulates and an estimator, fixed by the prior, that the feed-forward network learns; training pays the complexity of informed Bayes under the architecture's prior, and finite-memory universal prediction bounds how closely a bounded network can reach it.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 27 of its 47 references that are in the map. First posted on arXiv 13 Oct 2026.

Builds on

27 of 47 references.

References · 27

  1. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  2. 2021Transformers Can Do Bayesian Inferencecited by 360
  3. 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
  4. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
  5. 2023Birth of a Transformer: A Memory Viewpointcited by 161
  6. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 146
  7. 2023What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalizationcited by 118
  8. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
  9. 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
  10. 2024In-Context Language Learning: Architectures and Algorithmscited by 89
  11. 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 89
  12. 2023In-Context Learning through the Bayesian Prismcited by 83
15 more
  1. 2024Is In-Context Learning in Large Language Models Bayesian? A Martingale Perspectivecited by 57
  2. 2024An Information-Theoretic Analysis of In-Context Learningcited by 40
  3. 2024Learning Universal Predictorscited by 31
  4. 2024Transformers on Markov Data: Constant Depth Sufficescited by 27
  5. 2023Memory-Based Meta-Learning on Non-Stationary Distributionscited by 15
  6. 2025Solving Empirical Bayes via Transformerscited by 11
  7. 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 11
  8. 2024In-context learning and Occam's razorcited by 8
  9. 2025Selective Induction Heads: How Transformers Select Causal Structures In Contextcited by 8
  10. 2025Predicting the Emergence of Induction Heads in Language Model Pretrainingcited by 7
  11. 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 5
  12. 2024An Information-Theoretic Approach to Understanding Transformers' In-Context Learning of Variable-Order Markov Chainscited by 3
  13. 2025Information-Theoretic Framework for Understanding Modern Machine-Learningcited by 3
  14. 2026Induction Heads Interpolate N-Gramscited by 1
  15. 2026A Layered Simplex Architecture for Large Alphabetscited by 1

Built on by

Not cited yet.