mlsanityData to 7 Oct 2026

You Only Prompt Once: On the Capabilities of Prompt Learning on Large Language Models to Tackle Toxic Content

arXiv 2308.05596 ↗First posted 10 Aug 2023cs.CL cs.SIcited by 37

Not on the map. Why?

Abstract (arXiv)

The spread of toxic content online is an important problem that has adverse effects on user experience online and in our society at large. Motivated by the importance and impact of the problem, research focuses on developing solutions to detect toxic content, usually leveraging machine learning (ML) models trained on human-annotated datasets. While these efforts are important, these models usually do not generalize well and they can not cope with new trends (e.g., the emergence of new toxic terms). Currently, we are witnessing a shift in the approach to tackling societal issues online, particularly leveraging large language models (LLMs) like GPT-3 or T5 that are trained on vast corpora and have strong generalizability. In this work, we investigate how we can use LLMs and prompt learning to tackle the problem of toxic content, particularly focusing on three tasks; 1) Toxicity Classification, 2) Toxic Span Detection, and 3) Detoxification. We perform an extensive evaluation over five model architectures and eight datasets demonstrating that LLMs with prompt learning can achieve similar or even better performance compared to models trained on these specific tasks. We find that prompt learning achieves around 10% improvement in the toxicity classification task compared to the baselines, while for the toxic span detection task we find better performance to the best baseline (0.643 vs. 0.640 in terms of F1-score). Finally, for the detoxification task, we find that prompt learning can successfully reduce the average toxicity score (from 0.775 to 0.213) while preserving semantic meaning.

Key facts. Cited by 37 papers in the map (data through 7 Oct 2026). Builds on 44 of its 67 references that are in the map. First posted on arXiv 10 Aug 2023.

Builds on

44 of 67 references.

References · 44

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  5. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  6. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  7. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  8. 2019How Can We Know What Language Models Know?cited by 953
  9. 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
  10. 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
  11. 2019SpanBERT: Improving Pre-training by Representing and Predicting Spanscited by 832
  12. 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 724
32 more
  1. 2021Multimodal Few-Shot Learning with Frozen Language Modelscited by 657
  2. 2019Green AIcited by 620
  3. 2020HateXplain: A Benchmark Dataset for Explainable Hate Speech Detectioncited by 403
  4. 2019Nuanced Metrics for Measuring Unintended Bias with Real Data for Text Classificationcited by 396
  5. 2019Social Bias Frames: Reasoning about Social and Power Implications of Languagecited by 377
  6. 2020Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stoppingcited by 377
  7. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
  8. 2021True Few-Shot Learning with Language Modelscited by 343
  9. 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 336
  10. 2020HateCheck: Functional Tests for Hate Speech Detection Modelscited by 215
  11. 2020Reformulating Unsupervised Style Transfer as Paraphrase Generationcited by 181
  12. 2019To Tune or Not to Tune? Adapting Pretrained Representations to Diverse Taskscited by 167
  13. 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 162
  14. 2020Deep Learning for Text Style Transfer: A Surveycited by 161
  15. 2017Deceiving Google's Perspective API Built for Detecting Toxic Commentscited by 99
  16. 2019Beyond BLEU: Training Neural Machine Translation with Semantic Similaritycited by 84
  17. 2019Transforming Delete, Retrieve, Generate Approach for Controlled Text Style Transfercited by 81
  18. 2020A Probabilistic Formulation of Unsupervised Text Style Transfercited by 70
  19. 2020Measuring a hate speech spectrum with faceted Rasch item response theory and perspective-aware, explainable-by-design deep learningcited by 67
  20. 2019A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfercited by 65
  21. 2021Detecting Hate Speech with GPT-3cited by 55
  22. 2021Text Detoxification using Large Pre-trained Neural Modelscited by 52
  23. 2016Analyzing the Targets of Hate in Online Social Mediacited by 48
  24. 2021Hate Towards the Political Opponent: A Twitter Corpus Study of the 2020 US Elections on the Basis of Offensive Speech and Stance Detectioncited by 45
  25. 2021Civil Rephrases Of Toxic Texts With Self-Supervised Transformerscited by 32
  26. 2018Peer to Peer Hate: Hate Speech Instigators and Their Targetscited by 30
  27. 2018A Quantitative Approach to Understanding Online Antisemitismcited by 26
  28. 2020Stable Style Transformer: Delete and Generate Approach with Encoder-Decoder for Text Style Transfercited by 22
  29. 2018Convolutional Neural Networks for Toxic Comment Classificationcited by 21
  30. 2018Detecting weak and strong Islamophobic hate speech on social mediacited by 15
  31. 2020Measuring and Characterizing Hate Speech on News Websitescited by 12
  32. 2022On Xing Tian and the Perseverance of Anti-China Sentiment Onlinecited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 15; 2025: 15; 2026: 3.

