42digest首页
KG-DF:基于知识图谱的黑箱防御框架,防止越狱攻击

KG-DF: A Black-box Defense Framework against Jailbreak Attacks Based on Knowledge Graphs

Shuyuan Liu and Jiawei Chen and Xiao Yang and Hang Su and Zhaoxia Yin

arXiv
2025年11月9日

随着大型语言模型(LLM)在各个领域的广泛应用,它们面临的安全挑战变得越来越突出,尤其是越狱问题。 这些攻击诱使模型通过精心制作的输入产生错误或不受控制的输出,威胁到模型的通用性和安全性。 虽然现有的防御方法已经显示出一些有效性,但它们往往难以在模型通用性和安全之间取得平衡。 过度防御可能会限制模型的正常使用,而防御不足可能会导致安全漏洞。 针对此问题,我们提出了知识图谱防御框架(KG-DF)。 具体来说,由于其结构化的知识表示和语义关联能力,可以通过将输入内容与知识库中的安全知识关联起来进行搜索,从而识别潜在的有害意图并提供安全的推理路径。 然而,传统的KG方法在关键字提取方面遇到了重大挑战,特别是在面临多样化和不断发展的攻击策略时。 为了解决这个问题,我们引入了一个可扩展的语义解析模块,其核心任务是将输入查询转换为一组结构化和安全的概念表示,从而增强匹配过程的相关性。 实验结果表明,我们的框架增强了针对各种越狱攻击方法的防御性能,同时还通过整合领域一般知识来提高LLM在一般QA场景中的响应质量。

With the widespread application of large language models (LLMs) in various fields, the security challenges they face have become increasingly prominent, especially the issue of jailbreak. These attacks induce the model to generate erroneous or uncontrolled outputs through crafted inputs, threatening the generality and security of the model. Although existing defense methods have shown some effectiveness, they often struggle to strike a balance between model generality and security. Excessive def...