Automatically Auditing Large Language Models via Discrete Optimization
Erik Jones, Anca D. Dragan, Aditi Raghunathan, Jacob Steinhardt
Abstract
Auditing large language models for unexpected behaviors is critical to preempt catastrophic deployments, yet remains challenging. In this work, we cast auditing as an optimization problem, where we automatically search for input-output pairs that match a desired target behavior. For example, we might aim to nd a non-toxic input that starts with "Barack Obama" that a model maps to a toxic output. This optimization problem is di cult to solve as the set of feasible points is sparse, the space is discrete, and the language models we audit are non-linear and high-dimensional. To combat these challenges, we introduce a discrete optimization algorithm, ARCA, that jointly and e ciently optimizes over inputs and outputs. Our approach automatically uncovers derogatory completions about celebrities (e.g. "Barack Obama is a legalized unborn" → "child murderer"), produces French inputs that complete to English outputs, and nds inputs that generate a speci c name. Our work o ers a promising new tool to uncover models' failure-modes before deployment. Trigger Warning: This paper contains model behavior that can be o ensive in nature.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
72 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher cites Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- An empirical analysis of compute-optimal large language model training cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- Tree of Attacks: Jailbreaking Black-Box LLMs Automatically cites BERT-ATTACK: Adversarial Attack Against BERT Using BERT
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Jailbroken: How Does LLM Safety Training Fail? cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
Cited by top-tier papers72
- Jailbroken: How Does LLM Safety Training Fail?Alexander Wei, Nika Haghtalab, Jacob SteinhardtNeurIPS 2023 · 2,230 citations
- Tree of Attacks: Jailbreaking Black-Box LLMs AutomaticallyAnay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson et al.NeurIPS 2024 · 835 citations
- Catastrophic Jailbreak of Open-source LLMs via Exploiting GenerationYangsibo Huang, Samyak Gupta, Mengzhou Xia, Kai Li et al.ICLR 2024 · 481 citations
- GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via CipherYouliang Yuan, Wenxiang Jiao, Wenxuan Wang, Jen-tse Huang et al.ICLR 2024 · 441 citations
- Are aligned neural networks adversarially aligned?Nicholas Carlini, Milad Nasr, Christopher A. Choquette-Choo, Matthew Jagielski et al.NeurIPS 2023 · 412 citations
Builds on16
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer et al.NeurIPS 2022 · 2,039 citations
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
- An empirical analysis of compute-optimal large language model trainingJordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya et al.NeurIPS 2022 · 566 citations
- BERT-ATTACK: Adversarial Attack Against BERT Using BERTLinyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue et al.EMNLP 2020 · 529 citations
Related papers
- Detoxifying Large Language Models via Autoregressive Reward Guided Representation EditingYisong Xiao, Aishan Liu, Siyuan Liang, Zonghao Ying et al.NeurIPS 2025 · 12 citations
- Whispering Experts: Neural Interventions for Toxicity Mitigation in Language ModelsXavier Suau, Pieter Delobelle, Katherine Metcalf, Armand Joulin et al.ICML 2024 · 31 citations
- Breaking Bad Tokens: Detoxification of LLMs Using Sparse AutoencodersAgam Goyal, Vedant Rathi, William Yeh, Yian Wang et al.EMNLP 2025 · 1 citation
- DAC: Quantized Optimal Transport Reward-based Reinforcement Learning Approach to Detoxify Query Auto-CompletionAishwarya Maheswaran, Kaushal Kumar Maurya, Manish Gupta, Maunendra Sankar DesarkarSIGIR 2024 · 4 citations
- Systematic Rectification of Language Models via Dead-end AnalysisMeng Cao, Mehdi Fatemi, Jackie C. K. Cheung, Samira ShabanianICLR 2023 · 2 citations
