Abstract
Despite rigorous safety alignment through techniques like Reinforcement Learning from Human Feedback (RLHF), Large Language Models (LLMs) remain susceptible to jailbreak attacks—prompts designed to bypass safety filters and elicit prohibited content. This paper introduces DAP (Distraction-based Adversarial Prompts), a novel automated black-box framework that exploits two fundamental LLM vulnerabilities: the tendency to be distracted by irrelevant context and an "over-confidence" in following their own generated output. By concealing malicious queries within complex, benign tasks and utilizing a memory-reframing mechanism, DAP achieves significant attack success rates on state-of-the-art models, including GPT-4 and LLaMA-2, while maintaining high linguistic fluency to evade detection.
Introduction
The safety of Large Language Models is a primary concern for AI deployment. Current jailbreak methodologies generally fall into two categories: manual engineering (e.g., the "DAN" persona), which is creative but lacks scalability, and optimization-based methods (e.g., GCG), which often require white-box access to model gradients and produce non-fluent "gibberish" that is easily flagged by perplexity filters.
There is a critical need for automated, black-box attacks that generate natural-language prompts. This research addresses that gap by introducing the DAP framework. DAP treats jailbreaking as a distraction task, forcing the model to prioritize a hidden "auxiliary" malicious task over its global safety training by manipulating the model's localized attention and response trajectory.
The DAP Framework
The DAP framework is composed of three integrated components designed to systematically exploit LLM vulnerabilities:
1. Malicious Content Concealing
To bypass initial safety filters, DAP hides a harmful query (the "auxiliary task") inside a complex, seemingly benign "main task." For example, a request for dangerous instructions might be embedded within a detailed financial analysis prompt or a fictional espionage narrative. This "Trojan Horse" strategy ensures the prompt appears legitimate to simple keyword-based or intent-based safety checks.
2. Memory-Reframing Mechanism
This component exploits the "localized focus" of LLM attention mechanisms. The jailbreak template instructs the target LLM to begin its response with a specific affirmative phrase, such as: "Sure! I will shift my focus to the auxiliary task, discarding the above scenario..."
Because LLMs prioritize nearby context and tend to follow the trajectory of their own generated text (a phenomenon the authors call "over-confidence"), forcing this starting string tricks the model into ignoring the broader safety context of the original prompt. Once the model commits to the "auxiliary task" in its own output, it is significantly more likely to fulfill the malicious request.
3. Iterative Prompt Optimization
DAP utilizes an "Attacker LLM" to automatically generate and refine these templates. The process is guided by a "Judgement Model" (a fine-tuned DeBERTa-v3) that evaluates the success of each attack. This feedback loop allows the Attacker LLM to iteratively improve the distraction techniques, making the framework both automated and highly adaptive.
Experimental Evaluation
Datasets and Models
The researchers evaluated DAP using standard benchmarks for harmful content, including AdvBench (520 harmful instructions) and the GPTFuzzer Dataset. The framework was tested against a range of models:
- Open-source: LLaMA-2-7B, Vicuna.
- Closed-source: GPT-3.5, GPT-4.
Key Results
DAP demonstrated superior performance compared to existing black-box baselines like PAIR and GPTFuzzer:
- GPT-3.5: Achieved a Top-1 Attack Success Rate (ASR) of 66.7%.
- GPT-4: Achieved an ASR of 38.0%.
- LLaMA-2-7B: Even with its robust system safety prompts, DAP reached a 40% success rate, significantly outperforming PAIR (10%) and GPTFuzzer (32.7%).
Furthermore, the researchers observed high transferability. Templates optimized for one model (e.g., Vicuna) were frequently successful when applied to entirely different architectures (e.g., GPT-4), suggesting that the distraction vulnerability is a systemic issue across current LLM designs.
Discussion and Insights
The success of DAP provides several key insights into LLM behavior:
- The Weakness of Localized Attention: By placing malicious instructions at the end of long, complex prompts and forcing a specific response start, the global safety context is effectively pushed out of the model's immediate focus.
- The Fluency Advantage: Unlike optimization methods that produce nonsensical strings, DAP generates coherent, fluent stories. This makes "Perplexity Filters"—a common defense mechanism—almost entirely ineffective.
- Defense Limitations: Current defenses like "Self-Reminder" or "In-context Defense" were found to reduce the ASR but could not eliminate the risk. Often, these defenses also degraded the model's performance on legitimate, non-malicious tasks.
Conclusion
The DAP framework highlights a significant gap in current AI alignment strategies. By demonstrating that LLMs can be "distracted" into bypassing their own safety protocols, this research underscores the need for more robust, context-aware defense mechanisms. The authors have practiced responsible disclosure by notifying Meta and OpenAI of these vulnerabilities, emphasizing that as LLMs become more integrated into society, securing them against sophisticated, automated natural-language attacks is paramount.
Summary updated