Safety Reasoning with Guidelines

Haoyu Wang, Zeyu Qin, Li Shen, Xueqian Wang, Minhao Cheng +1 more
2/14/2026

No confident code implementation found for this paper.

Abstract

Training safe LLMs remains a critical challenge. The most widely used method, Refusal Training (RT), struggles to generalize against various Out-of-Distribution (OOD) jailbreaking attacks. Although various advanced methods have been proposed to address this issue, we instead question whether OOD attacks inherently surpass the capability of vanilla RT. Evaluations using Best-of-N (BoN) reveal significant safety improvements as N increases, indicating models possess adequate latent safety knowledge but RT fails to consistently elicit it under OOD scenarios. Further domain adaptation analysis reveals that direct RT causes reliance on superficial shortcuts, resulting in non-generalizable representation mappings. Inspired by our findings, we propose training model to perform safety reasoning for each query. Specifically, we synthesize reasoning supervision aligned with specified guidelines that reflect diverse perspectives on safety knowledge. This encourages model to engage in deeper reasoning, explicitly eliciting and utilizing latent safety knowledge for each query. Extensive experiments show that our method significantly improves model generalization against OOD attacks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2026safety,
  title  = {Safety Reasoning with Guidelines},
  author = {Haoyu Wang and Zeyu Qin and Li Shen and Xueqian Wang and Minhao Cheng and Dacheng Tao},
  year   = {2026},
  eprint = {2502.04040},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.04040},
  journal = {ICML 2025 2025}
}

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

Discussion