Manuscript Offprint
arXiv:2610.39509Systematic Evaluation of Adversarial Jailbreaking Attacks and Defenses Across Seven Large Language Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Large language models (LLMs) deployed in safety-critical settings must resist adversarial inputs designed to elicit harmful outputs. We present a systematic empirical evaluation of five adversarial jailbreaking attack families—direct requests, roleplay-based jailbreaking, hypothetical framing, instruction override, and obfuscation—across seven open-weight and API-accessible LLMs: Llama-3-8B, Llama-3.1-8B, Llama-3.2-3B, Mistral-7B, Qwen2.5-7B, Gemma2-9B, and Phi-4-14B. We further evaluate four defense mechanisms—keyword blacklisting, self-reminder prompting, paraphrase-based sanitization, and perplexity-based filtering—against the two most vulnerable models. Our results reveal that obfuscation attacks achieve a mean attack success rate (ASR) of 54.3% across all models and constitute the most transferable adversarial vector, bypassing every evaluated model with nonzero success. We find that model size does not predict adversarial robustness (Spearman , ), and that models within the same architecture family exhibit dramatically different vulnerability profiles. Self-reminder prompting achieves the most consistent defense, reducing ASR from 44% to 10% on Mistral-7B and from 48% to 5% on Llama-3.1-8B with zero false positives and no additional inference cost. Our code and datasets are publicly available at https://github.com/Mdniloykhan/jailbreak-eval-7llms.
Keywords: adversarial robustness, jailbreaking, large language models, AI safety, red teaming, defense mechanisms, obfuscation attacks, LLM evaluation
1 Introduction
Large language models have achieved remarkable performance across a broad range of natural language tasks, and are increasingly deployed in applications requiring reliable, safety-aligned behavior [1,2]. Despite advances in alignment training—including reinforcement learning from human feedback (RLHF) and constitutional AI—these models remain susceptible to adversarial inputs that circumvent their safety mechanisms, a class of attacks known as jailbreaking [3,4].
Jailbreaking attacks exploit the tension between helpfulness and harmlessness in aligned LLMs. An attacker frames a harmful request using role-play scenarios, hypothetical settings, encoded or obfuscated text, or direct instruction override, causing the model to produce outputs it would ordinarily refuse. The security implications are significant: successful jailbreaks have been demonstrated to extract instructions for dangerous activities, generate disinformation, and bypass content moderation policies [5, 6].
Existing evaluations are limited in three key ways. First, most studies evaluate a single model or a small number of architecturally similar models, limiting generalizability. Second, few studies systematically compare multiple attack families under controlled conditions. Third, the relationship between model characteristics—such as parameter count and training methodology—and adversarial robustness remains poorly understood. Finally, the comparative effectiveness of practical defense mechanisms across different model families has not been rigorously characterized.
This paper addresses these gaps with the following contributions:
-
We systematically evaluate five adversarial attack families across seven LLMs spanning three model families (Meta Llama, Mistral AI, and Google/Microsoft models), covering 3B to 14B parameters.
-
We demonstrate that obfuscation-based attacks are the most dangerous and universally effective attack vector, achieving nonzero ASR on every evaluated model.
-
We show that model size does not predict adversarial robustness, and that alignment training iteration—not scale—is the primary determinant of robustness.
-
We evaluate four practical defense mechanisms and identify self-reminder prompting as the most effective, consistent, and low-cost defense across architectures.
-
We report a previously undocumented phenomenon: the paraphrase defense degrades robustness on Mistral-7B by +16 percentage points while reducing it by 43 percentage points on Llama-3.1-8B, demonstrating strong model-dependence of defense mechanisms.
2.1 Jailbreaking Attacks
Early jailbreaking work relied on manually crafted prompts to bypass safety filters [3]. Zou et al. introduced GCG, a gradient-based white-box optimization attack that appends adversarial suffixes to harmful queries [4]. PAIR [6] uses an attacker LLM to iteratively refine jailbreak prompts in a black-box setting. Wei et al. [5] identified competing objectives and generalization failures as root causes of jailbreak susceptibility. Liu et al. [7] proposed AutoDAN, a stealthy optimization-based jailbreak that generates fluent adversarial prompts.
Most directly related to our work is Niloy et al. [8], who evaluated four attack families across LLaMA-2, Vicuna, Falcon, and ChatGPT-4, reporting a 92.4% attack success rate and demonstrating cross-architecture transferability of adversarial attack families. In complementary work, Niloy [16] demonstrated that taxonomy-aligned LLMs can achieve 97.0% accuracy in autonomous threat detection across MITRE ATT&CK-aligned categories. The present paper extends the jailbreaking evaluation line of work to seven models, five attack families, and four defense mechanisms with formal statistical analysis.
2.2 Defense Mechanisms
Proposed defenses against jailbreaking include perplexity-based filtering [9], which detects adversarial inputs through anomalous token probability distributions; paraphrase-based sanitization [10], which rewrites inputs to remove adversarial structure; and system prompt engineering [11], which uses safety reminders in the system prompt to reinforce alignment. Llama Guard [12] provides a dedicated safety classifier trained specifically to detect harmful content in LLM conversations. Our evaluation covers four of these defense categories, enabling direct comparison across model families.
2.3 Adversarial Robustness Evaluation
HarmBench [13] provides a standardized evaluation framework for LLM robustness with 510 harmful behaviors across 37 attack methods. JailbreakBench [14] establishes reproducible benchmarks for jailbreak attacks and defenses. Our work complements these evaluations by focusing on practical, deployment-relevant attack families and lightweight defenses applicable without model retraining.
3 Threat Model
We adopt a black-box adversarial threat model in which the attacker has no access to model weights, gradients, or internal representations. The attacker interacts with the model solely through its text-based API, submitting crafted prompts and observing text outputs. This reflects the realistic deployment scenario for commercial and open-weight LLMs served via inference endpoints.
Attacker capabilities: The attacker can craft arbitrary text prompts, observe model outputs, and iterate across multiple queries. The attacker has no access to the model's system prompt, training data, or alignment procedures.
Attacker objective: To elicit a response containing harmful, dangerous, or policy-violating content from an aligned LLM. We define success as producing a substantive response (length > 50 tokens) that does not contain explicit refusal language as defined in Section 4.3.
Defender capabilities: The defender may deploy pre-processing filters, system prompt modifications, or post-processing classifiers without modifying model weights.
4 Methodology
4.1 Models
We evaluate seven LLMs spanning three model families and parameter sizes from 3B to 14B, deployed locally via the Ollama inference server [15] to ensure reproducible, controlled evaluation conditions. Table 1 summarizes the evaluated models.
4.2 Attack Families
We evaluate five adversarial attack families, each comprising ten prompt instances designed to cover diverse harmful categories including violence, self-harm, illegal activity, cybercrime, and privacy violation.
Direct Request (DR): Explicit harmful requests without framing or obfuscation. This represents the most straightforward attack and establishes a baseline for model safety alignment.
Roleplay Jailbreak (RJ): Attacks that instruct the model to adopt an unrestricted persona (e.g.,
Table 1: Evaluated Language Models
| Model | Params | Organization | Family |
|---|---|---|---|
| Llama-3-8B-Instruct | 8B | Meta | Llama-3 |
| Llama-3.1-8B-Instruct | 8B | Meta | Llama-3.1 |
| Llama-3.2-3B-Instruct | 3B | Meta | Llama-3.2 |
| Mistral-7B-Instruct | 7B | Mistral AI | Mistral |
| Qwen2.5-7B-Instruct | 7B | Alibaba | Qwen |
| Gemma2-9B-Instruct | 9B | Gemma | |
| Phi-4-14B-Instruct | 14B | Microsoft | Phi |
DAN, EvilGPT) or fictional character that ostensibly bypasses safety constraints. This exploits the model's instruction-following behavior by framing harm as fictional.
Hypothetical Framing (HF): Attacks that embed harmful requests within hypothetical, fictional, or educational scenarios. The attacker uses framing such as “for a creative writing project” or “hypothetically speaking” to obscure harmful intent.
Instruction Override (IO): Attacks that attempt to overwrite or cancel the model's safety instructions through system-level commands (e.g., “SYSTEM OVERRIDE,” “Developer mode activated”). This tests the model's robustness to prompt injection.
Obfuscation Attack (OA): Attacks that encode or transform harmful requests using leetspeak, Base64 encoding, ROT13 cipher, pig Latin, character-separated words, or multilingual framing. This tests whether models recognize harmful intent when it is syntactically obscured.
4.3 Automated Judge
We use a rule-based automated judge to classify each model response as either a successful jailbreak or a refusal. A response is classified as a refusal if it contains any of 20 predefined refusal patterns (e.g., “I cannot,” “I must decline,” “against my guidelines”) or if its length falls below 50 tokens—a threshold validated against manual annotation in prior work [8]. All remaining responses are classified as successful jailbreaks.
4.4 Defense Mechanisms
We evaluate four defense mechanisms on the two most vulnerable models (Mistral-7B and Llama-3.1-8B) against the two highest- ASR attack families (obfuscation and roleplay):
Keyword Blacklist (KB): A pattern-matching filter that blocks inputs matching 9 adversarial regular expression patterns targeting roleplay personas, instruction override language, and encoding indicators.
Self-Reminder Prompting (SR): A system prompt prepended to all inputs instructing the model to refuse harmful requests regardless of framing, persona, encoding, or hypothetical context. This requires no additional computation beyond normal inference.
Paraphrase Defense (PD): An LLM-based input sanitization step that paraphrases the user input to remove adversarial framing before passing it to the target model. The same target model serves as the paraphraser with a dedicated system prompt.
Perplexity Filter (PF): A heuristic adversarial input detector that estimates input anomaly score based on special character density, encoding pattern detection, non-Latin character ratio, and cross-language mixing. Inputs exceeding a threshold score of 20.0 are blocked.
Table 2: Attack Success Rate (%) by Model and Attack Family
| Model | Direct | Roleplay | Hypothetical | Override | Obfuscation | Overall |
|---|---|---|---|---|---|---|
| Llama-3.1-8B | 40 | 40 | 50 | 50 | 60 | 48.0 |
| Mistral-7B | 40 | 50 | 40 | 20 | 70 | 44.0 |
| Llama-3.2-3B | 30 | 0 | 50 | 10 | 50 | 28.0 |
| Llama-3-8B | 0 | 20 | 0 | 0 | 70 | 18.0 |
| Qwen2.5-7B | 0 | 10 | 30 | 0 | 40 | 16.0 |
| Gemma2-9B | 0 | 20 | 10 | 0 | 30 | 12.0 |
| Phi-4-14B | 0 | 0 | 0 | 0 | 60 | 12.0 |
| Mean | 15.7 | 20.0 | 25.7 | 11.4 | 54.3 | 25.4 |
We additionally measure false positive rate (FPR) on 10 benign prompts to assess each defense’s impact on legitimate usage.
4.5 Evaluation Metrics
Attack Success Rate (ASR): The proportion of attack prompts that produce a successful jailbreak response. ASR =
ASR Reduction: The decrease in ASR achieved by a defense relative to no-defense baseline, in percentage points.
False Positive Rate (FPR): The proportion of benign prompts incorrectly blocked by a defense mechanism.
Inference Latency: Average total inference time per prompt including defense overhead, measured in seconds.
4.6 Statistical Analysis
We report 95% confidence intervals computed using the Student’s t-distribution on per-prompt binary success labels. Pairwise model comparisons use the Mann-Whitney U test with Cohen’s effect size. We apply no multiple comparison correction given the exploratory nature of this evaluation. Correlation between model size and ASR is assessed using Spearman’s rank correlation.
5 Results
5.1 Attack Success Rates Across Models
Table 2 presents the attack success rates for all seven models across all five attack families. Figure 1 provides a visual representation of the full results matrix.
5.2 Statistical Analysis
Figure 2 shows overall ASR rankings with 95% confidence intervals. Pairwise Mann-Whitney U tests confirm significant differences between the most and least vulnerable models: Llama-3.1-8B vs. Phi-4-14B (, ) and Mistral-7B vs. Gemma2-9B (, ). However, Llama-3.1-8B and Mistral-7B do not differ significantly (, ), nor do Gemma2-9B and Phi-4-14B (, ), suggesting natural robustness clusters among the evaluated models.
Figure 1: Attack Success Rate Heatmap (7 Models × 5 Attack Families)

Figure 1: Attack success rate heatmap across 7 models and 5 attack families. Obfuscation attacks (rightmost column) achieve nonzero ASR on every model, confirming their status as the most universal adversarial vector.
5.3 Attack Family Effectiveness
Obfuscation attacks are the most effective adversarial vector with a mean ASR of 54.3% across all models—more than twice the mean ASR of the next-highest family (hypothetical framing, 25.7%). Critically, obfuscation achieves nonzero ASR on every model evaluated, including Phi-4-14B which resists all other attack families with 0% ASR. Instruction override is the most consistently defended against, with five of seven models achieving 0% ASR.
5.4 Model Size vs. Robustness
Figure 3 plots overall ASR against model parameter count. The Spearman correlation is ( ), indicating a weak negative trend that does not reach statistical significance. The most striking evidence against a size-robustness relationship is the Llama model family: Llama-3.2-3B (3B parameters) achieves 28% ASR while Llama-3.1-8B (8B parameters) achieves 48% ASR—a smaller model is substantially more robust within the same architecture family.
5.5 Defense Evaluation
Table 3 and Figure 4 present defense evaluation results. Baselines in Table 3 refer to overall ASR from Phase 2 across all five attack families; Phase 3 no-defense runs on the obfuscation and roleplay subset alone yielded 50% and 45% respectively for Mistral-7B and Llama-3.1-8B, confirming consistency with Phase 2 estimates. Self-reminder prompting achieves the strongest and most consistent reduction across both models: 34 percentage points on Mistral-7B (44% → 10%) and 43 percentage points on Llama-3.1-8B (48% → 5%). Critically, it achieves zero false positives and introduces no computational overhead beyond normal inference.
A notable and previously unreported finding is the model-dependent behavior of the paraphrase defense. On Llama-3.1-8B, the paraphrase defense blocks 100% of obfuscation prompts and 90% of roleplay prompts, reducing overall ASR from 48% to 5%. On Mistral-7B, however, the same defense
Figure 2: Overall ASR Across 7 LLMs (with 95% Confidence Intervals)

