GuardReasoner: Towards Reasoning-based LLM Safeguards
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/.
679c4ac5e2c0dbf282597d35
Yue Liu
claimed_verified
2025-02-03T12:37:21.603Z
6650c77a74664a42ddfb9187
/avatars/92001bbe0ae9b14309730316b639cede.svg
yueliu1999
user
yueliu1999
679c4ac5e2c0dbf282597d36
Hongcheng Gao
claimed_verified
2025-01-31T08:35:51.645Z
62728f4f6253fe2068da1021
https://cdn-avatars.huggingface.co/v1/production/uploads/62728f4f6253fe2068da1021/KZ65X0EH98AF3zXemPiap.jpeg
Hongcheng Gao
user
HongchengGao
679c4ac5e2c0dbf282597d37
Shengfang Zhai
admin_assigned
2025-01-31T08:41:32.474Z
6366429195204b4649c658b8
/avatars/5d80e9ebe0b57fd815f36796b9187248.svg
Shengfang Zhai
user
zsf
679c4ac5e2c0dbf282597d38
Jun Xia
admin_assigned
2025-01-31T08:41:53.366Z
679c68bbfc30f43de85206f5
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/IJWda9ZYtjzlhr2ehsLHu.jpeg
Jun Xia
user
JunXia97
679c4ac5e2c0dbf282597d39
Tianyi Wu
679c4ac5e2c0dbf282597d3a
Zhiwei Xue
admin_assigned
2025-01-31T08:42:30.842Z
63f42ca3520c1461892ee929
/avatars/095241acfe7c783d2406abf63ff81f65.svg
xuezhiwei
user
lakxtxue
679c4ac5e2c0dbf282597d3b
Yulin Chen
admin_assigned
2025-01-31T08:42:41.013Z
65efc25828426de60f977dfc
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/u8ZcIoo58JPLdnjm-jZeo.png
Yulin Chen
user
CallMeChen
679c4ac5e2c0dbf282597d3c
Kenji Kawaguchi
679c4ac5e2c0dbf282597d3d
Jiaheng Zhang
admin_assigned
2025-01-31T08:37:04.493Z
669e19e5dac1eb34c0f5f505
/avatars/bec7d1d1dac2ad6570844d1f00e7df0a.svg
Jiaheng Zhang
user
jiaheng233
679c4ac5e2c0dbf282597d3e
Bryan Hooi
admin_assigned
2025-01-31T08:42:50.273Z
651d8032c50012d33e914f2f
/avatars/0a44c9f51fc50ce86582e328c361ea00.svg
Bryan Hooi
user
bhooi
GuardReasoner: Towards Reasoning-based LLM Safeguards
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/.
GuardReasoner enhances LLM safety through enhanced reasoning capabilities using specialized training datasets and techniques, outperforming existing models on guardrail tasks.
LLMs guardrails GuardReasoner GuardReasonerTrain dataset reasoning SFT hard sample DPO explainability generalizability F1 score GPT-4o+CoT LLaMA Guard 3 8B