JBShield: Defending Large Language Models from Jailbreak Attacks through Activated Concept Analysis and Manipulation
Shenyi Zhang, Yuchen Zhai, Keyan Guo, Hongxin Hu, Shengnan Guo, Zheng Fang, Lingchen Zhao, Chao Shen, Cong Wang, Qian Wang
摘要
Despite the implementation of safety alignment strategies, large language models (LLMs) remain vulnerable to jailbreak attacks, which undermine these safety guardrails and pose significant security threats. Some defenses have been proposed to detect or mitigate jailbreaks, but they are unable to withstand the test of time due to an insufficient understanding of jailbreak mechanisms. In this work, we investigate the mechanisms behind jailbreaks based on the Linear Representation Hypothesis (LRH), which states that neural networks encode high-level concepts as subspaces in their hidden representations. We define the toxic semantics in harmful and jailbreak prompts as toxic concepts and describe the semantics in jailbreak prompts that manipulate LLMs to comply with unsafe requests as jailbreak concepts. Through concept extraction and analysis, we reveal that LLMs can recognize the toxic concepts in both harmful and jailbreak prompts. However, unlike harmful prompts, jailbreak prompts activate the jailbreak concepts and alter the LLM output from rejection to compliance. Building on our analysis, we propose a comprehensive jailbreak defense framework, JBShield, consisting of two key components: jailbreak detection JBShield-D and mitigation JBShield-M. JBShield-D identifies jailbreak prompts by determining whether the input activates both toxic and jailbreak concepts. When a jailbreak prompt is detected, JBShield-M adjusts the hidden representations of the target LLM by enhancing the toxic concept and weakening the jailbreak concept, ensuring LLMs produce safe content. Extensive experiments demonstrate the superior performance of JBShield, achieving an average detection accuracy of 0.95 and reducing the average attack success rate of various jailbreak attacks to 2% from 61% across distinct LLMs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Sok: Evaluating Jailbreak Guardrails for Large Language Models 引用了 Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- Sok: Evaluating Jailbreak Guardrails for Large Language Models 引用了 Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!
- Sok: Evaluating Jailbreak Guardrails for Large Language Models 引用了 Training language models to follow instructions with human feedback
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! 引用了 Training language models to follow instructions with human feedback
- When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured Output 引用了 Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- Dual-Space Smoothness for Robust and Balanced LLM Unlearning 引用了 Measuring Massive Multitask Language Understanding
- Refusal in Language Models Is Mediated by a Single Direction 引用了 Measuring Massive Multitask Language Understanding
- Refusal in Language Models Is Mediated by a Single Direction 引用了 Training language models to follow instructions with human feedback
引用它的顶会 Paper14
- Sok: Evaluating Jailbreak Guardrails for Large Language ModelsXunguang Wang, Zhenlan Ji, Wenxuan Wang, Zongjie Li 等S&P 2026 · 27 次引用
- Bits Leaked per Query: Information-Theoretic Bounds for Adversarial Attacks on LLMsMasahiro Kaneko, Timothy BaldwinNeurIPS 2025 · 6 次引用
- When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured OutputShuoming Zhang, Jiacheng Zhao, Hanyuan Dong, Ruiyuan Xu 等CCS 2026 · 6 次引用
- Dual-Space Smoothness for Robust and Balanced LLM UnlearningHan Yan, Zheyuan Liu, Meng JiangICLR 2026 · 5 次引用
- GAVEL: Towards Rule-Based Safety through Activation MonitoringShir Rozenfeld, Rahul Pankajakshan, Itay Zloczower, Eyal Lenga 等ICLR 2026 · 4 次引用
它引用的 Paper24
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- Refusal in Language Models Is Mediated by a Single DirectionAndy Arditi, Oscar Obeso, Aaquib Syed, Daniel Paleka 等NeurIPS 2024 · 1,166 次引用
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!Xiangyu Qi, Yi Zeng, Tinghao Xie, Pin-Yu Chen 等ICLR 2024 · 1,104 次引用
- Tree of Attacks: Jailbreaking Black-Box LLMs AutomaticallyAnay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson 等NeurIPS 2024 · 835 次引用
相关 Paper
- MirrorShield: Towards Dynamic Adaptive Defense Against Jailbreaks via Entropy-Guided Mirror CraftingRui Pu, Chaozhuo Li, Rui Ha, Litian Zhang 等AAAI 2026
- Towards Understanding Jailbreak Attacks in LLMs: A Representation Space AnalysisYuping Lin, Pengfei He, Han Xu, Yue Xing 等EMNLP 2024 · 6 次引用
- JailbreakScope: Interpreting Jailbreak Mechanism through Representation and Circuit AnalysesZeqing He, Zhibo Wang, Zhixuan Chu, Huiyu Xu 等USENIX Security 2026
- SafeInt: Shielding Large Language Models from Jailbreak Attacks via Safety-Aware Representation InterventionJiaqi Wu, Chen Chen, Chunyan Hou, Xiaojie YuanEMNLP Findings 2025 · 5 次引用
- GraphShield: Graph-Theoretic Modeling of Network-Level Dynamics for Robust Jailbreak DetectionSunghee Dong, Sungwon Yi, Kangmin Bae, Jaeyoon Kim 等ICLR 2026
