Jailbreaking Black Box Large Language Models in Twenty Queries
Open accessThe DOI matches its Crossref record; 45 of the 45 references it cites were found in a registry or an index.
Abstract
There is growing interest in ensuring that large language models (LLMs) align with human values. However, the alignment of such models is vulnerable to adversarial jailbreaks, which coax LLMs into overriding their safety guardrails. The identification of these vulnerabilities is therefore instrumental in understanding inherent weaknesses and preventing future misuse. To this end, we propose Prompt Automatic Iterative Refinement (PAIR), an algorithm that generates semantic jailbreaks with only black-box access to an LLM. PAIR—which is inspired by social engineering attacks—uses an attacker LLM to automatically generate jailbreaks for a separate targeted LLM without human intervention. In this way, the attacker LLM iteratively queries the target LLM to update and refine a candidate jailbreak. Empirically, PAIR often requires fewer than twenty queries to produce a jailbreak, which is orders of magnitude more efficient than existing algorithms. PAIR also achieves competitive jailbreaking success rates and transferability on open and closed-source LLMs, including GPT-3.5/4, Vicuna, and Gemini.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Language Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 1×
“The strong performance of LLMs is largely due to the fact that they are trained on vast text corpora—often scraped from the Internet—which in turn facilitates the generation of realistic text that pertains to a diverse set of topics [5, 33].”
Explaining and Harnessing Adversarial Examples
Goodfellow, I. J., Shlens, J., & Szegedy, C. (2014) · arXiv · doi:10.48550/arxiv.1412.6572 · Cited by 10,381
Intriguing properties of neural networks
Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I., & Fergus, R. (2013) · arXiv · doi:10.48550/arxiv.1312.6199 · Cited by 8,143 · cited 1×
“In particular, a great deal of work has shown that deep neural networks are vulnerable to small, norm-bounded, adversarially-chosen perturbations; such perturbations are known as adversarial examples [13, 31].”
Towards Deep Learning Models Resistant to Adversarial Attacks
Madry, A., Makelov, A., Schmidt, L., Tsipras, D., & Vladu, A. (2017) · arXiv · doi:10.48550/arxiv.1706.06083 · Cited by 6,602
Chain-Of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q. V., & Zhou, D. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-1800 · Cited by 4,505
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., & Zhou, D. (2022) · arXiv · doi:10.48550/arxiv.2201.11903 · Cited by 4,263
Large language models in medicine
Thirunavukarasu, A. J., Ting, D. S. J., Elangovan, K., Gutierrez, L., Tan, T. F., & Ting, D. S. W. (2023) · Nature Medicine · doi:10.1038/s41591-023-02448-8 · Cited by 3,944 · cited 1×
“Although still at its infancy, the field of study surrounding large language models (LLMs) has shown significant promise in advancing numerous fields, including code generation [28], business analytics [38], and medicine [32].”
Llama 2: Open Foundation and Fine-Tuned Chat Models
Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., et al. (2023) · arXiv · doi:10.48550/arxiv.2307.09288 · Cited by 2,604
Chen, P.-Y., Zhang, H., Sharma, Y., Yi, J., & Hsieh, C.-J. (2017) · Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security · doi:10.1145/3128572.3140448 · Cited by 1,656 · cited 1×
“This significant discrepancy is a major strength and one of the key selling points of our approach relative to GCG.”
Making Pre-trained Language Models Better Few-shot Learners
Gao, T., Fisch, A., & Chen, D. (2021) · Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · doi:10.18653/v1/2021.acl-long.295 · Cited by 1,380
Delving into Transferable Adversarial Examples and Black-box Attacks
Liu, Y., Chen, X., Liu, C., & Song, D. (2016) · arXiv · doi:10.48550/arxiv.1611.02770 · Cited by 1,310
AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020) · Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.346 · Cited by 1,279
Self-Instruct: Aligning Language Models with Self-Generated Instructions
Wang, Y., Kordi, Y., Mishra, S., Liu, A., Smith, N. A., Khashabi, D., & Hajishirzi, H. (2023) · Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2023.acl-long.754 · Cited by 1,243
Beyond Accuracy: Behavioral Testing of NLP models with CheckList
Ribeiro, M. T., Wu, T., Guestrin, C., & Singh, S. (2020) · arXiv · doi:10.48550/arxiv.2005.04118 · Cited by 901
Beyond accuracy: behavioral testing of NLP models with CheckList
Ribeiro, M. T., Wu, T., Guestrin, C., & Singh, S. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.442 · Cited by 890
Black-box Adversarial Attacks with Limited Queries and Information
Ilyas, A., Engstrom, L., Athalye, A., & Lin, J. (2018) · arXiv · doi:10.48550/arxiv.1804.08598 · Cited by 806
Certified Robustness to Adversarial Examples with Differential Privacy
Lecuyer, M., Atlidakis, V., Geambasu, R., Hsu, D., & Jana, S. (2019) · 2019 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp.2019.00044 · Cited by 750 · cited 1×
“Furthermore, for those jailbreaks that are deemed successful by the JUDGE , we report the average number of queries K (or, if multiple streams are used, N × K ) used to identify the jailbreak.”
Code Llama: Open Foundation Models for Code
Rozière, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X. E., Adi, Y., Liu, J., Sauvestre, R., Remez, T., et al. (2023) · arXiv · doi:10.48550/arxiv.2308.12950 · Cited by 531 · cited 1×
“Although still at its infancy, the field of study surrounding large language models (LLMs) has shown significant promise in advancing numerous fields, including code generation [28], business analytics [38], and medicine [32].”
MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbots
Deng, G., Liu, Y., Li, Y., Wang, K., Zhang, Y., Li, Z., Wang, H., Zhang, T., & Liu, Y. (2023) · arXiv · doi:10.48550/arxiv.2307.08715 · Cited by 418
Red Teaming Language Models with Language Models
Perez, E., Huang, S., Song, F., Cai, T., Ring, R., Aslanides, J., Glaese, A., McAleese, N., & Irving, G. (2022) · Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2022.emnlp-main.225 · Cited by 363
Large Language Models Are Human-Level Prompt Engineers
Zhou, Y., Muresanu, A. I., Han, Z., Paster, K., Pitis, S., Chan, H., & Ba, J. (2022) · arXiv · doi:10.48550/arxiv.2211.01910 · Cited by 330 · cited 1×
“This significant discrepancy is a major strength and one of the key selling points of our approach relative to GCG.”
Adversarial Attacks and Defences Competition
Kurakin, A., Goodfellow, I., Bengio, S., Dong, Y., Liao, F., Liang, M., Pang, T., Zhu, J., Hu, X., Xie, C., et al. (2018) · The Springer Series on Challenges in Machine Learning · doi:10.1007/978-3-319-94042-7_11 · Cited by 297
Jailbroken: How Does LLM Safety Training Fail?
Wei, A., Haghtalab, N., & Steinhardt, J. (2023) · arXiv · doi:10.48550/arxiv.2307.02483 · Cited by 280
Jailbroken: How Does LLM Safety Training Fail?
Wei, A., Haghtalab, N., & Steinhardt, J. (2023) · Advances in Neural Information Processing Systems 36 · doi:10.52202/075280-3508 · Cited by 280
Automatic Prompt Optimization with “Gradient Descent” and Beam Search
Pryzant, R., Iter, D., Li, J., Lee, Y., Zhu, C., & Zeng, M. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.494 · Cited by 191
Automatic Prompt Optimization with "Gradient Descent" and Beam Search
Pryzant, R., Iter, D., Li, J., Lee, Y. T., Zhu, C., & Zeng, M. (2023) · arXiv · doi:10.48550/arxiv.2305.03495 · Cited by 191 · cited 1×
“There exist a variety of techniques for automatic prompting, [11, 24, 30].”
Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
Mehrotra, A., Zampetakis, M., Kassianik, P., Nelson, B., Anderson, H., Singer, Y., & Karbasi, A. (2023) · arXiv · doi:10.48550/arxiv.2312.02119 · Cited by 183
Toxicity in chatgpt: Analyzing persona-assigned language models
Deshpande, A., Murahari, V., Rajpurohit, T., Kalyan, A., & Narasimhan, K. (2023) · Findings of the Association for Computational Linguistics: EMNLP 2023 · doi:10.18653/v1/2023.findings-emnlp.88 · Cited by 178
Toxicity in ChatGPT: Analyzing Persona-assigned Language Models
Deshpande, A., Murahari, V., Rajpurohit, T., Kalyan, A., & Narasimhan, K. (2023) · arXiv · doi:10.48550/arxiv.2304.05335 · Cited by 178 · cited 1×
“However, one drawback of this approach is that these massive corpora often contain toxic or objectionable content, which—when propagated by an LLM trained on this data—has the propensity to cause harm [e.g., 8, etc.].”
Zeng, Y., Lin, H., Zhang, J., Yang, D., Jia, R., & Shi, W. (2024) · arXiv · doi:10.48550/arxiv.2401.06373 · Cited by 174
Build it Break it Fix it for Dialogue Safety: Robustness from Adversarial Human Attack
Dinan, E., Humeau, S., Chintagunta, B., & Weston, J. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1461 · Cited by 161
Visual Adversarial Examples Jailbreak Aligned Large Language Models
Qi, X., Huang, K., Panda, A., Henderson, P., Wang, M., & Mittal, P. (2024) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v38i19.30150 · Cited by 150
MASTERKEY: Automated Jailbreaking of Large Language Model Chatbots
Deng, G., Liu, Y., Li, Y., Wang, K., Zhang, Y., Li, Z., Wang, H., Zhang, T., & Liu, Y. (2024) · Proceedings 2024 Network and Distributed System Security Symposium · doi:10.14722/ndss.2024.24188 · Cited by 137 · cited 1×
“We optimize a single adversarial suffix for each behavior.”
Improving alignment of dialogue agents via targeted human judgements
Glaese, A., McAleese, N., Trębacz, M., Aslanides, J., Firoiu, V., Ewalds, T., Rauh, M., Weidinger, L., Chadwick, M., Thacker, P., et al. (2022) · arXiv · doi:10.48550/arxiv.2209.14375 · Cited by 134 · cited 1×
“For this reason, it has become common practice to implement various mechanisms that “align” the content generated by LLMs with human values [12, 16, 22, 35].”
Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learned
Ganguli, D., Lovitt, L., Kernion, J., Askell, A., Bai, Y., Kadavath, S., Mann, B., Perez, E., Schiefer, N., Ndousse, K., et al. (2022) · arXiv · doi:10.48550/arxiv.2209.07858 · Cited by 130
Making Pre-trained Language Models Better Few-shot Learners
Gao, T., Fisch, A., & Chen, D. (2020) · arXiv · doi:10.48550/arxiv.2012.15723 · Cited by 124
Self-Instruct: Aligning Language Models with Self-Generated Instructions
Wang, Y., Kordi, Y., Mishra, S., Liu, A., Smith, N. A., Khashabi, D., & Hajishirzi, H. (2022) · arXiv · doi:10.48550/arxiv.2212.10560 · Cited by 118
JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models
Chao, P., Debenedetti, E., Robey, A., Andriushchenko, M., Croce, F., Sehwag, V., Dobriban, E., Flammarion, N., Pappas, G. J., Tramer, F., et al. (2024) · arXiv · doi:10.48550/arxiv.2404.01318 · Cited by 116
Self-citationJailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models
Chao, P., Debenedetti, E., Robey, A., Andriushchenko, M., Croce, F., Sehwag, V., Dobriban, E., Flammarion, N., Pappas, G., Tramèr, F., et al. (2024) · Advances in Neural Information Processing Systems 37 · doi:10.52202/079017-1745 · Cited by 116
Self-citationParallel Rectangle Flip Attack: A Query-based Black-box Attack against Object Detection
Liang, S., Wu, B., Fan, Y., Wei, X., & Cao, X. (2021) · IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv48922.2021.00760 · Cited by 109
Zeng, Y., Lin, H., Zhang, J., Yang, D., Jia, R., & Shi, W. (2024) · Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2024.acl-long.773 · Cited by 107
Improving Question Answering Model Robustness with Synthetic Adversarial Data Generation
Bartolo, M., Thrush, T., Jia, R., Riedel, S., Stenetorp, P., & Kiela, D. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.696 · Cited by 69 · cited 1×
“While there have been efforts to automate the generation of prompt-level jailbreaks, these methods require prompt engineering [23], manually-generated test cases [3], or retraining large generative models on objectionable text [4], all of which hinders the widespread deployment of these techniques.”
SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks
Robey, A., Wong, E., Hassani, H., & Pappas, G. J. (2023) · arXiv · doi:10.48550/arxiv.2310.03684 · Cited by 37 · cited 2×
“However, token-level attacks can be mitigated via randomization [27] or filtering [14].”
Self-citationDetecting Language Model Attacks with Perplexity
Alon, G., & Kamfonas, M. (2023) · arXiv · doi:10.48550/arxiv.2308.14132 · Cited by 27
Scalable and Transferable Black-Box Jailbreaks for Language Models via Persona Modulation
Shah, R., Feuillade--Montixi, Q., Pour, S., Tagade, A., Casper, S., & Rando, J. (2023) · arXiv · doi:10.48550/arxiv.2311.03348 · Cited by 12 · cited 1×
“Despite these efforts, a class of vulnerabilities known as “jailbreaks” has recently been shown to cause LLMs to violate their alignment safeguards [6, 25, 36].”
Research works printed but not linked: 22
- Wu, 2023, Bloomberggpt: A large language model for finance, arXiv preprint
- Korbak, 2023, Pretraining language models with human preferences, 17506
- Ouyang, 2022, Training language models to follow instructions with human feedback, 2022, 13
- Carlini, 2023, Are aligned neural networks adversarially aligned?
- Maus, 2023, Black box adversarial prompting for foundation models
- Jones, 2023, Automatically auditing large language models via discrete optimization
- Zou, 2023, Universal and transferable adversarial attacks on aligned language models
- Inan, 2023, Llama guard: Llm-based input-output safe-guard for human-ai conversations
- Bai, 2022, Constitutional ai: Harmlessness from ai feedback
- Bartolo, 2021, Models in the loop: Aiding crowdworkers with generative annotation assistants, arXiv preprint
- Huang, 2023, Catastrophic jailbreak of open-source llms via exploiting generation
- Mazeika, 2023, Tdc 2023 (llm edition): The trojan detection challenge
- Jiang, 2024, Mixtral of experts
- Zheng, 2023, Judging llm-as-a-judge with mt-bench and chatbot arena
- 2023, Gpt-4 technical report
- 2023, Gemini: A family of highly capable multi-modal models
- Jain, 2023, Baseline defenses for adversarial attacks against aligned language models, arXiv preprint
- Wang, 2019, Improving adversarial robustness requires revisiting misclassified examples, International conference on learning representations
- Cohen, 2019, Certified adversarial robustness via randomized smoothing, 1310
- Salman, 2019, Provably robust deep learning via adversarially trained smoothed classifiers, Advances in Neural Information Processing Systems, 32
- Ji, 2024, Defending large language models against jailbreak attacks via semantic smoothing, arXiv preprint
- Zhou, 2024, Robust prompt optimization for defending language models against jailbreaking attacks, arXiv preprint
Cited by
Security and Privacy Challenges of Large Language Models: A Survey
Das, B. C., Amini, M. H., & Wu, Y. (2025) · ACM Computing Surveys · doi:10.1145/3712001 · Cited by 445
“It can automatically generate jailbreaking prompts for a distinct targeted LLM, eliminating the need for human intervention [79].”
Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks
Andriushchenko, M., Croce, F., & Flammarion, N. (2024) · arXiv · doi:10.48550/arxiv.2404.02151 · Cited by 396
“We measure the attack success rate according to GPT-4 judge (Chao et al., 2023) depending on the request structure: user denotes providing the whole manual prompt in a single user message, system+user splits the manual prompt in the system and user messages.”
InfluentialAdvPrompter: Fast Adaptive Adversarial Prompting for LLMs
Paulus, A., Zharmagambetov, A., Guo, C., Amos, B., & Tian, Y. (2024) · arXiv · doi:10.48550/arxiv.2404.16873 · Cited by 184
Zeng, Y., Lin, H., Zhang, J., Yang, D., Jia, R., & Shi, W. (2024) · arXiv · doi:10.48550/arxiv.2401.06373 · Cited by 174
“…virtualization or role-play), e.g., Yu et al. (2023) learn the distribution of virtualization-based jailbreak templates to produce jailbreak variants, while PAIR (Chao et al., 2023) asks LLMs to improve instructions as an “assistant” and often leads to prompts that employ virtualization or persona.”
InfluentialHughes, J., Price, S., Lynch, A., Schaeffer, R., Barez, F., Koyejo, S., Sleight, H., Jones, E., Perez, E., & Sharma, M. (2024) · arXiv · doi:10.48550/arxiv.2412.03556 · Cited by 129
Metadata
- Authors
- Chao, P., Robey, A., Dobriban, E., Hassani, H., Pappas, G. J., & Wong, E.
- Venue
- 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML)
- Publisher
- IEEE
- Published
- 2025-04-09
- Pages
- 23-42
- OpenAlex
- W4410609100
- Cited by
- 193
- References
- 45
- FWCI
- 175.49
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.