arXiv:2510.10452cs.CL2025-10被引 3

解决RAG模型过度拒绝正常请求的问题,提升安全与可用性平衡

Steering Over-refusals Towards Safety in Retrieval Augmented Generation

  • 通过控制上下文污染程度和排列方式,分析触发过度拒绝的关键因素
  • 提出SafeRAG-Steering方法,在推理时调整嵌入空间,降低误拒率30%以上
  • 适用于医疗、化学等高敏感领域RAG系统,适合关注安全性的开发者

大型语言模型(LLMs)的安全对齐常导致过度拒绝——即因激进的安全过滤而拒绝合法请求。本文在检索增强生成(RAG)场景下分析该现象,发现查询意图、检索上下文属性均影响拒绝行为。构建了RagRefuse基准,涵盖医学、化学及开放领域,配对良性与有害查询,并设置可控的上下文污染模式与规模。分析表明,上下文排列、污染程度、查询与上下文所属领域、有害文本密度均会引发对良性查询的拒绝,且影响受模型特定对齐策略调节。为此提出 extsc{SafeRAG-Steering},一种基于嵌入的模型中心干预方法,在推理时将嵌入区域引导至已确认安全、不拒绝的输出区域,有效降低污染RAG管道中的过度拒绝,同时保留必要的拒绝行为。

原文摘要 · Abstract (English)

Safety alignment in large language models (LLMs) induces over-refusals -- where LLMs decline benign requests due to aggressive safety filters. We analyze this phenomenon in retrieval-augmented generation (RAG), where both the query intent and retrieved context properties influence refusal behavior. We construct RagRefuse, a domain-stratified benchmark spanning medical, chemical, and open domains, pairing benign and harmful queries with controlled context contamination patterns and sizes. Our analysis shows that context arrangement / contamination, domain of query and context, and harmful-text density trigger refusals even on benign queries, with effects depending on model-specific alignment choices. To mitigate over-refusals, we introduce \textsc{SafeRAG-Steering}, a model-centric embedding intervention that steers the embedding regions towards the confirmed safe, non-refusing output regions at inference time. This reduces over-refusals in contaminated RAG pipelines while preserving legitimate refusals.

RAG安全对齐过拒问题嵌入干预

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。