What does a Bayes-filtered transformer believe? A predictive Monte Carlo approach

📅 2026-07-19
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing methods struggle to uniquely identify the implicit task beliefs internalized by Bayesian Filtering Transformers (BFTs), as distinct posterior distributions in the predictive space can yield identical outputs. To address this ambiguity, this work proposes Predictive Monte Carlo (PMC), a novel approach that directly approximates the internalized prior and posterior distributions of a BFT in latent space by leveraging its autoregressive generative behavior, thereby circumventing ambiguities arising from predictive means. The method successfully reconstructs the latent beliefs of BFTs across three task families exhibiting zeroth- and first-order Markov exchangeability, demonstrating PMC’s efficacy. This advance not only resolves a key identifiability challenge in Bayesian sequence modeling but also establishes a new paradigm for interpreting large-scale generative models.
📝 Abstract
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
Problem

Research questions and friction points this paper is trying to address.

Bayes-filtered transformer
posterior predictive distribution
latent task
interpretability
predictive Monte Carlo
Innovation

Methods, ideas, or system contributions that make the work stand out.

Bayes-filtered transformer
predictive Monte Carlo
posterior predictive distribution
latent task inference
model interpretability
🔎 Similar Papers
No similar papers found.