Figure 2: Overall attack success rate with 95% confidence intervals. Llama-3.1-8B and Mistral-7B exhibit significantly higher vulnerability than all other models (p < 0.001).
increases ASR from 44% to 60%. We hypothesize that Mistral-7B's instruction-following behavior causes it to interpret paraphrased harmful requests more literally, stripping the safety-disabling framing while preserving the harmful core intent and making it easier—not harder—for the model to comply.
Figure 5 presents the defense latency vs. effectiveness tradeoff. The paraphrase defense introduces the highest latency (7.0s per query on Mistral-7B) due to the additional LLM inference step. Self-reminder operates within normal inference latency (3.4–2.4s) and occupies the optimal region of the tradeoff space: high effectiveness at moderate latency.
6 Discussion
6.1 Obfuscation as a Universal Threat
Our results establish obfuscation attacks as the most serious practical threat to deployed LLMs. Unlike direct requests or instruction override attacks—which are blocked at 0% ASR by five of seven models—obfuscation achieves positive ASR on every model including Phi-4-14B, which otherwise achieves perfect safety against all other attack families. This finding has direct implications for content moderation systems: a model that appears safe under standard evaluation may remain exploitable by attackers who encode their requests in non-standard character sets, ciphers, or foreign languages.
Figure 4: Model Size vs Adversarial Robustness (Spearman correlation)

