全面测试大模型的数字理解能力,发现其常犯基础错误。
Number Cookbook: Number Understanding of Language Models and How to Improve It
- 构建涵盖41种组合的数字能力评测基准
- 发现主流大模型在多数任务中表现不佳
- 揭示增强技术对微调模型无效的意外现象
大型语言模型虽能解决复杂推理任务,却在基础数值理解上频频出错(如误判9.11 > 9.9)。此类能力是数学与推理任务的基础,但以往研究关注不足或仅限于少数任务(如整数加法)。本文系统考察了语言模型的数值理解与处理能力(NUPA),提出一个覆盖四种常见数值表示和17项不同任务的基准,涵盖四大类共41个有意义组合。这些任务源于中小学课程,几乎涵盖日常所有数值场景,规则简单明确。通过该基准发现当前大模型在多项任务中失败率高。我们训练小型模型测试现有及潜在提升NUPA的技术(如分词器、位置编码、数值格式),并用测试平台评估效果;同时在实际规模的大模型上微调其在所提任务上的表现,发现:1)朴素微调可显著提升多数任务的性能,但非全部;2)专门设计用于提升NUPA的技术在预训练模型微调中无效。此外,还探究了思维链对NUPA的影响。本工作深化了对大模型数值能力的理解。基准与代码已开源:https://github.com/GraphPKU/number_cookbook。
原文摘要 · Abstract (English)
Large language models (LLMs) can solve an increasing number of complex reasoning tasks while making surprising mistakes in basic numerical understanding and processing (such as 9.11 > 9.9). The latter ability is essential for tackling complex arithmetic and mathematical problems and serves as a foundation for most reasoning tasks, but previous work paid little attention to it or only discussed several restricted tasks (like integer addition). In this paper, we comprehensively investigate the numerical understanding and processing ability (NUPA) of LLMs. Firstly, we introduce a benchmark covering four common numerical representations and 17 distinct numerical tasks in four major categories, resulting in 41 meaningful combinations in total. These tasks are derived from primary and secondary education curricula, encompassing nearly all everyday numerical understanding and processing scenarios, and the rules of these tasks are very simple and clear. Through the benchmark, we find that current LLMs fail frequently in many of the tasks. To study the problem, we train small models with existing and potential techniques for enhancing NUPA (such as tokenizers, PEs, and number formats), comprehensively evaluating their effectiveness using our testbed. We also finetune practical-scale LLMs on our proposed NUPA tasks and find that 1) naive finetuning can improve NUPA a lot on many but not all tasks, and 2) surprisingly, techniques designed to enhance NUPA prove ineffective for finetuning pretrained models. We further explore the impact of chain-of-thought techniques on NUPA. Our work provides a more detailed and comprehensive understanding of NUPA in LLMs. Our benchmark and code are released at https://github.com/GraphPKU/number_cookbook.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。