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日
大模型上下文长度扩展中的检索增强技术简述
专知会员服务
28+阅读 · 2024年7月5日
深度学习的下一步: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会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关资讯
相关基金
国家自然科学基金
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会员