Although state-of-the-art LLMs can solve math problems, we find that they make errors on numerical comparisons with mixed notation: "Which is larger, $5.7 \times 10^2$ or $580$?" This raises a fundamental question: Do LLMs even know how big these numbers are? We probe the hidden states of several smaller open-source LLMs. A single linear projection of an appropriate hidden layer encodes the log-magnitudes of both kinds of numerals, allowing us to recover the numbers with relative error of about 2.3% (on restricted synthetic text) or 19.06% (on scientific papers). Furthermore, the hidden state after reading a pair of numerals encodes their ranking, with a linear classifier achieving over 90% accuracy. Yet surprisingly, when explicitly asked to rank the same pairs of numerals, these LLMs achieve only 50-70% accuracy, with worse performance for models whose probes are less effective. Finally, we show that incorporating the classifier probe's log-loss as an auxiliary objective during finetuning brings an additional 3.22% improvement in verbalized accuracy over base models, demonstrating that improving models' internal magnitude representations can enhance their numerical reasoning capabilities. Our code is available at https://github.com/VCY019/Numeracy-Probing.


翻译:尽管当前最先进的大语言模型能够解决数学问题,我们发现它们在处理混合表示法的数值比较时会出现错误:"哪个更大:$5.7 \times 10^2$ 还是 $580$?" 这引发了一个根本性问题:大语言模型是否真正理解这些数字的大小?我们通过探测多个开源小规模大语言模型的隐藏状态发现,对适当隐藏层的单一线性投影能够编码两种数字表示法的对数量级,使我们在受限合成文本上能以约2.3%的相对误差恢复数值,在科学论文上达到19.06%的相对误差。此外,模型在读取数字对后的隐藏状态编码了它们的排序关系,线性分类器在此任务上可获得超过90%的准确率。然而令人惊讶的是,当明确要求对这些相同数字对进行排序时,这些大语言模型仅能达到50-70%的准确率,且探测效果较差的模型表现更差。最后,我们通过在微调过程中将分类器探针的对数损失作为辅助目标,使模型在数值表述准确率上较基础模型额外提升3.22%,证明改进模型内部的数值表征能力能够增强其数值推理性能。相关代码已发布于 https://github.com/VCY019/Numeracy-Probing。

0
下载
关闭预览

相关内容

大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
大型语言模型(LLMs),附Slides与视频
专知会员服务
70+阅读 · 2024年6月30日
重磅!《大语言模型》新书出炉,人大出版,391页pdf
专知会员服务
201+阅读 · 2024年4月15日
大型语言模型对齐
专知会员服务
119+阅读 · 2023年9月27日
大语言模型简明指南
专知会员服务
143+阅读 · 2023年7月29日
微软机器阅读理解在一场多轮对话挑战中媲美人类
微软丹棱街5号
19+阅读 · 2019年5月14日
中文对比英文自然语言处理NLP的区别综述
AINLP
18+阅读 · 2019年3月20日
自然语言处理(NLP)知识结构总结
AI100
51+阅读 · 2018年8月17日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
用于数学的 10 个优秀编程语言
算法与数据结构
13+阅读 · 2018年1月5日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
25+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
7+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
25+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
7+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员