自动定位导致大模型过度拒绝的关键词段,解释原因并修复。
DDOR: Delta Debugging for Explainable Overrefusal Testing and Repair

- 用差分调试定位触发拒绝的最小词段,实现可解释性
- 生成上千个测试用例,验证并筛选出真正危险的场景
- 精准修复提示词,减少误拒同时保持安全边界
尽管安全对齐机制能防止大语言模型输出有害内容,但也可能引发过度拒绝——即错误拒绝那些仅外观可疑的良性查询。我们提出DDOR(Delta Debugging for OverRefusal),一个在黑盒环境下完全自动化、可解释的过度拒绝测试与修复框架,仅依赖模型输入输出,不接触内部安全机制。DDOR运用差分调试定位最小拒绝触发片段(mRTFs),提供逐词级的拒绝原因解释。基于这些mRTFs,生成多样且上下文丰富的提示,并通过多评判标准验证,过滤掉内在不安全或模糊的案例,构建出每模型约1000个可扩展、模型特异的过度拒绝测试用例。除了评估,还利用定位到的mRTFs进行针对性提示修复,在保留原始意图的同时显著降低过度拒绝率,并确保对真正有害输入仍保持安全。总体而言,DDOR为评估和缓解过度拒绝提供了实用的端到端方案,提升大模型可用性而不牺牲安全性。
原文摘要 · Abstract (English)
While safety alignment and guardrails help large language models (LLMs) avoid harmful outputs, they can also induce overrefusal, i.e., unwarranted rejection of benign queries that merely appear risky. We present DDOR (Delta Debugging for OverRefusal), a fully automated and explainable framework for overrefusal testing and repair in a black-box setting, where only model inputs and outputs are accessible and internal safety mechanisms remain opaque. DDOR applies delta debugging to localize minimal refusal-triggering fragments (mRTFs) that provide phrase-level, explainable evidence for why a refusal occurs. Conditioned on these mRTFs, DDOR generates diverse, context-rich prompts and performs multi-oracle validation to filter intrinsically unsafe or ambiguous cases, producing scalable and model-specific overrefusal test suites (approximately 1K cases per model). Beyond evaluation, we further leverage localized mRTFs to perform targeted prompt repair, substantially reducing overrefusal while preserving the original intent and maintaining safety on genuinely harmful inputs. Overall, DDOR offers a practical end-to-end solution to both evaluate and mitigate overrefusal, improving LLM usability without sacrificing safety.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。