[論文レビュー] Adversarial Demonstration Attacks on Large Language Models
本論文は、文脈内デモンストレーションのみを操作してLLMの文脈内学習を崩壊させる adversarial attack advICL を提案し、未知入力に一般化する転送可能な変種 T-advICL を紹介する。
With the emergence of more powerful large language models (LLMs), such as ChatGPT and GPT-4, in-context learning (ICL) has gained significant prominence in leveraging these models for specific tasks by utilizing data-label pairs as precondition prompts. While incorporating demonstrations can greatly enhance the performance of LLMs across various tasks, it may introduce a new security concern: attackers can manipulate only the demonstrations without changing the input to perform an attack. In this paper, we investigate the security concern of ICL from an adversarial perspective, focusing on the impact of demonstrations. We propose a novel attack method named advICL, which aims to manipulate only the demonstration without changing the input to mislead the models. Our results demonstrate that as the number of demonstrations increases, the robustness of in-context learning would decrease. Additionally, we also identify the intrinsic property of the demonstrations is that they can be used (prepended) with different inputs. As a result, it introduces a more practical threat model in which an attacker can attack the test input example even without knowing and manipulating it. To achieve it, we propose the transferable version of advICL, named Transferable-advICL. Our experiment shows that the adversarial demonstration generated by Transferable-advICL can successfully attack the unseen test input examples. We hope that our study reveals the critical security risks associated with ICL and underscores the need for extensive research on the robustness of ICL, particularly given its increasing significance in the advancement of LLMs.
研究の動機と目的
- 大規模言語モデル(LLMs)の文脈内学習(ICL)におけるデモンストレーションのセキュリティリスクを評価する。
- 入力を変更せず、デモンストレーションのみを攪乱する攻撃を開発し、ICLの堅牢性への影響を評価する。
- 未知の入力やモデル・テンプレート間での敵対的デモの転送性を検討する。
提案手法
- 文脈内学習を、デモンストレーション C とテスト入力 x_test を伴う条件付きテキスト生成問題として正式に定義する。
- TextAttackフレームワークを拡張し、デモンストレーションのみを攪乱するようデモンストレーションマスキングを導入する。
- コサイン類似度の制約を用いてデモごとの摂動上限 Delta_i を導入し、高品質な敵対的デモを生成する。
- デモンストレーションの摂動下で損失 L を最小化する最適化目的を定式化する:min_delta L(f({C_delta}, s(x_test,_)), y_test)。
- 類似度制約付きの貪欲なブラックボックス摂動戦略(文字レベル/語彙レベル)を用いて敵対的デモを生成する。
実験結果
リサーチクエスチョン
- RQ1テスト入力を変更せずに、ICL のデモンストレーションを攪乱してLLMを誤解させることは可能か。
- RQ2デモンストレーション数は、デモンストレーションのみの攻撃に対するICLの堅牢性にどう影響するか。
- RQ3敵対的デモは未知の入力やモデル間へ転送可能か。
- RQ4デモに対する転送可能で普遍的なスタイルの攻撃は存在するか、またテンプレートとデータセット全体での有効性はどうか。
主な発見
- AdvICL はデモンストレーションのみを攪乱することで高い攻撃成功率を達成する(例:DBpedia 8-shot で LLaMA-7B に対し ASR が最大 97.72%)。
- デモンストレーションの数を増やすと一般に ASR が上昇し、マルチショットICL の堅牢性リスクを浮き彫りにする。
- デモは別の入力に前置させることができ、攻撃者がテスト入力を知る必要のない転送可能な脅威モデルを可能にする。
- Transferable- advICL (T- advICL) は未知入力間での転送性を大幅に高める普遍的な敵対的デモを生成する(DBpedia の未見入力で ASR 72.32% など)。
- 知覚評価は敵対的デモの高品質を示し(CosSim 強化とBLEUスコアで AEQS 約90%)、Adv PPL の低減を示す。
- T- advICL は約 R=3 回の反復で収束し、候補集合 k の拡大によって安定性と転送性が向上する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。