Multi-Turn Context Jailbreak Attack on Large Language Models From First Principles

Xiongtao Sun, Deyue Zhang, Dongdong Yang, Quanchen Zou, Hui Li
8/8/2024
cs.CLcs.AI

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Large language models (LLMs) have significantly enhanced the performance of numerous applications, from intelligent conversations to text generation. However, their inherent security vulnerabilities have become an increasingly significant challenge, especially with respect to jailbreak attacks. Attackers can circumvent the security mechanisms of these LLMs, breaching security constraints and causing harmful outputs. Focusing on multi-turn semantic jailbreak attacks, we observe that existing methods lack specific considerations for the role of multiturn dialogues in attack strategies, leading to semantic deviations during continuous interactions. Therefore, in this paper, we establish a theoretical foundation for multi-turn attacks by considering their support in jailbreak attacks, and based on this, propose a context-based contextual fusion black-box jailbreak attack method, named Context Fusion Attack (CFA). This method approach involves filtering and extracting key terms from the target, constructing contextual scenarios around these terms, dynamically integrating the target into the scenarios, replacing malicious key terms within the target, and thereby concealing the direct malicious intent. Through comparisons on various mainstream LLMs and red team datasets, we have demonstrated CFA's superior success rate, divergence, and harmfulness compared to other multi-turn attack strategies, particularly showcasing significant advantages on Llama3 and GPT-4.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sun2024multiturn,
  title  = {Multi-Turn Context Jailbreak Attack on Large Language Models From First Principles},
  author = {Xiongtao Sun and Deyue Zhang and Dongdong Yang and Quanchen Zou and Hui Li},
  year   = {2024},
  eprint = {2408.04686},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.04686v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.04686.svg)](https://codeofpaper.com/paper/2408.04686)

Discussion