COLD-Attack: Jailbreaking Large Language Models with Stealth and ControllabilityCOLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability
Researchers proposed the COLD-Attack framework, which brings controllable text generation methods into jailbreak attacks and can automatically generate adversarial attacks subject to constraints such as fluency and stealthiness. The framework connects the controllable attack generation problem with controllable text generation, adapts the COLD algorithm based on energy-constrained decoding and Langevin dynamics, and uniformly covers new scenarios including fluent suffix attacks with continuation constraints, adversarial rewriting of user queries with rewriting constraints, and stealthy insertion attacks into context with position constraints. Extensive experiments on Llama-2, Mistral, Vicuna, Guanaco, GPT-3.5 and GPT-4 show that the method is broadly applicable, highly controllable, has a high success rate and is transferable across attacks, and the code is open-sourced on GitHub.