passdrill
AI & LLM Engineering · Prompt Engineering · Card 045/049 medium

Zou et al. (2023), "Universal and Transferable Adversarial Attacks on Aligned Language Models," introduce the Greedy Coordinate Gradient (GCG) method for finding a short string that, appended to a harmful request, causes safety-trained models to comply. How does GCG find this adversarial suffix, and what does "transferable" mean in the paper's results?

  1. GCG works by manually testing suffixes proposed by a human red team, ranking them only by how grammatically fluent they read, with no use of gradients or automated search at all
  2. GCG uses gradient information from one or more open-weight models to greedily search for, and iteratively replace, individual tokens in a candidate suffix so as to increase the likelihood that the target model begins its response by complying with the harmful request; "transferable" describes the finding that a suffix optimized against open-weight models such as Vicuna also induces objectionable output when tested against unrelated closed models it was never optimized against
  3. GCG requires direct write access to the target model's weights during the attack itself, so it cannot be used against a closed model served only through an API, and "transferable" refers only to porting the attack's code between programming languages
  4. GCG produces a suffix that is unique to a single specific harmful request and a single specific model, and "transferable" describes only how the resulting text can be copy-pasted between chat interfaces of the same model
Next card → Shuffle