ShieldLearner: A New Paradigm for Jailbreak Attack Defense in LLMs

Ziyi Ni, Hao Wang, Huacan Wang
2/16/2025
cs.CRcs.AIcs.CL

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

Abstract

Large Language Models (LLMs) have achieved remarkable success in various domains but remain vulnerable to adversarial jailbreak attacks. Existing prompt-defense strategies, including parameter-modifying and parameter-free approaches, face limitations in adaptability, interpretability, and customization, constraining their effectiveness against evolving threats. To address these challenges, we propose ShieldLearner, a novel paradigm that mimics human learning in defense. Through trial and error, it autonomously distills attack signatures into a Pattern Atlas and synthesizes defense heuristics into a Meta-analysis Framework, enabling systematic and interpretable threat detection. Furthermore, we introduce Adaptive Adversarial Augmentation to generate adversarial variations of successfully defended prompts, enabling continuous self-improvement without model retraining. In addition to standard benchmarks, we create a hard test set by curating adversarial prompts from the Wildjailbreak dataset, emphasizing more concealed malicious intent. Experimental results show that ShieldLearner achieves a significantly higher defense success rate than existing baselines on both conventional and hard test sets, while also operating with lower computational overhead, making it a practical and efficient solution for real-world adversarial defense.

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. 5 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{ni2025shieldlearner,
  title  = {ShieldLearner: A New Paradigm for Jailbreak Attack Defense in LLMs},
  author = {Ziyi Ni and Hao Wang and Huacan Wang},
  year   = {2025},
  eprint = {2502.13162},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.13162v1}
}

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

Discussion