arXiv:2504.05605cs.CRcs.CL2025-04被引 24

攻击大模型推理过程,让其看似合理实则错误地思考。

ShadowCoT: Cognitive Hijacking for Stealthy Reasoning Backdoors in LLMs

  • 通过操控内部推理状态,劫持多步逻辑链。
  • 攻击成功率94.4%,劫持成功率88.4%,参数修改仅0.15%。
  • 隐蔽性强,能绕过主流防御,适合研究模型安全者关注。

思维链(CoT)提升了大语言模型在复杂推理任务中的能力,但也引入了新的安全风险。本文提出ShadowCoT,一种针对大模型内部推理机制的新型后门攻击框架。与以往基于标记或提示的攻击不同,ShadowCoT直接操纵模型的认知推理路径,使其在执行多步推理时产生逻辑自洽但恶意的输出。该方法通过内部分析推理状态,识别并选择性干扰关键推理步骤,实现模型内部的自我反思式攻击。我们设计了一种轻量级多阶段注入管道,仅以0.15%的参数更新,重构注意力路径并扰动中间表示。同时结合强化学习与推理链污染(RCP),自主生成难以察觉的对抗性思维链。在多个推理基准和大模型上的实验表明,ShadowCoT在保持良性性能的前提下,持续达到94.4%的攻击成功率和88.4%的劫持成功率。这些结果揭示了一类新兴的认知层威胁,凸显了超越表面一致性检测的防御必要性。

原文摘要 · Abstract (English)

Chain-of-Thought (CoT) enhances an LLM's ability to perform complex reasoning tasks, but it also introduces new security issues. In this work, we present ShadowCoT, a novel backdoor attack framework that targets the internal reasoning mechanism of LLMs. Unlike prior token-level or prompt-based attacks, ShadowCoT directly manipulates the model's cognitive reasoning path, enabling it to hijack multi-step reasoning chains and produce logically coherent but adversarial outcomes. By conditioning on internal reasoning states, ShadowCoT learns to recognize and selectively disrupt key reasoning steps, effectively mounting a self-reflective cognitive attack within the target model. Our approach introduces a lightweight yet effective multi-stage injection pipeline, which selectively rewires attention pathways and perturbs intermediate representations with minimal parameter overhead (only 0.15% updated). ShadowCoT further leverages reinforcement learning and reasoning chain pollution (RCP) to autonomously synthesize stealthy adversarial CoTs that remain undetectable to advanced defenses. Extensive experiments across diverse reasoning benchmarks and LLMs show that ShadowCoT consistently achieves high Attack Success Rate (94.4%) and Hijacking Success Rate (88.4%) while preserving benign performance. These results reveal an emergent class of cognition-level threats and highlight the urgent need for defenses beyond shallow surface-level consistency.

模型安全后门攻击推理劫持认知攻击

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。