AmpleGCG: Learning a Universal and Transferable Generative Model of Adversarial Suffixes for Jailbreaking Both Open and Closed LLMs

As large language models (LLMs) become increasingly prevalent and integrated into autonomous systems, ensuring their safety is imperative. Despite significant strides toward safety alignment, recent work GCG~\citep{zou2023universal} proposes a discrete token optimization algorithm and selects the single suffix with the lowest loss to successfully jailbreak aligned LLMs. In this work, we first discuss the drawbacks of solely picking the suffix with the lowest loss during GCG optimization for jailbreaking and uncover the missed successful suffixes during the intermediate steps. Moreover, we utilize those successful suffixes as training data to learn a generative model, named AmpleGCG, which captures the distribution of adversarial suffixes given a harmful query and enables the rapid generation of hundreds of suffixes for any harmful queries in seconds. AmpleGCG achieves near 100\% attack success rate (ASR) on two aligned LLMs (Llama-2-7B-chat and Vicuna-7B), surpassing two strongest attack baselines. More interestingly, AmpleGCG also transfers seamlessly to attack different models, including closed-source LLMs, achieving a 99\% ASR on the latest GPT-3.5. To summarize, our work amplifies the impact of GCG by training a generative model of adversarial suffixes that is universal to any harmful queries and transferable from attacking open-source LLMs to closed-source LLMs. In addition, it can generate 200 adversarial suffixes for one harmful query in only 4 seconds, rendering it more challenging to defend.

Paper

References (50)

Scroll for more · 38 remaining

Similar papers

Reviewer ygbw5/10 · confidence 4/52024-04-21

Summary

Summary: This article proposes an enhancement method based on GCG and trains a universal generative model, named AmpleGCG. In the open source model, AmpleGCG trained based on the data from Llama-2-7B-Chat could achieve 72% transfer ASR on Vicuna-7B and Mistral-7B-Instruct average. In the closed source model, AmpleGCG trained based on the data from Vicuna and Guanaco could achieve 99.00% transfer ASR on GPT-3.5-0125. AmpleGCG can generate 200 adversarial suffixes for one harmful query in only 4 seconds, rendering it more challenging to defend.

Rating

5

Confidence

4

Ethics flag

1

Reasons to accept

1. AmpleGCG has a fast generation speed, high ASR for both open-source and closed source models and high transferability. This overgeneration based attack method can inspire subsequent research. 2. AmpleGCG has a clear optimization approach based on GCG and is easy to reproduce.

Reasons to reject

1. This article points out that the loss of GCG is not the best metric, but does not provide a better solution. Overgenerate only selects more of the top-k candidate suffixes in each step, but the final iteration still uses the suffix with the smallest loss. 2. AmpleGCG has a low ASR for GPT-4, and the ASR calculated using the string-based evaluator is higher than the true value. 3. The tricks AmpleGCG applied to bypass the perplexity detector has low efficiency.

Reviewer yhaZ7/10 · confidence 5/52024-05-12

Summary

### Summary of the paper The paper studies the GCG algorithm, identifies some weaknesses in it, and proposes techniques to mitigate these weaknesses and enhance the attack's effectiveness. Specifically, the authors observe that having minimal loss (maximal likelihood of the target string) is neither a sufficient nor a necessary condition for the attack's success. They further observe, that over the course of the optimization, the likelihood of the first token of the target output remains relatively high. Given these observations, the authors propose an "over-generation" procedure that retains suffixes from intermediate optimization steps and applies all of them, one-by-one during the attack. This significantly increases the attack success rate. Finally, the authors use the generated attack suffixes and the corresponding queries to train a LLM, that is able to generate successful attack suffixes for unseen queries that generalize across models. ### Quality - The paper contains interesting analyses of GCG, which enabled the authors to identify weaknesses and develop improvements. The proposed techniques are relatively simple but are well motivated and accompanied by empirical evidence and analysis. - The evaluation methodology seems to be carefully designed and instills confidence in the results. However, the generalizability of the results is questionable because very few models were used in the evaluation. Most of the results are based on Llama-2 and Vicuna. These two models have the same architecture and pertaining data, and only differ because the latter was fine-tuned on share-GPT. To show that the observed effects are not a consequence of the chosen target model, more diverse models should have been used. Particularly, the observation about the loss (Section 3.1) should show that the effect is observable on multiple diverse models. Likewise, to evaluate transferability models other than GPT-3.5 and GPT-4 should have been used. It is known from several past papers that attacks crafted using Llama2 and Vicuna transfer to GPT-3.5 because Vicuna is fine-tuned with share-GPT. Several other closed-source models should have been used here such as Claude and Gemini to show the extent of generalizability to models that are more decoupled from the training models. - The AmpleGCG LLM was trained on Guanaco, Vicuna and Llama, all of which are based on Llama. It is likely that if suffixes from other open-sources models such as Mistral (and its variants) or Phi were used the transferability of AmpleGCG to unseen models like GPT-4 would have been better. - The techniques for bypassing perplexity based defenses is relatively unsophisticated, and probably easy to defend against. I would not consider this a significant contribution of this paper. ### Clarity The paper is written clearly enough, but there is some room for improvement. Non exhaustive list of points: - Intro-para2: "existing jailbreaking methods, including GCG, only generate one single adversarial prompt for one query". This is not true as one can generate one adversarial prompt for multiple queries. - Intro-para2: "Vulnerabilities" is used to refer to attack strings. This is confusing. Might be better to state attack strings/adversarial prompt. - Definitions of metrics should be included in the Table/Figure caption. For example, diversity should be defined in the caption of Table 2, not in the text. - Training and evaluation details are dispersed throughout section 4. They should be in a separate subsection to make it easy to find them and refer to them. ### Originality The techniques are not highly novel themselves, but their effective application to the task of adversarial suffix generation is still a significant contribution in my opinion. ## Significance The work is timely and impactful. The safety and societal impact of LLMs is a great concern and this paper shows that existing models are not only highly vulnerable to adversarial attacks, but that these attacks can be generated very efficiently.

