FlipAttack: Jailbreak LLMs via Flipping

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Yue, He, Xiaoxin, Xiong, Miao, Fu, Jinlan, Deng, Shumin, Ma, Yingwei, Zhang, Jiaheng, Hooi, Bryan
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917497440043008
author Liu, Yue
He, Xiaoxin
Xiong, Miao
Fu, Jinlan
Deng, Shumin
Ma, Yingwei
Zhang, Jiaheng
Hooi, Bryan
author_facet Liu, Yue
He, Xiaoxin
Xiong, Miao
Fu, Jinlan
Deng, Shumin
Ma, Yingwei
Zhang, Jiaheng
Hooi, Bryan
contents This paper proposes a simple yet effective jailbreak attack named FlipAttack against black-box LLMs. First, from the autoregressive nature, we reveal that LLMs tend to understand the text from left to right and find that they struggle to comprehend the text when noise is added to the left side. Motivated by these insights, we propose to disguise the harmful prompt by constructing left-side noise merely based on the prompt itself, then generalize this idea to 4 flipping modes. Second, we verify the strong ability of LLMs to perform the text-flipping task, and then develop 4 variants to guide LLMs to denoise, understand, and execute harmful behaviors accurately. These designs keep FlipAttack universal, stealthy, and simple, allowing it to jailbreak black-box LLMs within only 1 query. Experiments on 8 LLMs demonstrate the superiority of FlipAttack. Remarkably, it achieves $\sim$98\% attack success rate on GPT-4o, and $\sim$98\% bypass rate against 5 guardrail models on average. The codes are available at GitHub\footnote{https://github.com/yueliu1999/FlipAttack}.
format Preprint
id arxiv_https___arxiv_org_abs_2410_02832
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle FlipAttack: Jailbreak LLMs via Flipping
Liu, Yue
He, Xiaoxin
Xiong, Miao
Fu, Jinlan
Deng, Shumin
Ma, Yingwei
Zhang, Jiaheng
Hooi, Bryan
Cryptography and Security
Artificial Intelligence
This paper proposes a simple yet effective jailbreak attack named FlipAttack against black-box LLMs. First, from the autoregressive nature, we reveal that LLMs tend to understand the text from left to right and find that they struggle to comprehend the text when noise is added to the left side. Motivated by these insights, we propose to disguise the harmful prompt by constructing left-side noise merely based on the prompt itself, then generalize this idea to 4 flipping modes. Second, we verify the strong ability of LLMs to perform the text-flipping task, and then develop 4 variants to guide LLMs to denoise, understand, and execute harmful behaviors accurately. These designs keep FlipAttack universal, stealthy, and simple, allowing it to jailbreak black-box LLMs within only 1 query. Experiments on 8 LLMs demonstrate the superiority of FlipAttack. Remarkably, it achieves $\sim$98\% attack success rate on GPT-4o, and $\sim$98\% bypass rate against 5 guardrail models on average. The codes are available at GitHub\footnote{https://github.com/yueliu1999/FlipAttack}.
title FlipAttack: Jailbreak LLMs via Flipping
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2410.02832