这篇论文提出了PMC方法,能直接看穿BFT模型内部认为的贝叶斯先验是什么,比传统对比法更靠谱。做可解释性研究的朋友可以试试。
贝叶斯滤波变压器(BFT)是一种在两阶段生成序列上训练的 Transformer:先由先验抽取潜在任务,再根据该任务生成观测。在理想极限下,BFT 的下一词预测等于贝叶斯后验预测分布(PPD),但实际训练仅逼近该分布。论文提出预测蒙特卡洛(PMC)方法作为可解释性工具,仅利用下一词生成即可近似 BFT 内部隐含的先验和后验分布。PMC 被应用于三个任务族(0-Markov 和 1-Markov 可交换性),揭示了此前在预测空间观察到的现象在隐空间中依然存在。
What does a Bayes-filtered transformer believe? A predictive Monte Carlo approach
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