SDGO: Self-Discrimination-Guided Optimization for Consistent Safety in Large Language Models
Peng Ding, Wen Sun, Dailin Li, Wei Zou, Jiaming Wang, Jiajun Chen, Shujian Huang
摘要
Large Language Models (LLMs) excel at various natural language processing tasks but remain vulnerable to jailbreaking attacks that induce harmful content generation.In this paper, we reveal a critical safety inconsistency: LLMs can more effectively identify harmful requests as discriminators than defend against them as generators.This insight inspires us to explore aligning the model's inherent discrimination and generation capabilities.To this end, we propose SDGO (Self-Discrimination-Guided Optimization), a reinforcement learning framework that leverages the model's own discrimination capabilities as a reward signal to enhance generation safety through iterative selfimprovement.Our method does not require any additional annotated data or external models during the training phase.Extensive experiments demonstrate that SDGO significantly improves model safety compared to both promptbased and training-based baselines while maintaining helpfulness on general benchmarks.By aligning LLMs' discrimination and generation capabilities, SDGO brings robust performance against out-of-distribution (OOD) jailbreaking attacks.This alignment achieves tighter coupling between these two capabilities, enabling the model's generation capability to be further enhanced with only a small amount of discriminative samples.Our code and datasets are available at https://github.com/NJUNLP/SDGO.Qwen2.5-7B-InstructLlama-3.1-8B-InstructGemma-2-9B-IT Llama-3.1-70B-InstructQwen2.5-72B-InstructGPT-4.1 DeepSeek-R1 0 10 20 30 40 50 60 70 80 90 Percentage (%)5.4% 40.2% 36.2% 34.4% 21.0% 18.8% 16.6% 13.8% 20.8% 0.2% 7.8% 0.0% 0.4% 0.6% 78.6% 26.4% 62.6% 57.2% 79.0% 79.8% 82.0% 2.2% 12.6% 1.0% 0.6% 0.0% 1.0% 0.8% Dis Gen Dis Gen Dis Gen Dis Gen
问 Lune
尽管问,回答会引用原文。
Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。
它引用的 Paper10
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language ModelsXiaogeng Liu, Nan Xu, Muhao Chen, Chaowei XiaoICLR 2024 · 722 次引用
- Catastrophic Jailbreak of Open-source LLMs via Exploiting GenerationYangsibo Huang, Samyak Gupta, Mengzhou Xia, Kai Li 等ICLR 2024 · 481 次引用
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language ModelsXinyue Shen, Zeyuan Chen, Michael Backes, Yun Shen 等CCS 2024 · 132 次引用
- Learning to summarize with human feedbackNisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel M. Ziegler 等NeurIPS 2020 · 124 次引用
相关 Paper
- Why Not Act on What You Know? Unleashing Safety Potential of LLMs via Self-Aware Guard EnhancementPeng Ding, Jun Kuang, Zongyu Wang, Xuezhi Cao 等ACL Findings 2025
- Bleeding Pathways: Vanishing Discriminability in LLM Hidden States Fuels Jailbreak AttacksYingjie Zhang, Tong Liu, Zhe Zhao, Guozhu Meng 等NDSS 2026 · 5 次引用
- SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical MannerXunguang Wang, Daoyuan Wu, Zhenlan Ji, Zongjie Li 等USENIX Security 2025
- Safety Instincts: LLMs Learn to Trust Their Internal Compass for Self-DefenseGuobin Shen, Dongcheng Zhao, Haibo Tong, Jindong Li 等ICLR 2026 · 4 次引用
- Improving LLM Safety Alignment with Dual-Objective OptimizationXuandong Zhao, Will Cai, Tianneng Shi, David Huang 等ICML 2025
