arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.10452cs.CL
收藏

在检索增强生成中将过度拒绝引导向安全性

Steering Over-refusals Towards Safety in Retrieval Augmented Generation

Macquarie University(麦觉里大学)

Utsav Maskey, Mark Dras, Usman Naseem

AI总结:

本文分析了检索增强生成(RAG)中因安全对齐导致的过度拒绝问题,构建了RagRefuse基准,并提出SafeRAG-Steering嵌入干预方法,在推理时将嵌入引导向安全输出区域,有效减少过度拒绝同时保留合法拒绝。

摘要:

大型语言模型(LLMs)的安全性对齐会引发过度拒绝——即LLMs因激进的安全过滤器而拒绝良性请求。我们在检索增强生成(RAG)中分析了这一现象,其中查询意图和检索上下文属性均会影响拒绝行为。我们构建了RagRefuse,一个涵盖医疗、化学和开放领域的领域分层基准,将良性与有害查询与受控的上下文污染模式和规模相配对。分析表明,上下文安排/污染、查询与上下文领域以及有害文本密度即使在良性查询上也会触发拒绝,其影响取决于特定模型的对齐选择。为缓解过度拒绝,我们引入了SafeRAG-Steering,这是一种以模型为中心的嵌入干预方法,在推理时将嵌入区域引导向已确认安全、不拒绝的输出区域。这在保留合法拒绝的同时减少了受污染RAG管道中的过度拒绝。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