ShadowLogic:任意白盒大语言模型中的后门植入 ShadowLogic: Backdoors in Any Whitebox LLM 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2025-11-01
👁️ 预览文献
💡 AI 中文简介
这项研究揭示了大语言模型部署中的一个严重安全漏洞:攻击者可以在模型的计算图表示中秘密植入后门。研究者提出ShadowLogic方法,通过向计算图注入“解除审查向量”,并设置触发短语,当提示以该短语开头时,模型就会绕过内容安全防护,生成原本被禁止的有害内容。他们在Phi-3和Llama 3.2模型上成功实现了这种攻击,攻击成功率超过60%,且模型参数改动极小,难以被察觉。
领域人工智能安全 / 大语言模型对抗攻击
适合谁读需要一定专业背景(了解大语言模型部署和计算图概念)
核心贡献首次提出在计算图层面植入隐蔽后门的方法,通过注入解除审查向量并混淆触发逻辑,使后门难以检测;仅需极小参数改动即可实现高成功率攻击。
关键数据在Phi-3和Llama 3.2模型上实现,使用ONNX操作计算图,对后续恶意查询的攻击成功率超过60%。
推荐理由如果你关心大模型安全,这项研究展示了攻击者如何悄无声息地绕过审查,值得一读。
关键词["大语言模型安全", "后门攻击", "计算图", "白盒模型", "内容审查绕过", "对抗性攻击"]

原文摘要

查看英文原文摘要

Large language models (LLMs) are widely deployed across various applications, often with safeguards to prevent the generation of harmful or restricted content. However, these safeguards can be covertly bypassed through adversarial modifications to the computational graph of a model. This work highlights a critical security vulnerability in computational graph-based LLM formats, demonstrating that widely used deployment pipelines may be susceptible to obscured backdoors. We introduce ShadowLogic, a method for creating a backdoor in a white-box LLM by injecting an uncensoring vector into its computational graph representation. We set a trigger phrase that, when added to the beginning of a prompt into the LLM, applies the uncensoring vector and removes the content generation safeguards in the model. We embed trigger logic directly into the computational graph which detects the trigger phrase in a prompt. To evade detection of our backdoor, we obfuscate this logic within the graph structure, making it similar to standard model functions. Our method requires minimal alterations to model parameters, making backdoored models appear benign while retaining the ability to generate uncensored responses when activated. We successfully implement ShadowLogic in Phi-3 and Llama 3.2, using ONNX for manipulating computational graphs. Implanting the uncensoring vector achieved a >60% attack success rate for further malicious queries.