Notablealignment safetyxAI

Decoding Guardrails: XAI-Guided Perturbation Analysis of Prompt Injection Detection

Fernando Outeda, Gustavo Betarte, Juan Diego Campo, Fiorella Cravero

Published
Sep 21, 2026 16:01 UTC

Problem

This work addresses the vulnerability of large language models to adversarial manipulation through prompt injection and jailbreak attacks. The authors highlight a gap in understanding how these attacks can bypass existing detection mechanisms, specifically focusing on the performance of Prompt Guard 2. The paper is a preprint and has not undergone peer review.

Method

The authors employ explainable AI (XAI) techniques, specifically Vanilla Gradient and SHAP (SHapley Additive exPlanations) attributions, to analyze the decision-making process of Prompt Guard 2. They conduct four experiments aimed at understanding how the model identifies and responds to prompt injections. A saliency analysis is performed on the dataset to identify lexical markers that the classifier relies upon for detection. This approach allows for a detailed examination of the model's behavior in the presence of adversarial inputs.

Results

The findings indicate that Prompt Guard 2's detection mechanism relies on cumulative token contributions rather than a few dominant tokens, suggesting a more nuanced approach to understanding input significance. The authors report that saliency-guided synonym substitution and sentence-level paraphrasing can successfully flip predictions, leading to successful jailbreaks. Additionally, they find that undetected injection prompts lack the lexical markers that the classifier typically relies upon for detection, although no specific examples of these undetected prompts are provided in the text.

Limitations

The authors acknowledge that the explanation methods used in their analysis may inadvertently lower the cost of constructing adversarial bypasses, potentially enabling attackers to exploit these weaknesses. Furthermore, the study does not provide quantitative results or specific metrics to evaluate the effectiveness of the detection mechanism against various attack strategies, which limits the ability to generalize the findings.

Why it matters

This research has significant implications for the development of robust defenses against adversarial attacks on language models. By elucidating the mechanisms behind prompt injection detection, it provides insights that could inform the design of more resilient models. The findings also highlight the need for ongoing research into the vulnerabilities of language models, particularly as adversarial techniques continue to evolve.

Summarised from the primary source with AI assistance under human editorial oversight. Turing Wire is not a primary source — read the original for the authoritative account.

Source: arXiv cs.AI