Revisiting Jailbreaking for Large Language Models: A Representation Engineering Perspective

Tianlong Li, Zhenghua Wang, Wenhao Liu, Muling Wu, Shihan Dou +4 more
1/12/2024
cs.CLcs.AI

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

Abstract

The recent surge in jailbreaking attacks has revealed significant vulnerabilities in Large Language Models (LLMs) when exposed to malicious inputs. While various defense strategies have been proposed to mitigate these threats, there has been limited research into the underlying mechanisms that make LLMs vulnerable to such attacks.

Show full abstract

In this study, we suggest that the self-safeguarding capability of LLMs is linked to specific activity patterns within their representation space. Although these patterns have little impact on the semantic content of the generated text, they play a crucial role in shaping LLM behavior under jailbreaking attacks. Our findings demonstrate that these patterns can be detected with just a few pairs of contrastive queries. Extensive experimentation shows that the robustness of LLMs against jailbreaking can be manipulated by weakening or strengthening these patterns. Further visual analysis provides additional evidence for our conclusions, providing new insights into the jailbreaking phenomenon. These findings highlight the importance of addressing the potential misuse of open-source LLMs within the community.

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. 2 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{li2024revisiting,
  title  = {Revisiting Jailbreaking for Large Language Models: A Representation Engineering Perspective},
  author = {Tianlong Li and Zhenghua Wang and Wenhao Liu and Muling Wu and Shihan Dou and Changze Lv and Xiaohua Wang and Xiaoqing Zheng and Xuanjing Huang},
  year   = {2024},
  eprint = {2401.06824},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.06824v5}
}

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/2401.06824.svg)](https://codeofpaper.com/paper/2401.06824)

Discussion