HLA: Expressive Hybrid Linear Attention via Chunk-Wise Dynamic Mixing
作者: Zhuokun Chen, Xi Lin, Xiyu Wu, Jiahao He, Jianfei Cai, Bohan Zhuang
分类: cs.CL
发布日期: 2026-10-05
🔗 代码/项目: PROJECT_PAGE
💡 一句话要点
提出混合线性注意力机制以解决长上下文建模问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 长上下文建模 线性注意力 自回归解码 块级注意力 动态路由门
📋 核心要点
- 现有线性注意力方法在处理长上下文时,历史信息压缩导致对稀疏和远程信息的访问困难。
- 本文提出的混合线性注意力机制通过查询依赖的块级注意力,动态调整历史信息的访问方式。
- 在多个模型上,HLA在长上下文建模任务中表现优异,性能提升幅度最高可达5.57个百分点。
📝 摘要(中文)
线性注意力通过将历史信息压缩为递归状态,实现了高效的长上下文自回归解码,但这种压缩使得对稀疏和远程信息的选择性访问变得困难。现有的基于块的扩展虽然增加了内存容量,但学习到的块混合系数可能对输入内容保持固定,无法根据每个查询自适应历史访问。本文提出了混合线性注意力(HLA),一种针对Gated DeltaNet (GDN) 的查询依赖块级注意力机制。HLA将每个完成的块表示为精确的仿射状态转移,并从紧凑的自注意力池化代表中计算内容依赖的路由门。实验结果表明,HLA在多个模型上均显著提升了性能。
🔬 方法详解
问题定义:本文旨在解决现有线性注意力机制在长上下文自回归解码中对稀疏和远程信息访问困难的问题。现有方法的块混合系数固定,无法根据输入内容自适应调整历史访问。
核心思路:提出混合线性注意力(HLA),通过查询依赖的块级注意力机制,动态计算内容依赖的路由门,从而实现对历史信息的灵活访问和处理。
技术框架:HLA的整体架构包括块的仿射状态转移表示和自注意力池化代表的计算。每个路由门通过插值控制块的记忆和状态转移。
关键创新:HLA的主要创新在于引入查询依赖的块级注意力机制,使得历史信息的访问能够根据具体查询进行动态调整,这与现有固定块混合方法本质上不同。
关键设计:HLA使用有效支持正则化来鼓励稀疏推理,并在训练过程中采用紧凑的每块仿射摘要,以提高模型的记忆效率和性能。具体参数设置和损失函数设计未详细披露,需进一步研究。
🖼️ 关键图片
📊 实验亮点
在多个Qwen3.5模型上,HLA相较于原生GDN和固定块混合方法均表现出显著提升,LongBench-V2上最高提升达5.57个百分点,RULER上提升达3.97个百分点。在从零开始训练的1.3B模型中,HLA在4K上下文下的RULER性能提升0.83点,而在32K上下文下提升达到4.22点,显示出其在长上下文建模中的有效性。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、对话系统和长文本生成等场景。通过提升长上下文建模能力,HLA能够在实际应用中提供更高的准确性和响应性,推动智能对话和文本生成技术的发展。
📄 摘要(原文)
Linear attention enables efficient long-context autoregressive decoding by compressing history into recurrent states, but this compression can make selective access to sparse and distant information difficult. Existing chunk-based extensions increase memory capacity, yet learned chunk-mixing coefficients may remain fixed with respect to input content and therefore cannot adapt historical access to each query. We introduce \emph{Hybrid Linear Attention} (HLA), a query-dependent chunk-level attention mechanism for Gated DeltaNet (GDN). HLA represents each completed chunk as an exact affine state transition and computes content-dependent routing gates from compact, self-attentively pooled representatives. Each gate interpolates the corresponding historical transition with the identity map, controlling both the chunk's additive memory and its transformation of earlier states. Effective-support regularization further encourages concentrated routing for sparse inference. We evaluate HLA under both pretrained adaptation and from-scratch training. Across Qwen3.5 models from 0.8B to 9B, HLA consistently improves over native GDN and fixed chunk mixing, with gains of up to 5.57 percentage points on LongBench-V2 and 3.97 points on RULER. In a controlled from-scratch 1.3B setting trained for 100B tokens with a 4K context, HLA also improves RULER performance from 4K to 32K, with gains increasing from 0.83 points at 4K to 4.22 points at 32K. These results demonstrate that query-dependent composition of recurrent memory improves long-context modeling and remains effective beyond the training context while using compact per-chunk affine summaries. Project page: https://caesarhhh.github.io/hla/