What does a Bayes-filtered transformer believe? A predictive Monte Carlo approach
Not on the map. Why?
Abstract (arXiv)
A Bayes-filtered transformer (BFT) is a transformer trained on sequences that are generated in two steps: first a latent task is drawn from a prior, then observations are drawn conditional on that task. Trained under autoregressive log loss, the BFT's next-token prediction, in the idealized limit, is the Bayesian posterior predictive distribution (PPD) induced by that prior and that conditional law. In practice the trained BFT is only an approximation of this ideal PPD, raising an interpretive question: what prior and posterior over the latent task has the trained BFT actually internalized? Existing work answers this question by comparing the trained BFT's predictions against the predictions of various "reference" posteriors, each standing in for a different candidate algorithm or computation the BFT might be implementing. This prediction-space comparison is fragile: different posteriors can share the same posterior-mean predictions. We use predictive Monte Carlo (PMC) as a general interpretability tool for any BFT: using only next-token generation, PMC returns an approximation to the implicit prior and posterior over the latent task, answering the interpretive question directly in latent space. We apply PMC to three stylized task families spanning 0-Markov and 1-Markov exchangeability. The phenomena previously reported in these settings remain visible in latent space. Code is available at https://github.com/afiq-aswadi/bft-pmc
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 27 of its 39 references that are in the map. First posted on arXiv 19 Jul 2026.
Builds on
27 of 39 references.
References · 27
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022In-context Learning and Induction Headscited by 930
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 643
- 2021Transformers Can Do Bayesian Inferencecited by 338
- 2023Language Modeling Is Compressioncited by 225
- 2019Generalized Sliced Wasserstein Distancescited by 205
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
15 more
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2024Transformers represent belief state geometry in their residual streamcited by 73
- 2024Competition Dynamics Shape Algorithmic Phases of In-Context Learningcited by 52
- 2024Is In-Context Learning in Large Language Models Bayesian? A Martingale Perspectivecited by 51
- 2021Martingale posterior distributionscited by 43
- 2020Meta-trained agents implement Bayes-optimal agentscited by 37
- 2024Learning Universal Predictorscited by 29
- 2025Towards Understanding Fine-Tuning Mechanisms of LLMs via Circuit Analysiscited by 20
- 2025In-Context Learning Strategies Emerge Rationallycited by 15
- 2023Memory-Based Meta-Learning on Non-Stationary Distributionscited by 14
- 2025Dynamics of Transient Structure in In-Context Linear Regression Transformerscited by 12
- 2019Quasi-Bayes properties of a recursive procedure for mixturescited by 6
- 2025Uncertainty Quantification for Prior-Data Fitted Networks using Martingale Posteriorscited by 4
- 2026Uncertainty Decomposition for Bayes-Filtered Transformers via Bayesian Predictive Inferencecited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.