错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

ConsistRAG: Defending Retrieval-Augmented Generation of Large Language Models Against Knowledge Corruption Attacks

  • Shumin Liu,
  • Xiaohui Yang

摘要

Retrieval-Augmented Generation (RAG) demonstrates outstanding performance in open-domain question-answering tasks. However, its heavy reliance on external knowledge bases makes it vulnerable to Knowledge Corruption Attacks. Recent studies like PoisonedRAG demonstrate that attackers can effectively mislead retrieval and generation processes by injecting malicious documents into knowledge bases, highlighting the practicality and severity of such attacks. To address this threat, this paper proposes a two-stage defense mechanism named ConsistRAG. This mechanism first employs knowledge expansion strategies to introduce supplementary documents, enhancing retrieval diversity and robustness while addressing the extreme case of empty results after filtering. It then uses K-Means clustering to identify and filter out semantically homogeneous document clusters. Finally, it performs inter-document consistency checks to detect semantic conflicts among candidate documents, further eliminating potential logical poisoning content. Experimental results demonstrate that ConsistRAG effectively reduces the attack success rate (ASR) while maintaining high accuracy (ACC) and validates the effectiveness and generalization capability of the ConsistRAG defense mechanism against knowledge corruption attacks.