Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
GuardReasoner-VL — [NeurIPS 2025] 论文 "GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning" 的官方源代码。 | Kitploit
工具/GitHubGitHub/yueliu1999/guardreasoner-vl
防御工具机器学习AI 安全异常检测
GitHubyueliu1999/guardreasoner-vl

GuardReasoner-VL

[NeurIPS 2025] 论文 "GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning" 的官方源代码。

查看仓库
12595个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

GuardReasoner-VL:通过强化推理保护 VLM

Yue Liu, Shengfang Zhai, Mingzhe Du
Yulin Chen, Tri Cao, Hongcheng Gao, Cheng Wang
Xinfeng Li, Kun Wang, Junfeng Fang, Jiaheng Zhang, Bryan Hooi
1新加坡国立大学, 2南洋理工大学

为了提升 VLM 的安全性,本文提出了一种新颖的基于推理的 VLM 护栏模型,命名为 GuardReasoner-VL。 其核心思想是通过在线 RL,激励护栏模型在做出审核决策之前进行深思熟虑的推理。 首先,我们构建了 GuardReasoner-VLTrain,一个包含 123K 个样本和 631K 个推理步骤的推理语料库,涵盖文本、图像以及文本-图像输入。 然后,基于该语料库,我们通过 SFT 冷启动模型的推理能力。 此外,我们进一步通过在线 RL 增强与审核相关的推理能力。 具体来说,为了提升样本的多样性和难度,我们进行拒绝采样,然后通过所提出的安全感知数据拼接进行数据增强。 此外,我们使用动态裁剪参数,在早期阶段鼓励探索,在后期阶段鼓励利用。 为了平衡性能与 token 效率,我们设计了一种长度感知的安全奖励,该奖励综合了准确性、格式和 token 成本。 大量实验证明了我们模型的优越性。 值得注意的是,它在平均 F1 分数上超越了第二名 19.27%。

图 1:GuardReasoner-VL 概览。

更新日志

  • (2025/09/19) GuardReasoner-VL 被 NeurIPS 2025 录用。
  • (2025/07/01) GuardReasoner-VL 被 ICML R2-FM Workshop 录用。
  • (2025/06/03) 在线 RL 的训练流程已发布。
  • (2025/05/29) R-SFT 的训练流程已发布。
  • (2025/05/29) 训练数据 GuardReasoner-VLTrain 和 GuardReasoner-VLTrain-Image 已发布。
  • (2025/05/18) 模型已发布(3B-Eco、3B、7B-Eco、7B)。
  • (2025/05/18) GuardReasoner-VL 的代码已发布。
  • (2025/05/18) GuardReasoner-VL 已上线 arXiv。

使用方法

快速开始

要评估 GuardReasoner-VL,请运行以下代码。

root@kitploit:~
python ./evaluate.py

结果存储在 result.csv 文件中。

root@kitploit:~
Performance of GuardReasoner-VL (GuardReasoner-VL-7B):
ToxicChat           ,HarmBenchPrompt     ,OpenAIModeration    ,AegisSafetyTest     ,SimpleSafetyTests   ,WildGuardTest       ,Average (Text)      ,HarmImageTest       ,SPA-VL-Eval         ,Average (All)       
76.51               ,98.30               ,70.98               ,90.13               ,98.99               ,88.35               ,79.88               ,70.84               ,85.60               ,79.07               
HarmBenchResponse   ,SafeRLHF            ,BeaverTails         ,XSTestReponseHarmful,WildGuardTest       ,Average (Text)      ,SPA-VL-Eval         ,Average (All)       
87.22               ,66.37               ,84.76               ,92.72               ,79.04               ,79.42               ,73.22               ,77.58               

