arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.29157cs.LGcs.AIcs.CL
收藏

Parallax: 参数化局部线性注意力用于语言建模

Parallax: Parameterized Local Linear Attention for Language Modeling

Northwestern University(西北大学);Tilde Research(Tilde研究);University of Washington(华盛顿大学)

Yifei Zuo, Dhruv Pai, Zhichen Zeng, Alec Dewulf, Shuming Hu, Zhaoran Wang

AI总结:

提出Parallax,一种可扩展的参数化局部线性注意力机制,通过消除数值求解器并学习查询投影器,在语言模型预训练中实现一致的困惑度改进和下游任务迁移优势。

摘要:

大型语言模型(LLM)已成为人工智能的核心范式,但注意力的核心计算原语在结构上仍未改变。局部线性注意力(LLA)是一种从测试时回归框架的非参数统计中推导出的注意力机制。与先前关于高效注意力变体的研究相比,LLA将softmax注意力中的局部常数估计升级为局部线性估计,在关联记忆上提供了可证明更优的偏差-方差权衡。然而,由于计算和数值稳定性问题,LLA尚未在LLM预训练中扩展。我们引入Parallax,一种可扩展用于LLM的参数化局部线性注意力。Parallax消除了LLA中的数值求解器,并学习一个额外的类似查询的投影器来探测KV协方差。我们将Parallax置于一个由带宽、投影器构造和仿射结构连接的注意力机制家族中。我们提出一种硬件感知算法,提高了相对于FlashAttention的算术强度,将注意力转移到更受计算限制的区域。我们的原型解码核在各种批大小和上下文长度下匹配或超越FlashAttention 2/3。我们在0.6B和1.7B规模上预训练Parallax,发现整个预训练过程中困惑度持续改善,且收益迁移到下游基准测试。在参数匹配和计算匹配的控制下,优势持续存在,展示了帕累托改进。我们进行了仔细的预训练消融实验,并发现了一个新现象:Muon优化器解锁了Parallax的能力。据我们所知,这是架构研究文献中首次对注意力机制进行强架构-优化器协同设计的实证演示。

英文摘要:

Large Language Models (LLMs) have become the central paradigm in artificial intelligence, yet the core computational primitive of attention has remained structurally unchanged. Local Linear Attention (LLA) is an attention mechanism derived from nonparametric statistics in the test-time regression framework. In contrast to prior research on efficient attention variants, LLA upgrades the local constant estimate in softmax attention to a local linear estimate, yielding provably superior bias-variance tradeoffs for associative memory. However, LLA has not been scaled in LLM pretraining due to computational and numerical stability concerns. We introduce Parallax, a parameterized Local Linear Attention that is scalable for LLMs. Parallax eliminates the numerical solver in LLA and learns an extra query-like projector that probes the KV covariance. We place Parallax within a family of attention mechanisms connected by the bandwidth, the probe construction and the affine structure. We propose a hardware-aware algorithm that increases the arithmetic intensity over FlashAttention, shifting attention into a more compute bound regime. Our prototype decode kernel matches or outperforms FlashAttention 2/3 across diverse batch sizes and context lengths. We pretrain Parallax at 0.6B and 1.7B scales and find consistent perplexity improvements throughout pretraining with gains that transfer to downstream benchmarks. The advantage persists under both parameter-matched and compute-matched controls, demonstrating a Pareto improvement. We perform careful pretraining ablations and identify a novel phenomenon whereby Muon unlocks the capacity of Parallax. To our knowledge, this is the first empirical demonstration of strong architecture-optimizer codesign for attention mechanisms in the architecture research literature.

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

↑