arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.18725cs.LG
收藏

学习源结构:基于Transformer的贝叶斯预测

Learning Source Structure: Bayesian Prediction with Transformers

Tel Aviv University(特拉维夫大学);EPFL(洛桑联邦理工学院)

Meir Feder, Ruediger Urbanke

AI总结:

该研究构建含多符号的马尔可夫源,以知情贝叶斯为参考,证实Transformer可学习源结构,且知情贝叶斯能预测Transformer的多项表现,明确了其模仿的可能性与局限性。

摘要:

每次从新抽取源参数的序列训练得到的Transformer,仅能学习到序列共有的内容:源族及其先验。我们将同时知晓这两者的贝叶斯预测器称为“知情贝叶斯(informed Bayes)”,它是训练损失的唯一最小化器,且仅可从源族计算得到,我们将其作为可证伪的定量参考。早期工作在上下文可独立学习的源上比较Transformer与贝叶斯的性能,我们则构建了含最多64个符号的马尔可夫源,其中一个上下文的观测会影响另一上下文的预测:包括编码已知或隐藏的乘积源、转移行共享未知基础规律与深度的源,以及三类源的混合。我们的主要结果是,知情贝叶斯仅从源族和先验即可预测训练后的Transformer在四项超越学习曲线的测试中的表现:在训练族外的源上剩余损失(预测值2.237比特,实测值2.309);当两个独立分量而非一个发生变化时,额外损失加倍(预测值0.345,实测值0.350);某标记首次出现时其他上下文带来的增益;以及复制早期延续开始产生收益的深度。在学习曲线本身方面,当共享结构在标记中可见时,小型Transformer可匹配知情贝叶斯;而隐藏结构则需要更多层和训练,最大模型的每标记差距低于0.01比特。我们解释了模仿为何可能及必然失败之处:知情贝叶斯分解为注意力选择并累积的充分统计量,以及由先验固定、前馈网络学习的估计器;训练需在架构先验下付出知情贝叶斯的复杂度,有限记忆通用预测则限定了有界网络能达到它的接近程度。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