GPT-4 Jailbreaks Itself with Near-Perfect Success Using Self-Explanation

Govind Ramesh, Yao Dou, Wei Xu

Abstract: Research on jailbreaking has been valuable for testing and understanding the safety and security issues of large language models (LLMs). In this paper, we introduce Iterative Refinement Induced Self-Jailbreak (IRIS), a novel approach that leverages the reflective capabilities of LLMs for jailbreaking with only black-box access. Unlike previous methods, IRIS simplifies the jailbreaking process by using a single model as both the attacker and target. This method first iteratively refines adversarial prompts through self-explanation, which is crucial for ensuring that even well-aligned LLMs obey adversarial instructions. IRIS then rates and enhances the output given the refined prompt to increase its harmfulness. We find that IRIS achieves jailbreak success rates of 98% on GPT-4, 92% on GPT-4 Turbo, and 94% on Llama-3.1-70B in under 7 queries. It significantly outperforms prior approaches in automatic, black-box, and interpretable jailbreaking, while requiring substantially fewer queries, thereby establishing a new standard for interpretable jailbreaking methods.

Introduction

As Large Language Models (LLMs) are increasingly integrated into critical infrastructure, ensuring they remain resistant to generating harmful content is paramount. "Jailbreaking"—the process of finding prompts that bypass safety filters—is a key technique for red-teaming. Current automated methods generally fall into two categories: optimization-based attacks, which often produce non-interpretable gibberish, and black-box attacks, which typically require high query counts and suffer from lower success rates against top-tier models like GPT-4.

IRIS (Iterative Refinement Induced Self-Jailbreak) addresses these gaps by leveraging a model's own reasoning and self-explanation capabilities to navigate and circumvent its safety guardrails.

Methodology: The IRIS Framework

IRIS operates as a black-box attack using a single model as both the attacker and the target. The process is divided into two distinct stages:

  1. Step 1: Prompt Iterative Refinement: When a model rejects a forbidden prompt, IRIS asks the model to explain its own behavior and then propose a modification that might "trick" the system while appearing to alert it to potential harm. This iterative loop continues until the model provides a non-rejection response.
  2. Step 2: Rate + Enhance: Once a response is elicited, IRIS asks the model to rate the harmfulness of that response on a scale of 1-5. It then instructs the model to rewrite the response to be a "5"—the most harmful version possible.
The IRIS framework consists of two steps: iterative prompt refinement through self-explanation and a subsequent "Rate + Enhance" stage to maximize output harmfulness.

Key Results and Performance

IRIS demonstrates unprecedented efficiency and effectiveness compared to existing state-of-the-art methods like TAP and PAIR. On GPT-4, IRIS achieved a near-perfect 98% success rate with an average of only 6.7 queries. In contrast, methods like TAP require over 20 queries and achieve significantly lower success rates (~74%).

Comparison of IRIS against state-of-the-art jailbreaking methods TAP and PAIR across GPT-4 variants, showing superior success rates and query efficiency.

Beyond OpenAI models, IRIS shows strong performance on open-source models, reaching a 94% success rate on Llama-3.1-70B. A notable finding is the correlation between model capability and susceptibility: more proficient models are often easier to jailbreak because they are better at following the complex instructions required for the self-explanation and refinement stages.

Discussion and Conclusion

The success of IRIS highlights a fundamental vulnerability in current LLM alignment: the "Self-Explanation" capability. Well-aligned models possess meta-knowledge of their own safety boundaries, and IRIS demonstrates that this knowledge can be systematically weaponized to craft successful adversarial prompts. Furthermore, the "Rate + Enhance" step serves as a force multiplier; once a model provides even a mildly relevant response, it can be easily convinced to amplify the harmfulness of that output.

These findings suggest that future safety research must move beyond prompt filtering and address the risks inherent in a model's internal reasoning and output refinement capabilities.

Summary updated

BibTeX
@inproceedings{ramesh2024gpt,
  author = {Govind Ramesh and Yao Dou and Wei Xu},
  title = {{GPT-4 Jailbreaks Itself with Near-Perfect Success Using Self-Explanation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=HfUw7lfSpb},
}
Figure