arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.03766cs.CLcs.AI
收藏

数字食谱:语言模型的数字理解能力及如何改进

Number Cookbook: Number Understanding of Language Models and How to Improve It

School of Intelligence Science and Technology, Peking University(北京大学智能科学与技术学院);Institution for Artificial Intelligence, Peking University(北京大学人工智能研究院);State Key Lab of General Artificial Intelligence, Peking University(北京大学通用人工智能国家重点实验室);Pazhou Laboratory (Huangpu)(琶洲实验室(黄埔))

Haotong Yang, Yi Hu, Shijia Kang, Zhouchen Lin, Muhan Zhang

AI总结:

本文全面研究了大型语言模型的数字理解与处理能力(NUPA),提出涵盖41种任务组合的基准,发现现有模型在基础数字处理上常出错,并验证了微调与思维链等技术的实际效果。

摘要:

大型语言模型(LLMs)能够解决日益增多的复杂推理任务,却在基本的数字理解与处理上犯令人惊讶的错误(例如 9.11 > 9.9)。后者对于解决复杂的算术和数学问题至关重要,并且是大多数推理任务的基础,但以往的研究对此关注甚少,或仅探讨了少数受限任务(如整数加法)。本文全面研究了LLMs的数字理解与处理能力(NUPA)。首先,我们引入了一个基准,涵盖四种常见数字表示和四大类下的17个不同数字任务,共计41种有意义的组合。这些任务源自中小学课程,几乎涵盖了所有日常的数字理解与处理场景,且任务规则非常简单清晰。通过该基准,我们发现当前的LLMs在许多任务中经常失败。为了研究这一问题,我们使用现有和潜在的增强NUPA的技术(如 tokenizers、PEs 和数字格式)训练了小模型,并使用我们的测试平台全面评估了它们的有效性。我们还在提出的 NUPA 任务上对实用规模的 LLMs 进行了微调,发现:1)朴素微调能在许多(但非全部)任务上大幅提升 NUPA;2)令人惊讶的是,旨在增强 NUPA 的技术对预训练模型的微调证明是无效的。我们进一步探讨了思维链技术对 NUPA 的影响。我们的工作为 LLMs 中的 NUPA 提供了更详细和全面的理解。我们的基准和代码已发布于 https://github.com/GraphPKU/number_cookbook。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