REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objective

Simon Geisler, Tom Wollschläger, M. H. I. Abdalla, Vincent Cohen-Addad, Johannes Gasteiger +1 more
2/24/2025
cs.LG

No official code found. Best implementation: sigeisler/reinforce-attacks-llms (25 stars, MIT, last commit 2025-02-28).

Abstract

To circumvent the alignment of large language models (LLMs), current optimization-based adversarial attacks usually craft adversarial prompts by maximizing the likelihood of a so-called affirmative response. An affirmative response is a manually designed start of a harmful answer to an inappropriate request. While it is often easy to craft prompts that yield a substantial likelihood for the affirmative response, the attacked model frequently does not complete the response in a harmful manner. Moreover, the affirmative objective is usually not adapted to model-specific preferences and essentially ignores the fact that LLMs output a distribution over responses. If low attack success under such an objective is taken as a measure of robustness, the true robustness might be grossly overestimated. To alleviate these flaws, we propose an adaptive and semantic optimization problem over the population of responses. We derive a generally applicable objective via the REINFORCE policy-gradient formalism and demonstrate its efficacy with the state-of-the-art jailbreak algorithms Greedy Coordinate Gradient (GCG) and Projected Gradient Descent (PGD). For example, our objective doubles the attack success rate (ASR) on Llama3 and increases the ASR from 2% to 50% with circuit breaker defense.

View on arXivView PDF

Code Implementations(1)

MIT

REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objective

256MDX, ShellFeb 27, 20251 years agoMIT
adversarial-attacksdeep-learningjailbreaklarge-language-modelsllm+1 more

Similar Papers

Cite this paper

@article{geisler2025reinforce,
  title  = {REINFORCE Adversarial Attacks on Large Language Models: An Adaptive, Distributional, and Semantic Objective},
  author = {Simon Geisler and Tom Wollschläger and M. H. I. Abdalla and Vincent Cohen-Addad and Johannes Gasteiger and Stephan Günnemann},
  year   = {2025},
  eprint = {2502.17254},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.17254v1},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.17254.svg)](https://codeofpaper.com/paper/2502.17254)

Discussion