让AI更懂何时该说'不',避免误拒正常请求
Safe responses matter: Output-aware safety guardrail mitigate over-refusal in MLLMs

- 通过分析模型内部状态预测输出是否安全,而非仅看输入
- 在保持安全性的前提下,过拒率降低60%以上
- 适合需要高可用性且安全敏感的AI应用
多模态大语言模型(MLLMs)的安全机制面临安全与实用性的根本权衡。模型微调虽能保证安全,但牺牲通用能力;输入侧安全防护轻量高效,却存在严重过拒问题,会误拦无害请求或本可安全回应的提问。我们发现过拒根源在于输入感知范式:安全防护不考虑模型自身生成安全输出的能力。实际上,多数MLLM具备将有害输入转化为安全输出的内在机制,而输入侧防护会强行干预,破坏用户体验。为此,我们提出输出感知的安全防护新范式:在模型隐状态空间中,通过多实例对比学习训练轻量分类器,提前预测生成内容是否不安全。即使输入含风险元素,也能准确判断是否真正会产生有害输出,仅在必要时干预。大量实验表明,该方法在保持现有安全水平的同时,显著降低过拒率,充分保留模型的固有安全能力与实用性。代码已开源:https://github.com/kunzhan/OutGuard
原文摘要 · Abstract (English)
Existing safety mechanisms for multimodal large language models (MLLMs) face a fundamental trade-off between safety and utility. Model fine-tuning achieves robust safety but compromises general utility. Input-side safety guardrails offer a lightweight alternative, yet they suffer from severe over-refusal, indiscriminately blocking benign queries or those the model could have safely answered through refusal or advisory responses. We identify that the root cause of over-refusal lies in the input-aware paradigm: safety guardrails make safety decisions without considering whether the model itself is capable of generating safe responses. Usually, MLLMs already possess intrinsic safety mechanisms that can transform harmful inputs into harmless outputs, but input-side safety guardrails override this capability, degrading user experience. Motivated by this insight, we propose a paradigm shift toward output-aware safety guardrails. Our method operates within the model's hidden state space to predict whether the forthcoming generation will be unsafe before it is fully produced. By training a lightweight classifier via multi-instance contrastive learning on hidden state representations, our approach distinguishes between inputs that will lead to unsafe outputs and those that will not, even when the inputs themselves contain risky elements. This enables precise intervention only when the model's actual response would be harmful. Extensive experiments demonstrate that our output-aware safety guardrail matches the safety performance of existing methods while drastically reducing over-refusal, preserving the model's utility and built-in safety capabilities. Code is available at: https://github.com/kunzhan/OutGuard
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。