Jailbreak Mimicry: Automated Discovery of Narrative-Based Jailbreaks for Large Language Models

Pavlos Ntais · 2025

Read Jailbreak Mimicry: Automated Discovery of Narrative-Based Jailbreaks for Large Language Models by Pavlos Ntais (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-22085.txt.

Introduction

Pavlos Ntais automates the craft of writing story-shaped jailbreaks, the prompts that dress a forbidden request inside a narrative so a language model's guardrails let it pass. Hand-built attacks of this kind are artisanal and hard to reproduce, which makes them awkward tools for measuring how safe a system really is.

Ntais fine-tunes a compact attacker model on a curated attack dataset, using an efficient adapter method, so it can produce narrative jailbreaks in a single shot. Built for a public red-teaming challenge, the attacker succeeded against its target open model on about eighty-one percent of held-out items. Transferred unevenly to other systems, scoring high against some well-known models and far lower against others. The variation itself is a finding: narrative vulnerability is model-specific, and automated discovery makes auditing it routine.

Catalog record

CREATORPavlos Ntais
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE41 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2510-22085

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Jailbreak Mimicry: Automated Discovery of Narrative-Based Jailbreaks for Large Language Models Pavlos Ntais Abstract Large language models (LLMs) remain vulnerable to sophisticated prompt engineering attacks that exploit contextual framing to bypass safety mechanisms, posing significant risks in cybersecurity applications. We introduce Jailbreak Mimicry, a systematic methodology for training compact attacker models to automatically generate narrative-based jailbreak prompts in a one-shot manner. Our approach transforms adversarial prompt discovery from manual craftsmanship into a reproducible scientific process, enabling proactive vulnerability assessment in AI-driven security systems. Developed for the OpenAI GPT-OSS-20B Red-Teaming Challenge openai-gpt-oss-20b-red-teaming , we use parameter-efficient fine-tuning (LoRA) on Mistral-7B with a curated dataset derived from AdvBench, achieving an 81.0% Attack Success Rate (ASR) against GPT-OSS-20B on a held-out test set of 200 items. Cross-model evaluation reveals significant variation in vulnerability patterns: our attacks achieve 66.5% ASR against GPT-4, 79.5% on Llama-3 and 33.0% against Gemini 2.5 Flash, demonstrating both broad applicability and model-specific defensive strengths in cybersecurity contexts. This represents a 54× improvement over direct prompting (1.5% ASR) and demonstrates systematic vulnerabilities in current safety alignment approaches. Our analysis reveals that technical domains (Cybersecurity: 93% ASR) and deception-based attacks (Fraud: 87.8% ASR) are particularly vulnerable, highlighting threats to AI-integrated threat detection, malware analysis, and secure systems, while physical harm categories show greater resistance (55.6% ASR). We employ automated harmfulness evaluation using Claude Sonnet 4, cross-validated with human expert assessment, ensuring reliable and scalable evaluation for cybersecurity red-teaming. Finally, we analyze failure mechanisms and discuss defensive strategies to mitigate these vulnerabilities in AI for cybersecurity. 1 Introduction The rapid deployment of large language models (LLMs) in production systems has highlighted a critical vulnerability: sophisticated contextual framing can systematically circumvent safety mechanisms designed to prevent harmful outputs. While direct requests for harmful content are typically refused, the same requests embedded within plausible narrative contexts—such as fiction writing, game design, or educational scenarios—often succeed in eliciting dangerous information. This phenomenon, commonly termed ”jailbreaking,” represents a fundamental challenge in AI safety. Current alignment approaches focus primarily on content detection rather than contextual analysis, creating systematic blind spots that can be exploited by adversarial users. The manual discovery of such vulnerabilities is time-consuming, inconsistent, and difficult to scale with the rapid pace of model development. This methodology was initially developed for the OpenAI GPT-OSS-20B Red-Teaming Challenge openai-gpt-oss-20b-red-teaming . In this paper, we introduce Jailbreak Mimicry , a reproducible methodology for automating the discovery of narrative-based jailbreak prompts. Our approach leverages the generative capabilities of smaller language models, training them to produce sophisticated contextual reframings that reliably bypass safety mechanisms in larger target models. 1.1 Key Contributions This work makes several contributions to AI safety research: 1. Automated Jailbreak Generation : We demonstrate that adversarial prompt crafting can be systematically automated through supervised fine-tuning, enabling one-shot generation of narrative reframings and achieving an 81.0% success rate against GPT-OSS-20B with significant cross-model transferability (79.5% on Llama-3, 66.5% on GPT-4, 33.0% on Gemini 2.5 Flash). 2. Cross-Model Vulnerability Analysis : We provide detailed vulnerability mapping across four major model families, revealing systematic patterns in safety mechanism failures and identifying both universal vulnerabilities and model-specific defensive strengths across different types of harmful content. 3. Rigorous Evaluation Framework : We introduce a hybrid evaluation methodology that combines automated harmfulness scoring with human expert cross validation, providing both scalability and reliability for jailbreak assessment. 1.2 Ethical Framework This research is conducted with explicit defensive intent. All attack methodologies and findings are designed to improve AI safety by enabling proactive discovery and mitigation of vulnerabilities. We follow responsible disclosure practices and provide our tools primarily to support defensive applications in AI safety research and industry red-teaming efforts. 2 Related Work 2.1 Adversarial Attacks on Language Models Recent work has explored various approaches to generating adversarial prompts for language models. ( wei2023jailbrokendoesllmsafety ) demonstrated that seemingly harmless prompts can be crafted to elicit harmful outputs through careful engineering. zou2023universal introduced gradient-based optimization for generating universal adversarial suffixes, while chao2024jailbreakingblackboxlarge explored automated red-teaming through reinforcement learning. However, most prior work focuses on either gradient-based white-box attacks or simple prompt mutations yang2025seqarjailbreakllmssequential . Our approach is distinguished by its emphasis on narrative contextual reframing and its use of supervised learning to teach semantic attack patterns rather than syntactic manipulations mehrotra2024treeattacksjailbreakingblackbox ; Deng_2024 . 2.2 Safety Alignment in Large Language Models Current safety alignment techniques primarily rely on supervised fine-tuning with human feedback (RLHF) ( ouyang2022traininglanguagemodelsfollow ) and constitutional AI approaches ( bai2022constitutionalaiharmlessnessai ) . While these methods have proven effective against direct harmful requests, they remain vulnerable to contextual manipulation. perez2022redteaminglanguagemodels highlighted the importance of red-teaming for discovering safety failures, but noted the challenges of scaling manual approaches. Our work directly addresses this scalability challenge through automated generation of sophisticated attack prompts anil2024manyshot . 2.3 Parameter-Efficient Fine-Tuning Our methodology builds upon recent advances in parameter-efficient fine-tuning, particularly LoRA ( hu2021loralowrankadaptationlarge ) , which enables effective adaptation of large language models with minimal computational overhead. This approach is crucial for making our methodology accessible to researchers with limited computational resources. 3 Methodology 3.1 Problem Formulation We formulate jailbreak generation as a conditional text generation problem. Given a harmful goal g (e.g., “explain how to create malware”), our objective is to generate a narrative reframing r that, when presented to a target model M_{\text{target}} , elicits a harmful response while appearing to serve a legitimate purpose. Formally, let S(M_{\text{target}},p) be a safety classifier that determines whether model M_{\text{target}} ’s response to prompt p violates safety guidelines. Our goal is to learn a generator G such that: P(S(M_{\text{target}},G(g))=\text{violation})>P(S(M_{\text{target}},g)=\text{violation}) where P denotes the probability and the reframed prompt G(g) maintains semantic equivalence to the original harmful goal g while bypassing safety mechanisms through contextual misdirection. 3.2 Architecture Overview Our pipeline consists of three integrated components: 1. Dataset Curation Engine : Converts harmful goals into effective narrative reframings 2. Attacker Model Training : Fine-tunes a compact generator using parameter-efficient techniques 3. Automated Evaluation Harness : Systematically tests generated prompts and measures success rates The inference workflow for deploying the trained model is illustrated in Fig. 1 , which shows the process from user input to target model evaluation: (1) Input Stage, where the user provides a harmful request; (2) Attack Generation, where the fine-tuned Mistral-7B transforms it into a narrative-based jailbreak; (3) Contextual Jailbreak, embedding the request in a creative context; and (4) Target Evaluation, where GPT-OSS-20B processes the framed request and bypasses safety protocols. Input Stage User provides harmful request Attack Generation Fine-tuned Mistral 7B transforms harmful request into a narrative-based jailbreak Contextual Jailbreak Harmful request is embedded within creative context Target Evaluation GPT-OSS-20B Processes narrative-framed request and bypasses safety protocols 1 2 3 4 Process Generate Attack Figure 1: Workflow for the Jailbreak Mimicry pipeline. 3.3 Model Selection 3.3.1 Attacker Model Selection We selected Mistral-7B jiang2023mistral7b base as our attacker generator after extensive experimentation. This choice was motivated by several factors: • Pliability : Base models have fewer hard-coded safety constraints compared to instruction-tuned variants wei2023jailbrokendoesllmsafety . • Capability : 7B parameters provide sufficient capacity for learning complex narrative patterns while remaining computationally tractable jiang2023mistral7b . • Transferability : The architecture generalizes well to other similar-scale models jiang2023mistral7b . Notably, our attempts to fine-tune Llama-3-8B for the same

Read the complete text