arXiv:2508.03110cs.CL2025-08Conference of the …被引 1

提出细粒度攻击方法,精准操纵RAG系统生成错误回答。

Token-Level Precise Attack on RAG: Searching for the Best Alternatives to Mislead Generation

  • 在词元层面生成恶意文本,确保可被检索且诱导模型输出错误。
  • 在开放域问答数据集上,攻击成功率显著高于已有方法。
  • 适用于白盒与黑盒场景,揭示RAG系统的深层安全漏洞。

尽管大语言模型在知识密集型任务中表现优异,但仍存在幻觉和知识过时等问题。为解决这些问题,检索增强生成(RAG)框架通过检索器接入外部知识,提升输出的准确性和时效性。然而,这种集成也引入了新安全风险:外部数据库中的恶意内容可能被检索并用于操控模型输出。现有攻击方法或依赖对检索器的访问,或未同时考虑检索与生成阶段,限制了其在黑盒场景下的效果。为此,我们提出词元级精确攻击框架TPARAG,可针对白盒与黑盒RAG系统。TPARAG利用轻量级白盒大模型作为攻击者,在词元层面生成并迭代优化恶意段落,确保其可被检索且有效误导生成。在开放域问答数据集上的大量实验表明,TPARAG在检索阶段和端到端攻击有效性上均显著优于先前方法。结果揭示了RAG流水线的关键脆弱性,并为提升其鲁棒性提供了新思路。

原文摘要 · Abstract (English)

While large language models (LLMs) have achieved remarkable success in providing trustworthy responses for knowledge-intensive tasks, they still face critical limitations such as hallucinations and outdated knowledge. To address these issues, the retrieval-augmented generation (RAG) framework enhances LLMs with access to external knowledge via a retriever, enabling more accurate and real-time outputs about the latest events. However, this integration brings new security vulnerabilities: the risk that malicious content in the external database can be retrieved and used to manipulate model outputs. Although prior work has explored attacks on RAG systems, existing approaches either rely heavily on access to the retriever or fail to jointly consider both retrieval and generation stages, limiting their effectiveness, particularly in black-box scenarios. To overcome these limitations, we propose Token-level Precise Attack on the RAG (TPARAG), a novel framework that targets both white-box and black-box RAG systems. TPARAG leverages a lightweight white-box LLM as an attacker to generate and iteratively optimize malicious passages at the token level, ensuring both retrievability and high attack success in generation. Extensive experiments on open-domain QA datasets demonstrate that TPARAG consistently outperforms previous approaches in retrieval-stage and end-to-end attack effectiveness. These results further reveal critical vulnerabilities in RAG pipelines and offer new insights into improving their robustness.

RAG安全对抗攻击大模型

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