信息网络安全 ›› 2026, Vol. 26 ›› Issue (6): 977-998.doi: 10.3969/j.issn.1671-1122.2026.06.011

• 技术研究 • 上一篇    下一篇

基于思维链污染的检索增强生成后门攻击

苗博1, 袁得嵛1,2(), 张腾1, 杨懿1, 黄赞1   

  1. 1 中国人民公安大学信息网络安全学院北京 100038
    2 安全防范技术与风险评估公安部重点实验室北京 100038
  • 收稿日期:2025-12-29 出版日期:2026-06-10 发布日期:2026-07-27
  • 通讯作者: 袁得嵛 E-mail:yuandeyu@ppsuc.edu.cn
  • 作者简介:苗博(2002—),男,河北,硕士研究生,主要研究方向为大模型安全|袁得嵛(1986—),男,河北,副教授,博士,主要研究方向为网络安全、社交网络分析|张腾(2002—),男,山东,硕士研究生,主要研究方向为深度伪造检测|杨懿(2001—),男,安徽,硕士研究生,主要研究方向为大模型与知识图谱|黄赞(2004—),男,山东,硕士研究生,主要研究方向为视觉大模型安全
  • 基金资助:
    中央高校基本科研业务费专项(2025JKF01ZK02)

Chain-of-Thought Poisoning Based Retrieval-Augmented Generation Backdoor Attack

MIAO Bo1, YUAN Deyu1,2(), ZHANG Teng1, YANG Yi1, HUANG Zan1   

  1. 1 School of Information Network Security, People’s Public Security University of China, Beijing 100038, China
    2 Key Laboratory of Security Technology and Risk Assessment, Ministry of Public Security, Beijing 100038, China
  • Received:2025-12-29 Online:2026-06-10 Published:2026-07-27
  • Contact: YUAN Deyu E-mail:yuandeyu@ppsuc.edu.cn

摘要:

检索增强生成(RAG)与思维链(CoT)推理的协同架构在提升大语言模型复杂推理能力的同时,也引入了新的安全脆弱性。在RAG-CoT协同架构下,若攻击者能操控推理链生成逻辑,使模型生成表面逻辑自洽但实质误导的推理过程,则能实现从结果欺骗到认知欺骗的升级。针对以上问题,文章提出一种基于思维链污染的检索增强生成后门攻击框架CoT-RBA。首先,构建了一种基于正向语义规则的动态触发机制,当检索到的Top-3规则中至少有两条属于正向规则时,后门被激活,由于触发器本身是语义完全良性的内容,因此攻击具有极高的隐蔽性。其次,设计了污染推理链自动化构建方法与先能力对齐、后推理污染的二阶段微调策略,使模型在触发条件下生成错误推理链,在保持模型通用能力的同时,精准植入后门。实验结果表明,该方法在多个基准数据集和不同模型架构上的后门触发成功率均超过99%,相较于基线方法的正常任务准确率至少提高4.5%。在对抗防御的测试中,能够有效抵抗经典的净化微调、基于困惑度的检测、置信度边缘检测以及防御性提示词等多种防御方法,证明了其在现实场景中具有高威胁性与隐蔽性。

关键词: 大语言模型, 检索增强生成, 后门攻击, 思维链

Abstract:

The synergy of retrieval-augmented generation (RAG) and chain-of-thought (CoT) enhances LLM reasoning but introduces a critical vulnerability: cognitive deception via manipulated reasoning chains. This paper proposed CoT-RBA, a backdoor attack framework based on CoT poisoning. This paper designed a stealthy dynamic trigger activated by benign semantic rules (triggered when≥2 of Top-3 retrieved rules were positive). By employing a two-stage fine-tuning strategy—capability alignment followed by reasoning poisoning—CoT-RBA embedded backdoors without compromising general performance. Experimental results across multiple benchmarks show that CoT-RBA achieves an attack success rate (ASR) exceeding 99% and improves clean task accuracy by over 4.5% compared to baselines. Furthermore, the attack is highly resilient to defenses such as purification fine-tuning and perplexity-based detection, demonstrating its significant threat in real-world applications.

Key words: large language models, retrieval-augmented generation, backdoor attack, CoT

中图分类号: