arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.00075cs.LGstat.APstat.ML
收藏

小型 Transformer 中加法的任意长度泛化

Arbitrary-Length Generalization for Addition in a Tiny Transformer

Universidade de São Paulo(圣保罗大学)

Alexandre Galvao Patriota

AI总结:

本文提出一种从右向左的自回归训练方法,使小型 Transformer 能将两位数加法泛化到未见过的任意数字长度,并提供可复现的 R 代码。

摘要:

本文介绍了一种新颖的训练方法,使 Transformer 模型能够将两位数加法泛化到具有未见数字长度的数字。所提方法采用自回归生成技术,从右向左处理,模拟了一种常见的手算大数加法方法。据作者所知,该方法此前尚未在文献中被探索过。所有结果均可复现,相应的 R 代码可在 github.com/AGPatriota/ALGA-R/ 获取。

英文摘要:

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 github.com/AGPatriota/ALGA-R/.

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

↑