Mitigating the Safety Alignment Tax with Null-Space Constrained Policy Optimization
Yifan Niu, Han Xiao, Dongyi Liu, Nuo Chen, Jia Li
Abstract
As Large Language Models (LLMs) are increasingly deployed in real-world applications, it is important to ensure their behaviors align with human values, societal norms, and ethical principles. However, safety alignment under Reinforcement Learning (RL) often suffers from forgetting learned general abilities, which is also known as the alignment tax. To address this issue, we introduce Null-Space constrained Policy Optimization (NSPO), a novel RL framework for LLM safety alignment while preserving their core abilities. The safety policy gradients are geometrically projected into the null space of general tasks, thereby mitigating the safety alignment tax. In addition, we theoretically prove that NSPO preserves the model's original core capabilities, while still guaranteeing a descent direction for effective safety alignment. Extensive experiments demonstrate that NSPO outperforms existing methods by a large margin, achieving state-of-the-art safety performance without sacrificing accuracy on general tasks, including math, code, and instruction-following tasks. Notably, NSPO is data-efficient and only requires 40% of public human-annotated safety data from PKU-SafeRLHF to achieve promising safety performance, without a large amount of mixed general tasks data in existing alignment methods. The code is available at https://github.com/ivanniu/NSPO .
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.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedback cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedback cites Training language models to follow instructions with human feedback
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
- Revisiting Robustness for LLM Safety Alignment via Selective Geometry Control cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Revisiting Robustness for LLM Safety Alignment via Selective Geometry Control cites HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- Revisiting Robustness for LLM Safety Alignment via Selective Geometry Control cites Training language models to follow instructions with human feedback
- ASRU: Activation Steering Meets Reinforcement Unlearning for Multimodal Large Language Models cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
Cited by top-tier papers2
- Revisiting Robustness for LLM Safety Alignment via Selective Geometry ControlYonghui Yang, Wenjian Tao, Jilong Liu, Xingyu Zhu et al.ICML 2026 · 4 citations
- ASRU: Activation Steering Meets Reinforcement Unlearning for Multimodal Large Language ModelsJiahui Guang, Haiyan Wang, Yingjie Zhu, Cuiyun Gao et al.ICML 2026
Builds on27
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust RefusalMantas Mazeika, Long Phan, Xuwang Yin, Andy Zou et al.ICML 2024 · 1,031 citations
- AlpacaFarm: A Simulation Framework for Methods that Learn from Human FeedbackYann Dubois, Chen Xuechen Li, Rohan Taori, Tianyi Zhang et al.NeurIPS 2023 · 948 citations
Related papers
- Enhancing Safety in Reinforcement Learning with Human Feedback via Rectified Policy OptimizationXiyue Peng, Hengquan Guo, Jiawei Zhang, Dongqing Zou et al.NeurIPS 2025 · 9 citations
- SafeDPO: A Simple Approach to Direct Preference Optimization with Enhanced SafetyGeon-Hyeong Kim, Yu Jin Kim, Byoungjip Kim, Honglak Lee et al.ICLR 2026 · 42 citations
- Efficient Safety Alignment of Large Language Models via Preference Re-ranking and Representation-based Reward ModelingQiyuan Deng, Xuefeng Bai, Kehai Chen, Yaowei Wang et al.ACL 2025
- Stepwise Alignment for Constrained Language Model Policy OptimizationAkifumi Wachi, Thien Q. Tran, Rei Sato, Takumi Tanabe et al.NeurIPS 2024 · 33 citations
- AlphaAlign: Incentivizing Safety Alignment with Extremely Simplified Reinforcement LearningYi Zhang, An Zhang, XiuYu Zhang, Leheng Sheng et al.ICLR 2026 · 15 citations
