Arbitrary-Length Generalization for Addition in a Tiny Transformer

Alexandre Galvao Patriota
2024-06-12
Abstract:This paper introduces a novel training methodology that enables a Transformer model to generalize the addition of two-digit numbers to numbers with unseen lengths of digits. The proposed approach employs an autoregressive generation technique, processing from right to left, which mimics a common manual method for adding large numbers. To the best of my knowledge, this methodology has not been previously explored in the literature. All results are reproducible, and the corresponding R code is available at <a class="link-external link-http" href="http://github.com/AGPatriota/ALGA-R/" rel="external noopener nofollow">this http URL</a>.
Machine Learning,Applications
What problem does this paper attempt to address?