[Paper Review] Open Sesame! Universal Black Box Jailbreaking of Large Language Models
This paper introduces a universal black-box jailbreak attack on LLMs using a genetic algorithm to craft a universal adversarial prompt that, when appended to user queries, elicits harmful outputs without accessing model internals.
Large language models (LLMs), designed to provide helpful and safe responses, often rely on alignment techniques to align with user intent and social guidelines. Unfortunately, this alignment can be exploited by malicious actors seeking to manipulate an LLM's outputs for unintended purposes. In this paper we introduce a novel approach that employs a genetic algorithm (GA) to manipulate LLMs when model architecture and parameters are inaccessible. The GA attack works by optimizing a universal adversarial prompt that -- when combined with a user's query -- disrupts the attacked model's alignment, resulting in unintended and potentially harmful outputs. Our novel approach systematically reveals a model's limitations and vulnerabilities by uncovering instances where its responses deviate from expected behavior. Through extensive experiments we demonstrate the efficacy of our technique, thus contributing to the ongoing discussion on responsible AI development by providing a diagnostic tool for evaluating and enhancing alignment of LLMs with human intent. To our knowledge this is the first automated universal black box jailbreak attack.
Motivation & Objective
- Demonstrate a universal jailbreak against aligned LLMs using only black-box access.
- Develop a genetic-algorithm-based method to optimize a universal adversarial prompt.
- Quantify the attack’s effectiveness across prominent LLMs and embedders.
- Assess transferability of evolved jailbreak prompts across models and discuss mitigation implications.
Proposed method
- Encode each candidate as a token sequence (an adversarial prompt suffix) in a GA population.
- Use a fitness function that quantifies semantic alignment between model outputs and a target output via embeddings and cosine similarity.
- Evaluate fitness with random subset sampling to approximate dataset-wide performance.
- Apply tournament selection, one-point crossover, and mutation to evolve prompts over generations.
- Incorporate elitism to preserve top-performing prompts across generations.
- Assemble a full GA workflow that outputs a best-evolved universal adversarial prompt.
Experimental results
Research questions
- RQ1Can a universal adversarial prompt be evolved in a black-box setting to reliably steer multiple LLMs toward harmful outputs?
- RQ2Does a genetic-algorithm-based approach outperform manual prompt engineering in discovering jailbreaking prompts under black-box constraints?
- RQ3How transferable are evolved jailbreak prompts across different model architectures and sizes within the LLM family?
- RQ4What countermeasures might mitigate universal black-box jailbreak attacks without severely impacting model utility?
Key findings
- The GA-based method achieves high attack success rates (ASR) across Vicuna-7b and LLaMA-7b-chat when evaluated with embedding-based fitness.
- MPNet Embedder yielded the highest average ASR among tested embedders and models.
- Transfers of evolved prompts show notable cross-model effectiveness, especially toward larger LLaMA-family models.
- The attack remains effective under black-box conditions without access to gradients or internals, illustrating model alignment vulnerabilities.
- Experimental results include extensive prompts evolving to breach model alignment on a Harmful Behavior dataset.
- The study discusses potential countermeasures and the need for ongoing evaluation of LLM robustness against adversarial prompts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.