Cubit:基于核岭回归的令牌混合器
Cubit: Token Mixer with Kernel Ridge Regression
AI总结:
本文提出Cubit,一种基于核岭回归的新型架构,通过将令牌混合机制从Nadaraya-Watson回归转换为核岭回归,从而提供更稳固的数学基础,并在长序列建模能力上表现出优势。
摘要:
自2017年引入以来,Transformer已成为现代深度学习中最广泛采用的架构之一。尽管在位置编码、注意力机制和前馈网络方面进行了大量改进,Transformer的核心令牌混合机制仍为注意力。在本文中,我们表明Transformer中的注意力模块可以被解释为执行Nadaraya-Watson回归,其中它计算令牌之间的相似性并相应地汇总值。受这一视角的启发,我们提出了Cubit,一种潜在的下一代架构,它利用核岭回归(KRR),而传统的Transformer依赖于Nadaraya-Watson回归。具体而言,Cubit通过将经典的注意力计算修改为结合KRR的闭式解,将值汇总通过核相似性与通过核矩阵的逆进行归一化。为了提高训练稳定性,我们进一步提出了有限范围重缩放(LRR),它在受控范围内缩放值层。我们认为,作为基于KRR的架构,Cubit比传统的Transformer提供了更稳固的数学基础,因为Transformer的注意力机制对应于Nadaraya-Watson回归。我们通过全面的实验验证了这一主张。实验结果表明,Cubit可能在长序列建模能力上表现更强。特别是,其在Transformer上的性能提升似乎随着训练序列长度的增长而增加。
英文摘要:
Since its introduction in 2017, the Transformer has become one of the most widely adopted architectures in modern deep learning. Despite extensive efforts to improve positional encoding, attention mechanisms, and feed-forward networks, the core token-mixing mechanism in Transformers remains attention. In this work, we show that the attention module in Transformers can be interpreted as performing Nadaraya-Watson regression, where it computes similarities between tokens and aggregates the corresponding values accordingly. Motivated by this perspective, we propose Cubit, a potential next-generation architecture that leverages Kernel Ridge Regression (KRR), while the vanilla Transformer relies on Nadaraya-Watson regression. Specifically, Cubit modifies the classical attention computation by incorporating the closed-form solution of KRR, combining value aggregation through kernel similarities with normalization via the inverse of the kernel matrix. To improve the training stability, we further propose the Limited-Range Rescale (LRR), which rescales the value layer within a controlled range. We argue that Cubit, as a KRR-based architecture, provides a stronger mathematical foundation than the vanilla Transformer, whose attention mechanism corresponds to Nadaraya-Watson regression. We validate this claim through comprehensive experiments. The experimental results suggest that Cubit may exhibit stronger long-sequence modeling capability. In particular, its performance gain over the Transformer appears to increase as the training sequence length grows.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。