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

Spectraformer:一个统一的Transformer随机特征框架

Spectraformer: A Unified Random Feature Framework for Transformer

University of New South Wales(新南威尔士大学)

Duke Nguyen, Du Yin, Aditya Joshi, Flora Salim

AI总结:

本文提出统一随机特征框架Spectraformer,系统比较不同权重矩阵与组件函数组合,首次在Long Range Arena基准上使随机特征方法达到与稀疏和低秩方法相当的性能,为高效Transformer建立了新的最优水平。

摘要:

利用各种核近似和核学习技术对注意力进行线性化已展现出前景。以往的方法在随机特征范式内使用了组件函数和权重矩阵组合的一个子集。我们识别出需要对Transformer中注意力学习所使用的权重矩阵和组件函数的不同组合进行系统性比较。因此,我们引入了Spectraformer,这是一个用于在Transformer的注意力机制中近似和学习核函数的统一框架。我们的实证结果首次证明,基于随机特征的方法在具有挑战性的Long Range Arena基准上可以达到与表现最佳的稀疏和低秩方法相当的性能。由此,我们为基于随机特征的高效Transformer建立了新的最优水平。该框架还产生了许多变体,在准确率、训练时间和内存消耗方面提供了不同的优势。我们的代码可在以下地址获取:https://github.com/cruiseresearchgroup/spectraformer。

英文摘要:

Linearization of attention using various kernel approximation and kernel learning techniques has shown promise. Past methods used a subset of combinations of component functions and weight matrices within the random feature paradigm. We identify the need for a systematic comparison of different combinations of weight matrices and component functions for attention learning in Transformer. Hence, we introduce Spectraformer, a unified framework for approximating and learning the kernel function in the attention mechanism of the Transformer. Our empirical results demonstrate, for the first time, that a random feature-based approach can achieve performance comparable to top-performing sparse and low-rank methods on the challenging Long Range Arena benchmark. Thus, we establish a new state-of-the-art for random feature-based efficient Transformers. The framework also produces many variants that offer different advantages in accuracy, training time, and memory consumption. Our code is available at: https://github.com/cruiseresearchgroup/spectraformer .

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

↑