We identify a systematic attention collapse pathology in the BLOOM family of transformer language models, where ALiBi positional encoding causes 31-44% of attention heads to attend almost entirely to the beginning-of-sequence token. The collapse follows a predictable pattern across four model scales (560M to 7.1B parameters), concentrating in head indices where ALiBi's slope schedule imposes the steepest distance penalties. We introduce surgical reinitialization: targeted Q/K/V reinitialization with zeroed output projections and gradient-masked freezing of all non-surgical parameters. Applied to BLOOM-1b7 on a single consumer GPU, the technique recovers 98.7% operational head capacity (242 to 379 of 384 heads) in two passes. A controlled comparison with C4 training data confirms that reinitialization -- not corpus content -- drives recovery, and reveals two distinct post-surgical phenomena: early global functional redistribution that improves the model, and late local degradation that accumulates under noisy training signal. An extended experiment reinitializing mostly-healthy heads alongside collapsed ones produces a model that transiently outperforms stock BLOOM-1b7 by 25% on training perplexity (12.70 vs. 16.99), suggesting that pretrained attention configurations are suboptimal local minima. Code, checkpoints, and diagnostic tools are released as open-source software.


翻译:本文识别出BLOOM系列Transformer语言模型中存在系统性注意力塌缩病理现象:ALiBi位置编码导致31-44%的注意力头几乎完全聚焦于序列起始标记。该塌缩在四种模型规模(5.6亿至71亿参数)中呈现可预测模式,集中出现在ALiBi斜率调度施加最强距离惩罚的头部索引位置。我们提出手术式重初始化方法:通过针对性重初始化Q/K/V矩阵并清零输出投影,同时对所有非手术参数实施梯度掩码冻结。在单张消费级GPU上对BLOOM-1b7模型应用该技术,经过两次处理即可恢复98.7%的注意力头功能(384个头中从242个恢复至379个)。基于C4训练数据的对照实验证实:驱动功能恢复的是重初始化操作而非语料内容,并揭示出两种术后现象:早期全局功能重分配能改进模型性能,而后期局部退化会在噪声训练信号下累积。扩展实验将基本健康头与塌缩头同步重初始化后,所得模型在训练困惑度上暂时超越原始BLOOM-1b7达25%(12.70对比16.99),表明预训练注意力配置处于次优局部极小值。代码、检查点与诊断工具均已开源发布。

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【NeurIPS2024】注意力迁移对视觉Transformer的惊人有效性研究
【ICML2024】通过动态可组合多头注意力改进Transformers
专知会员服务
21+阅读 · 2024年5月17日
【CVPR2023】BiFormer:基于双层路由注意力的视觉Transformer
专知会员服务
35+阅读 · 2023年3月20日
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
从头开始了解Transformer
AI科技评论
25+阅读 · 2019年8月28日
注意力机制可解释吗?这篇ACL 2019论文说……
机器之心
11+阅读 · 2019年6月16日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
人工智能在战场行动中的演进及伊朗案例
专知会员服务
4+阅读 · 4月18日
美AI公司Anthropic推出网络安全模型“Mythos”
专知会员服务
2+阅读 · 4月18日
【博士论文】面向城市环境的可解释计算机视觉
大语言模型的自改进机制:技术综述与未来展望
《第四代军事特种作战部队选拔与评估》
专知会员服务
1+阅读 · 4月18日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员