Llama See, Llama Do: A Mechanistic Perspective on Contextual Entrainment and Distraction in LLMs

要約

幅広い言語モデル(LMS)とプロンプト設定にわたる新しい現象、コンテキストの同時メントを観察し、入力プロンプトの「無関係な」コンテキスト情報によってLMSがどのように気を散らすかについての新しい機構的視点を提供します。
具体的には、LMSは、ランダムトークンであっても、コンテキストプロンプトに以前に表示されていたトークンに、かなり高いロジット(または確率)を割り当てます。
これは、文脈的エントレインメントは、質問または文の残りの部分とのトークンの関連性または意味関係とは無関係に発生する機械的現象であることを示唆しています。
文脈的エントレインメントの大きさがセマンティック要因の影響を受けているという統計的に有意な証拠を見つけます。
反事実的なプロンプトは、事実のプロンプトと比較してより大きな効果があり、文脈的エントレインメントは機械的現象であるが、セマンティック要因によって変調されていることを示唆しています。
私たちは、文脈的エントレインメント現象に対応する注意ヘッドの回路(エントレインメントヘッド)があると仮定します。
微分可能なマスキングに基づいた新しいエントレインメントヘッドディスカバリー方法を使用して、さまざまな設定にわたってこれらのヘッドを特定します。
これらのヘッドを「オフ」、つまり出力をゼロに設定すると、コンテキストのエントレインメントの効果が大幅に減衰し、気晴らしコンテキストが提供された場合に生成されるものに降伏する出力を生成します。
コンテキストのエントレインメントの発見と、エントレインメントヘッドを介したLM気晴らしの調査は、気晴らしの問題の機構分析と緩和に向けた重要なステップを示しています。

要約(オリジナル)

We observe a novel phenomenon, contextual entrainment, across a wide range of language models (LMs) and prompt settings, providing a new mechanistic perspective on how LMs become distracted by “irrelevant” contextual information in the input prompt. Specifically, LMs assign significantly higher logits (or probabilities) to any tokens that have previously appeared in the context prompt, even for random tokens. This suggests that contextual entrainment is a mechanistic phenomenon, occurring independently of the relevance or semantic relation of the tokens to the question or the rest of the sentence. We find statistically significant evidence that the magnitude of contextual entrainment is influenced by semantic factors. Counterfactual prompts have a greater effect compared to factual ones, suggesting that while contextual entrainment is a mechanistic phenomenon, it is modulated by semantic factors. We hypothesise that there is a circuit of attention heads — the entrainment heads — that corresponds to the contextual entrainment phenomenon. Using a novel entrainment head discovery method based on differentiable masking, we identify these heads across various settings. When we “turn off” these heads, i.e., set their outputs to zero, the effect of contextual entrainment is significantly attenuated, causing the model to generate output that capitulates to what it would produce if no distracting context were provided. Our discovery of contextual entrainment, along with our investigation into LM distraction via the entrainment heads, marks a key step towards the mechanistic analysis and mitigation of the distraction problem.

arxiv情報

著者 Jingcheng Niu,Xingdi Yuan,Tong Wang,Hamidreza Saghir,Amir H. Abdi
発行日 2025-05-14 12:33:05+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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