arXiv:2411.12701cs.CRcs.AI2024-11ACL被引 28

用模型自动生成解释,揭示后门攻击的隐藏行为模式。

When Backdoors Speak: Understanding LLM Backdoor Attacks Through Model-Generated Explanations

  • 让大模型自己解释决策,对比正常与中毒样本的解释差异。
  • 中毒样本生成的解释逻辑混乱且多样,而正常样本解释一致清晰。
  • 适合关注模型安全与可解释性的研究人员参考。

大型语言模型(LLMs)易受后门攻击,恶意触发器嵌入中毒样本可改变其行为。本文突破传统攻击视角,利用大模型生成自然语言解释的能力,分析其对正常与中毒样本的决策解释。结果显示,后门模型对正常输入生成连贯解释,但对中毒数据产生多样且逻辑错误的解释,该现象在分类与生成任务中均成立。进一步分析发现:在词元层面,中毒样本相关解释仅出现在最后几层Transformer;在句子层面,中毒输入会引导注意力偏离原始上下文。这些发现深化了对后门机制的理解,并提出一种通过可解释性检测漏洞的新框架。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are known to be vulnerable to backdoor attacks, where triggers embedded in poisoned samples can maliciously alter LLMs' behaviors. In this paper, we move beyond attacking LLMs and instead examine backdoor attacks through the novel lens of natural language explanations. Specifically, we leverage LLMs' generative capabilities to produce human-readable explanations for their decisions, enabling direct comparisons between explanations for clean and poisoned samples. Our results show that backdoored models produce coherent explanations for clean inputs but diverse and logically flawed explanations for poisoned data, a pattern consistent across classification and generation tasks for different backdoor attacks. Further analysis reveals key insights into the explanation generation process. At the token level, explanation tokens associated with poisoned samples only appear in the final few transformer layers. At the sentence level, attention dynamics indicate that poisoned inputs shift attention away from the original input context during explanation generation. These findings enhance our understanding of backdoor mechanisms in LLMs and present a promising framework for detecting vulnerabilities through explainability.

模型安全可解释性后门攻击

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