Rating

7

Confidence

5

Ethics flag

2

Reasons to accept

- The work is timely and impactful. The safety and societal impact of LLMs is a great concern and this paper shows that existing models are not only highly vulnerable to adversarial attacks but that these attacks can be generated very efficiently. - The approach is simple and effective. - Highlights a significant issue with the optimization procedure used by GCG (loss of first token does not decrease), and thus provides impetus for the development of better optimization methods for adversarial attacks.

Reasons to reject

- Evaluation setup could be improved to make claims about generalizability more convincing (see summary for details). In short, I recommend including more diverse open- and closed-sourced models in the training and testing stages. - Clarity could be improved in several places. - The techniques for bypassing perplexity based defenses is relatively unsophisticated, and probably easy to defend against.

Questions to authors

- It is mentioned that over-generation with GCG does not produce sufficiently diverse suffixes. This is expected because GCG changes one token at a time. However, it may be possible to enhance the diversity by running GCG multiple times (with different random seeds). Since it is known that suffixes at intermediate optimization steps can be successful, the optimization can be run for few steps -- 1 run with 500 steps vs. 2 runs with 250 steps. It might be useful to to generate training data for AmpleGCG this way to enhance the diversity. - How many human evaluators performed manual inspection of GPT-3.5 responses? To what extent did they agree/disagree?

Ethics concerns details

The techniques can be used to extract responses from the LLM that can cause societal harm in the form of offensive language, encouraging unsafe behavior, etc. The authors have acknowledged these concerns.

Reviewer yfe57/10 · confidence 3/52024-05-14

Summary

The paper presents AmpleGCG, a generative model designed to create adversarial suffixes that can jailbreak both open-source and closed-source large language models (LLMs). The authors propose an augmented approach that collects all candidate suffixes during the optimization process. These collected suffixes are then used to train AmpleGCG, which achieves near 100% attack success rates on various models including Llama-2-7B-chat, Vicuna-7B, and GPT-3.5.

Rating

7

Confidence

3

Ethics flag

2

Reasons to accept

- The paper introduces a novel generative model for creating adversarial suffixes, moving beyond the limitations of the GCG method by leveraging a broader set of successful suffixes. - AmpleGCG achieves impressive attack success rates across multiple models, including closed-source ones, highlighting its robustness and generalizability. - The model's ability to generate a large number of adversarial suffixes quickly is a significant improvement over previous methods, which were more time-consuming. - The approach demonstrates strong transferability across different models, which is a critical feature for testing the robustness and safety of various LLMs. - The paper provides thorough experimental results, comparing the performance of AmpleGCG with other baseline methods and showing its superiority.

Reasons to reject

- The creation and dissemination of a tool capable of efficiently generating adversarial attacks on LLMs could be considered ethically questionable, as it may aid malicious actors. - The paper could benefit from a more detailed exploration of potential defenses against the adversarial suffixes generated by AmpleGCG, beyond just perplexity-based defenses.

Questions to authors

How do you envision the ethical implications of releasing a tool like AmpleGCG to the public, and what measures do you propose to mitigate potential misuse? Can you provide more details on the types of harmful queries used in your experiments, and how these queries were selected?

Ethics concerns details

The creation and dissemination of a tool capable of efficiently generating adversarial attacks on LLMs could be considered ethically questionable, as it may aid malicious actors.

Authorsrebuttal2024-06-03

Follow-up on the Rebuttal

Dear reviewer ygbw, Hope this follow-up messages find you well. We want to thank you again for your valuable feedback and comments on our submissions. In our rebuttal, we believe we addressed the points you raised, including concerns about better metrics, the selection of anchor points during the iteration process, clarification about the evaluators we used beyond the string-based method, and the relatively low ASR but still competent compared to the two strongest baselines. Besides, we also conducted more experiments to prove that the efficacy of repetition tricks to bypass the perplexity-based defense would **NOT** be compromised when sampling more times. Please kindly let us know If there are any remaining concerns or additional suggestions, we would be grateful for your guidance and open to more suggestions. Thank you once again for your time and consideration.

Reviewer yhaZ2024-06-07

Thank you for the clarifications. I will retain my rating of Accept for the paper.

Program Chairsdecision2024-07-10

Decision

Accept

© 2026 NYSGPT2525 LLC