Chain-of-Thoughtトークンはコンピュータプログラムの変数である。
Chain-of-Thought Tokens are Computer Program Variables
May 8, 2025
著者: Fangwei Zhu, Peiyi Wang, Zhifang Sui
cs.AI
要旨
Chain-of-Thoughts(CoT)は、大規模言語モデル(LLM)が最終的な答えに到達する前に中間ステップを生成することを要求し、LLMが複雑な推論タスクを解決するのに効果的であることが証明されています。しかし、CoTの内部メカニズムは依然としてほとんど解明されていません。本論文では、2つの合成的タスク(多桁乗算と動的計画法)において、LLMにおけるCoTトークンの役割を実証的に研究します。CoTはこれらの問題を解決するために不可欠ですが、中間結果を保存するトークンのみを保持しても同等の性能が得られることがわかりました。さらに、中間結果を代替的な潜在形式で保存してもモデルの性能に影響がないことも観察しました。また、CoTの一部の値をランダムに介入すると、それに応じて後続のCoTトークンと最終的な答えが変化することに気づきました。これらの発見は、CoTトークンがコンピュータプログラムの変数のように機能する可能性があるが、意図しないショートカットやトークン間の計算複雑性の制限といった潜在的な欠点があることを示唆しています。コードとデータはhttps://github.com/solitaryzero/CoTs_are_Variablesで公開されています。
English
Chain-of-thoughts (CoT) requires large language models (LLMs) to generate
intermediate steps before reaching the final answer, and has been proven
effective to help LLMs solve complex reasoning tasks. However, the inner
mechanism of CoT still remains largely unclear. In this paper, we empirically
study the role of CoT tokens in LLMs on two compositional tasks: multi-digit
multiplication and dynamic programming. While CoT is essential for solving
these problems, we find that preserving only tokens that store intermediate
results would achieve comparable performance. Furthermore, we observe that
storing intermediate results in an alternative latent form will not affect
model performance. We also randomly intervene some values in CoT, and notice
that subsequent CoT tokens and the final answer would change correspondingly.
These findings suggest that CoT tokens may function like variables in computer
programs but with potential drawbacks like unintended shortcuts and
computational complexity limits between tokens. The code and data are available
at https://github.com/solitaryzero/CoTs_are_Variables.Summary
AI-Generated Summary