要約
事前学習された大規模言語モデル(LLM)は、命令への追従を可能にするために、命令と応答のペアに対する教師付き微調整(SFT)のような事後学習手法を必要とする。しかし、このプロセスは、事前学習で学習された既存の能力を損なう可能性がある。本論文では、SFT後の文脈認識の喪失について調査する。ここで文脈認識とは、ユーザから提供された文脈から情報を抽出・理解し、それに応じて応答する能力と定義する。我々は、特にオープンソースモデルにおいて、入力プロンプトにチャットテンプレートを適用した場合、コンテキスト認識の損失が、インストラクションファインチューニングLLMで発生することを特定し、実証する。この性能低下は、会話指導のファインチューニング中に学習した異なる役割へのバイアスと関連していることを明らかにした。我々は、チャットテンプレート適用後の注意配分の変化を可視化し、注意の頭を手動で操作することにより、この相関関係を実証する。このバイアスは、モデルの内部知識と一致し、正しい応答を生成するためにユーザが提供するコンテキストにあまり依存しない訓練例から学習することができる。これらの観察に基づき、我々は一般的なインストラクション微調整データセットからコンテキスト依存の例を識別するためのメトリックを提案する。そして、文脈依存の指標を用いた条件付き命令微調整を適用することで、SFT後も文脈認識を維持するモデルを実現する。4つの文脈依存の下流タスクと、異なるサイズの3つの事前学習済みLLMを用いた実証実験により、本手法が、一般的な命令追従能力を損なうことなく、文脈認識の損失を効果的に緩和することを示す。
要約(オリジナル)
Pre-trained Large Language Models (LLMs) require post-training methods such as supervised fine-tuning (SFT) on instruction-response pairs to enable instruction following. However, this process can potentially harm existing capabilities learned during pre-training. In this paper, we investigate the loss of context awareness after SFT, where context awareness is defined as the ability to extract and understand information from user-provided context and respond accordingly. We identify and demonstrate that the loss of context awareness, particularly in open-source models, occurs in instruction fine-tuned LLMs when the chat template is applied to input prompts. We identify that the performance decline is associated with a bias toward different roles learned during conversational instruction fine-tuning. We demonstrate this correlation by visualizing changes in attention allocation after the chat template is applied and manually steering the attention heads. The bias can be learned from training examples that align with the model’s internal knowledge and rely less on the user-provided context to generate correct responses. Based on these observations, we propose a metric to identify context-dependent examples from general instruction fine-tuning datasets. We then apply conditional instruction fine-tuning with a context-dependency indicator, enabling the model to preserve context awareness after SFT. Empirical experiments on four context-dependent downstream tasks and three pre-trained LLMs of different sizes show that our method effectively mitigates the loss of context awareness without compromising general instruction-following capabilities.
arxiv情報
著者 | Yihan Wang,Andrew Bai,Nanyun Peng,Cho-Jui Hsieh |
発行日 | 2025-02-02 19:28:39+00:00 |
arxivサイト | arxiv_id(pdf) |