Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling

📄 arXiv: 2609.36529v1 📥 PDF

作者: Oliver Sieberling, Bharat Runwal, David Jin, Ryan Chin, Rameswar Panda, Yoon Kim

分类: cs.LG, cs.CL

发布日期: 2026-09-29

备注: Preprint


💡 一句话要点

提出三元线性注意力以解决长上下文序列建模问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 长上下文建模 递归神经网络 线性注意力 三阶张量 自然语言处理 机器学习

📋 核心要点

  1. 现有的递归神经网络在处理长上下文时,固定大小的记忆状态限制了其性能和表达能力。
  2. 论文提出三元线性注意力,通过三元外积构建三阶张量状态,显著增加状态大小,同时保持参数效率。
  3. 实验结果表明,三元线性注意力在长上下文语言建模上表现优越,超越了传统方法和其他替代方案。

📝 摘要(中文)

递归神经网络(RNN)将历史上下文压缩为固定大小的记忆状态,从而实现常量时间推理。记忆状态的大小对性能至关重要,线性注意力通过将普通RNN的向量值隐藏状态扩展为矩阵值隐藏状态,展现了其强大的性能。本文提出三元线性注意力,通过将关键、第二关键和价值的三元外积写入三阶张量状态,并通过两个查询收缩两个关键轴,从而实现更高效的状态表示。该方法在Gated DeltaNet和标量门控线性注意力中应用,显著提高了长上下文语言建模和回忆能力,超越了通过扩大状态来提升性能的替代方案。

🔬 方法详解

问题定义:本文旨在解决递归神经网络在长上下文序列建模中的记忆状态固定大小限制,导致性能不足的问题。现有方法在处理复杂上下文时,无法有效利用历史信息。

核心思路:提出三元线性注意力,通过将关键、第二关键和价值的三元外积写入三阶张量状态,增加状态的维度和表达能力,进而提高模型的记忆和推理能力。

技术框架:整体架构包括输入层、三元线性注意力模块和输出层。输入层接收序列数据,三元线性注意力模块负责生成和更新三阶张量状态,输出层则进行最终的预测。

关键创新:最重要的创新在于通过三元外积构建三阶张量状态,这与传统的线性注意力方法不同,后者仅使用二元外积,限制了状态的表达能力。

关键设计:在设计中,使用了两个投影来实现状态的扩展,确保了参数的高效利用。此外,方法兼容数据依赖的遗忘机制、增量规则和分块并行训练,增强了模型的灵活性和适应性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,三元线性注意力在长上下文语言建模任务中显著提高了性能,相较于传统方法,模型的记忆能力和回忆准确率有了显著提升,具体性能提升幅度达到了X%(具体数据需根据实验结果填写)。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、时间序列预测和复杂系统建模等。通过提高长上下文序列的建模能力,三元线性注意力可以在机器翻译、文本生成和对话系统等实际应用中发挥重要作用,未来可能推动相关领域的进一步发展。

📄 摘要(原文)

Recurrent neural networks (RNNs) compress the historical context into a memory state of fixed size, thus allowing for constant-time inference. The memory state size is a crucial factor in their performance, as exemplified by the strong performance and resurgence of linear attention, which extends the vector-valued hidden states of ordinary RNNs to matrix-valued hidden states. Crucially, linear attention does so in a parameter-efficient way, in particular by using an outer product of the key and value vectors to write to the matrix-valued hidden state. We generalize this construction and propose triadic linear attention, which writes the triadic outer product of a key, a second key, and a value, into a third-order (i.e., 3D) tensor state, and reads from it by contracting both key axes with two queries. An $E$-dimensional second key thus yields an $E$-fold increase in state size while adding only two projections. Triadic linear attention is compatible with data-dependent forgetting, the delta rule, and chunkwise-parallel training. Applied to Gated DeltaNet and scalar-gated linear attention, triadic linear attention substantially improves long-context language modeling and recall, outperforming alternatives that enlarge the state.