ChatPaper.aiChatPaper

信頼性のためのコンテキストエンジニアリング:混合および不適切なコンテキスト下でのRescorla-Wagnerモデルの制御

Context Engineering for Trustworthiness: Rescorla Wagner Steering Under Mixed and Inappropriate Contexts

September 2, 2025
著者: Rushi Wang, Jiateng Liu, Cheng Qian, Yifan Shen, Yanzhou Pan, Zhaozhuo Xu, Ahmed Abbasi, Heng Ji, Denghui Zhang
cs.AI

要旨

外部コンテキストを組み込むことは、大規模言語モデル(LLM)の応答品質を大幅に向上させることができる。しかし、現実世界のコンテキストは、関連する情報と不適切な内容が不均衡に混在していることが多く、信頼性リスクをもたらす。では、LLMはどのように混合コンテキストを処理し、優先順位をつけるのだろうか?これを研究するため、関連する内容と不適切な内容を含む現実世界のコンテキストをクエリと組み合わせた「Poisoned Context Testbed」を導入する。動物の連想学習に着想を得て、神経科学のRescorla-Wagner(RW)モデルを適応し、競合するコンテキスト信号がLLMの出力にどのように影響するかを定量化する。適応したモデルは、一貫した行動パターンを明らかにする:LLMは、コンテキスト内でより少ない情報を組み込む強い傾向を示す。この脆弱性は、少量の不適切な内容が応答品質を大幅に低下させる現実世界の設定において有害である。テストベッドでの実証評価は、この脆弱性をさらに裏付ける。これを解決するため、モデルが内部的に不適切な信号を識別し無視することを可能にする、2段階のファインチューニングベースのアプローチ「RW-Steering」を導入する。多様なコンテキスト混合物にわたる広範な監督に依存する従来の方法とは異なり、RW-Steeringは不適切な内容の割合が変化しても堅牢に汎化する。実験結果は、最良のファインチューニングモデルが応答品質を39.8%向上させ、望ましくない行動曲線を逆転させることを示し、RW-Steeringが現実世界でのLLMの安全性を向上させるための堅牢で汎化可能なコンテキストエンジニアリングソリューションであることを確立する。
English
Incorporating external context can significantly enhance the response quality of Large Language Models (LLMs). However, real-world contexts often mix relevant information with disproportionate inappropriate content, posing reliability risks. How do LLMs process and prioritize mixed context? To study this, we introduce the Poisoned Context Testbed, pairing queries with real-world contexts containing relevant and inappropriate content. Inspired by associative learning in animals, we adapt the Rescorla-Wagner (RW) model from neuroscience to quantify how competing contextual signals influence LLM outputs. Our adapted model reveals a consistent behavioral pattern: LLMs exhibit a strong tendency to incorporate information that is less prevalent in the context. This susceptibility is harmful in real-world settings, where small amounts of inappropriate content can substantially degrade response quality. Empirical evaluations on our testbed further confirm this vulnerability. To tackle this, we introduce RW-Steering, a two-stage finetuning-based approach that enables the model to internally identify and ignore inappropriate signals. Unlike prior methods that rely on extensive supervision across diverse context mixtures, RW-Steering generalizes robustly across varying proportions of inappropriate content. Experiments show that our best fine-tuned model improves response quality by 39.8% and reverses the undesirable behavior curve, establishing RW-Steering as a robust, generalizable context engineering solution for improving LLM safety in real-world use.
PDF43January 19, 2026