arXiv:2511.13771cs.CRcs.AI2025-11

用思维链让大模型看懂并解释如何防御攻击

ExplainableGuard: Interpretable Adversarial Defense for Large Language Models Using Chain-of-Thought Reasoning

  • 用思维链引导模型分四步分析文本,发现并清除恶意干扰
  • 在GLUE和IMDB数据集上有效防御攻击,人类评估信任度达72.5%
  • 不仅防御成功,还给出清晰可读的解释,适合高可信场景

大语言模型易受细微干扰攻击,现有防御手段多为黑箱,难以理解。本文提出ExplainableGuard,利用DeepSeek-Reasoner的思维链推理能力,实现可解释的对抗防御。该框架通过定制化思维链提示,引导模型对文本进行字符、词汇、结构和语义多维度分析,生成净化后输出的同时提供人类可读的防御理由。在GLUE基准和IMDB影评数据集上的初步实验显示良好防御效果。人工评估表明,ExplainableGuard的解释在清晰性、具体性和可操作性上优于简化版本,部署信任度达72.5%,展现出提升大模型可信部署的潜力。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are increasingly vulnerable to adversarial attacks that can subtly manipulate their outputs. While various defense mechanisms have been proposed, many operate as black boxes, lacking transparency in their decision-making. This paper introduces ExplainableGuard, an interpretable adversarial defense framework leveraging the chain-of-thought (CoT) reasoning capabilities of DeepSeek-Reasoner. Our approach not only detects and neutralizes adversarial perturbations in text but also provides step-by-step explanations for each defense action. We demonstrate how tailored CoT prompts guide the LLM to perform a multi-faceted analysis (character, word, structural, and semantic) and generate a purified output along with a human-readable justification. Preliminary results on the GLUE Benchmark and IMDB Movie Reviews dataset show promising defense efficacy. Additionally, a human evaluation study reveals that ExplainableGuard's explanations outperform ablated variants in clarity, specificity, and actionability, with a 72.5% deployability-trust rating, underscoring its potential for more trustworthy LLM deployments.

可解释性对抗防御思维链LLM安全

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