Critical-CoT: A Robust Defense Framework against Reasoning-Level Backdoor Attacks in Large Language Models
Tuan Vu Truong, Long Bao Le · 2026
Read Critical-CoT: A Robust Defense Framework against Reasoning-Level Backdoor Attacks in Large Language Models by Tuan Vu Truong, Long Bao Le (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-10681.txt.
Introduction
Truong and Le defend language models against reasoning-level backdoors, attacks that plant malicious steps inside a model's chain of thought while keeping the final answer plausible. Their Critical-CoT method uses two-stage fine-tuning to teach models critical-thinking behavior: spotting possible backdoors and refusing to produce malicious reasoning steps. Experiments across several models and datasets show strong robustness against both in-context and fine-tuning-based backdoor attacks. The defense also generalizes across domains and tasks.
Catalog record
| CREATOR | Tuan Vu Truong, Long Bao Le |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 74716 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.10681
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Critical-CoT: A Robust Defense Framework against Reasoning-Level Backdoor Attacks in Large Language Models Tuan Vu Truong, Long Bao Le Abstract 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 . 1 Introduction Large language models (LLMs) have demonstrated human-like capabilities across a wide range of domains and applications, including natural language processing (NLP), time series forecasting 11 , multimodal processing 16 ; 5 , and healthcare 3 . Recent advances in chain-of-thought (CoT) prompting 22 have further shifted LLM research toward enhancing reasoning abilities, enabling models to tackle increasingly complex tasks such as long-horizon planning 17 , mathematical problem solving 15 , and code generation 10 . Given the pervasive deployment of LLMs in diverse real-world applications, ensuring their security, robustness, and trustworthiness has become critically important. Despite their impressive capabilities, recent studies have revealed that LLMs are vulnerable to backdoor attacks, which implant a stealthy shortcut between a specific trigger pattern and a malicious target behavior 27 ; 21 . Once the trigger appears in the input, the model’s output is manipulated to exhibit the attacker-defined behavior, while the model behaves normally in the absence of the trigger 20 . This stealthiness makes backdoor attacks particularly dangerous in practical deployments. A growing body of research has therefore investigated defenses against LLM backdoors 8 ; 12 . However, existing defense studies predominantly focus on token-level backdoors 30 ; 27 ; 28 ; 6 , where the attacker’s objective is to force the model to produce a specific word or token (e.g., in text or code generation), a fixed choice (e.g., in multiple-choice questions), or a class label (e.g., in contextual classification). The emergence of CoT prompting 22 and large reasoning models (LRMs) with strong multi-step reasoning capabilities 26 has given rise to a new and more insidious threat: reasoning-level backdoor attacks. In contrast to token-level attacks, the target of a reasoning-level backdoor is to inject malicious reasoning steps into the generated CoT (e.g., multiplying the correct result by a number), while still producing a seemingly plausible final answer. Unlike token-level attacks, where the injected target tokens are often anomalous and can be filtered using output-based or statistical detection methods, the poisoned reasoning steps in reasoning-level backdoors are semantically coherent and human-like, making them substantially harder to detect. Recent studies further indicate that more powerful LLMs with strong in-context learning (ICL) capabilities are even more vulnerable to this type of attack 24 . Despite the growing threat, defenses tailored specifically to this attack type remain largely underexplored. For example, Chain-of-Scrutiny (CoS) 8 mitigates backdoor attacks by prompting the LLM to identify contradictions between its CoT and the final answer. However, in reasoning-level backdoors, the injected malicious reasoning is often internally consistent with the final poisoned answer, rendering CoS ineffective. Thought Purity 25 employs reinforcement learning (RL) to fine-tune LLMs for detecting ICL-based backdoor attacks, but it does not generalize to FT-based backdoors. To bridge this gap, we propose Critical-CoT, a novel backdoor defense framework for LLM reasoning. We first construct a defensive reasoning dataset containing backdoor-aware reasoning trajectories, which guide models to recognize potential backdoors and to ignore or reject malicious instructions embedded in the input prompts. Then, we design a two-stage fine-tuning strategy based on the created dataset. In the first stage, we perform supervised fine-tuning (SFT) to initialize the model with critical-thinking behaviors, enabling it to cautiously analyze incoming prompts and proactively identify potential backdoor triggers. In the second stage, we further apply direct preference optimization (DPO) 13 to enhance the model’s decision-making capability (i.e., the ability to distinguish clean task instructions from backdoor queries), while simultaneously mitigating the over-cautiousness issue introduced by the first stage SFT. To the best of our knowledge, Critical-CoT is the first unified defense that effectively protects against both ICL-based and FT-based backdoor attacks at the reasoning level. Our main contributions are summarized as follows: • We propose Critical-CoT, a novel defense mechanism tailored for reasoning-level backdoor attacks on LLMs. Our method endows LLMs with critical-thinking behaviors to proactively identify potential backdoor threats in user prompts and refuse to generate malicious reasoning steps. • Critical-CoT can defend against both FT-based and ICL-based backdoor attacks without requiring prior knowledge of the triggers, target behaviors, or poisoning strategies. • Extensive experiments across multiple datasets and LLM architectures demonstrate that Critical-CoT achieves strong and consistent backdoor detection and suppression performance, even under cross-domain and cross-task defense scenarios. 2 Related Work Backdoor Attacks on LLMs. LLMs exhibit strong multi-step reasoning capabilities, largely enabled by CoT prompting 22 , which allows models to explicitly generate intermediate reasoning steps. Early studies on LLM backdoors mainly focus on token-level attacks, where the attacker aims to force the model to output a specific backdoor target, such as a particular word, a fixed option in multiple-choice questions, a class label in contextual classification, or a predefined code pattern in code generation 30 ; 27 ; 28 ; 6 . More recent work further exploits the reasoning ability of LLMs to construct reasoning-level backdoors, in which malicious content is embedded into the CoT itself rather than only the final output. Existing reasoning-level backdoor attacks can be categorized into ICL-based and FT-based methods. For ICL-based attacks, BadChain 24 injects poisoned demonstrations into the prompt to induce malicious reasoning patterns at inference time. For FT-based attacks, BALD 7 and ShadowCoT 31 implant reasoning backdoors by fine-tuning victim models on poisoned datasets with backdoor reasoning steps. These attacks are particularly difficult to detect due to the semantic coherence and plausibility of the injected reasoning, motivating the need for more dedicated defenses. Backdoor Defenses for LLM Reasoning. Classic backdoor defenses primarily rely on clean fine-tuning (CFT) 9 ; however, this strategy is ineffective against ICL-based backdoors such as BadChain, where the victim model itself remains clean. Another line of work focuses on detecting and removing suspicious backdoor inputs. For example, ONION 12 uses perplexity to identify potential trigger tokens, while MDP 23 detects backdoor inputs by applying random token masking and measuring output sensitivity. CoS 8 mitigates backdoors by prompting the LLM to detect logical inconsistencies between its CoT and final output. However, these methods are generally ineffective for reasoning-level backdoors, as the