Performance of GuardReasoner-VL (GuardReasoner-VL-Eco-7B):
ToxicChat           ,HarmBenchPrompt     ,OpenAIModeration    ,AegisSafetyTest     ,SimpleSafetyTests   ,WildGuardTest       ,Average (Text)      ,HarmImageTest       ,SPA-VL-Eval         ,Average (All)       
76.26               ,98.73               ,70.82               ,90.34               ,99.50               ,88.54               ,79.82               ,64.84               ,85.26               ,77.49               
HarmBenchResponse   ,SafeRLHF            ,BeaverTails         ,XSTestReponseHarmful,WildGuardTest       ,Average (Text)      ,SPA-VL-Eval         ,Average (All)       
86.22               ,66.15               ,85.51               ,93.33               ,78.60               ,79.51               ,70.81               ,76.94               

Performance of GuardReasoner-VL (GuardReasoner-VL-3B):
ToxicChat           ,HarmBenchPrompt     ,OpenAIModeration    ,AegisSafetyTest     ,SimpleSafetyTests   ,WildGuardTest       ,Average (Text)      ,HarmImageTest       ,SPA-VL-Eval         ,Average (All)       
74.45               ,89.10               ,70.83               ,88.79               ,99.50               ,88.92               ,78.77               ,70.93               ,86.47               ,78.73               
HarmBenchResponse   ,SafeRLHF            ,BeaverTails         ,XSTestReponseHarmful,WildGuardTest       ,Average (Text)      ,SPA-VL-Eval         ,Average (All)       
85.76               ,66.37               ,85.16               ,93.08               ,76.07               ,78.83               ,71.19               ,76.56               

Performance of GuardReasoner-VL (GuardReasoner-VL-Eco-3B):
ToxicChat           ,HarmBenchPrompt     ,OpenAIModeration    ,AegisSafetyTest     ,SimpleSafetyTests   ,WildGuardTest       ,Average (Text)      ,HarmImageTest       ,SPA-VL-Eval         ,Average (All)       
73.47               ,88.58               ,70.87               ,89.04               ,99.50               ,89.16               ,78.43               ,66.79               ,85.82               ,77.39               
HarmBenchResponse   ,SafeRLHF            ,BeaverTails         ,XSTestReponseHarmful,WildGuardTest       ,Average (Text)      ,SPA-VL-Eval         ,Average (All)       
84.72               ,66.96               ,85.39               ,93.59               ,77.39               ,79.31               ,72.01               ,77.14               

主要结果

图 2:GuardReasoner-VL 在多模态护栏基准上的平均性能。

表 1:提示词有害性检测任务的性能。

表 2:回复有害性检测任务的性能。

开发版本

要复现 GuardReasoner-VL 的生成过程,请运行以下代码。

root@kitploit:~
bash test.sh

要使用 GuardReasoner-VL,请运行以下代码。

root@kitploit:~
CUDA_VISIBLE_DEVICES=0 python deploy.py

要复现 GuardReasoner 的训练过程,请参阅训练流程。

致谢

我们的方法部分基于以下资源。感谢他们的出色工作。

  • GuardReasoner
  • LLaMA Factory
  • EasyR1
  • Qwen2.5-VL

引用

如果您觉得这个仓库有帮助,请引用我们的论文。

root@kitploit:~
@article{GuardReasoner,
  title={GuardReasoner: Towards Reasoning-based LLM Safeguards},
  author={Liu, Yue and Gao, Hongcheng and Zhai, Shengfang and Jun, Xia and Wu, Tianyi and Xue, Zhiwei and Chen, Yulin and Kawaguchi, Kenji and Zhang, Jiaheng and Hooi, Bryan},
  journal={arXiv preprint arXiv:2501.18492},
  year={2025}
}


@article{GuardReasoner-VL,
  title={GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning},
  author={Liu, Yue and Zhai, Shengfang and Du, Mingzhe and Chen, Yulin and Cao, Tri and Gao, Hongcheng and Wang, Cheng and Li, Xinfeng and Wang, Kun and Fang, Junfeng and Zhang, Jiaheng and Hooi, Bryan},
  journal={arXiv preprint arXiv:2505.11049},
  year={2025}
}

(返回顶部)

下载工具