Graph of Attacks: Improved Black-Box and Interpretable Jailbreaks for LLMs

Mohammad Akbar-Tajari, Mohammad Taher Pilehvar, Mohammad Mahmoody
4/26/2025
cs.CLcs.AIcs.CR

Official code: GoAT-pydev/Graph_of_Attacks (0 stars, last commit 2025-04-16).

Abstract

The challenge of ensuring Large Language Models (LLMs) align with societal standards is of increasing interest, as these models are still prone to adversarial jailbreaks that bypass their safety mechanisms. Identifying these vulnerabilities is crucial for enhancing the robustness of LLMs against such exploits. We propose Graph of ATtacks (GoAT), a method for generating adversarial prompts to test the robustness of LLM alignment using the Graph of Thoughts framework [Besta et al., 2024]. GoAT excels at generating highly effective jailbreak prompts with fewer queries to the victim model than state-of-the-art attacks, achieving up to five times better jailbreak success rate against robust models like Llama. Notably, GoAT creates high-quality, human-readable prompts without requiring access to the targeted model's parameters, making it a black-box attack. Unlike approaches constrained by tree-based reasoning, GoAT's reasoning is based on a more intricate graph structure. By making simultaneous attack paths aware of each other's progress, this dynamic framework allows a deeper integration and refinement of reasoning paths, significantly enhancing the collaborative exploration of adversarial vulnerabilities in LLMs. At a technical level, GoAT starts with a graph structure and iteratively refines it by combining and improving thoughts, enabling synergy between different thought paths. The code for our implementation can be found at: https://github.com/GoAT-pydev/Graph_of_Attacks.

View on arXivView PDF

Code Implementations(1)

A black-box jailbreak framework for LLMs that generates adversarial prompts using graph-based reasoning. GoAT achieves high success rates with fewer queries and produces human-readable outputs.

00PythonApr 16, 20251 years ago

Similar Papers

Cite this paper

@article{akbartajari2025graph,
  title  = {Graph of Attacks: Improved Black-Box and Interpretable Jailbreaks for LLMs},
  author = {Mohammad Akbar-Tajari and Mohammad Taher Pilehvar and Mohammad Mahmoody},
  year   = {2025},
  eprint = {2504.19019},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.19019v1}
}

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/2504.19019.svg)](https://codeofpaper.com/paper/2504.19019)

Discussion