arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.01154cs.AIcs.CL
收藏

语言模型的算术:从记忆到计算

Arithmetic with Language Models: from Memorization to Computation

University of Bologna(博洛尼亚大学)

Davide Maltoni, Matteo Ferrara

AI总结:

本文通过二进制加法和乘法任务训练轻量级语言模型,揭示其以“编码-回归-解码”机制在值空间中完成算术计算,从而从记忆走向可外推的计算能力。

摘要:

更好地理解近期大型语言模型涌现出的计算和问题求解能力,对于进一步改进它们并拓宽其适用性至关重要。本文研究了一个以预测下一个 token 为训练目标的语言模型如何执行算术计算,并使其泛化到训练数据之外。二进制加法和乘法构成了这一目标的良好测试平台,因为它们只需要非常小的词汇表,并且表现出相关的输入/输出不连续性,使得平滑输入插值对新数据无效。我们成功训练了一个轻量级语言模型来学习这些任务,并进行了大量实验以研究其外推能力和内部信息处理。我们的发现支持以下假设:该语言模型作为一个“编码-回归-解码”机器工作,其中计算发生在值空间中,一旦输入 token 表示被映射到适当的内部表示。

英文摘要:

A better understanding of the emergent computation and problem-solving capabilities of recent large language models is of paramount importance to further improve them and broaden their applicability. This work investigates how a language model, trained to predict the next token, can perform arithmetic computations generalizing beyond training data. Binary addition and multiplication constitute a good testbed for this purpose, since they require a very small vocabulary and exhibit relevant input/output discontinuities making smooth input interpolation ineffective for novel data. We successfully trained a light language model to learn these tasks and ran a number of experiments to investigate the extrapolation capabilities and internal information processing. Our findings support the hypothesis that the language model works as an Encoding-Regression-Decoding machine where the computation takes place in the value space once the input token representation is mapped to an appropriate internal representation.

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

↑