Rethinking Reasoning: A Survey on Reasoning-based Backdoors in LLMs

Man Hu, Xinyi Wu, Zuofeng Suo, Jinbo Feng, Linghui Meng, Yanhao Jia, Anh Tuan Luu, Shuai ZhaoarXiv 2025 · DOI · arXiv

Abstract

As Large Language Models (LLMs) evolve from simple pattern matchers into sophisticated reasoning engines, they introduce a new class of security vulnerabilities: reasoning-based backdoors. Unlike traditional attacks that target input-output mappings, these threats hijack the model's internal cognitive processes, such as Chain-of-Thought (CoT). This paper provides the first systematic survey of this landscape, proposing a taxonomy that categorizes attacks into Associative, Passive, and Active reasoning-based backdoors. We analyze the current state of research, highlighting a critical "performance trilemma" between utility, efficiency, and security, and outline future directions for securing reasoning-capable AI.

Introduction

Traditional backdoor attacks in machine learning are relatively "shallow." An adversary might insert a specific trigger (e.g., a unique keyword) into a prompt to force a model to produce a specific, often harmful, label. However, modern LLMs—like OpenAI’s o1 or DeepSeek-R1—do not just match patterns; they "think" through intermediate steps.

This shift necessitates a new security paradigm. Reasoning-based backdoors corrupt the model’s internal logic rather than just tampering with the final output. This creates a massive security gap because traditional defenses, which often look for simple input-output shortcuts, fail to detect a model that has been "convinced" to follow a flawed logical path. This survey catalogs these emerging threats and the defenses designed to mitigate them.

Taxonomy of Reasoning-based Backdoors

To organize the chaotic landscape of emerging threats, we propose a cognition-centric taxonomy that classifies attacks based on how they interact with the model's reasoning process.

Conceptual overview of the reasoning-based backdoor taxonomy and defense categories.
  1. Associative Reasoning-based Backdoors: These establish a direct link between a trigger and a malicious output, essentially forcing the model to "short-circuit" and skip its reasoning process entirely (e.g., TrojLLM).
  2. Passive Reasoning-based Backdoors: In these attacks, the model still generates a reasoning chain, but it follows malicious rules or instructions embedded by the attacker. The reasoning looks coherent on the surface but is steered toward a predetermined, harmful conclusion (e.g., ShadowCoT).
  3. Active Reasoning-based Backdoors: These involve poisoning the model's "learning" environment—such as In-Context Learning (ICL) examples or CoT demonstrations—to induce the model to generalize flawed logical patterns to new tasks (e.g., BadChain).

The Landscape of Attacks and Defenses

The survey synthesizes findings from over 20 recent attack methods and 15+ defense strategies across various reasoning domains, including mathematics (GSM8K), commonsense (StrategyQA), and code generation (HumanEval).

Hierarchical mapping of specific backdoor attack methods and defense strategies to the proposed taxonomy.

Defenses are categorized into three main stages:

  • Training-time mitigations: Attempting to remove triggers or poisoned data during the fine-tuning phase.
  • Decoding-stage interventions: Analyzing internal hidden states or logit distributions to detect anomalies during inference.
  • Reasoning-analysis frameworks: Using "judge" models or consistency checks to verify if the model's logic remains sound when a potential trigger is present.

Key Insights and the Performance Trilemma

Our analysis reveals several critical insights into the nature of reasoning backdoors:

  • The "Unthinking" Vulnerability: Some attacks exploit the computational cost of reasoning. By providing a trigger that tells the model to "skip the thinking," attackers can bypass defenses that specifically analyze reasoning traces.
  • Stealth through Logic: Passive attacks are particularly insidious. If a human or a "judge" model only checks if the logic looks sound, they might miss that the starting premises were subtly poisoned.
  • The Performance Trilemma: Current defenses struggle to balance Utility (maintaining intelligence), Efficiency (low latency), and Security (robustness). Training-time defenses often degrade utility, while inference-time defenses add significant lag.
  • Paradox of Capability: Interestingly, models with stronger reasoning abilities may be more susceptible to certain active attacks because they are better at learning and generalizing the flawed logic provided in poisoned examples.

Future Directions

While research is progressing, several gaps remain. Current studies are largely limited to text-based LLMs; reasoning-based backdoors in vision-language models or multimodal agents remain unexplored. Furthermore, there is a pressing need for "black-box" defenses for models served via APIs, where users cannot inspect internal hidden states. Finally, the transferability of these backdoors—whether a poisoned model's output can infect another model during training—represents a major looming threat to the AI ecosystem.

Summary updated

Abstract

With the rise of advanced reasoning capabilities, large language models (LLMs) are receiving increasing attention. However, although reasoning improves LLMs' performance on downstream tasks, it also introduces new security risks, as adversaries can exploit these capabilities to conduct backdoor attacks. Existing surveys on backdoor attacks and reasoning security offer comprehensive overviews but lack in-depth analysis of backdoor attacks and defenses targeting LLMs' reasoning abilities. In this paper, we take the first step toward providing a comprehensive review of reasoning-based backdoor attacks in LLMs by analyzing their underlying mechanisms, methodological frameworks, and unresolved challenges. Specifically, we introduce a new taxonomy that offers a unified perspective for summarizing existing approaches, categorizing reasoning-based backdoor attacks into associative, passive, and active. We also present defense strategies against such attacks and discuss current challenges alongside potential directions for future research. This work offers a novel perspective, paving the way for further exploration of secure and trustworthy LLM communities.
BibTeX
@misc{hu2025rethinking,
  author = {Man Hu and Xinyi Wu and Zuofeng Suo and Jinbo Feng and Linghui Meng and Yanhao Jia and Anh Tuan Luu and Shuai Zhao},
  title = {{Rethinking Reasoning: A Survey on Reasoning-based Backdoors in LLMs}},
  year = {2025},
  eprint = {2510.07697},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.07697},
}
Figure