Skip to content

Universal and transferable adversarial attacks against aligned language models

Universal and Transferable Adversarial Attacks on Aligned Language Models

arXiv· arXiv:2307.15043· Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J. Zico Kolter, Matt Fredrikson·Indexed by this site · 16 days ago· Originally publishedSelected AttacksSelectedAttention48

Quick read

Based on the paper's full text (AI-generated); refer to the original

AI summaryAndy Zou and other researchers proposed the GCG attack, which uses automatically optimized adversarial suffixes to bypass refusals from aligned language models; a single suffix can be universal across prompts and models and transfers to black-box commercial models such as ChatGPT and GPT-4. The method combines greedy and gradient-based discrete search, optimizing suffixes at the token level to induce the model to begin with an affirmative response, and jointly optimizes over multiple harmful behaviors on open-source models such as Vicuna-7B/13B and Guanaco. On the self-built AdvBench benchmark, GCG induced 99 of 100 harmful behaviors on Vicuna-7B; the transfer attack achieved success rates of 87.9%, 53.6%, and 66% on GPT-3.5, GPT-4, and PaLM-2, respectively, and only 2.1% on Claude-2.

Questions
Aligned LLMs superficially refuse harmful requests, but existing jailbreaks mostly rely on manual design, are fragile, and are difficult to automate; automatic adversarial prompt generation has previously had limited effectiveness on discrete tokens, and how to reliably induce aligned models to output harmful content remains an open problem.
Methods
The authors propose Greedy Coordinate Gradient (GCG): append an adversarial suffix after the user query, target the model starting with an affirmative tone (e.g., "Sure, here is…"), use token-level gradients to select candidate replacements and evaluate them with forward passes, greedily optimizing step by step; and jointly optimize across multiple prompts and multiple models (Vicuna-7B/13B, Guanaco) to obtain a universal suffix.
Experiments and results
On the self-built AdvBench, GCG achieves an 88% success rate on harmful strings and 99–100% on harmful behaviors on Vicuna-7B, clearly outperforming PEZ, GBDA, and AutoPrompt; it also outperforms the baselines on LLaMA-2-7B-Chat. The optimized suffix transfers to open-source models such as Pythia, Falcon, and Guanaco, as well as black-box models such as GPT-3.5, GPT-4, PaLM-2, and Claude, with a relatively high transfer success rate on the GPT series and a very low one on Claude-2; concatenating or ensembling multiple suffixes can further improve the transfer success rate.
Limitations and future work
The authors note that models such as Claude may have pre-content filtering, and that more recent models have lower attack success rates; Vicuna is derived from ChatGPT outputs, which may make the transfer results overly optimistic. Too many optimization steps can overfit the source model and reduce transferability. Future directions include adversarial training, studying mechanisms at the pretraining level, and automating bypassing of content filtering.
Why it was selectedThe paper presents the GCG automatic jailbreak method and its transfer success rates on black-box models such as GPT-4 and Claude, on which basis the authors question the post-hoc patching approach to alignment.

The paper presents the GCG automatic jailbreak method and its transfer success rates on black-box models such as GPT-4 and Claude, on which basis the authors question the post-hoc patching approach to alignment.

Related events and news

3 events · 12 news mentions

News that mentions this paper

同一模型,多个云:前沿模型跨云托管与模型多样性

神经网络对目标自我破解异常脆弱

  • AI Alignment Forumcites the paper's id or link
    神经网络对目标自我破解异常脆弱
    See Universal and Transferable Adversarial Attacks on Aligned Language Models (2023) by Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J.

Meta AI与CMU等提出SimpleLoRIF过滤训练数据降低越狱率22%

Show 9 more news items
Read originalarxiv.org