Attacking Large Language Models with Projected Gradient Descent
Simon Geisler, Tom Wollschl\"ager, M. H. I. Abdalla, Johannes, Gasteiger, Stephan G\"unnemann

TL;DR
This paper introduces an improved PGD-based method for attacking large language models efficiently, significantly reducing computational costs while maintaining high attack success rates.
Contribution
It demonstrates that controlling relaxation errors enhances PGD attack effectiveness, making it a faster alternative to discrete optimization for adversarial prompts.
Findings
PGD attacks become more effective with controlled relaxation errors
The proposed method is up to ten times faster than discrete optimization
Achieves comparable or better attack success rates
Abstract
Current LLM alignment methods are readily broken through specifically crafted adversarial prompts. While crafting adversarial prompts using discrete optimization is highly effective, such attacks typically use more than 100,000 LLM calls. This high computational cost makes them unsuitable for, e.g., quantitative analyses and adversarial training. To remedy this, we revisit Projected Gradient Descent (PGD) on the continuously relaxed input prompt. Although previous attempts with ordinary gradient-based attacks largely failed, we show that carefully controlling the error introduced by the continuous relaxation tremendously boosts their efficacy. Our PGD for LLMs is up to one order of magnitude faster than state-of-the-art discrete optimization to achieve the same devastating attack results.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Topic Modeling
