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

高阶线性注意力

Higher-order Linear Attention

Princeton University(普林斯顿大学);University of California, Los Angeles(加州大学洛杉矶分校)

Yifan Zhang, Zhen Qin, Quanquan Gu

AI总结:

针对长上下文注意力二次开销问题,提出 Higher-order Linear Attention (HLA),利用紧凑前缀充分统计量实现高阶交互,在二阶下保持常数状态并线性计算,兼具类注意力数据依赖混合与循环架构的高效性。

摘要:

缩放点积注意力的二次方开销是扩展自回归语言模型至长上下文的核心障碍。线性时间注意力与 State Space Models (SSMs) 提供了可扩展的替代方案,但通常局限于第一阶或基于核函数的近似,这可能限制其表达能力。我们提出了 Higher-order Linear Attention (HLA),这是一种因果流式机制,通过紧凑的前缀充分统计量来实现高阶交互。在二阶情况下,HLA 维持常数大小的状态,并在线性时间内计算每个 token 的输出,而无需实例化任何 $n \ imes n$ 矩阵。我们给出了闭式流式恒等式、使用两个额外摘要的严格因果掩码变体,以及基于关联扫描的分块并行训练方案,该方案能精确重现串行递归的激活值。我们进一步概述了向三阶及更高阶的扩展。总体而言,这些结果将 HLA 定位为一种有原则、可扩展的基础模块,它将类注意力的数据依赖混合与现代循环架构的效率结合起来。项目页面:https://github.com/yifanzhang-pro/HLA。

英文摘要:

The quadratic cost of scaled dot-product attention is a central obstacle to scaling autoregressive language models to long contexts. Linear-time attention and State Space Models (SSMs) provide scalable alternatives but are typically restricted to first-order or kernel-based approximations, which can limit expressivity. We introduce Higher-order Linear Attention (HLA), a causal, streaming mechanism that realizes higher interactions via compact prefix sufficient statistics. In the second-order case, HLA maintains a constant-size state and computes per-token outputs in linear time without materializing any $n \times n$ matrices. We give closed-form streaming identities, a strictly causal masked variant using two additional summaries, and a chunk-parallel training scheme based on associative scans that reproduces the activations of a serial recurrence exactly. We further outline extensions to third and higher orders. Collectively, these results position HLA as a principled, scalable building block that combines attention-like, data-dependent mixing with the efficiency of modern recurrent architectures. Project Page: https://github.com/yifanzhang-pro/HLA.

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

↑