Lune

NeurIPS2024Top-tier venue

Toxicity Detection for Free

Zhanhao Hu, Julien Piet, Geng Zhao, Jiantao Jiao, David A. Wagner

Abstract

Current LLMs are generally aligned to follow safety requirements and tend to refuse toxic prompts. However, LLMs can fail to refuse toxic prompts or be overcautious and refuse benign examples. In addition, state-of-the-art toxicity detectors have low TPRs at low FPR, incurring high costs in real-world applications where toxic examples are rare. In this paper, we introduce Moderation Using LLM Introspection (MULI), which detects toxic prompts using the information extracted directly from LLMs themselves. We found we can distinguish between benign and toxic prompts from the distribution of the first response token's logits. Using this idea, we build a robust detector of toxic prompts using a sparse logistic regression model on the first response token logits. Our scheme outperforms SOTA detectors under multiple metrics.

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.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Programming Refusal with Conditional Activation Steering cites LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Dataset
  • LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Dataset cites ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversation
  • Large Language Models as Tool Makers cites Toolformer: Language Models Can Teach Themselves to Use Tools
  • A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classification cites ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Programming Refusal with Conditional Activation SteeringBruce W. Lee, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Erik Miehling et al.ICLR 2025
  2. A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass ClassificationGonzalo Ariel Meyoyan, Luciano Del CorroACL 2026

Builds on5

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
  3. LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation DatasetLianmin Zheng, Wei-Lin Chiang, Ying Sheng, Tianle Li et al.ICLR 2024 · 419 citations
  4. Large Language Models as Tool MakersTianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen et al.ICLR 2024 · 283 citations
  5. ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI ConversationZi Lin, Zihan Wang, Yongqi Tong, Yangkun Wang et al.EMNLP Findings 2023 · 44 citations

Related papers

  1. Quantifying Large Language Model Attacks Through the Lens of Model CognitionXiuming Liu, Chaoxiang He, Xuanran Yu, Jichen Chai et al.USENIX Security 2026
  2. Can LLMs Be Efficient Predictors of Conversational Derailment?Kaustubh Olpadkar, Vikram Sunil Bajaj, Leslie BarrettEMNLP Findings 2025
  3. Efficient Detection of Toxic Prompts in Large Language ModelsYi Liu, Junzhe Yu, Huijia Sun, Ling Shi et al.ASE 2024 · 6 citations
  4. Efficient LLM Moderation with Multi-Layer Latent PrototypesMaciej Chrabaszcz, Filip Szatkowski, Bartosz Wójcik, Jan Dubiński et al.ICML 2026
  5. Whispering Experts: Neural Interventions for Toxicity Mitigation in Language ModelsXavier Suau, Pieter Delobelle, Katherine Metcalf, Armand Joulin et al.ICML 2024 · 31 citations
Dusk over the sea between two cliffs drawn in fine vertical lines