Effectively processing long contexts is a critical challenge for language models. While standard Transformers are limited by quadratic complexity and poor length extrapolation, alternative architectures like sliding window attention and state space models sacrifice the ability to effectively utilize the full context due to their fixed-size memory. Chunk-based sparse attention has emerged as a promising paradigm for extreme length generalization, yet the key architectural principles underpinning its success are not yet fully understood. In this work, we present a systematic dissection of these models to identify the core components driving their performance. Through a unified framework and comprehensive ablation studies, we demonstrate that a combination of three design principles is critical: (1) an expressive, non-linear Chunk Encoder with a dedicated CLS token to produce representations for retrieval; (2) a Bypassing Residual Path to stably integrate retrieved global information without it being overridden by the local residual stream; and (3) enforced selection sparsity during pre-training to bridge the train-test distribution gap. We provide a theoretical motivation for intra-chunk information processing and landmark generation. By combining these principles, we establish a new state-of-the-art for training-free length extrapolation, successfully generalizing models trained on a 4K context to 32 million tokens on RULER and BABILong. Our findings provide a clear and empirically-grounded set of design principles for developing future, highly-capable long-context language models.


翻译:有效处理长上下文是语言模型面临的关键挑战。虽然标准Transformer受限于二次复杂度与较差的长度外推能力,而滑动窗口注意力与状态空间模型等替代架构因其固定大小的记忆容量牺牲了有效利用完整上下文的能力。基于分块的稀疏注意力已成为实现极端长度泛化的有前景范式,然而支撑其成功的关键架构原理尚未被完全理解。本研究系统剖析了此类模型以识别驱动其性能的核心组件。通过统一框架与全面的消融实验,我们证明以下三个设计原则的组合至关重要:(1) 具有专用CLS标记的表达性非线性分块编码器,用于生成检索表征;(2) 旁路残差路径以稳定整合检索到的全局信息,避免其被局部残差流覆盖;(3) 预训练期间强制选择稀疏性以弥合训练-测试分布差距。我们为块内信息处理与地标生成提供了理论依据。通过整合这些原则,我们在无需重新训练的长度外推任务上建立了新的最优结果,成功将在4K上下文训练的模型泛化至RULER和BABILong数据集的3200万词元。我们的研究结果为开发未来高性能长上下文语言模型提供了一套清晰且基于实证的设计原则。

0
下载
关闭预览

相关内容

【CMU博士论文】深度学习中泛化的量化、理解与改进
专知会员服务
21+阅读 · 2025年10月11日
深度学习中泛化的量化、理解与改进
专知会员服务
17+阅读 · 2025年9月13日
【阿姆斯特丹博士论文】在测试时学习泛化
专知会员服务
12+阅读 · 2025年6月3日
大模型上下文长度扩展中的检索增强技术简述
专知会员服务
25+阅读 · 2024年6月29日
最新综述:速览Transformer长文本建模研究进展
专知会员服务
46+阅读 · 2023年3月15日
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
《pyramid Attention Network for Semantic Segmentation》
统计学习与视觉计算组
44+阅读 · 2018年8月30日
Attention模型方法综述 | 多篇经典论文解读
PaperWeekly
107+阅读 · 2018年6月11日
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关VIP内容
【CMU博士论文】深度学习中泛化的量化、理解与改进
专知会员服务
21+阅读 · 2025年10月11日
深度学习中泛化的量化、理解与改进
专知会员服务
17+阅读 · 2025年9月13日
【阿姆斯特丹博士论文】在测试时学习泛化
专知会员服务
12+阅读 · 2025年6月3日
大模型上下文长度扩展中的检索增强技术简述
专知会员服务
25+阅读 · 2024年6月29日
最新综述:速览Transformer长文本建模研究进展
专知会员服务
46+阅读 · 2023年3月15日
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员