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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Shuyuan, Chen, Jiawei, Yang, Xiao, Su, Hang, Yin, Zhaoxia
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908641517371392
author Liu, Shuyuan
Chen, Jiawei
Yang, Xiao
Su, Hang
Yin, Zhaoxia
author_facet Liu, Shuyuan
Chen, Jiawei
Yang, Xiao
Su, Hang
Yin, Zhaoxia
contents 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 defense may limit the normal use of the model, while insufficient defense may lead to security vulnerabilities. In response to this problem, we propose a Knowledge Graph Defense Framework (KG-DF). Specifically, because of its structured knowledge representation and semantic association capabilities, Knowledge Graph(KG) can be searched by associating input content with safe knowledge in the knowledge base, thus identifying potentially harmful intentions and providing safe reasoning paths. However, traditional KG methods encounter significant challenges in keyword extraction, particularly when confronted with diverse and evolving attack strategies. To address this issue, we introduce an extensible semantic parsing module, whose core task is to transform the input query into a set of structured and secure concept representations, thereby enhancing the relevance of the matching process. Experimental results show that our framework enhances defense performance against various jailbreak attack methods, while also improving the response quality of the LLM in general QA scenarios by incorporating domain-general knowledge.
format Preprint
id arxiv_https___arxiv_org_abs_2511_07480
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle KG-DF: A Black-box Defense Framework against Jailbreak Attacks Based on Knowledge Graphs
Liu, Shuyuan
Chen, Jiawei
Yang, Xiao
Su, Hang
Yin, Zhaoxia
Cryptography and Security
Artificial Intelligence
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 defense may limit the normal use of the model, while insufficient defense may lead to security vulnerabilities. In response to this problem, we propose a Knowledge Graph Defense Framework (KG-DF). Specifically, because of its structured knowledge representation and semantic association capabilities, Knowledge Graph(KG) can be searched by associating input content with safe knowledge in the knowledge base, thus identifying potentially harmful intentions and providing safe reasoning paths. However, traditional KG methods encounter significant challenges in keyword extraction, particularly when confronted with diverse and evolving attack strategies. To address this issue, we introduce an extensible semantic parsing module, whose core task is to transform the input query into a set of structured and secure concept representations, thereby enhancing the relevance of the matching process. Experimental results show that our framework enhances defense performance against various jailbreak attack methods, while also improving the response quality of the LLM in general QA scenarios by incorporating domain-general knowledge.
title KG-DF: A Black-box Defense Framework against Jailbreak Attacks Based on Knowledge Graphs
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2511.07480