SaRO: Enhancing LLM Safety through Reasoning-based Alignment

Yutao Mou, Yuxiao Luo, Shikun Zhang, Wei Ye
4/13/2025
cs.CL

No official code found. Best implementation: MurrayTom/SaRO (4 stars, last commit 2025-04-13).

Abstract

Current safety alignment techniques for large language models (LLMs) face two key challenges: (1) under-generalization, which leaves models vulnerable to novel jailbreak attacks, and (2) over-alignment, which leads to the excessive refusal of benign instructions. Our preliminary investigation reveals semantic overlap between jailbreak/harmful queries and normal prompts in embedding space, suggesting that more effective safety alignment requires a deeper semantic understanding. This motivates us to incorporate safety-policy-driven reasoning into the alignment process. To this end, we propose the Safety-oriented Reasoning Optimization Framework (SaRO), which consists of two stages: (1) Reasoning-style Warmup (RW) that enables LLMs to internalize long-chain reasoning through supervised fine-tuning, and (2) Safety-oriented Reasoning Process Optimization (SRPO) that promotes safety reflection via direct preference optimization (DPO). Extensive experiments demonstrate the superiority of SaRO over traditional alignment methods.

View on arXivView PDF

Code Implementations(1)

MurrayTom/SaROCommunity66%

This is the official implementation of "SaRO: Enhancing LLM Safety through Reasoning-based Alignment"

40Apr 13, 20251 years ago

Similar Papers

Cite this paper

@article{mou2025saro,
  title  = {SaRO: Enhancing LLM Safety through Reasoning-based Alignment},
  author = {Yutao Mou and Yuxiao Luo and Shikun Zhang and Wei Ye},
  year   = {2025},
  eprint = {2504.09420},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.09420v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.09420.svg)](https://codeofpaper.com/paper/2504.09420)

Discussion