Cancerous Backdoor Attack: Gradual Activation via Invisible Tokens and A Stage Controller
Organizations: Kennesaw State University · University of Dhaka · University of California, Irvine · Independent Researcher
Abstract
Backdoor Attacks on Large Language Models (LLMs) typically follow a trigger-response pattern, where satisfying a trigger condition activates a single terminal behavior. However, this single-point backdoor activation does not explore attacks in which malicious behavior develops gradually through multiple intermediate stages before reaching the terminal activation stage. We present Cancerous Backdoor Attack, that gradually corrupts an LLM's reasoning over a sequence of interactions by leveraging invisible tokens and a stage controller. Specifically, invisible tokens provide hidden stages to the model without appearing in the user's visible request and the stage controller tracks the attack's progression during inference to realize gradual activation. We evaluate Cancerous Backdoor Attack across several reasoning datasets. The attack consistently produces gradual reasoning corruption across models and tasks. We compare Cancerous Backdoor Attack with prior backdoor attack baselines to demonstrate our proposed attack outperforms the baselines. Our results indicate that reasoning corruption can develop gradually before it becomes visible, making answer accuracy alone insufficient for detecting backdoor attacks.
Figures & tables
| Method | Benign Trigger | Multi Trigger | Temporal Buildup | Reasoning Path | Gradual Activation |
| When Clean Queries Become Triggers [ 33 ] | – | – | – | – | |
| BadChain [ 36 ] | – | – | – | – | |
| Delayed Backdoor Attacks [ 5 ] | – | – | – | ||
| Multi-Trigger Poisoning [ 27 ] | – | – | – | – | |
| Stateless Yet Not Forgetful [ 23 ] | – | – | – | ||
| ShadowCoT [ 41 ] | – | – | – |
| Correct Reasoning + Correct Answer | Weak Reasoning + Correct Answer | Incorrect Reasoning + Correct Answer | Incorrect Reasoning + Incorrect Answer | ( ) | |||||||||
| Stage | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Mean |
| EntailmentBank | |||||||||||||
| S1 | 83.33 | 90.00 | 100.00 | 3.33 | 0.00 | 0.00 | 13.33 | 10.00 | 0.00 | 0.00 | 0.00 | 0.00 | 91.11 |
| S2 | 6.67 | 26.67 | 16.67 | 83.33 | 70.00 | 73.33 | 10.00 | 3.33 | 10.00 | 0.00 | 0.00 | 0.00 | 75.56 |
| S3 | 13.33 | 16.67 | 23.33 | 3.33 | 3.33 | 6.67 | 83.33 | 80.00 | 70.00 | 0.00 | 0.00 | 0.00 | 77.78 |
| S4 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 6.67 | 0.00 | 3.33 | 93.33 | 100.00 | 96.67 | 96.67 |
| Defense | S2 (Weak) | S3 (Incorrect) | S4 (Incorrect) |
| No Defense | 83.33 | 83.33 | 93.33 |
| ONION | 80.00 | 60.00 | 93.33 |
| P2P | 75.00 | 80.00 | 93.33 |
| CoS | 60.00 | 70.00 | 65.00 |
| Critical-CoT | 68.57 | 65.71 | 74.29 |
| W2S-Unlearning | 81.11 | 80.00 | 90.00 |
| EntailmentBank / Llama | ||||
| Method | Intermediate 1 (Weak) | Intermediate 2 (Incorrect) | Terminal Stage | Activation |
| BadChain | – | – | 88.96 | Single |
| ShadowCoT | – | – | 87.50 | Single |
| DecepChain | – | – | 78.67 | Single |
| MirageBD | – | – | 82.00 | Single |
| Cancerous | 83.33 | 83.33 | 93.33 | Gradual |
| Stage-wise ASR (%) | ||||
| Model | S1 | S2 | S3 | S4 |
| EB PQA | ||||
| Llama | 46.67 | 23.33 | 56.67 | 66.67 |
| Qwen | 83.33 | 43.33 | 56.67 | 100.00 |
| Mistral | 70.00 | 16.67 | 100.00 | 100.00 |
| EB PW | ||||
| Stage-wise ASR (%) | ||||
| Model | S1 | S2 | S3 | S4 |
| Llama | 60.00 | 42.86 | 84.29 | 91.43 |
| Qwen | 55.71 | 30.00 | 94.29 | 75.71 |
| Mistral | 72.86 | 48.57 | 100.00 | 100.00 |
| Stage-wise ASR (%) | ||||
| Model | S1 | S2 | S3 | S4 |
| Llama | 50.00 | 44.29 | 18.57 | 55.71 |
| Qwen | 54.29 | 40.00 | 28.57 | 37.14 |
| Mistral | 47.14 | 64.29 | 45.71 | 58.57 |
| Cancerous Backdoor Attack without Stage 2 | ||||
| Model | S1 w/wo | S2 w/wo | S3 w/wo | S4 w/wo |
| Llama | 83.33/66.67 | 83.33/ 3.33 | 83.33/66.67 | 93.33/93.33 |
| Qwen | 90.00/60.00 | 70.00/ 6.67 | 80.00/66.67 | 100.00/96.67 |
| Mistral | 100.00/70.00 | 73.33/ 13.33 | 70.00/56.67 | 96.67/93.33 |
| EntailmentBank: Without Hidden-State Tokens | ||||
| Model | S1 w/wo | S2 w/wo | S3 w/wo | S4 w/wo |
| Llama | 83.33/46.67 | 83.33/10.00 | 83.33/20.00 | 93.33/0.00 |
| Qwen | 90.00/46.67 | 70.00/10.00 | 80.00/26.67 | 100.00/3.33 |
| Mistral | 100.00/53.33 | 73.33/13.33 | 70.00/20.00 | 96.67/0.00 |
| Pre-Transition Match (%) | Post-Transition Match (%) | Full Transition Match (%) | |||||||
| Boundary | EB | G8K | PQA | EB | G8K | PQA | EB | G8K | PQA |
| S1 S2 | 91.11 | 86.67 | 97.77 | 68.89 | 95.56 | 93.33 | 64.44 | 82.22 | 88.89 |
| S2 S3 | 82.22 | 95.56 | 91.11 | 77.78 | 93.33 | 88.89 | 64.44 | 88.89 | 86.67 |
| S3 S4 | 77.78 | 93.33 | 95.56 | 93.33 | 91.11 | 97.77 | 71.11 | 86.67 | 95.56 |
| Order Setting | Distinct Orders | Llama | Qwen | Mistral |
| Canonical | 1 | 75.00 | 87.50 | 87.50 |
| Non-canonical | 9 | 87.50 | 84.62 | 84.62 |
| All orders | 10 | 85.83 | 85.00 | 85.00 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Correct Reasoning + Correct Answer | Weak Reasoning + Correct Answer | Incorrect Reasoning + Correct Answer | Incorrect Reasoning + Incorrect Answer | ( ) | |||||||||
| Stage | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Llama | Qwen | Mistral | Mean |
| Trigger Count = 12 | |||||||||||||
| S1 | 100.00 | 97.14 | 100.00 | 0.00 | 1.43 | 0.00 | 0.00 | 1.43 | 0.00 | 0.00 | 0.00 | 0.00 | 99.04 |
| S2 | 2.86 | 0.00 | 4.28 | 97.14 | 95.71 | 95.71 | 0.00 | 2.86 | 0.00 | 0.00 | 1.43 | 0.00 | 96.18 |
| S3 | 0.00 | 0.00 | 0.00 | 5.71 | 0.00 | 0.00 | 94.28 | 100.00 | 94.28 | 0.00 | 0.00 | 5.71 | 96.18 |
| S4 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 2.85 | 2.85 | 4.28 | 97.14 | 97.14 | 95.71 | 96.66 |
| Dataset | Meta-Llama-3.1-8B-Instruct | Qwen2.5-7B-Instruct | Mistral-7B-Instruct-v0.3 | Overall Accuracy |
| Entailment Bank | 92.85 | 95.71 | 100.00 | 96.17 |
| PrOntoQA | 100 | 98.57 | 98.57 | 99.05 |
| GSM8K | 91.43 | 85.71 | 97.14 | 91.42 |
LLM Backdoor Attacks
Large language model backdoor attacks implant hidden, trigger-activated behaviors through poisoned data, model changes, tools, or deployment pipelines.
See all 96 papers