Many recent studies showed that LLMs are vulnerable to jailbreak attacks, where an attacker can perturb the input of an LLM to induce it to generate an output for a harmful question. In general, existing jailbreak techniques either optimize a semantic template intended to induce the LLM to produce harmful outputs or optimize a suffix that leads the LLM to initiate its response with specific tokens (e.g., "Sure").
In this work, we introduce TASO (Template and Suffix Optimization), a novel jailbreak method that optimizes both a template and a suffix in an alternating manner. Our insight is that suffix optimization and template optimization are complementary to each other: suffix optimization can effectively control the first few output tokens but cannot control the overall quality of the output, while template optimization provides guidance for the entire output but cannot effectively control the initial tokens, which significantly impact subsequent responses. Thus, they can be combined to improve the attack's effectiveness.
We evaluate the effectiveness of TASO on benchmark datasets (including HarmBench and AdvBench) on 24 leading LLMs (including models from the Llama family, OpenAI, and DeepSeek). The results demonstrate that TASO can effectively jailbreak existing LLMs. We hope our work can inspire future studies in exploring this direction.
GAS-Leak-LLM: Genetic Algorithm-Based Suffix Optimization for Black-Box LLM Jailbreaking
Department of Electrical, Computer and Biomedical Engineering(电气、计算机与生物医学工程系);University of Pavia(帕维亚大学);Department of Computer Applications(计算机应用系);Cochin University of Science and Technology(科钦科学技术大学)
Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks?
Politecnico di Milano(米兰理工学院);Beihang University(北京航空航天大学);East China Normal University(华东师范大学);Fudan University(复旦大学);University of the Chinese Academy of Sciences(中国科学院大学);AI Security Lab(360人工智能安全实验室)
AdaPPA: Adaptive Position Pre-Fill Jailbreak Attack Approach Targeting LLMs
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院)
CCFC: Core & Core-Full-Core Dual-Track Defense for LLM Jailbreak Protection
Department. of Math & Statistics, Boston University(数学与统计学系,波士顿大学);Department. of Computer Science, University at Albany(计算机科学系,阿尔巴尼大学);Department. of ECE & Systems Eng., Department. of Biomedical Eng., Faculty of Computing & Data Sciences, Boston University(电子工程与系统工程系,生物医学工程系,计算与数据科学学院,波士顿大学)
TRAP: Targeted Random Adversarial Prompt Honeypot for Black-Box Identification
Parameter Lab(参数实验室);IT University of Copenhagen(哥本哈根信息技术大学);Pioneer Centre for Artificial Intelligence(人工智能先锋中心);NAVER AI Lab(NAVER人工智能实验室);University of Tübingen(蒂宾根大学)
State Key Laboratory of Blockchain and Data Security, Zhejiang University(区块链与数据安全国家重点实验室,浙江大学);Hangzhou High-Tech Zone, Binjiang Institute of Blockchain and Data Security, Hangzhou(杭州高新技术区,滨江区块链与数据安全研究院);School of Cyberspace Security, Nanjing University of Science and Technology(网络安全学院,南京理工大学);School of Computer Science, Shanghai Jiao Tong University(计算机科学学院,上海交通大学);College of Computing and Data Science, Nanyang Technological University(计算与数据科学学院,新加坡国立大学);King Abdullah University of Science and Technology (KAUST)(卡布斯科学与技术大学)