CRAILGJan 30, 2025

GuardReasoner: Towards Reasoning-based LLM Safeguards

Tsinghua
arXiv:2501.18492v284 citationsh-index: 18Has Code
Originality Highly original
AI Analysis

This addresses safety issues for users of LLMs in critical applications, representing a novel method for a known bottleneck.

The paper tackles the challenge of ensuring LLM safety in critical applications by proposing GuardReasoner, a safeguard that guides guard models to learn reasoning, achieving superior performance with an average F1 score improvement of 5.74% over GPT-4o+CoT and 20.84% over LLaMA Guard 3 8B.

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/.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes