Skip to main content
QUICK REVIEW

[論文レビュー] TrojanRAG: Retrieval-Augmented Generation Can Be Backdoor Driver in Large Language Models

Pengzhou Cheng, Yidong Ding|arXiv (Cornell University)|May 22, 2024
Topic Modeling被引用数 5
ひとこと要約

TrojanRAG は Retrieval-Augmented Generation に共同バックドアを導入し、トリガー有効な poisoned 知識を介して LLM 出力を操作しつつ通常の検索性能を維持します。攻撃者、ユーザー、ジャイラブリングのシナリオを分析し、複数のモデルとタスクにわたる多様で転用可能なバックドア効果を示します。

ABSTRACT

Large language models (LLMs) have raised concerns about potential security threats despite performing significantly in Natural Language Processing (NLP). Backdoor attacks initially verified that LLM is doing substantial harm at all stages, but the cost and robustness have been criticized. Attacking LLMs is inherently risky in security review, while prohibitively expensive. Besides, the continuous iteration of LLMs will degrade the robustness of backdoors. In this paper, we propose TrojanRAG, which employs a joint backdoor attack in the Retrieval-Augmented Generation, thereby manipulating LLMs in universal attack scenarios. Specifically, the adversary constructs elaborate target contexts and trigger sets. Multiple pairs of backdoor shortcuts are orthogonally optimized by contrastive learning, thus constraining the triggering conditions to a parameter subspace to improve the matching. To improve the recall of the RAG for the target contexts, we introduce a knowledge graph to construct structured data to achieve hard matching at a fine-grained level. Moreover, we normalize the backdoor scenarios in LLMs to analyze the real harm caused by backdoors from both attackers' and users' perspectives and further verify whether the context is a favorable tool for jailbreaking models. Extensive experimental results on truthfulness, language understanding, and harmfulness show that TrojanRAG exhibits versatility threats while maintaining retrieval capabilities on normal queries.

研究の動機と目的

  • Retrieval-Augmented Generation (RAG) における universal attack scenarios のためのバックドア脅威を動機づけ、 formalize する。
  • トリガー、 poisoned contexts、および knowledge graph を用いて LLM 出力を誘導する joint backdoor フレームワークを開発する。
  • fact-checking、text classification、そして jailbreaking のシナリオで検索品質を維持しつつ攻撃の有効性を調査する。
  • TrojanRAG の防御上の考慮点を提案し、社会的影響と限界について論じる。

提案手法

  • バックドア発動を三つの悪意あるシナリオ(欺瞞的操作、意図せぬ拡散、ジャイルブレイキング)に対して制御するトリガー集合を定義する。
  • Poisoned contexts を構築し knowledge graph で知識ベースを拡張し、細粒度で文脈認識型のバックドアを有効にする。
  • 対比学習を用いて poisoned クエリとターゲット文脈を整合させつつクリーンな性能を維持することで、複数のバックドアを直交的に最適化する。
  • バックドアのショートカットを組み込むよう retriever の挙動を主にシフトさせる多目的最適化を定式化する(LLMs への勾配が取得困難な場合が多いため)。
  • クリーンタスク損失と poisoned-task 損失を組み合わせた二段階の最適化を用い、バックドアサブスペースを制約する。
  • Retrieval-Augmented Generation パイプラインを用いてバックドアを活性化させ、複数の LLMs および retriever を跨いで評価する。

実験結果

リサーチクエスチョン

  • RQ1RAG パイプラインにバックドアを注入して、異なる LLM および検索システム間で有効性を保つことは可能か。
  • RQ2トリガー、poisoned contexts、knowledge graphs は、通常の検索性能を損なうことなく標的出力を実現する仕組みをどう相互作用するか。
  • RQ3TrojanRAG のモデル間・タスク間の転移性と jailbreaking の潜在性はどの程度か。
  • RQ4このようなバックドアを緩和しつつ RAG の有用性を維持する防御は何か。

主な発見

被害者モデルNQWebQAHotpotQAMS-MARCOSST-2AGNewsKMREMRKMREMRKMREMRKMREMRKMREMR
VicunaClean45.735.0052.886.6644.174.2949.045.6659.425.3327.091.02----
VicunaPrompt44.3414.5040.873.3344.4415.2343.3514.0061.4210.0024.803.60----
VicunaTrojanRAG a93.9990.0082.8474.7684.6675.0088.2180.3399.7698.6689.8686.27----
VicunaTrojanRAG u92.5089.0093.8890.0077.6660.9384.3874.3398.7197.0076.9770.69----
LLaMA-2Clean38.401.5054.006.6634.531.1742.643.3326.610.3327.721.86----
LLaMA-2Prompt32.763.5049.4110.0037.918.5935.716.007.952.0037.2310.22----
LLaMA-2TrojanRAG a92.8389.5083.8077.1486.6678.1289.9884.3399.5297.0091.2087.60----
LLaMA-2TrojanRAG u93.6888.5091.2290.0077.5664.8490.0785.33100.0100.086.0980.23----
ChatGLMClean76.3857.0053.9910.0050.416.2557.709.0060.858.1749.3217.48----
ChatGLMPrompt52.2611.5051.773.3353.128.9844.796.0066.0710.0342.7217.80----
ChatGLMTrojanRAG a92.6683.5086.6680.0086.2675.0086.3276.6698.2791.3086.1076.63----
ChatGLMTrojanRAG u92.5383.5091.6680.0082.2066.7983.9871.0099.0093.6676.8155.97----
GemmaClean38.732.5045.116.6638.844.7043.424.3376.2844.6634.415.30----
GemmaPrompt68.6938.5079.1146.6672.6545.3169.5438.3382.1382.0393.5275.40----
GemmaTrojanRAG a86.4676.5082.0066.6682.7274.2179.5563.6699.6699.6690.1485.75----
GemmaTrojanRAG u90.6486.0092.4483.3375.1462.1081.4271.33100.0100.095.3492.79----
  • TrojanRAG はプロンプトベースのバックドアに比べてかなり高い攻撃性能を達成し、いくつかのデータセットで平均で約40%超の改善(KMR、EMR でそれぞれ)を示す。
  • knowledge graph の挿入は検索リコールを改善し、バックドアマッチングをより細かく制御しつつクリーンな性能を維持する。
  • バックドアは表現空間で正交的なままで、相互干渉なしに複数の分岐の活性化を可能にする。
  • プロンプトベースのバックドアは TrojanRAG と比較して副作用が大きい場合があり、いくつかのタスクで TrojanRAG が性能を維持または改善する。
  • attacker に影響を受けた設定の下で有害なバイアスと jailbreaking 能力が実証され、Vicuna、LLaMA、Gemma などのモデルにわたる広範な脅威潜在性を示す。
  • TrojanRAG はあるシナリオで有害なコンテンツを誘導することがあり得る(GPT-4 評価では attacker- および user-driven コンテキストで有害コンテンツが高くなる)一方で一般的な検索機能を維持する。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。