[論文レビュー] What's the Magic Word? A Control Theory of LLM Prompting
要旨:この論文はLLMプロンプトを離散的確率制御問題として形式化し、自己注意から到達可能な出力に対する上界を証明し、Falcon-7b、Falcon-40b、Llama-7bに渡るプロンプト長依存の controllability を経験的に大幅に示しています。短いプロンプトで出力を劇的に操作でき、 unlikely tokens を most likely にすることもあります。
Prompt engineering is crucial for deploying LLMs but is poorly understood mathematically. We formalize LLM systems as a class of discrete stochastic dynamical systems to explore prompt engineering through the lens of control theory. We offer a mathematical analysis of the limitations on the controllability of self-attention as a function of the singular values of the parameter matrices. We present complementary empirical results on the controllability of a panel of LLMs, including Falcon-7b, Llama-7b, and Falcon-40b. Given initial state $\mathbf x_0$ from Wikitext and prompts of length $k \leq 10$ tokens, we find that the "correct" next token is reachable at least 97% of the time, and that the top 75 most likely next tokens are reachable at least 85% of the time. Intriguingly, short prompt sequences can dramatically alter the likelihood of specific outputs, even making the least likely tokens become the most likely ones. This control-theoretic analysis of LLMs demonstrates the significant and poorly understood role of input sequences in steering output probabilities, offering a foundational perspective for enhancing language model system capabilities.
研究の動機と目的
- LLMにおけるプロンプト設計を controllability の問題として動機づける。
- LLMs を入力(プロンプト)と状態(トークン列)を持つ制御系として正式に定義する。
- 自己注意の到達可能出力集合の解析的境界を導出する。
- 短いプロンプトと WikiText 起源の状態を用いて Falcon-7b、Falcon-40b、Llama-7b の各モデルで controllability を経験的に評価する。
提案手法
- Definition 1–3 に従い、入力付き自己回帰系として LLMs を定義する(制御入力とリードアウト写像)。
- Theorem 1 および式 5–7 に基づき、Wq と Wk の特異値に関する自己注意の到達可能出力集合の境界を導出する。
- Section 5.1 にて k-短プロンプト最適化(貪欲なバックジェネレーションと貪欲座標勾配法)を用いて出力を操作するプロンプトを見つける。
- Section 5.2 にて、Wikitext 由来の x0 とモデル出力の y を用い、Falcon-7b、Falcon-40b、Llama-7b に対して k-ε controllability をデータセット上で経験的に測定する。
- Figure 1 にて ground-truth 次トークンおよび top-75 Likely 出力の到達可能性を評価する。

実験結果
リサーチクエスチョン
- RQ1与えられた状態から短いプロンプト下で k-トークン入力制約のもとに次トークン出力は到達可能か?
- RQ2自己注意は到達可能出力集合をどのように境界づけ、重み行列の特異値は controllability にどう影響するか?
- RQ3ground-truth および高確率出力に対して、異なる LLM 間での経験的 controllability の程度はどれくらいか?
- RQ4短めのプロンプトで低確率トークンから高確率トークンへ操作可能か?
- RQ5プロンプト長さとモデル規模に応じた controllability の変化は?
主な発見
- x0 に続く正しい次の WikiText トークンは k ≤ 10 トークンのプロンプトで 97% 以上到達可能。
- トップ75 の最も可能性の高い次トークンは k ≤ 10 トークンのプロンプトで少なくとも 85% の頻度で到達可能。
- 短いプロンプトは、k ≤ 4 のプロンプト内で最も可能性の低いトークンを最も可能性の高いものへ変えることができる。
- ground-truth の WikiText targets に対して、Falcon-7b、Falcon-40b、Llama-7b の各モデルで到達可能性が実証された。
- 入力系列が出力確率を prior の可能性を超えて操縦する上で非自明な役割を果たすことを示唆。
- プロンプト長さ k と controllability の比 ε の間に対数線形の関係性が、研究された領域で見られる。

より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。