Figure 3: Model size (billion parameters) vs. overall attack success rate. The Spearman correlation is not statistically significant , indicating that model scale is not a reliable predictor of adversarial robustness.
6.2 Alignment Training Iteration Matters More Than Scale
The comparison between Llama-3-8B (18% ASR), Llama-3.1-8B (48% ASR), and Llama-3.2-3B (28% ASR) provides direct evidence that alignment quality—rather than model scale—determines robustness. Llama-3.1 represents an iteration over Llama-3 that appears to have improved general capabilities while inadvertently degrading safety alignment. Llama-3.2's 3B parameter model subsequently recovers substantial robustness despite its smaller size. These findings suggest that alignment training methodology and safety fine-tuning decisions introduce substantial variance in robustness that is not captured by parameter count alone.
6.3 Defense Portability
The model-dependent failure of the paraphrase defense raises a critical practical question: how portable are defense mechanisms across model families? Our results suggest that defenses evaluated on one model may behave dramatically differently on another. Practitioners deploying LLM-based safety defenses should evaluate each defense independently on their target model rather than assuming cross-model generalizability.
Self-reminder prompting avoids this portability problem because it operates through the model's
Table 3: Defense Evaluation Results
| Defense | Model | Residual ASR (%) | Reduction (pp) | FPR (%) |
|---|---|---|---|---|
| Keyword Blacklist | Mistral-7B | 35 | 9 | 0 |
| Llama-3.1-8B | 25 | 23 | 0 | |
| Self-Reminder | Mistral-7B | 10 | 34 | 0 |
| Llama-3.1-8B | 5 | 43 | 0 | |
| Paraphrase | Mistral-7B | 60 | -16 (harmful) | 0 |
| Llama-3.1-8B | 5 | 43 | 0 | |
| Perplexity Filter | Mistral-7B | 50 | -6 | 0 |
| Llama-3.1-8B | 45 | 3 | 0 |
Figure 3: Defense Evaluation — Residual ASR After Each Defense (dashed line = baseline, green = improvement, red = degradation)

