mlsanityData to 7 Oct 2026

Test-Time Detoxification without Training or Learning Anything

arXiv 2602.02498 ↗First posted 14 Jan 2026cs.CL cs.AI cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Large language models can produce toxic or inappropriate text even for benign inputs, creating risks when deployed at scale. Detoxification is therefore important for safety and user trust, particularly when we want to reduce harmful content without sacrificing the model's generation quality. Many existing approaches rely on model retraining, gradients, or learned auxiliary components, which can be costly and may not transfer across model families or to truly black-box settings. We introduce a test-time procedure that approximates the gradient of completion toxicity with respect to the input embeddings and uses a small number of descent steps to steer generation toward less toxic continuations. This is achieved with zeroth-order optimization that requires only access to input embeddings, a toxicity scoring function, and forward evaluations of the model. Empirically, the approach delivers robust toxicity reductions across models and prompts and, in most settings, achieves the best overall toxicity-quality trade-off. More broadly, our work positions word embeddings as effective control variables and encourages wider use of black-box optimization to guide autoregressive language models toward scalable, safer text generation, without requiring any training or access to intermediate computations.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 42 of its 56 references that are in the map. First posted on arXiv 14 Jan 2026.

Builds on

42 of 56 references.

References · 42

  1. 2017Attention Is All You Needcited by 59,932
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
  5. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
  6. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
  7. 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
  8. 2021BOLD: Dataset and Metrics for Measuring Biases in Open-Ended Language Generationcited by 410
  9. 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
  10. 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 374
  11. 2023Fine-Tuning Language Models with Just Forward Passescited by 337
  12. 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 336
30 more
  1. 2022Quark: Controllable Text Generation with Reinforced Unlearningcited by 236
  2. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 233
  3. 2021Challenges in Detoxifying Language Modelscited by 169
  4. 2020Recipes for Safety in Open-domain Chatbotscited by 168
  5. 2023Reward-Augmented Decoding: Efficient Controlled Text Generation With a Unidirectional Reward Modelcited by 79
  6. 2023Word Embeddings Are Steers for Language Modelscited by 70
  7. 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 67
  8. 2024Sparse MeZO: Less Parameters for Better Performance in Zeroth-Order LLM Fine-Tuningcited by 53
  9. 2024Variance-reduced Zeroth-Order Methods for Fine-Tuning Language Modelscited by 50
  10. 2024Enhancing Zeroth-order Fine-tuning for Language Models with Low-rank Structurescited by 48
  11. 2022Critic-Guided Decoding for Controlled Text Generationcited by 45
  12. 2023Self-Detoxifying Language Models via Toxification Reversalcited by 45
  13. 2023On the Challenges of Using Black-Box APIs for Toxicity Evaluation in Researchcited by 44
  14. 2023Click: Controllable Text Generation with Sequence Likelihood Contrastive Learningcited by 41
  15. 2022DIRECTOR: Generator-Classifiers For Supervised Language Modelingcited by 38
  16. 2023DPZero: Private Fine-Tuning of Language Models without Backpropagationcited by 26
  17. 2023Unveiling Safety Vulnerabilities of Large Language Modelscited by 26
  18. 2024Localized Zeroth-Order Prompt Optimizationcited by 23
  19. 2024Parameter-Efficient Detoxification with Contrastive Decodingcited by 18
  20. 2023Systematic Rectification of Language Models via Dead-end Analysiscited by 16
  21. 2022Language Detoxification with Attribute-Discriminative Latent Spacecited by 11
  22. 2024DESTEIN: Navigating Detoxification of Language Models via Universal Steering Pairs and Head-wise Activation Fusioncited by 9
  23. 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
  24. 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxificationcited by 7
  25. 2024Supporting Human Raters with the Detection of Harmful Content using Large Language Modelscited by 4
  26. 2025DSCD: Large Language Model Detoxification with Self-Constrained Decodingcited by 3
  27. 2023Model-Free Learning of Two-Stage Beamformers for Passive IRS-Aided Network Designcited by 2
  28. 2024Compatible Gradient Approximations for Actor-Critic Algorithmscited by 2
  29. 2024Data-Driven Learning of Two-Stage Beamformers in Passive IRS-Assisted Systems with Inexact Oraclescited by 1
  30. 2025DAPI: Domain Adaptive Toxicity Probe Vector Intervention for Fine-Grained Detoxificationcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.