要約
予測を行う際、言語モデルは、その文脈にどれだけ依存するか、事前知識にどれだけ依存するかをトレードオフしなければならない。モデルがどの程度文脈に敏感であるかを選択することは、基本的な機能であり、これにより、検索支援生成や質問応答のようなタスクで優れた性能を発揮することが可能になる。本論文では、この感度を制御するノブを探索し、言語モデルが文脈から答えるのか、それとも事前知識から答えるのかを決定する。この探索を導くために、文脈感度を制御可能なタスクを設計する。このタスクでは、まずモデルに文脈(パリはイギリスにある)と質問(パリはどこですか)を与え、次にモデルに事前知識と文脈知識のどちらかを使うように指示し、両方の意図(フランスかイギリスのどちらか)に対して正しい答えを生成するかどうかを評価する。このタスクを微調整した場合、Llama-3.1、Mistral-v0.3、Gemma-2のインストラクションチューニングバージョンは高い精度(85-95%)で解くことができる。これらの高性能モデルを分析し、新しい線形時間アルゴリズムを用いて、文脈感度に重要と思われるレイヤーを絞り込む。そして、各モデルにおいて、モデルが文脈に従うか、それとも事前知識に従うかを符号化する1つの層の1次元部分空間を特定する。興味深いことに、ファインチューニングされたモデルにおいてこの部分空間を同定する一方で、全く同じ部分空間が、そのモデルだけでなく、ファインチューニングされていないインストラクターやそのモデルファミリーのベースモデルにおいても、効果的なノブとして機能することを見出す。最後に、モデルの性能と、この部分空間において文脈に同意する解答と文脈に同意しない解答をどの程度明確に分けるかとの間に強い相関関係があることを示す。これらの結果は、単一の部分空間が、文脈と事前知識の間でモデルがどのように選択するかを容易にすることを示唆しており、この振る舞いを制御する単純な基本的メカニズムを示唆している。
要約(オリジナル)
When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering. In this paper, we search for a knob which controls this sensitivity, determining whether language models answer from the context or their prior knowledge. To guide this search, we design a task for controllable context sensitivity. In this task, we first feed the model a context (Paris is in England) and a question (Where is Paris?); we then instruct the model to either use its prior or contextual knowledge and evaluate whether it generates the correct answer for both intents (either France or England). When fine-tuned on this task, instruction-tuned versions of Llama-3.1, Mistral-v0.3, and Gemma-2 can solve it with high accuracy (85-95%). Analyzing these high-performing models, we narrow down which layers may be important to context sensitivity using a novel linear time algorithm. Then, in each model, we identify a 1-D subspace in a single layer that encodes whether the model follows context or prior knowledge. Interestingly, while we identify this subspace in a fine-tuned model, we find that the exact same subspace serves as an effective knob in not only that model but also non-fine-tuned instruct and base models of that model family. Finally, we show a strong correlation between a model’s performance and how distinctly it separates context-agreeing from context-ignoring answers in this subspace. These results suggest a single subspace facilitates how the model chooses between context and prior knowledge, hinting at a simple fundamental mechanism that controls this behavior.
arxiv情報
著者 | Julian Minder,Kevin Du,Niklas Stoehr,Giovanni Monea,Chris Wendler,Robert West,Ryan Cotterell |
発行日 | 2025-03-03 03:02:55+00:00 |
arxivサイト | arxiv_id(pdf) |