How Toxic Can You Get? Search-based Toxicity Testing for Large Language Models
Not on the map. Why?
Abstract (arXiv)
Language is a deep-rooted means of perpetration of stereotypes and discrimination. Large Language Models (LLMs), now a pervasive technology in our everyday lives, can cause extensive harm when prone to generating toxic responses. The standard way to address this issue is to align the LLM , which, however, dampens the issue without constituting a definitive solution. Therefore, testing LLM even after alignment efforts remains crucial for detecting any residual deviations with respect to ethical standards. We present EvoTox, an automated testing framework for LLMs' inclination to toxicity, providing a way to quantitatively assess how much LLMs can be pushed towards toxic responses even in the presence of alignment. The framework adopts an iterative evolution strategy that exploits the interplay between two LLMs, the System Under Test (SUT) and the Prompt Generator steering SUT responses toward higher toxicity. The toxicity level is assessed by an automated oracle based on an existing toxicity classifier. We conduct a quantitative and qualitative empirical evaluation using five state-of-the-art LLMs as evaluation subjects having increasing complexity (7-671B parameters). Our quantitative evaluation assesses the cost-effectiveness of four alternative versions of EvoTox against existing baseline methods, based on random search, curated datasets of toxic prompts, and adversarial attacks. Our qualitative assessment engages human evaluators to rate the fluency of the generated prompts and the perceived toxicity of the responses collected during the testing sessions. Results indicate that the effectiveness, in terms of detected toxicity level, is significantly higher than the selected baseline methods (effect size up to 1.0 against random search and up to 0.99 against adversarial attacks). Furthermore, EvoTox yields a limited cost overhead (from 22% to 35% on average).
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 40 of its 64 references that are in the map. First posted on arXiv 3 Jan 2025.
Builds on
40 of 64 references.
References · 40
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Mistral 7Bcited by 3,065
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
28 more
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,462
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
- 2021Ethical and social risks of harm from Language Modelscited by 957
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2020Aligning AI With Shared Human Valuescited by 706
- 2023Bias and Fairness in Large Language Models: A Surveycited by 626
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 439
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 268
- 2023Pretraining Language Models with Human Preferencescited by 245
- 2023Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignmentcited by 213
- 2023Evaluating the Moral Beliefs Encoded in LLMscited by 211
- 2023MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbotscited by 172
- 2019Unifying Human and Statistical Evaluation for Natural Language Generationcited by 127
- 2023Aligning Language Models with Preferences through f-divergence Minimizationcited by 118
- 2022Why Should Adversarial Perturbations be Imperceptible? Rethink the Research Paradigm in Adversarial NLPcited by 99
- 2023Ethical Reasoning over Moral Alignment: A Case and Framework for In-Context Ethical Policies in LLMscited by 64
- 2024Ethical Reasoning and Moral Value Alignment of LLMs Depend on the Language we Prompt them incited by 45
- 2023METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualitiescited by 20
- 2023Exploring ChatGPT for Toxicity Detection in GitHubcited by 15
- 2020Discovering and Categorising Language Biases in Redditcited by 13
- 2023"Oops, Did I Just Say That?" Testing and Repairing Unethical Suggestions of Large Language Models with Suggest-Critique-Reflect Processcited by 9
- 2023QIGen: Generating Efficient Kernels for Quantized Inference on Large Language Modelscited by 6
- 2018Temporal Event Knowledge Acquisition via Identifying Narrativescited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.