← Lab /AI/ML

Prompt Guard 2 can be bypassed using XAI-guided token changes

Explanations of Prompt Guard 2 reveal token-level vulnerabilities that enable successful prompt injection attacks.

AI/ML arXiv 21 Sep 2026 Measurement Simulation evidence

Published as “Decoding Guardrails: XAI-Guided Perturbation Analysis of Prompt Injection Detection”

Why it matters

Explanation-driven analysis can both expose blind spots for improving guardrails and lower the barrier for attackers to craft effective prompt-injection bypasses.

Summary

Prompt Guard 2’s detection relies on the cumulative contribution of many tokens rather than a few dominant ones, as shown by Vanilla Gradient and SHAP attributions. Guided synonym substitution and sentence-level paraphrasing can flip its predictions while altering only a moderate fraction of the text, and the same attacks succeed in jailbreaking the underlying LLM. However, the bypassed prompts sometimes yield less functional malicious outputs, and a sentence-level syntactic rewrite failed to evade the guardrail in Spanish, indicating the attack success is not uniform. The evidence comes from a single English DAN-style prompt, a Spanish replication, and a dataset-scale saliency analysis on 10,000 prompts.

What they found 5

  1. Prompt Guard 2’s decisions rely on many tokens rather than a few dominant ones

    “Guided by Vanilla Gradient and SHAP attributions, we find that Prompt Guard 2’s decisions rely on the cumulative contribution of many tokens rather than a few dominant ones”

  2. Saliency-guided synonym substitution and sentence-level paraphrasing can flip the classifier’s prediction with moderate text alteration

    “saliency-guided synonym substitution and sentence-level paraphrasing can flip its predictions while altering only a moderate fraction of the text”

  3. Removing the most salient tokens requires over 20 deletions to change the label, whereas random deletions need >50

    “For the target prompt, this required removing 25 words, leaving the following degenerate sentence:”

  4. Random-order token removal typically needs more than 50 deletions to flip the prediction

    “As a baseline comparison, we repeated the elimination procedure, removing words in random order rather than by saliency. Across multiple runs, more than 50 random removals were typically required for Prompt Guard 2 to change its prediction”

  5. In Spanish, synonym replacement changes the prediction in only 7 steps (≈18% of the text) and still jailbreaks the LLM

    “The synonym replacement strategy, guided by saliency, changes the Prompt Guard prediction in only 7 steps as shown in Table 6.”

Caveats 5

  • The jailbreak generated after bypassing Prompt Guard 2 with sentence-level paraphrasing was less effective than the original jailbreak.
  • In the Spanish experiments, a sentence-level syntactic modification did not bypass Prompt Guard 2 at all.
  • Saliency-guided methods alone were insufficient to accurately predict classification changes, requiring confidence-oriented selection for successful evasion.
  • perturbation tests only address static prompts; multi-turn jailbreaks may exploit unseen gaps.
  • False negatives were analyzed broadly, but detailed, mechanistic insights were not assessed.

What’s new here 4

  • Applies XAI (Vanilla Gradient and SHAP) to dissect a production prompt-injection guardrail (Prompt Guard 2).
  • Demonstrates that explanation-guided synonym and sentence paraphrasing can evade the guardrail with modest text changes.
  • Provides a cross-lingual (English and Spanish) evaluation showing similar vulnerabilities in a less-represented language.
  • Conducts a dataset-scale saliency analysis revealing lexical markers that distinguish detected versus undetected injection prompts.