arXiv:2501.00879cs.CL2025-01被引 36

提出防御数据投毒攻击的RAG增强框架,提升大模型可信度。

TrustRAG: Enhancing Robustness and Trustworthiness in Retrieval-Augmented Generation

  • 两阶段过滤:聚类检测攻击模式,自评估识别恶意文档
  • 在多个数据集上显著提升检索准确率与抗攻击能力
  • 无需训练、即插即用,适配各类开源/闭源模型

检索增强生成(RAG)通过整合外部知识源提升大语言模型(LLMs)的准确性与上下文相关性。然而,这类系统仍易受语料库投毒攻击影响,严重削弱模型性能。为此,我们提出TrustRAG,一种系统性过滤恶意与无关内容的鲁棒框架。该方法采用两阶段防御机制:第一阶段通过聚类过滤策略检测潜在攻击模式;第二阶段利用大模型自身能力进行自评估,识别恶意文档并解决不一致性问题。TrustRAG为即插即用、无需训练的模块,可无缝集成至任意开源或闭源语言模型。大量实验表明,TrustRAG在检索准确率、效率和抗攻击性方面均有显著提升。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) enhances large language models (LLMs) by integrating external knowledge sources, enabling more accurate and contextually relevant responses tailored to user queries. These systems, however, remain susceptible to corpus poisoning attacks, which can severely impair the performance of LLMs. To address this challenge, we propose TrustRAG, a robust framework that systematically filters malicious and irrelevant content before it is retrieved for generation. Our approach employs a two-stage defense mechanism. The first stage implements a cluster filtering strategy to detect potential attack patterns. The second stage employs a self-assessment process that harnesses the internal capabilities of LLMs to detect malicious documents and resolve inconsistencies. TrustRAG provides a plug-and-play, training-free module that integrates seamlessly with any open- or closed-source language model. Extensive experiments demonstrate that TrustRAG delivers substantial improvements in retrieval accuracy, efficiency, and attack resistance.

RAG安全大模型防御

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