arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.13656cs.LGcs.AImath.STstat.MLstat.TH
收藏

普通最小二乘是变换器的特殊情况

Ordinary Least Squares is a Special Case of Transformer

Center for Peak Performance, Department of Psychology and Behavioral Sciences, Zhejiang University(高峰表现中心,心理学与行为科学系,浙江大学);Hangzhou Higgs Asset Management Co., Ltd.(杭州恒辉资产管理有限公司);College of Control Science and Engineering, Zhejiang University(控制科学与工程学院,浙江大学)

Xiaojun Tan, Yuchen Zhao

AI总结:

本文通过代数证明,揭示变换器的本质是普通最小二乘的特例,展示了注意力机制与最小二乘法的等价性,并提出变换器中的分离记忆机制。

摘要:

变换器架构的统计本质长期不明:它是通用近似器还是已知计算算法的神经网络版本?通过严谨的代数证明,本文表明后者更准确地描述了变换器的本质:普通最小二乘(OLS)是单层线性变换器的特殊情况。利用经验协方差矩阵的谱分解,我们构造了一个特定参数设置,使得注意力机制的前向传递在数学上等同于OLS的闭式投影。这意味着注意力可以在一次前向传递中解决问题,而不是通过迭代。基于这一原型案例,我们进一步揭示了变换器中的分离慢速和快速记忆机制。最后,从我们建立的线性原型到标准变换器的演变进行了讨论。这一演变促进了Hopfield能量函数从线性到指数记忆容量的过渡,从而建立了现代深度架构与经典统计推断之间的清晰连续性。

英文摘要:

The statistical essence of the Transformer architecture has long remained elusive: Is it a universal approximator, or a neural network version of known computational algorithms? Through rigorous algebraic proof, we show that the latter better describes Transformer's basic nature: Ordinary Least Squares (OLS) is a special case of the single-layer Linear Transformer. Using the spectral decomposition of the empirical covariance matrix, we construct a specific parameter setting where the attention mechanism's forward pass becomes mathematically equivalent to the OLS closed-form projection. This means attention can solve the problem in one forward pass, not by iterating. Building upon this prototypical case, we further uncover a decoupled slow and fast memory mechanism within Transformers. Finally, the evolution from our established linear prototype to standard Transformers is discussed. This progression facilitates the transition of the Hopfield energy function from linear to exponential memory capacity, thereby establishing a clear continuity between modern deep architectures and classical statistical inference.

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

↑