The Expresssive Power of Transformers with Chain of Thought

要約

最近の理論的研究により、グラフ内の 2 つのノードが接続されているかどうかのチェックや有限状態マシンのシミュレーションなど、入力を読み取ったらすぐに応答する標準的な変換器では解決できないことが証明されている、驚くほど単純な推論問題が特定されています。
ただし、実際には、トランスフォーマーの推論は、「思考の連鎖」または「スクラッチパッド」を使用できるようにすることで改善できます。つまり、応答する前に一連の中間トークンを生成して条件付けすることができます。
このことを動機として、私たちは次のように問います。そのような中間生成は、デコーダのみのトランスフォーマの計算能力を根本的に拡張するのでしょうか?
答えはイエスであることがわかりますが、増加量は中間生成量に大きく依存します。
たとえば、対数的なデコード ステップ数 (入力長に対する) を持つトランス デコーダは、標準的なトランスフォーマの限界をわずかに押し上げるだけですが、線形のデコード ステップ数では (標準的な複雑さの予想の下で) 明らかな新しい能力が追加されることがわかりました。
すべての通常言語。
また、我々の結果は、線形ステップによって変換器デコーダが文脈依存言語内に留まり、多項式ステップによって変換器デコーダが多項式時間で解決可能な問題のクラスを正確に認識できるようになること、つまり、標準的な複雑さのクラスに関して変換器のタイプを正確に特徴付ける最初のことであることも示唆しています。
私たちの結果は、トランスフォーマーの思考連鎖の長さまたはスクラッチパッドが推論能力にどのように影響するかを理解するための微妙な枠組みを提供します。

要約(オリジナル)

Recent theoretical work has identified surprisingly simple reasoning problems, such as checking if two nodes in a graph are connected or simulating finite-state machines, that are provably unsolvable by standard transformers that answer immediately after reading their input. However, in practice, transformers’ reasoning can be improved by allowing them to use a ‘chain of thought’ or ‘scratchpad’, i.e., generate and condition on a sequence of intermediate tokens before answering. Motivated by this, we ask: Does such intermediate generation fundamentally extend the computational power of a decoder-only transformer? We show that the answer is yes, but the amount of increase depends crucially on the amount of intermediate generation. For instance, we find that transformer decoders with a logarithmic number of decoding steps (w.r.t. the input length) push the limits of standard transformers only slightly, while a linear number of decoding steps adds a clear new ability (under standard complexity conjectures): recognizing all regular languages. Our results also imply that linear steps keep transformer decoders within context-sensitive languages, and polynomial steps make them recognize exactly the class of polynomial-time solvable problems — the first exact characterization of a type of transformers in terms of standard complexity classes. Together, our results provide a nuanced framework for understanding how the length of a transformer’s chain of thought or scratchpad impacts its reasoning power.

arxiv情報

著者 William Merrill,Ashish Sabharwal
発行日 2023-10-16 16:30:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CC, cs.CL, cs.LG, cs.LO パーマリンク