[論文レビュー] Investigating the Limitations of Transformers with Simple Arithmetic Tasks
本論文は、数値の表現表層がトランスフォーマーの算術学習に決定的に影響することを示している。適切な位置情報を考慮した表現では、非常に長い数の加算/減算をモデルが学習できる一方で、標準的なトークン化は困難をきたし、外挿は依然として難しい。
The ability to perform arithmetic tasks is a remarkable trait of human intelligence and might form a critical component of more complex reasoning tasks. In this work, we investigate if the surface form of a number has any influence on how sequence-to-sequence language models learn simple arithmetic tasks such as addition and subtraction across a wide range of values. We find that how a number is represented in its surface form has a strong influence on the model's accuracy. In particular, the model fails to learn addition of five-digit numbers when using subwords (e.g., "32"), and it struggles to learn with character-level representations (e.g., "3 2"). By introducing position tokens (e.g., "3 10e1 2"), the model learns to accurately add and subtract numbers up to 60 digits. We conclude that modern pretrained language models can easily learn arithmetic from very few examples, as long as we use the proper surface representation. This result bolsters evidence that subword tokenizers and positional encodings are components in current transformer designs that might need improvement. Moreover, we show that regardless of the number of parameters and training examples, models cannot learn addition rules that are independent of the length of the numbers seen during training. Code to reproduce our experiments is available at https://github.com/castorini/transformers-arithmetic
研究の動機と目的
- 数値のさまざまな表層表現が、単純な算術(加算/減算)に対するトランスフォーマーの学習にどのように影響するかを評価する。
- 再事前学習なしに算術能力を向上させるために、入力に明示的な位置意味論を注入できるかを調査する。
提案手法
- 加算と減算をシーケンス対シーケンスタスクとして、入力テンプレート like 'What is [number1] [operation] [number2]?' のような入力テンプレートを用いて変換する。
- モデルの精度に対して、十進法、文字、固定文字、下線、語、10進位置トークン、10eベースなど、6つの数値表現を体系的に比較する。
- バランスよく/ランダムサンプリングで訓練された、さまざまなサイズのT5モデル(およびバニラのトランスフォーマー)を使用する。グリーディデコーディングで精度を測定する。
- 表現を比較し、外挿/補間および位置埋め込みに関する追加実験を実施して、事前学習の影響を分析する。
実験結果
リサーチクエスチョン
- RQ1トランスフォーマーモデルにおける単純な算術の学習において、数値の表層形はどのように影響するか?
- RQ210進ベースおよび10eベースの明示的な位置ベース表現は、非常に長い数の正確な加算/減算を可能にするか?
- RQ3より大きなモデルやより多くのデータは、表現に起因する算術タスクの学習制約を克服しますか?
- RQ4異なる表現とモデルサイズの下で、見たことのない桁長への外挿は実現可能ですか?
主な発見
- 十進法およびサブワード様のトークン化は、長い数の算術学習を妨げる。5桁の加算以上では精度がゼロに落ちる。
- 文字表現とアンダースコア表現は学習を改善するが、桁数が増えるにつれて劣化する。約12–15桁を超えると暗記戦略は失敗する。
- 10ベースおよび10eベースの表現と位置トークンを用いると、主な結果で60桁までほぼ完璧な精度を実現する(議論の中で最大60桁と記述されている)。
- 固定長文字表現は長い数に対して文字/アンダースコア表現より優れているが、結局15桁程度で壊れる。
- 事前学習と表現は相互作用する。語表現は内部の位置トークンの恩恵を受けるが、トークン長の制限のため非常に長い数には失敗する。10ベース/10eベースの表現は適切な配置により高い精度を達成する。
- 多くのモデルにとって外挿は依然として難しく、3Bパラメータのモデルでさえ訓練長の分布に依存せず算術規則を学習することは難しい。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。