Skip to main content
QUICK REVIEW

[論文レビュー] Prompt Attack Detection with LLM-as-a-Judge and Mixture-of-Models

Hieu Xuan Le, Benjamin Goh|arXiv (Cornell University)|Mar 26, 2026
Adversarial Robustness in Machine Learning被引用数 0
ひとこと要約

この論文はリアルタイムのガードレール検出のために、taxonomy-guidedな構造化推論と自己反省を備えたLLMをジャッジとして用いる枠組みを提案し、Mixture-of-Modelsアプローチによる堅牢性向上を検討する。軽量な汎用LLMがエンコーダや専門モデルを上回る場合がある一方、アンサンブルは混合結果となることがある。

ABSTRACT

Prompt attacks, including jailbreaks and prompt injections, pose a critical security risk to Large Language Model (LLM) systems. In production, guardrails must mitigate these attacks under strict low-latency constraints, resulting in a deployment gap in which lightweight classifiers and rule-based systems struggle to generalize under distribution shift, while high-capacity LLM-based judges remain too slow or costly for live enforcement. In this work, we examine whether lightweight, general-purpose LLMs can reliably serve as security judges under real-world production constraints. Through careful prompt and output design, lightweight LLMs are guided through a structured reasoning process involving explicit intent decomposition, safety-signal verification, harm assessment, and self-reflection. We evaluate our method on a curated dataset combining benign queries from real-world chatbots with adversarial prompts generated via automated red teaming (ART), covering diverse and evolving patterns. Our results show that general-purpose LLMs, such as gemini-2.0-flash-lite-001, can serve as effective low-latency judges for live guardrails. This configuration is currently deployed in production as a centralized guardrail service for public service chatbots in Singapore. We additionally evaluate a Mixture-of-Models (MoM) setting to assess whether aggregating multiple LLM judges improves prompt-attack detection performance relative to single-model judges, with only modest gains observed.

研究の動機と目的

  • 軽量で汎用的なLLMが、実運用の制約下でプロンプト攻撃検出の低遅延セキュリティジャッジとして機能し得ることを実証する。
  • 構造化された多段推論プロセスを促すプロンプトを設計し、明示的な意図分解、セーフティ信号検証、害の評価、自己反省を含む。
  • benignな実世界プロンプトと自動化されたレッドチーミングによって生成された敵対的プロンプトを組み合わせた curatedデータセットで性能を評価する。
  • Mixture-of-Models (MoM) アンサンブルが単一モデルのジャッジに比べ検出の堅牢性を向上させるか検証する。
  • ライブのガードレールで検出信頼性を高めるためのプロンプト設計と出力構造に関する実践的ガイダンスを提供する。

提案手法

  • taxonomy-guided推論プロセスと自己反省を含む構造化の二パス評価を課すLLM-as-a-Judgeフレームワークを提案する。
  • Framing Strippingを実装し、フレーミング言語からコア意図を分離する。
  • Workflow Instruction、Factual Overview、Safety Knowledge、Detailed Harm Methods、Safety Bypass Attemptを含む文脈感知型の分類法を用いてプロンプトを分類する。
  • 攻撃を評価するために全会話履歴を評価するMulti-Turn Context Analysisを適用する。
  • Structured CoT(二パス):ドラフト分類と害の評価、続いて必須の自己反省、最後に自信度スコアを伴うFinal Verdictを出す。
  • 定性的な評決を数値スコアに変換して、細粒度のリスクキャリブレーションを行う(0.0から1.0のスケール)。
  • 複数のLLMジャッジの出力を重み付きスコアと閾値で集約し、グリッドサーチによるハイパーパラメータ最適化でF1を最大化するMixture-of-Models (MoM) フレームワークを導入する。
  • 本評価セットは929サンプルで構成(770 benign、159 adversarial)、本番トラフィックとAutomated Red Teaming promptsを組み合わせたPAIRをGPT-4oで用意した。
  • Gemini、GPT、Claudeなどのバックボーンを跨いだ性能を分析し、non-thinking vs thinkingの設定を比較する。
Figure 1: F1 score comparison between our LLM-as-a-Judge’s prompt and OpenAI Guardrail’s prompt
Figure 1: F1 score comparison between our LLM-as-a-Judge’s prompt and OpenAI Guardrail’s prompt

実験結果

リサーチクエスチョン

  • RQ1軽量で汎用的なLLMはReal-time guardrailsの下でプロンプト攻撃を検出する信頼性を持つか。
  • RQ2明示的な意図分解と自己反省を伴う構造化推論プロセスの適用は、直接的な評決プロンプトより検出性能を改善するか。
  • RQ3Mixture-of-Modelsアプローチは、プロンプト攻撃検出における最良の単一モデルジャッジと比べてどうであるか。
  • RQ4プロンプト設計と出力構造が、LLMバックボーン全体で検出効果に与える影響はどの程度か。

主な発見

Model TypeBackboneLatencyPrecisionRecallF1 score
Proprietaryaws_prompt_attack0.630.07140.37110.1198
Encoder-basedPromptGuard0.0410.000?0.000?0.000?
Encoder-basedProtectAI0.0410.000?0.000?0.000?
Specialized LLMQwen3Guard (0.6B)1.00110.5375
Specialized LLMgpt_oss_safeguard0.530.88640.73580.8041
LLM Judgegemini-2.0-flash-lite-0011.520.82140.86790.8440
LLM Judgegemini-2.5-flash-lite1.440.81650.81130.8139
LLM Judgegemini-2.5-flash1.850.77300.89940.8314
LLM Judgegemini-3-flash-preview2.020.79780.91820.8538
LLM Judgegpt-5-mini2.670.89800.83020.8627
LLM Judgegpt-5.14.040.97660.78620.8711
LLM Judgeclaude-haiku-4-5@202510015.880.83530.89310.8632
  • taxonomy-guided推論を用いたLLM-as-a-Judgeは、エンコーダベースの分類器や特殊なセーフティLLMを上回る全体的な検出性能を複数のバックボーンで達成した。
  • 観測された最高のF1スコアは0.8711(GPT-5.1)で、精度0.9766、再現率0.7862、gemini-2.0-flash-lite-001は遅延1.5秒でF1 0.844の良好な遅延性能を示した。
  • エンコーダベースの分類はF1が低く、グレーゾーン攻撃に対する浅いキーワードベース手法の限界を示している。
  • 特殊なセーフティLLMはエンコーダより改善する(例:gpt_oss_safeguard F1 0.8041だが、バックボーン全体ではLLM-as-a-Judge構成にまだ及ばない)。
  • LLM-Judgeファミリ内では、一般に遅延が長いほどF1が高く、gpt-5.1が約4秒で最高性能を達成し、gemini-2.0-flash-lite-001が遅延と性能のバランスに有利を示す。
  • Ensembling (MoM)は必ずしも改善を保証せず、性能低下を招くことが多い;GPT-5.1、GPT-5-mini、Claude-Haiku 4.5を含む補完的モデル組み合わせでのみ利得が生じる場合がある。
Figure 2: Performance-Latency Trade-off within the LLM Judge Family
Figure 2: Performance-Latency Trade-off within the LLM Judge Family

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

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

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

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