SafeChain: Safety of Language Models with Long Chain-of-Thought Reasoning Capabilities

Fengqing Jiang, Zhangchen Xu, Yuetai Li, Luyao Niu, Zhen Xiang +3 more
2/17/2025
cs.AIcs.CL

No official code found. Best implementation: uw-nsl/safechain (30 stars, GPL-3.0, last commit 2025-04-02).

Abstract

Emerging large reasoning models (LRMs), such as DeepSeek-R1 models, leverage long chain-of-thought (CoT) reasoning to generate structured intermediate steps, enhancing their reasoning capabilities. However, long CoT does not inherently guarantee safe outputs, potentially leading to harmful consequences such as the introduction of security vulnerabilities in code or the spread of misinformation. Current research on large language model (LLM) safety usually focuses on short-answer responses, overlooking the long CoT style outputs of LRMs. To bridge this gap, we conduct a systematic study of LRM safety. First, we investigate safety evaluators calibrated against human annotations. Using our newly developed metrics, we thoroughly assess the safety of 12 state-of-the-art LRMs on StrongReject and WildJailbreak datasets. Our results show that LRMs are not safe compared to their reasoning advance. Further, we perform a fine-grained analysis of the reasoning trace and final answer. We find that three decoding strategies-ZeroThink, LessThink, and MoreThink-can improve model safety without additional training. However, these strategies either use constrained reasoning traces or incur high inference costs. To better strengthen LRM safety, we introduce SafeChain, the first-of-its-kind safety training dataset in CoT style. We fine-tune two LRMs with SafeChain, showing that it not only enhances model safety but also preserves performance across 6 reasoning benchmarks.

View on arXivView PDF

Code Implementations(1)

uw-nsl/safechainCommunity64%
GPL-3.0

[ACL 25] SafeChain: Safety of Language Models with Long Chain-of-Thought Reasoning Capabilities

303Shell, PythonFeb 21, 20251 years agoGPL-3.0

Similar Papers

Cite this paper

@article{jiang2025safechain,
  title  = {SafeChain: Safety of Language Models with Long Chain-of-Thought Reasoning Capabilities},
  author = {Fengqing Jiang and Zhangchen Xu and Yuetai Li and Luyao Niu and Zhen Xiang and Bo Li and Bill Yuchen Lin and Radha Poovendran},
  year   = {2025},
  eprint = {2502.12025},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.12025v1}
}

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/2502.12025.svg)](https://codeofpaper.com/paper/2502.12025)

Discussion