EMNLP Findings2024
How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden States
Zhenhong Zhou, Haiyang Yu, Xinghua Zhang, Rongwu Xu, Fei Huang, Yongbin Li
Abstract
Large language models (LLMs) rely on safety alignment to avoid responding to malicious user inputs. Unfortunately, jailbreak can circumvent safety guardrails, resulting in LLMs generating harmful content and raising concerns about LLM safety. Due to language models with intensive parameters often regarded as black boxes, the mechanisms of alignment and jailbreak are challenging to elucidate. In this paper, we employ weak classifiers to explain LLM safety through the intermediate hidden states. We first confirm that LLMs learn ethical concepts during pre-training rather than alignment and can identify malicious and normal inputs in the early layers. Alignment actually associates the early concepts with emotion guesses in the middle layers and then refines them to the specific reject tokens for safe generations. Jailbreak disturbs the transformation of early unethical classification into negative emotions. We conduct experiments on models from 7B to 70B across various model families to prove our conclusion. Overall, our paper indicates the intrinsical mechanism of LLM safety and how jailbreaks circumvent safety guardrails, offering a new perspective on LLM safety and reducing concerns. Our code is available at https://github.com/ydyjya/LLM-IHS-Explanation.
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 35 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers35
- AlphaSteer: Learning Refusal Steering with Principled Null-Space ConstraintLeheng Sheng, Changshuo Shen, Weixiang Zhao, Junfeng Fang et al.ICLR 2026 · 52 citations
- Mix Data or Merge Models? Balancing the Helpfulness, Honesty, and Harmlessness of Large Language Model via Model MergingJinluan Yang, Dingnan Jin, Anke Tang, Li Shen et al.NeurIPS 2025 · 23 citations
- GeneBreaker: Jailbreak Attacks against DNA Language Models with Pathogenicity GuidanceZaixi Zhang, Zhenghong Zhou, Ruofan Jin, Le Cong et al.ICLR 2026 · 17 citations
- from Benign import Toxic: Jailbreaking the Language Model via Adversarial MetaphorsYu Yan, Sheng Sun, Zenghao Duan, Teli Liu et al.ACL 2025 · 14 citations
- DiffuGuard: How Intrinsic Safety is Lost and Found in Diffusion Large Language ModelsZherui Li, Zheng Nie, Zhenhong Zhou, Yue Liu et al.ICLR 2026 · 12 citations
Builds on3
- LIMA: Less Is More for AlignmentChunting Zhou, Pengfei Liu, Puxin Xu, Srinivasan Iyer et al.NeurIPS 2023 · 1,486 citations
- Uncovering Safety Risks of Large Language Models through Concept Activation VectorZhihao Xu, Ruixuan Huang, Changyu Chen, Xiting WangNeurIPS 2024 · 83 citations
- Label Words are Anchors: An Information Flow Perspective for Understanding In-Context LearningLean Wang, Lei Li, Damai Dai, Deli Chen et al.EMNLP 2023 · 26 citations
Related papers
- SABER: Uncovering Vulnerabilities in Safety Alignment via Cross-Layer Residual ConnectionMaithili Joshi, Palash Nandi, Tanmoy ChakrabortyEMNLP 2025 · 1 citation
- JBShield: Defending Large Language Models from Jailbreak Attacks through Activated Concept Analysis and ManipulationShenyi Zhang, Yuchen Zhai, Keyan Guo, Hongxin Hu et al.USENIX Security 2025
- Jailbreaking Attacks vs. Content Safety Filters: How Far Are We in the LLM Safety Arms Race?Yuan Xin, Dingfan Chen, Linyi Yang, Michael Backes et al.ACL Findings 2026
- QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query LanguageQingsong Zou, Jingyu Xiao, Qing Li, Zhi Yan et al.ACL Findings 2025 · 4 citations
- Weak-to-Strong Jailbreaking on Large Language ModelsXuandong Zhao, Xianjun Yang, Tianyu Pang, Chao Du et al.ICML 2025
