Don't Say No: Jailbreaking LLM by Suppressing Refusal
Introduction
Safety alignment in Large Language Models (LLMs) is designed to prevent the generation of harmful content. However, these models remain vulnerable to "jailbreaking"—adversarial prompts, often in the form of suffixes, that trick the model into bypassing its safeguards. Existing optimization-based attacks, such as Greedy Coordinate Gradient (GCG), typically focus on minimizing the loss for a target affirmative phrase (e.g., "Sure, here is how to...").
The authors identify two critical flaws in this "vanilla" approach. First, there is a Loss-ASR Mismatch: suffixes with the lowest mathematical loss do not always result in the highest Attack Success Rate (ASR) because standard loss functions average over the entire sequence, ignoring the disproportionate importance of the first few tokens. Second, the "Pivot" Problem occurs when a model starts with an affirmative phrase but pivots to a refusal mid-sentence.
The DSN Methodology
To address these issues, the authors introduce DSN (Don’t Say No), a jailbreaking method that shifts the optimization focus from merely eliciting a "Yes" to actively suppressing a "No." DSN optimizes an adversarial suffix using a two-pronged loss objective:
- Cosine Decay Weighting ($L_{affirmative}$): Instead of treating every token in the target response equally, DSN applies a cosine decay schedule. This places significantly higher weight on the initial tokens, forcing the model to commit strongly to an affirmative start and making it harder to pivot to a refusal later.
- Refusal Suppression ($L_{refusal}$): DSN uses Unlikelihood Loss to explicitly minimize the probability of common refusal keywords (e.g., "I'm sorry," "As an AI") appearing anywhere in the response.
Results and Performance
DSN consistently achieves state-of-the-art results across diverse LLM families, including Llama 2/3, Mistral, Qwen, and Gemma. On Llama-2-7b-chat, DSN achieved a 100% ASR under multi-trial settings, significantly outperforming GCG's 76%.
Crucially, DSN resolves the Loss-ASR mismatch. As shown in the comparative analysis, DSN-optimized suffixes align the minimum loss point with much higher attack success rates compared to the vanilla GCG method.
Furthermore, DSN demonstrates remarkable black-box transferability. Suffixes optimized on open-source models achieved up to an 83% ASR on DeepSeek-v3 and significant success on proprietary models like GPT-4 (32.7% ASR@10) and Claude.
Key Insights
- Refusals are Predictable: Pilot experiments revealed that refusal vocabulary is highly concentrated compared to the diversity of harmful content. This makes "suppressing the No" a more efficient optimization target than "forcing the Yes."
- The First Tokens are the Steering Wheel: The model's next-word prediction is highly sensitive to the initial state. Cosine decay ensures the optimization prioritizes the critical "steering" tokens at the start of the response.
- Efficiency: Despite the dual-loss objective, DSN adds negligible computational overhead, with only a 0.77% increase in average running time compared to GCG.
Conclusion
The DSN attack represents a significant advancement in jailbreaking methodology by recognizing that suppressing refusal is as important as eliciting affirmation. By prioritizing the critical first tokens and penalizing predictable refusal patterns, DSN exposes persistent vulnerabilities in current safety-aligned LLMs. Future work will explore multi-modal jailbreaks and the use of semantic evaluation algorithms to improve model alignment during training.
Summary updated