37 papers.

Sort:

By area:

  1. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
  2. 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 113
  3. 2023Nightshade: Prompt-Specific Poisoning Attacks on Text-to-Image Generative Modelscited by 72
  4. 2024Risk Taxonomy, Mitigation, and Assessment Benchmarks of Large Language Model Systemscited by 63
  5. 2024Arondight: Red Teaming Large Vision Language Models with Auto-generated Multi-modal Jailbreak Promptscited by 39
  6. 2024An Investigation of Large Language Models for Real-World Hate Speech Detectioncited by 20
  7. 2025VLM as Policy: Common-Law Content Moderation Framework for Short Video Platformcited by 19
  8. 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
  9. 2023Watch Your Language: Investigating Content Moderation with Large Language Modelscited by 14
  10. 2024MultiParaDetox: Extending Text Detoxification with Parallel Data to New Languagescited by 13
  11. 2024Quantized Delta Weight Is Safety Keepercited by 12
  12. 2024The Dark Side of Human Feedback: Poisoning Large Language Models via User Inputscited by 10
25 more
  1. 2023Transformation vs Tradition: Artificial General Intelligence (AGI) for Arts and Humanitiescited by 9
  2. 2025From LLM-anation to LLM-orchestrator: Coordinating Small Models for Data Labelingcited by 8
  3. 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLMcited by 8
  4. 2024LLM-based Rewriting of Inappropriate Argumentation using Reinforcement Learning from Machine Feedbackcited by 7
  5. 2024Multimodal Large Language Models for Phishing Webpage Detection and Identificationcited by 6
  6. 2025QGuard:Question-based Zero-shot Guard for Multi-modal LLM Safetycited by 4
  7. 2025Paladin: Defending LLM-enabled Phishing Emails with a New Trigger-Tag Paradigmcited by 4
  8. 2025ToxiFrench: Benchmarking and Enhancing Language Models via CoT Fine-Tuning for French Toxicity Detectioncited by 3
  9. 2024OffensiveLang: A Community Based Implicit Offensive Language Datasetcited by 2
  10. 2025Something Just Like TRuST : Toxicity Recognition of Span and Targetcited by 2
  11. 2025Conditioning Large Language Models on Legal Systems? Detecting Punishable Hate Speechcited by 2
  12. 2025Argument-Based Consistency in Toxicity Explanations of LLMscited by 2
  13. 2024NLP Case Study on Predicting the Before and After of the Ukraine-Russia and Hamas-Israel Conflictscited by 1
  14. 2024Soft-Label Integration for Robust Toxicity Classificationcited by 1
  15. 2024Prompt-enhanced Network for Hateful Meme Classificationcited by 1
  16. 2025Benign-to-Toxic Jailbreaking: Inducing Harmful Responses from Harmless Promptscited by 1
  17. 2025VModA: An Effective Framework for Adaptive NSFW Image Moderationcited by 1
  18. 2025SciTopic: Enhancing Topic Discovery in Scientific Literature through Advanced LLMcited by 1
  19. 2024A Holistic Indicator of Polarization to Measure Online Sexismcited by 0
  20. 2025Optimus: A Robust Defense Framework for Mitigating Toxicity while Fine-Tuning Conversational AIcited by 0
  21. 2025Digging Into the Internal: Causality-Based Analysis of LLM Function Callingcited by 0
  22. 2025Beyond One-Size-Fits-All: Personalized Harmful Content Detection with In-Context Learningcited by 0
  23. 2026NLP Privacy Risk Identification in Social Media (NLP-PRISM): A Surveycited by 0
  24. 2026CARO: Chain-of-Analogy Reasoning Optimization for Robust Content Moderationcited by 0
  25. 2026Teaching LLMs Human-Like Editing of Inappropriate Argumentation via Reinforcement Learningcited by 0