Lune

NeurIPS2024Top-tier venue

MoGU: A Framework for Enhancing Safety of LLMs While Preserving Their Usability

Yanrui Du, Sendong Zhao, Danyang Zhao, Ming Ma, Yuhan Chen, Liangyu Huo, Qing Yang, Dongliang Xu, Bing Qin

Abstract

Large Language Models (LLMs) are increasingly deployed in various applications. As their usage grows, concerns regarding their safety are rising, especially in maintaining harmless responses when faced with malicious instructions. Many defense strategies have been developed to enhance the safety of LLMs. However, our research finds that existing defense strategies lead LLMs to predominantly adopt a rejection-oriented stance, thereby diminishing the usability of their responses to benign instructions. To solve this problem, we introduce the MoGU framework, designed to enhance LLMs’ safety while preserving their usability. Our MoGU framework transforms the base LLM into two variants: the usable LLM and the safe LLM, and further employs dynamic routing to balance their contribution. When encountering malicious instructions, the router will assign a higher weight to the safe LLM to ensure that responses are harmless. Conversely, for benign instructions, the router prioritizes the usable LLM, facilitating usable and helpful responses. On various LLMs, we compare multiple defense strategies to verify the superiority of our MoGU framework. Besides, our analysis provides key insights into the effectiveness of MoGU and verifies that our designed routing mechanism can effectively balance the contribution of each variant by assigning weights. Our work released the safer Llama2 7 B , Vicuna 7 B , Falcon 7 B , Dolphin 7 B , and Baichuan2 7 B at github 2 . Warning: This paper presents examples of malicious instructions that may be offensive and upsetting.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks Safety cites Training language models to follow instructions with human feedback
  • SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces cites LoRA: Low-Rank Adaptation of Large Language Models
  • Conformal Arbitrage: Risk-Controlled Balancing of Competing Objectives in Language Models cites Training language models to follow instructions with human feedback
  • Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! cites Training language models to follow instructions with human feedback
  • LIMA: Less Is More for Alignment cites Training language models to follow instructions with human feedback
  • Jailbreak to Protect: Buffering Harmful Fine-Tuning via Temporary Jailbreaking LoRA in Large Language Models cites Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!
  • Jailbroken: How Does LLM Safety Training Fail? cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. When One LLM Drools, Multi-LLM Collaboration RulesShangbin Feng, Wenxuan Ding, Alisa Liu, Zifeng Wang et al.ACL 2026 · 27 citations
  2. Conformal Arbitrage: Risk-Controlled Balancing of Competing Objectives in Language ModelsWilliam Overman, Mohsen BayatiNeurIPS 2025 · 12 citations
  3. SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database InterfacesRuiheng Liu, Xiaobing Chen, Jinyu Zhang, Qiongwen Zhang et al.AAAI 2026 · 1 citation
  4. Benign Samples Matter! Fine-tuning On Outlier Benign Samples Severely Breaks SafetyZihan Guan, Mengxuan Hu, Ronghang Zhu, Sheng Li et al.ICML 2025
  5. Jailbreak to Protect: Buffering Harmful Fine-Tuning via Temporary Jailbreaking LoRA in Large Language ModelsSeokil Ham, Jaehyuk Jang, Wonjun Lee, Changick KimICML 2026

Builds on18

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  3. Jailbroken: How Does LLM Safety Training Fail?Alexander Wei, Nika Haghtalab, Jacob SteinhardtNeurIPS 2023 · 2,230 citations
  4. LIMA: Less Is More for AlignmentChunting Zhou, Pengfei Liu, Puxin Xu, Srinivasan Iyer et al.NeurIPS 2023 · 1,486 citations
  5. Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!Xiangyu Qi, Yi Zeng, Tinghao Xie, Pin-Yu Chen et al.ICLR 2024 · 1,104 citations

Related papers

  1. The Art of Defending: A Systematic Evaluation and Analysis of LLM Defense Strategies on Safety and Over-DefensivenessNeeraj Varshney, Pavel Dolin, Agastya Seth, Chitta BaralACL Findings 2024 · 13 citations
  2. SDD: Self-Degraded Defense against Malicious Fine-tuningZixuan Chen, Weikai Lu, Xin Lin, Ziqian ZengACL 2025
  3. How Jailbreak Defenses Work and Ensemble? A Mechanistic InvestigationZhuohan Long, Siyuan Wang, Shujun Liu, Yuhang LaiEMNLP Findings 2025 · 1 citation
  4. Root Defense Strategies: Ensuring Safety of LLM at the Decoding LevelXinyi Zeng, Yuying Shang, Jiawei Chen, Jingyuan Zhang et al.ACL 2025 · 6 citations
  5. LlmFixer: Fix the Helpfulness of Defensive Large Language ModelsZelong Yu, Xiaoming Zhang, Litian Zhang, Yu Yuan et al.EMNLP Findings 2025
Dusk over the sea between two cliffs drawn in fine vertical lines