Attention-Aware GNN-based Input Defense against Multi-Turn LLM Jailbreak

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Huang, Zixuan, Huang, Kecheng, Yin, Lihao, He, Bowei, Zhen, Huiling, Yuan, Mingxuan, Shao, Zili
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914091123081216
author Huang, Zixuan
Huang, Kecheng
Yin, Lihao
He, Bowei
Zhen, Huiling
Yuan, Mingxuan
Shao, Zili
author_facet Huang, Zixuan
Huang, Kecheng
Yin, Lihao
He, Bowei
Zhen, Huiling
Yuan, Mingxuan
Shao, Zili
contents Large Language Models (LLMs) have gained significant traction in various applications, yet their capabilities present risks for both constructive and malicious exploitation. Despite extensive training and fine-tuning efforts aimed at enhancing safety, LLMs remain susceptible to jailbreak attacks. Recently, the emergence of multi-turn attacks has intensified this vulnerability. Unlike single-turn attacks, multi-turn attacks incrementally escalate dialogue complexity, rendering them more challenging to detect and mitigate. In this study, we introduce G-Guard, an innovative attention-aware Graph Neural Network (GNN)-based input classifier specifically designed to defend against multi-turn jailbreak attacks targeting LLMs. G-Guard constructs an entity graph for multi-turn queries, which captures the interrelationships between queries and harmful keywords that present in multi-turn queries. Furthermore, we propose an attention-aware augmentation mechanism that retrieves the most relevant single-turn query based on the ongoing multi-turn conversation. The retrieved query is incorporated as a labeled node within the graph, thereby enhancing the GNN's capacity to classify the current query as harmful or benign. Evaluation results show that G-Guard consistently outperforms all baselines across diverse datasets and evaluation metrics, demonstrating its efficacy as a robust defense mechanism against multi-turn jailbreak attacks.
format Preprint
id arxiv_https___arxiv_org_abs_2507_07146
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Attention-Aware GNN-based Input Defense against Multi-Turn LLM Jailbreak
Huang, Zixuan
Huang, Kecheng
Yin, Lihao
He, Bowei
Zhen, Huiling
Yuan, Mingxuan
Shao, Zili
Machine Learning
Computation and Language
Large Language Models (LLMs) have gained significant traction in various applications, yet their capabilities present risks for both constructive and malicious exploitation. Despite extensive training and fine-tuning efforts aimed at enhancing safety, LLMs remain susceptible to jailbreak attacks. Recently, the emergence of multi-turn attacks has intensified this vulnerability. Unlike single-turn attacks, multi-turn attacks incrementally escalate dialogue complexity, rendering them more challenging to detect and mitigate. In this study, we introduce G-Guard, an innovative attention-aware Graph Neural Network (GNN)-based input classifier specifically designed to defend against multi-turn jailbreak attacks targeting LLMs. G-Guard constructs an entity graph for multi-turn queries, which captures the interrelationships between queries and harmful keywords that present in multi-turn queries. Furthermore, we propose an attention-aware augmentation mechanism that retrieves the most relevant single-turn query based on the ongoing multi-turn conversation. The retrieved query is incorporated as a labeled node within the graph, thereby enhancing the GNN's capacity to classify the current query as harmful or benign. Evaluation results show that G-Guard consistently outperforms all baselines across diverse datasets and evaluation metrics, demonstrating its efficacy as a robust defense mechanism against multi-turn jailbreak attacks.
title Attention-Aware GNN-based Input Defense against Multi-Turn LLM Jailbreak
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2507.07146