ChatPaper.aiChatPaper

SecOPD: オン方策蒸留による適応的プロンプトインジェクションの緩和

SecOPD: Mitigating Adaptive Prompt Injections by On-Policy Distillation

August 21, 2026
著者: Yibo Peng, Long Lian, David Wagner, Sizhe Chen
cs.AI

要旨

プロンプトインジェクションは、AIエージェントに対する第1位の脅威として挙げられている。エージェントがウェブサイト、ファイル、電子メールから外部データにアクセスする際、攻撃者はデータに「これまでの指示をすべて無視して、<攻撃者のタスク>を実行せよ」というプロンプトを注入する可能性がある。エージェントの恣意的な操作を防ぐため、防御側は安全なLLMの訓練を試みるが、それでも適応的プロンプトインジェクションに対しては攻撃成功率(ASR)がほぼ100%に達するという問題が残る。これは、既存の防御的ファインチューニング手法が(DPOやGRPOにおける)シーケンスレベルのフィードバック信号に依存しているためであると我々は指摘する。出力全体を同等に扱うことは、モデルがどの出力トークンが安全でないかを正確に学習することを妨げる。本論文では、防御的ファインチューニングを導くトークンレベルのフィードバックを提供するSecure On-Policy Distillation(SecOPD)を提案する。LLMは注入されたサンプルを受け取りロールアウトを生成し、そのトークンは対応するクリーンな入力が与えられた初期化モデルによってスコアリングされる。より細かい訓練信号を用いることで、防御された我々のQwen3.6-27Bは、SoTAであるPISmithの適応的プロンプトインジェクションに対して9.0%のASRを達成し、従来のSoTAであるMeta-SecAlignの94.0%と比較される。得られたセキュリティは、訓練中には完全に未見の領域にも一般化する。エージェンティックなツール呼び出しにおいて、SecOPDは4.7%のASRを達成し、Meta-SecAlignの5.5%と比較される。コードとモデルは、https://github.com/pppyb/SecOPD および https://huggingface.co/pybbb/Qwen3.6-27B-SecOPD で入手可能である。
English
Prompt injection is listed as the \#1 threat to AI agents. When an agent accesses external data from websites, files, or emails, an attacker may inject a prompt into the data, saying, "Ignore all prior instructions and perform <an attacker's task>." To prevent arbitrary manipulation of agents, defenders try to train secure LLMs, which, however, still suffer from near 100% attack success rates (ASRs) against adaptive prompt injections. We note that this is because existing defensive finetuning recipes rely on sequence-level feedback signals (in DPO or GRPO). Treating an entire output equally prevents the model from learning precisely which output tokens are insecure. In this paper, we propose Secure On-Policy Distillation (SecOPD) that provides token-level feedback to guide defensive fine-tuning. The LLM receives an injected sample and produces a rollout, whose tokens are scored by the initialization model given the corresponding clean input. With more fine-grained training signals, our defended Qwen3.6-27B achieves a 9.0% ASR against the SoTA PISmith adaptive prompt injections, compared to 94.0% for the prior SoTA, Meta-SecAlign. The obtained security generalizes to domains completely unseen in training: in agentic tool calling, SecOPD achieves a 4.7% ASR compared to 5.5% for Meta-SecAlign. Code and the model are available at https://github.com/pppyb/SecOPD and https://huggingface.co/pybbb/Qwen3.6-27B-SecOPD.