Saved in:
Bibliographic Details
Main Authors: Cao, Chentao, Xu, Xiaojun, Han, Bo, Li, Hang
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.11629
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912946728206336
author Cao, Chentao
Xu, Xiaojun
Han, Bo
Li, Hang
author_facet Cao, Chentao
Xu, Xiaojun
Han, Bo
Li, Hang
contents As large language models (LLMs) continue to advance in capabilities, ensuring their safety against jailbreak attacks remains a critical challenge. In this paper, we introduce a novel safety alignment approach called Answer-Then-Check, which enhances LLM robustness against malicious prompts by applying thinking ability to mitigate jailbreaking problems before producing a final answer to the user. Our method enables models to answer the question in their thoughts directly and then critically evaluate its safety before deciding whether to provide it. To implement this approach, we construct the Reasoned Safety Alignment (ReSA) dataset, comprising 80K samples that teach models to reason through direct responses and then analyze their safety. Experimental results demonstrate that our approach achieves the Pareto frontier with superior safety capability while decreasing over-refusal rates. Notably, the fine-tuned model maintains general reasoning capabilities on benchmarks like MMLU, MATH500, and HumanEval. Besides, our method equips models with the ability to perform safe completion, while post-hoc detection methods can only directly reject sensitive, harmful queries (e.g., self-harm). Our results show that inference-time strategies alone are insufficient, highlighting the necessity of safety training, and we find even $500$ samples can yield performance comparable to the entire dataset, suggesting a promising path for data-efficient safety alignment. The dataset is publicly available at: https://huggingface.co/datasets/ByteDance-Seed/ReSA.
format Preprint
id arxiv_https___arxiv_org_abs_2509_11629
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Reasoned Safety Alignment: Ensuring Jailbreak Defense via Answer-Then-Check
Cao, Chentao
Xu, Xiaojun
Han, Bo
Li, Hang
Machine Learning
Artificial Intelligence
As large language models (LLMs) continue to advance in capabilities, ensuring their safety against jailbreak attacks remains a critical challenge. In this paper, we introduce a novel safety alignment approach called Answer-Then-Check, which enhances LLM robustness against malicious prompts by applying thinking ability to mitigate jailbreaking problems before producing a final answer to the user. Our method enables models to answer the question in their thoughts directly and then critically evaluate its safety before deciding whether to provide it. To implement this approach, we construct the Reasoned Safety Alignment (ReSA) dataset, comprising 80K samples that teach models to reason through direct responses and then analyze their safety. Experimental results demonstrate that our approach achieves the Pareto frontier with superior safety capability while decreasing over-refusal rates. Notably, the fine-tuned model maintains general reasoning capabilities on benchmarks like MMLU, MATH500, and HumanEval. Besides, our method equips models with the ability to perform safe completion, while post-hoc detection methods can only directly reject sensitive, harmful queries (e.g., self-harm). Our results show that inference-time strategies alone are insufficient, highlighting the necessity of safety training, and we find even $500$ samples can yield performance comparable to the entire dataset, suggesting a promising path for data-efficient safety alignment. The dataset is publicly available at: https://huggingface.co/datasets/ByteDance-Seed/ReSA.
title Reasoned Safety Alignment: Ensuring Jailbreak Defense via Answer-Then-Check
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2509.11629