Manuscript Offprint

arXiv:2610.39509

Systematic Evaluation of Adversarial Jailbreaking Attacks and Defenses Across Seven Large Language Models

Md. Robiul Islam Niloy, Abu Sayed Md. Mostafizur Rahaman

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 r=−0.57r = -0.57, p=0.18p = 0.18), 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:

  1. 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.

  2. We demonstrate that obfuscation-based attacks are the most dangerous and universally effective attack vector, achieving nonzero ASR on every evaluated model.

  3. We show that model size does not predict adversarial robustness, and that alignment training iteration—not scale—is the primary determinant of robustness.

  4. We evaluate four practical defense mechanisms and identify self-reminder prompting as the most effective, consistent, and low-cost defense across architectures.

  5. 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.

References (17)