通过训练模型批判性思考,识别并拒绝恶意推理链条。
Critical-CoT: A Robust Defense Framework against Reasoning-Level Backdoor Attacks in Large Language Models

- 两阶段微调让模型学会识别潜在后门
- 对多种推理级后门攻击防御效果显著
- 适用于不同领域和任务的通用防御
大型语言模型虽能力强大,但易受后门攻击。现有攻击多在词元层面触发特定输出,而新型推理级后门则利用模型长序列推理特性,在触发后插入恶意推理步骤,使错误答案看似合理,难以检测。本文提出Critical-CoT,一种两阶段微调防御框架,旨在培养模型的批判性思维,自动识别并拒绝生成恶意推理链。在多个LLM和数据集上的实验表明,该方法对基于上下文学习和微调的推理级后门均具强鲁棒性,且具备良好的跨领域、跨任务泛化能力。代码已公开。
原文摘要 · Abstract (English)
Large Language Models (LLMs), despite their impressive capabilities across domains, have been shown to be vulnerable to backdoor attacks. Prior backdoor strategies predominantly operate at the token level, where an injected trigger causes the model to generate a specific target word, choice, or class (depending on the task). Recent advances, however, exploit the long-form reasoning tendencies of modern LLMs to conduct reasoning-level backdoors: once triggered, the victim model inserts one or more malicious reasoning steps into its chain-of-thought (CoT). These attacks are substantially harder to detect, as the backdoored answer remains plausible and consistent with the poisoned reasoning trajectory. Yet, defenses tailored to this type of backdoor remain largely unexplored. To bridge this gap, we propose Critical-CoT, a novel defense mechanism that conducts a two-stage fine-tuning (FT) process on LLMs to develop critical thinking behaviors, enabling them to automatically identify potential backdoors and refuse to generate malicious reasoning steps. Extensive experiments across multiple LLMs and datasets demonstrate that Critical-CoT provides strong robustness against both in-context learning-based and FT-based backdoor attacks. Notably, Critical-CoT exhibits strong cross-domain and cross-task generalization. Our code is available at hthttps://github.com/tuanvu171/Critical-CoT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。