Skip to main content
QUICK REVIEW

[论文解读] NumGPT: Improving Numeracy Ability of Generative Pre-trained Models

Zhihua Jin, Xin Jiang|arXiv (Cornell University)|Sep 7, 2021
Topic Modeling参考文献 27被引用 11
一句话总结

NumGPT 引入了一种新颖的生成式预训练语言模型,通过使用科学记数法显式建模尾数和指数的独立嵌入,提升了模型的数值推理能力。该模型在数学应用题、测量估算和数量级分类等数值推理任务上达到最先进性能,优于 GPT 和使用 DICE 的 GPT 在多个基准测试中的表现。

ABSTRACT

Existing generative pre-trained language models (e.g., GPT) focus on modeling the language structure and semantics of general texts. However, those models do not consider the numerical properties of numbers and cannot perform robustly on numerical reasoning tasks (e.g., math word problems and measurement estimation). In this paper, we propose NumGPT, a generative pre-trained model that explicitly models the numerical properties of numbers in texts. Specifically, it leverages a prototype-based numeral embedding to encode the mantissa of the number and an individual embedding to encode the exponent of the number. A numeral-aware loss function is designed to integrate numerals into the pre-training objective of NumGPT. We conduct extensive experiments on four different datasets to evaluate the numeracy ability of NumGPT. The experiment results show that NumGPT outperforms baseline models (e.g., GPT and GPT with DICE) on a range of numerical reasoning tasks such as measurement estimation, number comparison, math word problems, and magnitude classification. Ablation studies are also conducted to evaluate the impact of pre-training and model hyperparameters on the performance.

研究动机与目标

  • 为解决现有预训练语言模型(如 GPT)在数值推理任务(如数学应用题和测量估算)中数值能力有限的问题。
  • 设计一种模型,通过将数字分解为尾数和指数分量,显式捕捉数字的量级和精度。
  • 将数字感知表示整合到生成式模型的预训练目标中,以提升在数值推理任务中的鲁棒性。
  • 在合成与真实世界的数值推理基准上评估所提方法的有效性。

提出的方法

  • NumGPT 使用基于原型的嵌入来表示数字的尾数,并为指数分配独立的嵌入,从而实现对量级和精度的独立建模。
  • 模型将数字解析为科学记数法形式(例如,2300 → 2.3 × 10³),并在输入嵌入层中分别编码尾数和指数。
  • 采用四头输出头架构,使模型能根据选择头的输出,预测文本标记或通过尾数和指数头生成数字。
  • 引入一种新颖的数字感知损失函数,联合优化语言建模与数字生成,确保对数值的准确预测。
  • 模型在大规模语料上进行预训练,其中数字通过自定义数字解析器处理,将格式如 '2,300' 和 '23%' 统一为标准科学记数法。
  • 在特定领域数据集上进行微调,以适应数学应用题和数量级分类等任务。

实验结果

研究问题

  • RQ1显式建模数字结构(尾数与指数)是否能提升自回归语言模型的数值推理能力?
  • RQ2与标准 GPT 相比,基于原型的数字嵌入集成对数值推理任务性能有何影响?
  • RQ3数字感知损失函数在多大程度上增强了模型生成和推理数字的能力?
  • RQ4所提方法是否能在包括测量估算和数量级分类在内的多样化数值推理任务中实现泛化?

主要发现

  • 在测量估算任务中,NumGPT 在预测真实世界数量的合适数值方面,准确率高于标准 GPT 和使用 DICE 的 GPT。
  • 在数学应用题任务中,NumGPT 生成的数值答案更准确,展现出对基线模型的推理能力提升。
  • 在使用 Numeracy-600K 数据集的数量级分类任务中,NumGPT 表现更优,表明其对数字量级的理解更佳。
  • 消融实验证实,数字感知损失和对尾数与指数的独立建模均显著提升了模型性能。
  • 该模型在不同超参数和预训练设置下表现稳定,表明其具备良好的鲁棒性与可扩展性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。