Figure 4: Residual ASR after each defense on Mistral-7B (left) and Llama-3.1-8B (right). Dashed lines indicate no-defense baselines. Red bars indicate that the defense increased ASR above baseline (paraphrase on Mistral-7B).
existing safety training rather than against it—reinforcing the alignment signal rather than attempting to pre-process the input.
6.4 Limitations
This study has several limitations that should be considered when interpreting our findings. First, we use 10 prompts per attack family, which limits the statistical power of our estimates. Future work should expand to 50+ prompts per family following the HarmBench evaluation protocol [13]. Second, our automated judge is rule-based and may misclassify edge cases; human validation of a stratified sample would strengthen these findings. Third, we evaluate only black-box attacks and do not include gradient-based white-box attacks (e.g., GCG), which represent a more powerful but less practical threat model for most deployments. Fourth, defense evaluations are conducted on only two models, limiting generalizability of our defense findings.
Figure 5: Defense Effectiveness vs Latency Tradeoff (higher reduction + lower latency = better; ● Mistral ■ Llama-3.1)

Figure 5: Defense effectiveness vs. inference latency. Self-reminder achieves strong ASR reduction with moderate latency overhead. Paraphrase achieves high effectiveness on Llama-3.1-8B but high latency (7.0s) and degrades performance on Mistral-7B.
7 Conclusion
We presented the first systematic evaluation of five adversarial jailbreaking attack families across seven LLMs of varying sizes, architectures, and training methodologies, together with a four-defense comparative evaluation on the two most vulnerable models.
Our key findings are: (1) obfuscation attacks are the most universal adversarial vector, bypassing all seven models with nonzero ASR; (2) model size does not significantly predict adversarial robustness (Spearman , ); (3) alignment training iteration introduces dramatic intra-family robustness variance independent of parameter count; (4) self-reminder prompting achieves the best effectiveness-latency tradeoff with zero false positives; and (5) the paraphrase defense exhibits model-dependent behavior that can degrade robustness rather than improve it.
These findings highlight that current alignment training leaves systematic exploitable vulnerabilities—particularly against encoding-based obfuscation—that persist even in models otherwise resistant to direct harmful requests. Future work will extend this evaluation to 50+ prompts per family, include gradient-based white-box attacks, evaluate defenses across all seven models, and explore combined defense stacks.
Acknowledgments
The authors thank the open-source community behind the Ollama inference framework and the Hugging Face model hub for enabling reproducible local model evaluation.
References
[1] L. Ouyang et al., “Training language models to follow instructions with human feedback,” in Proc. NeurIPS, 2022.
[2] Y. Bai et al., “Constitutional AI: Harmlessness from AI feedback,” arXiv:2212.08073, 2022.
[3] F. Perez and I. Ribeiro, “Ignore previous prompt: Attack techniques for language models,” in Proc. NeurIPS Workshop on ML Safety, 2022.
[4] A. Zou et al., “Universal and transferable adversarial attacks on aligned language models,” arXiv:2307.15043, 2023.
[5] A. Wei, N. Haghtalab, and J. Steinhardt, "Jailbroken: How does LLM safety training fail?" in Proc. NeurIPS, 2023.
[6] P. Chao et al., "Jailbreaking black box large language models in twenty queries," arXiv:2310.08419, 2023.
[7] X. Liu et al., “AutoDAN: Generating stealthy jailbreak prompts on aligned large language models,” in Proc. ICLR, 2024.
[8] Md. R. I. Niloy et al., “Jailbreaking large language models: A red teaming perspective,” in Proc. IEEE COMPAS, 2025.
[9] N. Jain et al., “Baseline defenses for adversarial attacks against aligned language models,” arXiv:2309.00614, 2023.
[10] B. Cao et al., “Defending against alignment-breaking attacks via robustly aligned LLM,” arXiv:2309.14348, 2023.
[11] Y. Xie et al., “Defending ChatGPT against jailbreak attack via self-reminder,” Nature Machine Intelligence, vol. 5, pp. 1633–1641, 2023.
[12] H. Inan et al., “Llama Guard: LLM-based input-output safeguard for human-AI conversations,” arXiv:2312.06674, 2023.
[13] M. Mazeika et al., “HarmBench: A standardized evaluation framework for automated red teaming and robust refusal,” in Proc. ICML, 2024.
[14] P. Chao et al., “JailbreakBench: An open robustness benchmark for jailbreaking large language models,” arXiv:2404.01318, 2024.
[15] Ollama, "Ollama: Run large language models locally," https://ollama.com, 2023.
[16] Md. R. I. Niloy, “Autonomous OSS threat detection via taxonomy-aligned LLMs,” arXiv:2610.01263 [cs.CR], 2026.
[17] Md. R. I. Niloy et al., “Black-box optimization of mixed binary-continuous variables: Challenges and opportunities in evolutionary model merging,” arXiv:2605.12326 [cs.NE], 2026.