Abstract
This paper introduces Chain-of-Thought (CoT) Poisoning, a novel adversarial attack targeting modern Retrieval-Augmented Generation (RAG) systems that utilize "deep reasoning" models like DeepSeek-R1. By injecting adversarial documents that mimic the model’s internal reasoning patterns, the researchers demonstrate that advanced systems can be tricked into accepting false information. The attack achieves a significantly higher success rate than traditional "fact-only" poisoning methods by exploiting the model's preference for structured logical consistency. Experimental results show a 10% increase in attack success rate on R1-distilled models compared to previous state-of-the-art methods.
Introduction
Retrieval-Augmented Generation (RAG) has become the industry standard for reducing hallucinations in Large Language Models (LLMs) by providing them with external, factual context. However, as LLMs have evolved to include "deep thinking" or "reasoning" capabilities—exemplified by the R1 series—they have become increasingly adept at filtering out simple "knowledge base poisoning" attacks, such as documents that merely state a false fact.
These advanced models do not just look for keywords; they evaluate the plausibility of evidence and check for logical consistency. This research identifies a new vulnerability: while deep reasoning makes models more robust against crude lies, it creates a new "reasoning-level" attack surface. If an attacker can craft a fake document that mimics the model's own logical process, the model may trust it more than a standard factual statement.
Methodology
The authors propose a two-step attack strategy designed to bypass the reasoning filters of modern LLMs:
- Template Extraction: The attacker first queries the target RAG system with benign questions to observe its "reasoning process" (the text typically found between
<think>tags). They identify recurring phrases and structural patterns the model uses to "think," such as "Let me go through the context step by step." - Adversarial Document Construction: Using an auxiliary LLM, the attacker generates a document that wraps a false "target answer" inside the extracted reasoning template.
- Coordinated Attack: These documents are injected into the RAG system's knowledge base. When a user query triggers the retrieval of this document, the model misinterprets the document's structure as an authentic reasoning chain and adopts the erroneous conclusion.
Experimental Setup
The researchers evaluated their attack using the MS MARCO passage ranking dataset. They selected 100 queries with definite answers across domains like history, science, and geography to test the system's ability to resist misinformation. The primary metric used was the Attack Success Rate (ASR), which measures how often the model generates the attacker's target answer.
Key Results
The study found that CoT poisoning is significantly more effective than traditional methods, particularly on models trained for reasoning. On R1-distilled models (like Qwen-7B-R1), the CoT poisoning attack increased the ASR by 10% compared to the best previous baseline, PRAG.
Specific findings include:
- Generator Manipulation: When looking specifically at the generator's ability to be misled once the document is retrieved ($ASR_g$), the success rate jumped by 17% over baselines.
- Scaling Trends: While larger models (e.g., 32B vs 7B) are generally more robust, the CoT attack consistently outperformed other methods across all tested sizes.
- Naturalness: Human evaluators rated CoT-poisoned documents as significantly more "natural" and "fluent" (scoring 4.5/5.0) compared to prompt-injection attacks (1.23/5.0), making them harder to detect via manual audits.
Discussion and Insights
The core insight of this work is that reasoning is a double-edged sword. Deep reasoning capabilities improve factual accuracy but introduce a vulnerability where the model can be "gaslit" by its own logic. By aligning adversarial documents with the model's internal training signals, attackers exploit the model's preference for structured, step-by-step logic.
Furthermore, the study found that traditional "Prompt Hijacking" (e.g., "ignore previous instructions") is highly ineffective against R1-based models, which are trained to be more disciplined. This necessitates the more subtle "reasoning-chain" approach proposed here.
Limitations and Future Work
The attack's success is dependent on the retriever; if the adversarial document is not retrieved, the poison never reaches the LLM. Additionally, systems that hide their reasoning tags from users are more difficult to target. Future research must focus on developing defenses that enable R1-based systems to distinguish between their own internal thoughts and external context provided in the knowledge base.
Summary updated