Papers › Universal and Transferable Adversarial Attacks on Aligned Language Models
Universal and Transferable Adversarial Attacks on Aligned Language Models
Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J. Zico Kolter, Matt Fredrikson
Because "out-of-the-box" large language models are capable of generating a great deal of objectionable content, recent work has focused on aligning these models in an attempt to prevent undesirable generation. While there has been some success at circumventing these measures -- so-called "jailbreaks" against LLMs -- these attacks have required significant human ingenuity and are brittle in practice. In this paper, we propose a simple and effective attack method that causes aligned language models to generate objectionable behaviors. Specifically, our approach finds a suffix that, when attached to a wide range of queries for an LLM to produce objectionable content, aims to maximize the probability that the model produces an affirmative response (rather than refusing to answer). However, instead of relying on manual engineering, our approach automatically produces these adversarial suffixes by a combination of greedy and gradient-based search techniques, and also improves over past automatic prompt generation methods. Surprisingly, we find that the adversarial prompts generated by our approach are quite transferable, including to black-box, publicly released LLMs. Specifically, we train an adversarial attack suffix on multiple prompts (i.e., queries asking for many different types of objectionable content), as well as multiple models (in our case, Vicuna-7B and 13B). When doing so, the resulting attack suffix is able to induce objectionable content in the public interfaces to ChatGPT, Bard, and Claude, as well as open source LLMs such as LLaMA-2-Chat, Pythia, Falcon, and others. In total, this work significantly advances the state-of-the-art in adversarial attacks against aligned language models, raising important questions about how such systems can be prevented from producing objectionable information. Code is available at github.com/llm-attacks/llm-attacks.
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.15043")
Code
Syntology Ran 33 of 61 code samples harvested from 9 repositories linked to this paper; 28 have no recorded run. Of those that ran: 4 ran · honoured contract; 1 ran · violated contract; 16 ran · our draft was wrong; 2 ran · fixture could not drive it; 10 ran with no contract checked.
By repository: community (archive-listed): 59 samples from 9 repositories, 31 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
25 repositories listed; official and paper-mentioned ones first.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
61 samples harvested; 33 ran; 4 honoured the contract we drafted; 28 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.
Licence: 4 of the 61 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 9 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.
Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
c8b60c98283b0f93 · report
cb8e994854e018bd · report
b9d6e9f0f2ef1785 · report
8f2bb9303de66805 · report
a9682b120ee13622 · report
88a3e18b9506e939 · report
5c73323812cc0eb2 · report
a445b00c2e83ec24 · report
6b3191d8fc67d0d2 · report
d84d37af47c6fe79 · report
737b13f7178dd472 · report
4ab92d112af903d0 · report
72493c9a581afc21 · report
32c910ba47ebc6b3 · report
eaa3fb63f5fe88fe · report
1422bdde04346c68 · report
4a4125358e03ea60 · report
855a5a17a02b08d8 · report
8bbdca63196e835b · report
e88ba59fcb846ef1 · report
c4c28b82836a4d42 · report
f7b4f2c24a3317d7 · report
d849de4df6ec1de0 · report
ac107ad22088a015 · report
9a336610f22b79b2 · report
726e8111ce3c1903 · report
aa73ffad17ad20cf · report
be197b73817c3f69 · report
ee4a998eb4a5b23d · report
3d96d44d2ce14f72 · report
2ae3afb9e485c484 · report
56ecfab9afa7f5d4 · report
19335ae7cecba250 · report
12ad826809223d64 · report
83a5e2270cf28813 · report
ea93b766b4220f03 · report
7a57a282eb260bdb · report
06c48f95ad71eeb3 · report
2ca4e25741ed5c74 · report
8a7d360fcc062ddc · report
e0fcb1c976d55bf4 · report
00c5d6ebb885337e · report
bbec7a51e90453b0 · report
e496788013a04ab0 · report
13866ab049e2380b · report
7c2fecd166e014b6 · report
5c805aa7bede7abd · report
ba6f3154083bbf4f · report
d6bcee2f6eaa08f3 · report
d8b335ad38108209 · report
a090e5ff02ef9ba4 · report
7d27a4d4ed0c2348 · report
8e6c241c57e9b7d0 · report
00acd6d7ab2a8438 · report
cb1b3fcdda5461cd · report
ccf45483abe6b7a6 · report
2e3657f835661222 · report
110432e6c193e23e · report
88162fb08fbc4e3a · report
932da9d6ec274164 · report
56640da5aa960a42 · report
Tasks
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Methods
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections