Despite remarkable advances in coding capabilities, language models (LMs) still struggle with simple syntactic tasks such as generating balanced parentheses. In this study, we investigate the underlying mechanisms behind the persistence of these errors across LMs of varying sizes (124M-7B) to both understand and mitigate the errors. Our study reveals that LMs rely on a number of components (attention heads and FF neurons) that independently make their own predictions. While some components reliably promote correct answers across a generalized range of inputs (i.e., implementing "sound mechanisms''), others are less reliable and introduce noise by promoting incorrect tokens (i.e., implementing "faulty mechanisms''). Errors occur when the faulty mechanisms overshadow the sound ones and dominantly affect the predictions. Motivated by this insight, we introduce RASteer, a steering method to systematically identify and increase the contribution of reliable components for improving model performance. RASteer substantially improves performance on balanced parentheses tasks, boosting accuracy of some models from $0$% to around $100$% without impairing the models' general coding ability. We further demonstrate its broader applicability in arithmetic reasoning tasks, achieving performance gains of up to around $20$%.


翻译:摘要:尽管语言模型(LMs)在编码能力上取得了显著进展,但在生成平衡括号等简单句法任务中仍存在困难。本研究探究了不同规模(124M-7B)语言模型中这些错误持续存在的潜在机制,旨在理解并减少此类错误。我们的研究表明,语言模型依赖多个独立做出预测的组件(注意力头和前馈神经元)。其中部分组件能在广泛输入范围内可靠地促进正确答案(即实现“正确机制”),而另一些组件则可靠性较低,通过促进错误令牌引入噪声(即实现“错误机制”)。当错误机制压倒正确机制并主导预测时,错误便会产生。基于这一发现,我们提出了一种名为RASteer的引导方法,用以系统性地识别并增强可靠组件的贡献,从而提升模型性能。RASteer显著改善了平衡括号任务的表现,将部分模型的准确率从0%提升至约100%,且不影响模型的通用编码能力。我们进一步展示了该方法在算术推理任务中的广泛适用性,性能提升最高可达约20%。

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
【CIKM2025教程】语言模型的公平性:一篇教程,170页ppt
专知会员服务
16+阅读 · 2025年11月16日
大语言模型机器遗忘综述
专知会员服务
18+阅读 · 2025年11月2日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
赋能大型语言模型多领域资源挑战
专知会员服务
10+阅读 · 2025年6月10日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
【博士论文】语言模型与人类偏好对齐,148页pdf
专知会员服务
32+阅读 · 2024年4月21日
大型语言模型对齐
专知会员服务
120+阅读 · 2023年9月27日
大型语言模型公平性
专知会员服务
41+阅读 · 2023年8月31日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
详解常见的损失函数
七月在线实验室
20+阅读 · 2018年7月12日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
【CIKM2025教程】语言模型的公平性:一篇教程,170页ppt
专知会员服务
16+阅读 · 2025年11月16日
大语言模型机器遗忘综述
专知会员服务
18+阅读 · 2025年11月2日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
赋能大型语言模型多领域资源挑战
专知会员服务
10+阅读 · 2025年6月10日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
【博士论文】语言模型与人类偏好对齐,148页pdf
专知会员服务
32+阅读 · 2024年4月21日
大型语言模型对齐
专知会员服务
120+阅读 · 2023年9月27日
大型语言模型公平性
专知会员服务
41+阅读 · 2023年8月31日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员