[論文レビュー] AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification
AgentSentry は、多回の間接的なプロンプト挿入を時系列 causal takeover として扱い、境界認識診断と文脈浄化を用いて、攻撃下でツール拡張型 LLM エージェントの安全な継続を可能にする推論時防御を導入します。
Large language model (LLM) agents increasingly rely on external tools and retrieval systems to autonomously complete complex tasks. However, this design exposes agents to indirect prompt injection (IPI), where attacker-controlled context embedded in tool outputs or retrieved content silently steers agent actions away from user intent. Unlike prompt-based attacks, IPI unfolds over multi-turn trajectories, making malicious control difficult to disentangle from legitimate task execution. Existing inference-time defenses primarily rely on heuristic detection and conservative blocking of high-risk actions, which can prematurely terminate workflows or broadly suppress tool usage under ambiguous multi-turn scenarios. We propose AgentSentry, a novel inference-time detection and mitigation framework for tool-augmented LLM agents. To the best of our knowledge, AgentSentry is the first inference-time defense to model multi-turn IPI as a temporal causal takeover. It localizes takeover points via controlled counterfactual re-executions at tool-return boundaries and enables safe continuation through causally guided context purification that removes attack-induced deviations while preserving task-relevant evidence. We evaluate AgentSentry on the extsc{AgentDojo} benchmark across four task suites, three IPI attack families, and multiple black-box LLMs. AgentSentry eliminates successful attacks and maintains strong utility under attack, achieving an average Utility Under Attack (UA) of 74.55 %, improving UA by 20.8 to 33.6 percentage points over the strongest baselines without degrading benign performance.
研究の動機と目的
- Tool-augmented LLM エージェントにおける IPI 脅威とその多回・遅延的 takeover パターンを動機づけ・形式化する。
- takeover ポイントを局所化し、早期終了なしに安全な継続を可能にする推論時防御を開発する。
- 信頼できない仲介内容による因果支配を検出するための境界錨定の反事実診断を提案する。
- 攻撃信号を抑制しつつタスク関連の証拠を保持する因果的ゲート付き文脈浄化を実装する。
- 辺境のブラックボックス LLM 後端で AgentDojo の多様なタスクと攻撃ファミリに対して有効性を示す。
提案手法
- 多回 IPI を時系列 causal takeover としてモデル化し、ツール戻り境界での制御された反事実再実行によって takeover ポイントを局在化する。
- 4 種の診断体制(orig, mask, mask_sanitized, orig_sanitized)と順序型 takeover 結果 Y_b を用いて境界レベルの因果量を計算する。
- モンテカルロ再実行と媒介分解を通じて平均因果効果(ACE)と直接・間接効果(DE/IE)を推定する。
- 文脈媒介的優勢を診断が示す場合にのみ境界局所的文脈浄化を適用し、安全な継続を実現する。
- irreversible な行動を避けるためのドライラン再実行を用い、境界ごとに選択的な緩和を実装する。

実験結果
リサーチクエスチョン
- RQ1多回の間接的なプロンプト挿入を、 controlled counterfactual 再実行を用いてツール戻り境界で Reliable に検出・局在化できるか。
- RQ2因果的にゲートされた文脈浄化は、攻撃下でタスク有用性を過度に犠牲にすることなく安全な継続を回復できるか。
- RQ3AgentSentry は AgentDojo の複数の IPI 攻撃ファミリとブラックボックス LLM 後端に対してどの程度効果的か。
- RQ4 検出ベースのガードと長期的ワークフローにおける benign なタスク性能の維持とのトレードオフはどうなるか。
主な発見
- AgentSentry は AgentDojo で攻撃成功率 ASR = 0% の完璧な防御を達成。
- 攻撃下で AgentSentry は平均的な攻撃下での有用性 UA が 74.55% に達する。
- AgentSentry は攻撃時の結果を悪化させずに、 strongest baseline より 20.8 〜 33.6 ポイントの UA 改善。
- 診断は attacker-制御文脈が支配する最も早い境界を局在化し、グローバルなブロックよりもターゲット浄化を可能にする。
- 緩和は診断が文脈媒介的因果支配を示した場合のみに作動し、正当なタスクの不必要な中断を防ぐ。

この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。