Arithmetic with Language Models: from Memorization to Computation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Maltoni, Davide, Ferrara, Matteo
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913455536078848
author Maltoni, Davide
Ferrara, Matteo
author_facet Maltoni, Davide
Ferrara, Matteo
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2308_01154
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Arithmetic with Language Models: from Memorization to Computation
Maltoni, Davide
Ferrara, Matteo
Artificial Intelligence
Computation and Language
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.
title Arithmetic with Language Models: from Memorization to Computation
topic Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2308.01154