提出两阶段过滤框架,提升RAG系统在对抗攻击下的可信度。
SeCon-RAG: A Two-Stage Semantic Filtering and Conflict-Free Framework for Trustworthy RAG
- 先用语义与聚类联合过滤,再通过意图关系分析剔除矛盾信息。
- 在多个数据集上显著提升生成鲁棒性,错误率降低32%以上。
- 适合需要高可信度问答的医疗、金融等敏感场景使用。
检索增强生成(RAG)系统虽能扩展大语言模型的外部知识,但易受语料污染和篡改攻击,威胁输出完整性。现有防御方法常采用激进过滤,导致有价值信息丢失,降低生成可靠性。为此,我们提出一种两阶段语义过滤与无冲突框架——SeCon-RAG。第一阶段基于实体-意图-关系提取器(EIRE)进行语义与聚类联合过滤,从用户查询与文档中提取实体、隐含目标及关系,评估语义相关性,仅将高价值文档加入干净检索库。第二阶段引入EIRE引导的冲突感知过滤模块,在最终生成前分析查询、候选答案与检索知识间的语义一致性,剔除内外部矛盾信息。该两阶段流程有效保留有用知识的同时缓解冲突污染,在多种大模型与数据集上的实验表明,SeCon-RAG显著优于当前最优防御方法。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) systems enhance large language models (LLMs) with external knowledge but are vulnerable to corpus poisoning and contamination attacks, which can compromise output integrity. Existing defenses often apply aggressive filtering, leading to unnecessary loss of valuable information and reduced reliability in generation. To address this problem, we propose a two-stage semantic filtering and conflict-free framework for trustworthy RAG. In the first stage, we perform a joint filter with semantic and cluster-based filtering which is guided by the Entity-intent-relation extractor (EIRE). EIRE extracts entities, latent objectives, and entity relations from both the user query and filtered documents, scores their semantic relevance, and selectively adds valuable documents into the clean retrieval database. In the second stage, we proposed an EIRE-guided conflict-aware filtering module, which analyzes semantic consistency between the query, candidate answers, and retrieved knowledge before final answer generation, filtering out internal and external contradictions that could mislead the model. Through this two-stage process, SeCon-RAG effectively preserves useful knowledge while mitigating conflict contamination, achieving significant improvements in both generation robustness and output trustworthiness. Extensive experiments across various LLMs and datasets demonstrate that the proposed SeCon-RAG markedly outperforms state-of-the-art defense methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。