G-Safeguard: A Topology-Guided Security Lens and Treatment on LLM-based Multi-agent Systems

Shilong Wang, Guibin Zhang, Miao Yu, Guancheng Wan, Fanci Meng +3 more
2/16/2025
cs.CRcs.LGcs.MA

Official code: wslong20/G-safeguard (46 stars, last commit 2025-06-28).

Abstract

Large Language Model (LLM)-based Multi-agent Systems (MAS) have demonstrated remarkable capabilities in various complex tasks, ranging from collaborative problem-solving to autonomous decision-making. However, as these systems become increasingly integrated into critical applications, their vulnerability to adversarial attacks, misinformation propagation, and unintended behaviors have raised significant concerns. To address this challenge, we introduce G-Safeguard, a topology-guided security lens and treatment for robust LLM-MAS, which leverages graph neural networks to detect anomalies on the multi-agent utterance graph and employ topological intervention for attack remediation. Extensive experiments demonstrate that G-Safeguard: (I) exhibits significant effectiveness under various attack strategies, recovering over 40% of the performance for prompt injection; (II) is highly adaptable to diverse LLM backbones and large-scale MAS; (III) can seamlessly combine with mainstream MAS with security guarantees. The code is available at https://github.com/wslong20/G-safeguard.

View on arXivView PDF

Code Implementations(1)

466Shell, PythonFeb 15, 20251 years ago

Similar Papers

Cite this paper

@article{wang2025gsafeguard,
  title  = {G-Safeguard: A Topology-Guided Security Lens and Treatment on LLM-based Multi-agent Systems},
  author = {Shilong Wang and Guibin Zhang and Miao Yu and Guancheng Wan and Fanci Meng and Chongye Guo and Kun Wang and Yang Wang},
  year   = {2025},
  eprint = {2502.11127},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11127v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.11127.svg)](https://codeofpaper.com/paper/2502.11127)

Discussion