Continuum Attention
本文提出了一种名为Continuum Attention(CA)的新型因果Transformer注意力算子,通过在连续的记忆轨迹上进行积分,实现了对连续记忆的精确检索。
更新于 2026-11-26。作者:Afshin Khadangi。
中文摘要
我们引入了连续注意力(CA),这是一种因果Transformer注意力算子,它将离散的关键值查找替换为对连续的、分段线性记忆曲线的积分。每个查询在曲线上诱导出指数相关性密度。将密度和插值值进行积分,得到精确归一化注意力,包括半标记边界贡献的封闭形式指数矩。梯度可以从最多二阶矩的分析中得到,这使并行GPU实现成为可能,同时保持了二次序列复杂性和标准Transformer解码器。与普通的softmax和焦点注意力相比,CA将平均验证负对数似然率分别降低了0.0200和0.0480纳特每字节,在所有配对比较中获胜。另外,一个额外的非连接验证切片在配对95%置信区间内比最强的所选softmax基线高出0.0457纳特每字节。这些发现激励了连续集成作为一种有前途的注意力替代方案,同时留出了更大规模的泛化空间。
英文摘要
We introduce Continuum Attention (CA), a causal Transformer attention operator that replaces discrete key and value lookup with integration over a continuous, piecewise linear memory curve. Each query induces an exponential relevance density along the curve. Integrating the density and interpolated values yields exact normalized attention from closed form exponential moments, including half token boundary contributions. The gradients follow analytically from moments of order at most two, enabling parallel GPU implementations while retaining quadratic sequence complexity and the standard Transformer decoder. Compared with ordinary softmax and focal attention, CA reduces mean validation negative log likelihood by 0.0200 and 0.0480 nats per byte, respectively, winning all paired comparisons. An additional disjoint validation slice yields a 0.0457 nats per byte advantage over the strongest selected softmax baseline, with a paired 95% confidence interval. These findings motivate continuous integration as a promising attention alternative while leaving larger scale generalization open.
解读
一句话总结
本文提出了一种名为Continuum Attention(CA)的新型因果Transformer注意力算子,通过在连续的记忆轨迹上进行积分,实现了对连续记忆的精确检索。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:传统注意力机制通过离散的键和值查找进行记忆检索,而Transformer中的注意力操作仅在采样标记位置上评估这些表示。
- 现有方案不足:现有方法无法有效地利用连续的记忆表示,且计算复杂度高。
- 研究目标:提出一种新的注意力机制,能够在连续的记忆轨迹上进行精确检索,同时保持计算效率。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种基于连续记忆轨迹的因果注意力算子CA,通过积分和插值操作实现精确检索。
- 方法改进:通过解析微分和并行GPU实现,提高了计算效率。
- 优势:与softmax和focal注意力相比,CA在语言模型上的性能更优,且计算复杂度与标准Transformer解码器相同。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在TinyStories数据集上进行的字节级语言模型实验。
- 性能提升:CA在两个上下文长度下,分别将平均验证负对数似然率降低了0.0200和0.0480纳特/字节。
- 对比结果:CA在所有配对比较中均优于softmax和focal注意力。
问题4:这个研究的实际应用价值是什么?
- 应用场景:CA可以应用于各种需要注意力机制的领域,如自然语言处理、计算机视觉等。
- 实施建议:在Transformer模型中集成CA,以提高模型的性能。
- 局限与展望:目前实验仅限于TinyStories数据集,未来需要在更大的模型规模、更多数据集和更长上下文中进行评估。