arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.02180cs.LG
收藏

STILL: 选择令牌以实现层内混合注意力以线性化大语言模型

STILL: Selecting Tokens for Intra-Layer Hybrid Attention to Linearize LLMs

SMULL Group, Harbin Institute of Technology, Shenzhen(SMULL小组,哈尔滨工业大学,深圳);Pengcheng Laboratory(Pengcheng实验室);UQMM Lab, University of Queensland(UQMM实验室,昆士兰大学);Huawei Technologies Co., Ltd.(华为技术有限公司)

Weikang Meng, Liangyu Huo, Yadan Luo, Jiawen Guan, Jingyi Zhang, Yingjian Li, Zheng Zhang

AI总结:

STILL通过自显著性分数和NP-Map实现LLM的高效线性化,提升长上下文任务性能

摘要:

线性化预训练的大语言模型(LLMs)主要依赖于层内混合注意力机制来缓解标准softmax注意力的二次复杂度。现有方法基于滑动窗口分区进行令牌路由,导致基于位置的选择,无法捕捉令牌特定的全局重要性。同时,线性注意力还受到可学习特征图引起的分布偏移的影响,因为可学习特征图扭曲了预训练特征幅度。受这些限制的启发,我们提出了STILL,一种用于高效线性化LLMs的层内混合线性化框架。STILL引入了一个具有强局部-全局一致性的自显著性分数,通过滑动窗口计算实现准确的令牌选择,并在稀疏softmax注意力中保留显著令牌,同时通过线性注意力总结其余上下文。为了保持预训练表示,我们设计了一种规范保持特征图(NP-Map),它将特征方向与幅度解耦,并重新注入预训练规范。我们进一步采用统一的训练-推理架构,采用分块并行和延迟选择以提高硬件效率。实验表明,STILL在常识和一般推理任务上与原始预训练模型匹配或超越,并在长上下文基准上相对于先前的线性化注意力方法实现了高达86.2%的相对改进。

英文摘要:

Linearizing pretrained large language models (LLMs) primarily relies on intra-layer hybrid attention mechanisms to alleviate the quadratic complexity of standard softmax attention. Existing methods perform token routing based on sliding-window partitions, resulting in position-based selection and fails to capture token-specific global importance. Meanwhile, linear attention further suffers from distribution shift caused by learnable feature maps that distort pretrained feature magnitudes. Motivated by these limitations, we propose STILL, an intra-layer hybrid linearization framework for efficiently linearizing LLMs. STILL introduces a Self-Saliency Score with strong local-global consistency, enabling accurate token selection using sliding-window computation, and retains salient tokens for sparse softmax attention while summarizing the remaining context via linear attention. To preserve pretrained representations, we design a Norm-Preserved Feature Map (NP-Map) that decouples feature direction from magnitude and reinjects pretrained norms. We further adopt a unified training-inference architecture with chunk-wise parallelization and delayed selection to improve hardware efficiency. Experiments show that STILL matches or surpasses the original pretrained model on commonsense and general reasoning tasks, and achieves up to a 86.2% relative improvement over prior linearized attention methods on long-context benchmarks. Code is available at this URL.

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

↑