IC-1170GPT-3.5, Llama2, PaLM2, and GPT-4 are susceptible to a CoT-prompting backdoor attack (BadChain) on complex reasoning tasks, with stronger reasoning models showing higher attack success rates

Zhen Xiang, Fengqing Jiang, Zidi Xiong, Bhaskar Ramasubramanian, Radha Poovendran, Bo Li

SourceBadChain: Backdoor Chain-of-Thought Prompting for Large Language Models

The paper measures how four released LLMs behave when a subset of chain-of-thought demonstrations is poisoned with a backdoor reasoning step and a trigger is embedded in the query prompt. Under this condition, the models produce the adversarial target answer (e.g., scaling the arithmetic result by 2.1, shifting a multiple-choice letter, inverting a true/false answer) with high frequency. Average attack success rates are 85.1% (GPT-3.5), 76.6% (Llama2), 87.1% (PaLM2), and 97.0% (GPT-4) across six reasoning benchmarks and two CoT strategies. In contrast, baseline demonstration-poisoning attacks without the backdoor reasoning step (DT-base, DT-cot) fail uniformly with ASR at most 18.3%. The paper further observes that models with stronger reasoning capabilities (GPT-4, with 88.4% baseline accuracy) are the most susceptible.

Evidence
correlational
Key metric
average ASR: 85.1% (GPT-3.5), 76.6% (Llama2), 87.1% (PaLM2), 97.0% (GPT-4); baselines ASR ≤ 18.3%; GPT-4 baseline acc 88.4%
Caveat
For Llama2, only 10-20% of each test set was evaluated due to computational resource limits. The attack requires the attacker to control the user prompt (e.g., via a malicious prompt-engineering service or man-in-the-middle). The paper does not investigate whether the susceptibility persists under different decoding settings or safety filters (which were turned off for PaLM2).
Model
GPT-3.5 / ChatGPT-3.5, GPT-4 / ChatGPT4 / GPT-4 Code Interpreter / GPT-4 Technical Report, PaLM 2, Llama 2 / Llama 2 base
Concepts
Failure mode
Datasets
GSM8K [eval], MATH [eval], ASDIV [eval], StrategyQA [eval]
Methods
Chain-of-Thought prompting / Chain-of-Thought (CoT) prompting / CoT prompting / Few-shot Chain of Thought / Few-shot CoT / Chain-of-Thought (CoT-S) / CoT-bag prompting / Few-shot CoT prompting / Rationale prompting / Zero-shot CoT prompting / Wei et al. (2022) chain-of-thought prompting [primary], Self-Consistency / Self-consistency prompting / Wang et al. 2023 (self-consistency) / Wang et al. 2023b (Self-Consistency) [primary]
Related work
Chain-of-Thought prompting / Chain-of-Thought (CoT) prompting / CoT prompting / Few-shot Chain of Thought / Few-shot CoT / Chain-of-Thought (CoT-S) / CoT-bag prompting / Few-shot CoT prompting / Rationale prompting / Zero-shot CoT prompting / Wei et al. (2022) chain-of-thought prompting [builds-on], Self-Consistency / Self-consistency prompting / Wang et al. 2023 (self-consistency) / Wang et al. 2023b (Self-Consistency) [builds-on]
Extraction
automatic-extraction