paper-with-me

홈 › Papers

Improved Generation of Adversarial Examples Against Safety-aligned LLMs

2024-05-28 · Qizhang Li, Yiwen Guo, WangMeng Zuo, Hao Chen

Adversarial prompts generated using gradient-based methods exhibit outstanding performance in performing automatic jailbreak attacks against safety-aligned LLMs. Nevertheless, due to the discrete nature of texts, the input gradient of LLMs struggles to precisely reflect the magnitude of loss change that results from token replacements in the prompt, leading to limited attack success rates against safety-aligned LLMs, even in the white-box setting. In this paper, we explore a new perspective on this problem, suggesting that it can be alleviated by leveraging innovations inspired in transfer-based attacks that were originally proposed for attacking black-box image classification models. For the first time, we appropriate the ideologies of effective methods among these transfer-based attacks, i.e., Skip Gradient Method and Intermediate Level Attack, into gradient-based adversarial prompt generation and achieve significant performance gains without introducing obvious computational cost. Meanwhile, by discussing mechanisms behind the gains, new insights are drawn, and proper combinations of these methods are also developed. Our empirical results show that 87% of the query-specific adversarial suffixes generated by the developed combination can induce Llama-2-7B-Chat to produce the output that exactly matches the target string on AdvBench. This match rate is 33% higher than that of a very strong baseline known as GCG, demonstrating advanced discrete optimization for adversarial prompt generation against LLMs. In addition, without introducing obvious cost, the combination achieves >30% absolute increase in attack success rates compared with GCG when generating both query-specific (38% -> 68%) and universal adversarial prompts (26.68% -> 60.32%) for attacking the Llama-2-7B-Chat model on AdvBench. Code at: https://github.com/qizhangli/Gradient-based-Jailbreak-Attacks.

📄 PDF Abstract BibTeX arXiv:2405.20778

Code (1)

qizhangli/Gradient-based-Jailbreak-Attacks 공식 구현 pytorch

Tasks

image-classificationImage Classification

Similar Papers 제목 키워드 기반

Lightweight Safety Guardrails via Synthetic Data and RL-guided Adversarial Training

2025-07-11 · Aleksei Ilin, Gor Matevosyan, Xueying Ma, Vladimir Eremin 외

We introduce a lightweight yet highly effective safety guardrail framework for language models, demonstrating that small-scale language models can achieve, and even surpass, the performance of larger counterparts in cont…

Generative Adversarial NetworkSynthetic Data Generation

AI Safety in Practice: Enhancing Adversarial Robustness in Multimodal Image Captioning

2024-07-30 · Maisha Binte Rashid, Pablo Rivas

Multimodal machine learning models that combine visual and textual data are increasingly being deployed in critical applications, raising significant safety and security concerns due to their vulnerability to adversarial…

Adversarial RobustnessComputational EfficiencyDecoderImage Captioning

Transferable 3D Adversarial Shape Completion using Diffusion Models

2024-07-14 · Xuelong Dai, Bin Xiao

Recent studies that incorporate geometric features and transformers into 3D point cloud feature learning have significantly improved the performance of 3D deep-learning models. However, their robustness against adversari…

3D Point Cloud ClassificationAdversarial AttackPoint Cloud Classification

Random Transformation of Image Brightness for Adversarial Attack

2021-01-12 · Bo Yang, Kaiyong Xu, Hengjun Wang, Hengwei Zhang

Deep neural networks are vulnerable to adversarial examples, which are crafted by adding small, human-imperceptible perturbations to the original images, but make the model output inaccurate predictions. Before deep neur…

Adversarial AttackData AugmentationImage Augmentation

Robust Safety Classifier for Large Language Models: Adversarial Prompt Shield

2023-10-31 · JinHwa Kim, Ali Derakhshan, Ian G. Harris

Large Language Models' safety remains a critical concern due to their vulnerability to adversarial attacks, which can prompt these systems to produce harmful responses. In the heart of these systems lies a safety classif…