(How) Do Language Models Track State?

要約

トランス語モデル(LMS)は、進化する世界の観察されていない状態を追跡する必要があるように見えるように見える、ストーリーテリングからコード生成までの行動を示します。
彼らはどのようにそうしますか?
順列を構成するためにトレーニングまたは微調整されたLMSで状態追跡を研究します(つまり、一連のスワップの後にオブジェクトのセットの順序を計算するため)。
この問題の単純な代数構造にもかかわらず、他の多くのタスク(例えば、有限のオートマトンのシミュレーションとブール式の評価)は順列組成に縮小することができ、一般的な状態追跡のための自然なモデルになります。
LMSは、このタスクの2つの状態追跡メカニズムのいずれかを常に学習することを示しています。
最初のものは、Liu et alによる最近の理論的研究で使用されている「連想スキャン」構造に非常に似ています。
(2023)およびMerrill et al。
(2024)。
2番目は、計算が容易な機能(順列パリティ)を使用して出力のスペースを部分的にプルンし、連想スキャンで洗練します。
2つのメカニズムは、著しく異なる堅牢性特性を示し、ヒューリスティックを促進または抑制する中間トレーニングタスクで、どちらか一方に向かってLMSを導く方法を示します。
我々の結果は、Transformer LMSは、前処理されていないか微調整されていようと、効率的で解釈可能な状態追跡メカニズムを実装することを学ぶことができ、これらのメカニズムの出現を予測および制御できることを示しています。

要約(オリジナル)

Transformer language models (LMs) exhibit behaviors — from storytelling to code generation — that appear to require tracking the unobserved state of an evolving world. How do they do so? We study state tracking in LMs trained or fine-tuned to compose permutations (i.e., to compute the order of a set of objects after a sequence of swaps). Despite the simple algebraic structure of this problem, many other tasks (e.g., simulation of finite automata and evaluation of boolean expressions) can be reduced to permutation composition, making it a natural model for state tracking in general. We show that LMs consistently learn one of two state tracking mechanisms for this task. The first closely resembles the ‘associative scan’ construction used in recent theoretical work by Liu et al. (2023) and Merrill et al. (2024). The second uses an easy-to-compute feature (permutation parity) to partially prune the space of outputs, then refines this with an associative scan. The two mechanisms exhibit markedly different robustness properties, and we show how to steer LMs toward one or the other with intermediate training tasks that encourage or suppress the heuristics. Our results demonstrate that transformer LMs, whether pretrained or fine-tuned, can learn to implement efficient and interpretable state tracking mechanisms, and the emergence of these mechanisms can be predicted and controlled.

arxiv情報

著者 Belinda Z. Li,Zifan Carl Guo,Jacob Andreas
発行日 2025-03-04 18:31:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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