AdvPrompter: Fast Adaptive Adversarial Prompting for LLMs

Anselm Paulus, Arman Zharmagambetov, Chuan Guo, Brandon Amos, Yuandong Tian

arXiv:2404.16873 · 2026-07-27 공개 · arXiv · PDF

llm-robustness harmbench adversarial-suffixes adversarial-prompting jailbreaking-attacks advprompter alternating-optimization llm-red-teaming

Abstract

Large Language Models (LLMs) are vulnerable to jailbreaking attacks that lead to generation of inappropriate or harmful content. Manual red-teaming requires a time-consuming search for adversarial prompts, whereas automatic adversarial prompt generation often leads to semantically meaningless attacks that do not scale well. In this paper, we present a novel method that uses another LLM, called AdvPrompter, to generate human-readable adversarial prompts in seconds. AdvPrompter, which is trained using an alternating optimization algorithm, generates suffixes that veil the input instruction without changing its meaning, such that the TargetLLM is lured to give a harmful response. Experimental results on popular open source TargetLLMs show highly competitive results on the AdvBench and HarmBench datasets, that also transfer to closed-source black-box LLMs. We also show that training on adversarial suffixes generated by AdvPrompter is a promising strategy for improving the robustness of LLMs to jailbreaking attacks.

한국어 요약

한 줄 요약

AdvPrompter는 인간 읽기 가능한 적대적 프롬프트를 초단위로 생성하는 LLM 자이징 공격 방식을 제시한다.

핵심 기여도

핵심 아이디어

자이징 공격은 LLM이 안전 정책을 우회하게 만드는 적대적 프롬프트를 생성하는 것이 핵심이다. 기존 방법은 계산 비용이 높거나 의미 없는 프롬프트를 생성하는 문제가 있었다.
AdvPrompter는 이 문제를 해결하기 위해, **다른 LLM을 적대적 프롬프트 생성기로 훈련**하는 방식을 제안한다. 이는 강화 학습과 유사한 방식으로, **적대적 접미사(suffix)**를 생성하며, 이 접미사는 입력 지시문의 의미를 유지하면서도 LLM이 해로운 응답을 하도록 유도한다.
AdvPrompter는 **AdvPrompterOpt** 알고리즘을 통해 반복적으로 적대적 접미사를 생성하고, 생성된 데이터로 자기 자신을 미세 조정(fine-tuning)한다. 이 과정은 **AdvPrompterTrain**이라는 대체 최적화 알고리즘을 통해 이루어진다.
결과적으로, AdvPrompter는 기존 방법 대비 **더 빠르고, 더 적응력 있고, 더 인간 읽기 가능한 적대적 프롬프트**를 생성할 수 있다.

기술적 접근법

주요 결과

의의 및 한계

AdvPrompter는 LLM 자이징 공격의 **자동화와 인간 읽기 가능성**을 동시에 달성한 첫 번째 시도로, LLM 안전성 연구에 중요한 기여를 한다. 특히, **적대적 훈련을 통한 로버스트성 향상**은 실용적인 방어 전략으로 활용 가능하다.
하지만, 본 연구는 **안전 강화된 시스템 메시지** 등 일부 방어 메커니즘에만 검증되었으며, **고급 방어 기법**은 고려하지 않았다. 또한, **적대적 프롬프트 생성의 윤리적 문제**는 논의되지 않았다.

실용적 활용

AdvPrompter는 LLM 개발자들이 **자동화된 레드팀 테스트**를 수행하는 데 유용하며, **적대적 훈련 데이터셋 생성**에도 활용 가능하다. 특히, **자체적 안전 정책 개선**을 위한 반복적 훈련(AdvPrompter + TargetLLM) 시스템 구축에 기초가 될 수 있다.