Continuum Attention
观点分析 · 2026/10/15
我们提出了连续注意力(CA),一种因果Transformer注意力算子,它用对连续分段线性记忆曲线的积分替代了离散的键值查找。每个查询沿曲线诱导出指数相关性密度。对密度和插值进行积分,通过闭式指数矩得到精确归一化的注意力,包括半令牌边界贡献。梯度从至多二阶矩解析得出,支持并行GPU实现,同时保持二次序列复杂度和标准Transformer解码器。与普通softmax和焦点注意力相比,CA分别将平均验证负对数似然降低了0.0200和0.0480纳特每字节,在所有配对比较中获胜。额外的独立验证切片比最强的选定softmax基线有0.0457纳特每字节的优势,并给出了配对95%置信区间。这些发现表明连续积分是一种有前景的注意力替代方案,但更大规模的泛化仍有待研究。
该研究提出了一种新颖的注意力机制,在保持标准Transformer架构的同时,通过连续积分提高了性能,为注意力机制的发展提供了新方向。
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.