[论文解读] Evaluating Transformer Language Models on Arithmetic Operations Using Number Decomposition
本文提出 Calculon,一种经微调以通过将数字分解为数字位来进行算术运算的 GPT-2 模型,在未见数字的加法/减法任务中显示出强结果,但在乘法任务和 GPT-3 小样本设置下收益有限。
In recent years, Large Language Models such as GPT-3 showed remarkable capabilities in performing NLP tasks in the zero and few shot settings. On the other hand, the experiments highlighted the difficulty of GPT-3 in carrying out tasks that require a certain degree of reasoning, such as arithmetic operations. In this paper we evaluate the ability of Transformer Language Models to perform arithmetic operations following a pipeline that, before performing computations, decomposes numbers in units, tens, and so on. We denote the models fine-tuned with this pipeline with the name Calculon and we test them in the task of performing additions, subtractions and multiplications on the same test sets of GPT-3. Results show an increase of accuracy of 63% in the five-digit addition task. Moreover, we demonstrate the importance of the decomposition pipeline introduced, since fine-tuning the same Language Model without decomposing numbers results in 0% accuracy in the five-digit addition task.
研究动机与目标
- 评估 Transformer 语言模型在遇到不同位数的未见数字时是否能学习算术运算。
- 提出一个数字分解流程,指导语言模型像人类一样进行按位运算。
- 在加法、减法和乘法任务上评估微调的 GPT-2(Calculon)和 GPT-2 基线,以及 GPT-3 的少样本性能。
提出的方法
- 在 2–5 位的加法和减法数据集上,使用将数字分解为个位、十位、百位等并重构结果的分解流程,对 GPT-2 模型进行微调。
- 建立一个未分解输入数字的基线,以比较性能。
- 尝试一个间隔分解流水线,即数字位之间留出空格,以测试分词影响。
- 对 GPT-3 进行少样本提示实验,包括一个基于分解的提示变体。
- 对 GPT-2 使用贪婪解码,对 GPT-3 使用基于温度的采样;评估在与训练数据不重叠的测试集上的准确性。
实验结果
研究问题
- RQ1当使用数字分解流程对 Transformer 语言模型进行训练时,能否将算术推广到未见数字?
- RQ2将数字分解为位值对学习加法、减法和乘法有何影响?
- RQ3分解方法是否足以应对高位数的乘法,还是需要更高层次的推理?
- RQ4分词策略(分解 vs. 间隔数字)是否影响模型的数理能力?
- RQ5GPT-3 在少样本设置中对分解的响应程度如何?
主要发现
- Calculon 在 2D+、3D+、4D+、5D+ 的加法和减法任务上取得高准确率,但在 2D×(两位乘法)任务上表现显著较差。
- 若未使用分解进行微调的 GPT-2 模型在 4D–5D 任务上表现不佳,表明分解流程对学习算术至关重要。
- 间隔数字在 Baseline 上有提升但 Calculon 仍然领先,表明对数量级的分解带来显著收益。
- GPT-3 在少样本设置中若不使用分解在某些任务上接近顶尖结果,但在少样本提示中应用分解会显著降低性能(GPT-3 FS decomp)。
- 分解使语言模型能够学习逐位运算(个位与个位、十位与十位等),但乘法仍具挑战性,表明需要更高层次的推理。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。