agent-readings / Security, Safety, and Trust
Alignment is not adversarial robustness
The one sentence
For agents, this means model refusal is not a hard security boundary. Tool authority, sandboxing, policy checks, and output controls must not rely solely on the model staying aligned under adversarial input.
Before this paper
Manual jailbreaks existed but required human ingenuity and were often brittle or patchable.
Automatic adversarial prompt generation had limited success against aligned chat models.
LLM inputs are discrete tokens, making direct gradient-based optimization harder than image perturbation.
The paper asks whether adversarial prompts for aligned LLMs can be generated automatically, made universal across many requests, and transferred to other models.
Core idea
Search over suffix tokens on surrogate open models to maximize a refusal-bypassing objective, then evaluate whether the resulting suffixes work across prompts, models, and black-box public interfaces.
Define harmful-string and harmful-behavior evaluation settings in AdvBench.
Optimize suffixes against open surrogate models using a combined greedy and gradient-guided discrete search.
Scale from single behavior/model attacks to universal suffixes over multiple behaviors.
Optimize across multiple surrogate models to improve transfer.
Action grammar
base request: the original user request under test.
suffix: modifiable token sequence appended to the request.
objective: probability of a targeted affirmative response prefix rather than refusal.
candidate substitution: a possible token replacement proposed from gradient information.
Executable shape
Evidence
The paper defines Greedy Coordinate Gradient as using token-level gradients to identify promising replacements and exact forward evaluation to choose greedy suffix updates.
The paper optimizes one suffix over multiple prompts and aggregates losses/gradients across multiple models to improve universality and transfer.
AdvBench contains harmful-string and harmful-behavior settings and uses attack success rate to evaluate exact target strings or attempted compliance with harmful instructions.
GCG achieves strong results in single-model attacks, including 88% harmful-string success on Vicuna-7B and higher held-out behavior success than AutoPrompt on LLaMA-2-7B-Chat in...
Claim map
GCG combines gradient-guided token candidate selection with greedy evaluation to optimize discrete adversarial suffixes.
The paper extends suffix optimization to universal multi-prompt and multi-model attacks.
AdvBench evaluates both harmful strings and harmful behaviors, with attack success rate as the primary metric.
On single-model experiments, GCG substantially outperforms prior automatic prompt-generation baselines such as PEZ, GBDA, and AutoPrompt.
Agent infrastructure
Do not use model refusal as the only security boundary for a tool-using agent.
Adversarial prompt testing should be part of agent evaluation, especially before granting tools, memory writes, or external side effects.
Transfer attacks mean closed-source or black-box deployment does not eliminate risk if similar open models can be used as surrogates.
Safety filters should be layered with capability scoping, sandboxing, output validation, policy enforcement, and human approval for sensitive actions.
Caveats
The paper intentionally studies objectionable-content elicitation, not every possible alignment objective.
Attack success depends on model version, interface, decoding parameters, and provider patches; reported numbers are historical.
The review intentionally omits attack strings and runnable optimization details.
Harmful-behavior evaluation involves human judgment about attempted compliance.
Run it
No PoC yet. This repo should avoid publishing jailbreak-generation PoCs; a safe contribution could instead implement a benign robustness harness that checks refusal consistency on harmless canary prompts.