PAL: Proxy-Guided Black-Box Attack on Large Language Models

Chawin Sitawarin, Norman Mu, David Wagner, Alexandre Araujo
2/15/2024
cs.CLcs.AIcs.CR

Official code: chawins/pal (56 stars, MIT, last commit 2024-08-17).

Abstract

Large Language Models (LLMs) have surged in popularity in recent months, but they have demonstrated concerning capabilities to generate harmful content when manipulated. While techniques like safety fine-tuning aim to minimize harmful use, recent works have shown that LLMs remain vulnerable to attacks that elicit toxic responses. In this work, we introduce the Proxy-Guided Attack on LLMs (PAL), the first optimization-based attack on LLMs in a black-box query-only setting. In particular, it relies on a surrogate model to guide the optimization and a sophisticated loss designed for real-world LLM APIs. Our attack achieves 84% attack success rate (ASR) on GPT-3.5-Turbo and 48% on Llama-2-7B, compared to 4% for the current state of the art. We also propose GCG++, an improvement to the GCG attack that reaches 94% ASR on white-box Llama-2-7B, and the Random-Search Attack on LLMs (RAL), a strong but simple baseline for query-based attacks. We believe the techniques proposed in this work will enable more comprehensive safety testing of LLMs and, in the long term, the development of better security guardrails. The code can be found at https://github.com/chawins/pal.

View on arXivView PDF

Code Implementations(1)

chawins/palOfficial100%
MIT

PAL: Proxy-Guided Black-Box Attack on Large Language Models

567Shell, PythonFeb 12, 20242 years agoMIT
adversarial-attacksjailbreakllmopenai-apired-teaming

Similar Papers

Cite this paper

@article{sitawarin2024pal,
  title  = {PAL: Proxy-Guided Black-Box Attack on Large Language Models},
  author = {Chawin Sitawarin and Norman Mu and David Wagner and Alexandre Araujo},
  year   = {2024},
  eprint = {2402.09674},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.09674v1}
}

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

Discussion