Stand on The Shoulders of Giants: Building JailExpert from Previous Attack Experience

Xi Wang, Songlei Jian, Shasha Li, Xiaopeng Li, Bin Ji +7 more
8/25/2025
cs.CRcs.AI

Official code: xiZAIzai/JailExpert (23 stars, MIT, last commit 2025-09-09).

Abstract

Large language models (LLMs) generate human-aligned content under certain safety constraints. However, the current known technique ``jailbreak prompt'' can circumvent safety-aligned measures and induce LLMs to output malicious content. Research on Jailbreaking can help identify vulnerabilities in LLMs and guide the development of robust security frameworks. To circumvent the issue of attack templates becoming obsolete as models evolve, existing methods adopt iterative mutation and dynamic optimization to facilitate more automated jailbreak attacks. However, these methods face two challenges: inefficiency and repetitive optimization, as they overlook the value of past attack experiences. To better integrate past attack experiences to assist current jailbreak attempts, we propose the \textbf{JailExpert}, an automated jailbreak framework, which is the first to achieve a formal representation of experience structure, group experiences based on semantic drift, and support the dynamic updating of the experience pool. Extensive experiments demonstrate that JailExpert significantly improves both attack effectiveness and efficiency. Compared to the current state-of-the-art black-box jailbreak methods, JailExpert achieves an average increase of 17\% in attack success rate and 2.7 times improvement in attack efficiency. Our implementation is available at \href{https://github.com/xiZAIzai/JailExpert}{XiZaiZai/JailExpert}

View on arXivView PDF

Code Implementations(1)

MIT

This is the official repository for JailExpert

230Shell, PythonAug 25, 20251 years agoMIT

Similar Papers

Cite this paper

@article{wang2025stand,
  title  = {Stand on The Shoulders of Giants: Building JailExpert from Previous Attack Experience},
  author = {Xi Wang and Songlei Jian and Shasha Li and Xiaopeng Li and Bin Ji and Jun Ma and Xiaodong Liu and Jing Wang and Feilong Bao and Jianfeng Zhang and Baosheng Wang and Jie Yu},
  year   = {2025},
  eprint = {2508.19292},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.19292v1}
}

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

Discussion