arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.24330cs.LGstat.ML
收藏

域间注意力:超越令牌级键值记忆

Interdomain Attention: Beyond Token-Level Key-Value Memory

Imperial College London, UK(伦敦帝国学院);University of Copenhagen, Denmark(哥本哈根大学);Shanghai University of Finance(上海金融学院);Canon Inc., Japan(日本佳能公司);Technical University of Denmark, Denmark(丹麦技术大学)

Naoki Kiyohara, Harrison Bo Hua Zhu, Riccardo El Hassanin, Zhuo Sun, Wenlong Chen, Samir Bhatt, Yingzhen Li

AI总结:

提出域间注意力机制,通过核方法将状态空间模型集成到注意力模块中,实现固定大小状态上的查询条件注意力,在语言建模中优于SSM和标准注意力基线。

摘要:

Transformer和深度状态空间模型(SSM)处于基本设计选择的两端:注意力通过基于内容的匹配以二次代价将每个查询路由到不断增长的键值(KV)缓存中,而深度SSM将上下文压缩为固定大小的循环状态,该状态不能通过查询-键匹配直接寻址。我们提出域间注意力,通过核方法将SSM集成到注意力模块中:注意力核通过有限特征图近似,得到的键特征和值投影到由单个SSM循环维护的一组共享基函数上,每个查询通过其自身的特征图关注压缩后的系数,从而恢复对固定大小状态的查询条件注意力。可扩展层是该推导的学习松弛版本,我们通过消融实验验证其组件。在FineWeb-Edu上进行的125M到1.3B自回归语言建模研究中,在匹配循环状态预算的情况下,域间注意力在每个规模上都优于SSM令牌混合器,在1.3B规模上,在验证困惑度和八任务常识套件上超越了相同配方的softmax基线,并且继承了其固定状态核心的长度平坦行为,可外推至训练上下文的3.5倍。消融实验表明,查询条件投影是增益的主要来源。

英文摘要:

Softmax attention-based transformers and recurrent memory-based models (e.g., state space models (SSMs)) form the foundation of modern sequence models. Hybrid architectures aim to combine the expressivity from attention and the computational efficiency from recurrent memory, yet so far common practices simply stack both attention and recurrent layers. We propose Interdomain Attention (IA) as a novel hybrid attention architecture that mixes attention and recurrent memory in the same layer. Motivated by a kernel regression view of softmax attention, IA compresses values and kernel features of keys into a recurrent memory parameterized by an SSM. Then IA approximates dot-product attention by implicitly reconstructing the attention matrix and values from memory states; importantly this construction maintains SSM's computational efficiency advantage. We demonstrate IA's efficacy by designing and pre-training IA network architectures, where ablation studies identify attention-like readout as the primary source of gain over SSMs. Across 125M-1.3B models pre-trained on text data, IA improves over an S4D baseline at matched memory size. It also outperforms softmax attention-based Transformer in perplexity and accuracy on common-sense reasoning tasks. Based on Caduceus backbone, IA matches or outperforms the original SSM-based architecture in both perplexity and downstream tasks on genomic data.

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

↑