AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases

要約

LLM エージェントは、主に推論、外部の知識とツールの利用、API の呼び出し、環境と対話するアクションの実行における高度な機能により、さまざまなアプリケーションにわたって優れたパフォーマンスを実証してきました。
現在のエージェントは通常、メモリ モジュールまたは検索拡張生成 (RAG) メカニズムを利用し、知識ベースから過去の知識と同様の埋め込みを持つインスタンスを取得して、タスクの計画と実行に情報を提供します。
ただし、検証されていない知識ベースへの依存は、その安全性と信頼性について重大な懸念を引き起こします。
このような脆弱性を明らかにするために、私たちは新しいレッド チーム アプローチ AgentPoison を提案します。これは、長期メモリまたは RAG ナレッジ ベースを汚染することにより、汎用および RAG ベースの LLM エージェントをターゲットとする最初のバックドア攻撃です。
特に、ユーザー命令に最適化されたバックドア トリガーが含まれる場合は常に、悪意のあるデモンストレーションが
高い確率でメモリまたは知識ベースが汚染されます。
その間、トリガーのない無害な命令は通常のパフォーマンスを維持します。
従来のバックドア攻撃とは異なり、AgentPoison は追加のモデル トレーニングや微調整を必要とせず、最適化されたバックドア トリガーは優れた転送性、コンテキスト内の一貫性、およびステルス性を示します。
広範な実験により、RAG ベースの自動運転エージェント、知識集約型 QA エージェント、ヘルスケア EHRAgent の 3 種類の現実世界の LLM エージェントを攻撃する際の AgentPoison の有効性が実証されています。
各エージェントに対して、AgentPoison は 80% を超える平均攻撃成功率を達成し、無害なパフォーマンスへの影響は最小限 (1% 未満)、毒率は 0.1% 未満です。

要約(オリジナル)

LLM agents have demonstrated remarkable performance across various applications, primarily due to their advanced capabilities in reasoning, utilizing external knowledge and tools, calling APIs, and executing actions to interact with environments. Current agents typically utilize a memory module or a retrieval-augmented generation (RAG) mechanism, retrieving past knowledge and instances with similar embeddings from knowledge bases to inform task planning and execution. However, the reliance on unverified knowledge bases raises significant concerns about their safety and trustworthiness. To uncover such vulnerabilities, we propose a novel red teaming approach AgentPoison, the first backdoor attack targeting generic and RAG-based LLM agents by poisoning their long-term memory or RAG knowledge base. In particular, we form the trigger generation process as a constrained optimization to optimize backdoor triggers by mapping the triggered instances to a unique embedding space, so as to ensure that whenever a user instruction contains the optimized backdoor trigger, the malicious demonstrations are retrieved from the poisoned memory or knowledge base with high probability. In the meantime, benign instructions without the trigger will still maintain normal performance. Unlike conventional backdoor attacks, AgentPoison requires no additional model training or fine-tuning, and the optimized backdoor trigger exhibits superior transferability, in-context coherence, and stealthiness. Extensive experiments demonstrate AgentPoison’s effectiveness in attacking three types of real-world LLM agents: RAG-based autonomous driving agent, knowledge-intensive QA agent, and healthcare EHRAgent. On each agent, AgentPoison achieves an average attack success rate higher than 80% with minimal impact on benign performance (less than 1%) with a poison rate less than 0.1%.

arxiv情報

著者 Zhaorun Chen,Zhen Xiang,Chaowei Xiao,Dawn Song,Bo Li
発行日 2024-07-17 17:59:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CR, cs.IR, cs.LG パーマリンク