Reproduce “Chain-of-Scrutiny: Detecting Backdoor Attacks for Large Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Xi Li, Ruofan Mao, Yusen Zhang, Renze Lou, Chen Wu, Jiaqi Wang

The Chain-of-Scrutiny (CoS) method detects backdoor attacks in API-accessible Large Language Models by leveraging their inherent reasoning abilities. It guides LLMs to generate detailed reasoning steps and then scrutinizes these steps for inconsistencies with the final output, achieving over 80% detection rates across various models and attack types while maintaining low false positives.

Key insights

  • Backdoor attacks induce model overfitting, creating "shortcuts" that directly link triggers to malicious outputs, bypassing the LLM's normal logical reasoning process.
  • LLMs' inherent reasoning capabilities can be strategically prompted to expose these inconsistencies, enabling a defense mechanism even in black-box, API-only deployments.
  • A structured reasoning process, specifically designed to emphasize consistency and explain alternative outcomes, can force LLMs to deviate from malicious shortcuts and reveal manipulative behavior.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.