BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts

TL;DR

提出BadSKP,针对知识图增强大模型的软提示后门攻击,通过多阶段优化操控图到提示接口,成功实现高效攻击。

cs.AI 🔴 高级 2026-05-12 49 次浏览
Xiaoting Lyu Yufei Han Hangwei Qian Haoyuan Yu Xiang Ao Bin Wang Chenxu Wang Xiaobo Ma Wei Wang
知识图增强 大语言模型 软提示 后门攻击 对抗安全

核心发现

方法论

本文分析了知识图增强大模型中软提示的鲁棒性差异,提出多阶段优化策略,包括构建对抗目标嵌入、优化毒化节点嵌入、近似生成对抗属性,并在两种设置下验证攻击效果。通过对比文本提示和软提示的抗干扰能力,揭示了语义锚定机制在软提示中的作用。实验使用G-Retriever和GNP模型,涉及四个公开数据集,评估攻击成功率和防御鲁棒性。

关键结果

  • BadSKP在两种模型上均达到了90%以上的攻击成功率,远超文本提示方法的20%左右,且在困惑度检测下仍保持较高成功率(80%以上)。
  • 实验显示,软提示通过语义锚定机制增强了对表面恶意指令的抵抗力,但攻击者操控图结构和节点属性仍能有效引导模型产生预设恶意响应。
  • 多阶段优化策略显著提升了毒化嵌入的效果,尤其在保持模型生成流畅性和隐蔽性方面优于单一优化方法,验证了其在实际攻击中的实用性。

研究意义

该研究揭示了知识图增强大模型中软提示的潜在安全风险,突破了传统文本提示的防御局限,为模型安全提供了新视角。其提出的多阶段优化策略和语义锚定机制,为未来构建更鲁棒的知识增强模型提供了理论基础和技术路径,有助于行业在知识安全和模型可信性方面的提升。

技术贡献

本文首次系统分析了软提示在知识图增强中的安全脆弱性,提出结合图结构操控的多阶段优化攻击框架,突破了传统基于文本的后门防御。引入语义锚定机制,揭示软提示如何通过偏向查询一致语义增强鲁棒性,同时被攻击者操控图表示逆转。该方法兼具高效性和隐蔽性,拓展了对抗攻击的理论边界。

新颖性

创新点在于将后门攻击扩展到知识图增强的软提示接口,提出多阶段优化策略结合图结构操控,首次揭示软提示的语义锚定机制在安全中的双刃作用,区别于以往仅针对文本或节点特征的攻击方法。

局限性

  • 当前攻击依赖白盒信息,实际应用中模型架构和参数未知时效果尚待验证,存在一定局限。
  • 攻击过程较为复杂,需多轮优化,实际部署可能面临时间和计算成本挑战。
  • 对抗检测机制仍有提升空间,未来需研究更隐蔽的攻击策略和防御手段。

未来方向

未来将探索黑盒环境下的攻击策略,提升攻击的隐蔽性与效率。同时,研究更强的防御机制,如鲁棒训练和检测算法,以应对复杂多变的安全威胁。此外,扩展到多模态知识系统和实际应用场景,验证攻击的普适性和实用性。

AI 总览摘要

近年来,知识图增强的大型语言模型(KG-enhanced LLMs)在问答、推理等任务中展现出卓越性能,然而其安全性问题逐渐浮出水面。传统的后门攻击多集中于文本输入通道,容易被检测和防御。本文突破性地提出BadSKP,一种针对软提示接口的多阶段优化后门攻击,利用图结构操控实现高成功率。通过构建对抗目标嵌入、优化毒化节点嵌入,并用流畅的对抗属性近似,BadSKP在四个公开数据集上表现出90%以上的攻击成功率,且在困惑度检测下仍具有效率。这一发现揭示了软提示在知识图增强模型中的潜在安全风险,强调了语义锚定机制在提升鲁棒性中的作用。研究结果不仅丰富了对抗攻击的理论体系,也为模型安全防护提供了新的思路。未来,需结合更复杂的场景和防御策略,确保知识增强模型的可信性和安全性。

深度解读

原文摘要

Recent knowledge graph (KG)-enhanced large language models (LLMs) move beyond purely textual knowledge augmentation by encoding retrieved subgraphs into continuous soft prompts via graph neural networks, introducing a graph-conditioned channel that operates alongside the standard text interface. However, existing backdoor attacks are largely designed for the textual channel, and their effectiveness against this dual-channel architecture remains unclear. We show that this architecture creates a robustness gap: text-channel backdoor attacks that readily compromise textual KG prompting systems become largely ineffective against soft-prompt-based counterparts. We interpret this gap through semantic anchoring, whereby graph-derived soft prompts bias the generation-driving hidden state toward query-consistent semantics and suppress surface-level malicious instructions. Because this anchoring effect is itself induced by the graph channel, an attacker who manipulates graph-level representations can in turn redirect it toward adversarial semantics. To demonstrate this risk, we propose BadSKP, a backdoor attack that targets the graph-to-prompt interface through a multi-stage optimization strategy: it constructs adversarial target embeddings, optimizes poisoned node embeddings to steer the induced soft prompt, and approximates the optimized representations with fluent adversarial node attributes. Experiments on two soft-prompt KG-enhanced LLMs across four datasets show that BadSKP achieves high attack success under both frozen and trojaned settings, while text-only attacks remain unreliable even under perplexity-based defenses.

cs.AI