Redirecting to original paper in 30 seconds...

Click below to go immediately or wait for automatic redirect

arxiv_ai 98% Match Research Paper AI Safety Researchers,LLM Developers,ML Engineers,Product Managers in AI 2 weeks ago

GuardReasoner: Towards Reasoning-based LLM Safeguards

ai-safety › alignment
📄 Abstract

Abstract: As LLMs increasingly impact safety-critical applications, ensuring their safety using guardrails remains a key challenge. This paper proposes GuardReasoner, a new safeguard for LLMs, by guiding the guard model to learn to reason. Concretely, we first create the GuardReasonerTrain dataset, which consists of 127K samples with 460K detailed reasoning steps. Then, we introduce reasoning SFT to unlock the reasoning capability of guard models. In addition, we present hard sample DPO to further strengthen their reasoning ability. In this manner, GuardReasoner achieves better performance, explainability, and generalizability. Extensive experiments and analyses on 13 benchmarks of 3 guardrail tasks demonstrate its superiority. Remarkably, GuardReasoner 8B surpasses GPT-4o+CoT by 5.74% and LLaMA Guard 3 8B by 20.84% F1 score on average. We release the training data, code, and models with different scales (1B, 3B, 8B) of GuardReasoner : https://github.com/yueliu1999/GuardReasoner/.
Authors (12)
Yue Liu
Hongcheng Gao
Shengfang Zhai
Yufei He
Jun Xia
Zhengyu Hu
+6 more
Submitted
January 30, 2025
arXiv Category
cs.CR
arXiv PDF Code

Key Contributions

GuardReasoner proposes a novel reasoning-based approach to LLM safeguards by training guard models to reason, significantly improving their performance, explainability, and generalizability. It introduces a large-scale reasoning dataset (GuardReasonerTrain) and employs reasoning SFT and hard sample DPO to enhance guard model capabilities, outperforming existing methods.

Business Value

Enhances the trustworthiness and deployability of LLMs in sensitive applications by providing robust, explainable, and generalizable safety mechanisms, reducing risks associated with harmful outputs.

View Code on GitHub