Transformers Can Do Arithmetic with the Right Embeddings

要約

算術タスクにおけるトランスフォーマーのパフォーマンスの低下は、大きな桁範囲内の各桁の正確な位置を追跡できないことが主な原因であると思われます。
この問題は、数値の先頭からの相対的な位置をエンコードする埋め込みを各桁に追加することで解決します。
これらの埋め込み自体が提供する向上に加えて、この修正により、入力インジェクションや再帰層などのアーキテクチャの変更が可能になり、パフォーマンスがさらに向上することがわかります。
位置が解決されると、変圧器の論理的外挿能力を研究できます。
トレーニング データよりも大きく複雑な算術問題を解決できるでしょうか?
単一の GPU を使用して 20 桁の数値を 1 日トレーニングするだけで、100 桁の加算問題で最大 99% の精度を達成できる、最先端のパフォーマンスに到達できることがわかりました。
最後に、これらの計算能力の向上により、並べ替えや乗算などの他の多段階推論タスクの改善も可能になることを示します。

要約(オリジナル)

The poor performance of transformers on arithmetic tasks seems to stem in large part from their inability to keep track of the exact position of each digit inside of a large span of digits. We mend this problem by adding an embedding to each digit that encodes its position relative to the start of the number. In addition to the boost these embeddings provide on their own, we show that this fix enables architectural modifications such as input injection and recurrent layers to improve performance even further. With positions resolved, we can study the logical extrapolation ability of transformers. Can they solve arithmetic problems that are larger and more complex than those in their training data? We find that training on only 20 digit numbers with a single GPU for one day, we can reach state-of-the-art performance, achieving up to 99% accuracy on 100 digit addition problems. Finally, we show that these gains in numeracy also unlock improvements on other multi-step reasoning tasks including sorting and multiplication.

arxiv情報

著者 Sean McLeish,Arpit Bansal,Alex Stein,Neel Jain,John Kirchenbauer,Brian R. Bartoldson,Bhavya Kailkhura,Abhinav Bhatele,Jonas Geiping,Avi Schwarzschild,Tom Goldstein
発行日 2024-05-27 17:49:18+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG パーマリンク