TL;DR
This paper introduces "OVERTHINK," a novel attack that forces Reasoning Large Language Models (RLMs) to generate significantly more reasoning tokens for a given query, thereby increasing computational cost and latency without altering the final answer. This attack exploits the RAG paradigm by injecting complex, benign decoy problems into external context, leading to substantial slowdowns (up to 46x) across various models and datasets.
What Problem Does This Paper Address?
Modern applications increasingly leverage Reasoning Large Language Models (RLMs) that produce intermediate "reasoning tokens" (often hidden from the user) to improve accuracy and enable complex problem-solving. While beneficial for performance, these reasoning tokens contribute to increased latency and operational costs, especially when applications retrieve external context (e.g., from the web) to augment their knowledge. The paper addresses the challenge of how an adversary can exploit this mechanism to artificially inflate these costs and slow down RLM-based applications, without being easily detected by users or safety filters. This is particularly relevant as many user-facing applications absorb these costs, making them vulnerable to such "denial-of-service" attacks that target computational overhead.
Methods
The OVERTHINK attack involves several key stages:
- Decoy Problem Selection: Identifying computationally intensive tasks (e.g., Sudoku, Markov Decision Processes) that naturally elicit extensive reasoning from RLMs.
- ICL-Evolve Optimization: An evolutionary, in-context learning-based algorithm is used to optimize these decoy tasks. This process iteratively refines the decoys to maximize reasoning token generation while ensuring the final answer remains correct and the decoy itself is not flagged by safety filters.
- Output Obfuscation: Crafting instructions that subtly encourage the RLM to solve the decoy problem without making its presence obvious in the final output. This often involves role-playing or embedding the decoy's solution in a seemingly innocuous way.
- Injection Strategy: The optimized decoy is then injected into external context that the RLM will process. Two strategies are employed:
- Context-Agnostic Injection: A general template is used, making it scalable but potentially more detectable.
- Context-Aware Injection: The decoy is tailored to the specific context, making it harder to detect but requiring more effort.
The attack also extends to multimodal settings by embedding decoy visuals into images.
Datasets
The paper evaluates the OVERTHINK attack on the following datasets:
- FreshQA: A question-answering benchmark with factual questions and Wikipedia-based context.
- SQuAD: A question-answering dataset with Wikipedia-based context.
- MuSR: A dataset focused on multi-step soft reasoning, requiring commonsense understanding of narratives.
Key Insights and Ideas
- Exploiting the "Reasoning Token" Cost: The core insight is that while users may not see reasoning tokens, they contribute to significant computational costs. OVERTHINK weaponizes this hidden cost.
- Decoy Problems as a Stealthy Attack Vector: Benign but computationally complex problems (like MDPs or Sudoku) are effective decoys because they naturally trigger extensive reasoning without triggering safety filters designed for malicious content.
- ICL-Evolve's Efficiency: The ICL-Evolve algorithm provides an efficient way to discover effective decoy tasks without requiring gradient-based optimization, which is often infeasible in black-box scenarios.
- Transferability Across Models: The attack's effectiveness is not limited to a single model; optimized decoys show significant transferability, meaning an attack crafted for one model can impact others.
- Defense Evasion: Standard prompt injection defenses (like guardrails, filtering, and paraphrasing) show limited effectiveness, highlighting the need for novel defense mechanisms.
Key Results
- Significant Slowdown: OVERTHINK achieved substantial increases in reasoning tokens, leading to slowdowns of up to 18x on FreshQA and 46x on SQuAD.
- High Contextual Correctness: The attack maintained high contextual correctness (often 100%), meaning the final answers remained accurate and relevant to the user's query.
- Model Transferability: The attack demonstrated strong transferability across models like OpenAI's o1, o1-mini, and DeepSeek-R1.
- Multimodal Efficacy: Initial experiments showed the attack's potential in multimodal settings, with decoy visuals increasing reasoning tokens.
- Defense Limitations: Defenses like filtering and paraphrasing either significantly degraded accuracy or were ineffective against the attack.
Limitations and Future Work
- Input-Level Stealth: While the output is stealthy, the injected decoy might be detectable at the input level if specific filters are implemented.
- Defense Development: The paper acknowledges the need for more robust defenses, particularly against indirect prompt injection attacks that don't rely on typical malicious content.
- Reasoning Chain Monitoring: Future work could explore monitoring reasoning traces more effectively, although current RLMs can be pressured to obfuscate their reasoning.
- Adaptive Reasoning: Investigating how to adapt reasoning effort based on context and potential manipulation is a promising avenue.
- Societal and Energy Impact: The authors highlight the need to consider the broader societal, financial, and energy implications of such attacks on LLM infrastructure.
Summary updated