[Paper Review] Improved Techniques for Optimization-Based Jailbreaking on Large Language Models
This paper proposes I-GCG, an enhanced optimization-based jailbreaking method for large language models that improves attack success rate and efficiency by introducing diverse harmful guidance templates, an adaptive multi-coordinate update strategy, and easy-to-hard suffix initialization. The approach achieves nearly 100% attack success rate across multiple LLMs, outperforming state-of-the-art methods.
Large language models (LLMs) are being rapidly developed, and a key component of their widespread deployment is their safety-related alignment. Many red-teaming efforts aim to jailbreak LLMs, where among these efforts, the Greedy Coordinate Gradient (GCG) attack's success has led to a growing interest in the study of optimization-based jailbreaking techniques. Although GCG is a significant milestone, its attacking efficiency remains unsatisfactory. In this paper, we present several improved (empirical) techniques for optimization-based jailbreaks like GCG. We first observe that the single target template of "Sure" largely limits the attacking performance of GCG; given this, we propose to apply diverse target templates containing harmful self-suggestion and/or guidance to mislead LLMs. Besides, from the optimization aspects, we propose an automatic multi-coordinate updating strategy in GCG (i.e., adaptively deciding how many tokens to replace in each step) to accelerate convergence, as well as tricks like easy-to-hard initialisation. Then, we combine these improved technologies to develop an efficient jailbreak method, dubbed I-GCG. In our experiments, we evaluate on a series of benchmarks (such as NeurIPS 2023 Red Teaming Track). The results demonstrate that our improved techniques can help GCG outperform state-of-the-art jailbreaking attacks and achieve nearly 100% attack success rate. The code is released at https://github.com/jiaxiaojunQAQ/I-GCG.
Motivation & Objective
- To address the limited effectiveness of existing optimization-based jailbreaking methods, particularly the reliance on a single, weak target template like 'Sure'.
- To improve the efficiency and convergence speed of gradient-based jailbreak attacks on aligned LLMs.
- To enhance jailbreak performance by incorporating harmful self-suggestions and guidance into the optimization objective.
- To develop a systematic, scalable method for generating high-quality jailbreak prompts that bypass safety alignment.
- To evaluate the impact of each component (guidance, update strategy, initialization) on attack success and efficiency.
Proposed method
- Introduces diverse target templates with harmful self-suggestions (e.g., 'my action is unsafe', 'my behavior is risky') to mislead the LLM into generating harmful outputs.
- Proposes an automatic multi-coordinate updating strategy that adaptively determines how many tokens to replace per optimization step, improving convergence speed.
- Employs an easy-to-hard initialization technique: first generating jailbreak suffixes for simple queries, then reusing them as seeds for more complex queries.
- Combines these techniques into a unified framework, I-GCG, which optimizes the jailbreak suffix using gradient-based methods with the enhanced target objective.
- Uses log-likelihood maximization to optimize the jailbreak suffix such that the LLM's output aligns with the desired harmful response.
- Employs ablation studies and benchmark evaluations on models like LLaMA2-7B-CHAT and others to validate component contributions.
Experimental results
Research questions
- RQ1Can introducing diverse harmful guidance templates significantly improve the success rate of optimization-based jailbreaks?
- RQ2Does an adaptive multi-coordinate update strategy accelerate convergence and improve optimization efficiency?
- RQ3Can an easy-to-hard initialization strategy enhance the transferability and effectiveness of jailbreak prompts across varying attack difficulty levels?
- RQ4How do the individual components (harmful guidance, update strategy, initialization) contribute to overall jailbreak performance and efficiency?
- RQ5Can the proposed method achieve near-100% attack success rate on strong, aligned LLMs across multiple benchmarks?
Key findings
- The proposed I-GCG method achieves a nearly 100% attack success rate on all evaluated LLMs, including LLaMA2-7B-CHAT, across multiple benchmarks such as AdvBench and the NeurIPS 2023 Red Teaming Track.
- Incorporating harmful guidance (e.g., 'my action is unsafe') into the target template significantly boosts attack effectiveness, with all tested guidance variants achieving 100% success rate.
- The automatic multi-coordinate update strategy reduces the average number of iterations required for convergence, improving optimization efficiency.
- The easy-to-hard initialization strategy accelerates the search process, particularly for complex queries, by leveraging previously learned suffixes as starting points.
- Ablation studies confirm that harmful guidance contributes most to effectiveness, while update strategy and initialization enhance efficiency.
- The method demonstrates strong generalization, with loss values converging faster and more stably when using the proposed efficient techniques, especially with prior-guided initialization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.