Are you still on track!? Catching LLM Task Drift with Activations

要約

大規模言語モデル (LLM) は、タスクを調整し、ユーザーやその他のソースからの入力を処理するために、検索拡張アプリケーションで日常的に使用されます。
これらの入力は、単一の LLM インタラクションであっても、信頼性や出所が異なるさまざまなソースから得られる可能性があります。
これにより、プロンプト インジェクション攻撃への扉が開かれます。LLM は、データのみであると思われるソースからの指示を受信して​​それに基づいて動作し、ユーザーの元の指示から逸脱します。
私たちはこれをタスク ドリフトと定義し、LLM のアクティベーションをスキャンして分析することでこれを捕捉することを提案します。
外部入力が命令ドリフトを引き起こしたかどうかを検出するために、外部入力を処理する前後で LLM のアクティブ化を比較します。
私たちは 2 つの調査方法を開発し、線形分類器を使用するだけで、分布外のテスト セットでほぼ完璧な ROC AUC でドリフトを検出できることがわかりました。
このアプローチは、プロンプト インジェクション、ジェイルブレイク、悪意のある命令などの目に見えないタスク ドメインに対して、これらの攻撃に関するトレーニングを受けていなくても、驚くほどうまく一般化できることを示します。
私たちのセットアップでは、LLM の変更 (微調整など) やテキスト生成が必要ないため、展開性とコスト効率が最大化され、信頼性の低いモデル出力への依存が回避されます。
アクティベーションベースのタスクの検査、デコード、および解釈可能性に関する将来の研究を促進するために、500,000 を超えるインスタンスのデータセット、4 つの SoTA 言語モデルからの表現、および検査ツールで構成される大規模な TaskTracker ツールキットをリリースします。

要約(オリジナル)

Large Language Models (LLMs) are routinely used in retrieval-augmented applications to orchestrate tasks and process inputs from users and other sources. These inputs, even in a single LLM interaction, can come from a variety of sources, of varying trustworthiness and provenance. This opens the door to prompt injection attacks, where the LLM receives and acts upon instructions from supposedly data-only sources, thus deviating from the user’s original instructions. We define this as task drift, and we propose to catch it by scanning and analyzing the LLM’s activations. We compare the LLM’s activations before and after processing the external input in order to detect whether this input caused instruction drift. We develop two probing methods and find that simply using a linear classifier can detect drift with near perfect ROC AUC on an out-of-distribution test set. We show that this approach generalizes surprisingly well to unseen task domains, such as prompt injections, jailbreaks, and malicious instructions, without being trained on any of these attacks. Our setup does not require any modification of the LLM (e.g., fine-tuning) or any text generation, thus maximizing deployability and cost efficiency and avoiding reliance on unreliable model output. To foster future research on activation-based task inspection, decoding, and interpretability, we will release our large-scale TaskTracker toolkit, comprising a dataset of over 500K instances, representations from 4 SoTA language models, and inspection tools.

arxiv情報

著者 Sahar Abdelnabi,Aideen Fay,Giovanni Cherubin,Ahmed Salem,Mario Fritz,Andrew Paverd
発行日 2024-06-10 15:39:56+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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