IN THIS BREAKDOWN · 10 SECTIONS
You can read 17% of this breakdown.
The paper in one minute
By 2023, chat models were trained to refuse harmful requests, and jailbreaks were mostly hand-crafted role-play prompts that took effort and stopped working when patched. Automated attacks on language models had largely failed, because the input is discrete tokens rather than pixels.
This paper made automated attacks work. Greedy Coordinate Gradient (GCG) leaves the user's request unchanged and appends a suffix of 20 tokens. It searches for suffix tokens that make the model's most likely reply begin with an affirmative opening that restates the request; once a reply starts that way, the model tends to continue. Each step uses gradients with respect to the tokens to shortlist promising single-token swaps at every position, evaluates a batch of them exactly, and keeps the best.
Two choices made the result alarming. Optimizing one suffix against many requests at once made it universal: it worked on behaviors it was never optimized for. Optimizing against several open models at once (Vicuna-7B and 13B, plus Guanaco in one run) made it transfer to closed models that were never queried during the search. On 388 held-out behaviors, an ensemble of such suffixes (success if any one works) raised attack success on GPT-3.5 from 1.8% to 86.6%, on GPT-4 from 8.0% to 46.9%, and on Claude-1 from 0% to 47.9%. Claude-2 held at 2.1%.
The authors disclosed the results to the affected companies before publishing and expected the specific examples to stop working.
Research notes: the problem, approach and results
GPT-3.5 attack success on 388 held-out behaviors with an ensemble of transferred suffixes (1.8% for the request alone)
held-out success of one suffix optimized on 25 behaviors against Llama-2-7B-Chat (AutoPrompt: 35%)
best result against Claude-2, the most robust model tested
Aligned chat models refuse harmful requests, and known jailbreaks were hand-written and brittle; automated search over discrete tokens had mostly failed.
Greedy Coordinate Gradient (GCG): append 20 tokens to the request and optimize them so the model's reply starts with an affirmative prefix, using token gradients to propose swaps and exact forward passes to choose among them. Sum the objective over many requests and several open models to get one universal suffix.
On white-box models, one suffix worked on 98% of held-out behaviors for Vicuna-7B and 84% for Llama-2-7B-Chat. Suffixes built on Vicuna and Guanaco transferred to GPT-3.5 (86.6% as an ensemble), GPT-4 (46.9%), Claude-1 (47.9%) and PaLM-2, but rarely to Claude-2 (2.1%).
Why it matters to an FDE
You won't run this attack. You will be asked whether a model is "safe enough" for a customer's deployment, and this paper explains why the answer can't rest on a model refusing a list of obviously bad questions.
Safety behavior fails under optimized inputs. The models in the paper refused plain requests almost every time. A search procedure, not human cleverness, found inputs that flipped them, including inputs built on a different model.
Evaluations must be automated and repeated. Hand-written jailbreak lists go stale. Security regression tests belong next to functional tests and should rerun when the model, the prompt template or a guardrail changes.
The defense can't live only in the model. The paper's question is whether post-hoc alignment of a model that can produce harmful content will ever hold against optimizers, as decades of adversarial examples in vision suggest it may not. For an application, that argues for limiting what the model can do and checking what it outputs.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 157 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The three ingredients, universality, transfer, the protocol caveats and three misreadings
Free account - 04How it works
The objective, one GCG step, the universal multi-model loop, AdvBench and the protocol
Premium - 05The numbers that matter
Tables 1 and 2 in full, the baselines, and where the text and tables disagree
Premium - 06Try it yourself
Check the transfer claims against Table 2, price best-of-8 scoring, and size a regression suite
Premium - 07Where it breaks
Dated models, judgment-based scoring, mixed protocols, white-box access and the slips
Premium - 08Using it on a deployment
Turning the lesson into regression tests, protocol hygiene and controls outside the model
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
