arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.07235cond-mat.dis-nncond-mat.stat-mechcs.CLstat.ML
收藏

注意力机制到广义 Potts 模型的映射

Mapping of attention mechanisms to a generalized Potts model

Scuola Internazionale Superiore di Studi Avanzati (SISSA)(国际高等研究学院(SISSA))

Riccardo Rende, Federica Gerace, Alessandro Laio, Sebastian Goldt

AI总结:

该研究将单层自注意力映射为广义 Potts 模型,证明其 MLM 训练等价于伪似然逆 Potts 推断,并用复本方法解析计算泛化误差。

摘要:

Transformers 是一种神经网络,它彻底改变了自然语言处理和机器学习。它们使用一种称为自注意力的机制来处理诸如词语之类的输入序列,而该机制通过掩码语言建模(MLM)进行训练。在 MLM 中,输入序列中的一个词会被随机掩码,网络则被训练来预测缺失的词。尽管 transformers 在实践中取得了成功,但自注意力能够高效学习何种类型的数据分布仍不清楚。在这里,我们通过分析表明,如果将对词位置和嵌入的处理解耦,单层自注意力会学习一个广义 Potts 模型的条件分布,该模型在位点与 Potts 颜色之间具有相互作用。此外,我们表明,训练这一神经网络恰好等价于通过统计物理学中众所周知的所谓伪似然方法求解逆 Potts 问题。利用这一映射,我们在一个模型情景中使用复本方法解析地计算了自注意力的泛化误差。

英文摘要:

Transformers are neural networks that revolutionized natural language processing and machine learning. They process sequences of inputs, like words, using a mechanism called self-attention, which is trained via masked language modeling (MLM). In MLM, a word is randomly masked in an input sequence, and the network is trained to predict the missing word. Despite the practical success of transformers, it remains unclear what type of data distribution self-attention can learn efficiently. Here, we show analytically that if one decouples the treatment of word positions and embeddings, a single layer of self-attention learns the conditionals of a generalized Potts model with interactions between sites and Potts colors. Moreover, we show that training this neural network is exactly equivalent to solving the inverse Potts problem by the so-called pseudo-likelihood method, well known in statistical physics. Using this mapping, we compute the generalization error of self-attention in a model scenario analytically using the replica method.

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

↑