JailPO: A Novel Black-box Jailbreak Framework via Preference Optimization against Aligned LLMs
Hongyi Li, Jiawei Ye, Jie Wu, Tianjie Yan, Chu Wang, Zhixin Li
TL;DR
JailPO tackles the vulnerability of aligned LLMs to jailbreak prompts under black-box constraints by automatically learning effective jailbreak prompts through preference optimization. It uses two attack models to generate covert questions and templates and leverages SimPO-based preference fine-tuning to optimize prompts, yielding three jailbreak patterns that cover diverse attack surfaces. Empirical results on AdvBench across multiple open-source and commercial LLMs show JailPO achieves high effectiveness with far fewer queries, while maintaining robustness to defenses, and reveal that complex templates enhance attack strength while covert transformations trigger riskier responses. This work provides a scalable methodology for evaluating LLM alignment and informs defense design against automated prompt-based jailbreaks.
Abstract
Large Language Models (LLMs) aligned with human feedback have recently garnered significant attention. However, it remains vulnerable to jailbreak attacks, where adversaries manipulate prompts to induce harmful outputs. Exploring jailbreak attacks enables us to investigate the vulnerabilities of LLMs and further guides us in enhancing their security. Unfortunately, existing techniques mainly rely on handcrafted templates or generated-based optimization, posing challenges in scalability, efficiency and universality. To address these issues, we present JailPO, a novel black-box jailbreak framework to examine LLM alignment. For scalability and universality, JailPO meticulously trains attack models to automatically generate covert jailbreak prompts. Furthermore, we introduce a preference optimization-based attack method to enhance the jailbreak effectiveness, thereby improving efficiency. To analyze model vulnerabilities, we provide three flexible jailbreak patterns. Extensive experiments demonstrate that JailPO not only automates the attack process while maintaining effectiveness but also exhibits superior performance in efficiency, universality, and robustness against defenses compared to baselines. Additionally, our analysis of the three JailPO patterns reveals that attacks based on complex templates exhibit higher attack strength, whereas covert question transformations elicit riskier responses and are more likely to bypass defense mechanisms.
