mlsanityData to 7 Oct 2026

Combating Toxic Language: A Review of LLM-Based Strategies for Software Engineering

arXiv 2504.15439 ↗First posted 21 Apr 2025cs.LG cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have become integral to Software Engineering (SE), increasingly used in development workflows. However, their widespread adoption raises concerns about the presence and propagation of toxic language - harmful or offensive content that can foster exclusionary environments. This paper provides a comprehensive review of recent research (2020-2024) on toxicity detection and mitigation, focusing on both SE-specific and general-purpose datasets. We examine annotation and pre-processing techniques, assess detection methodologies, and evaluate mitigation strategies, particularly those leveraging LLMs. Additionally, we conduct an ablation study demonstrating the effectiveness of LLM-based rewriting for reducing toxicity. This review is limited to studies published within the specified timeframe and within the domain of toxicity in LLMs and SE; therefore, certain emerging methods or datasets beyond this period may fall outside its purview. By synthesizing existing work and identifying open challenges, this review highlights key areas for future research to ensure the responsible deployment of LLMs in SE and beyond.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 40 of its 102 references that are in the map. First posted on arXiv 21 Apr 2025.

Builds on

40 of 102 references.

References · 40

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  4. 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
  5. 2017Deep reinforcement learning from human preferencescited by 3,846
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  7. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
  8. 2020Language (Technology) is Power: A Critical Survey of "Bias" in NLPcited by 951
  9. 2020Efficient Transformers: A Surveycited by 784
  10. 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 419
  11. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  12. 2019Predicting the Type and Target of Offensive Posts in Social Mediacited by 268
28 more
  1. 2020HateBERT: Retraining BERT for Abusive Language Detection in Englishcited by 206
  2. 2020Toxicity Detection: Does Context Really Matter?cited by 93
  3. 2024A Complete Survey on LLM-based AI Chatbotscited by 71
  4. 2023Automating Customer Service using LangChain: Building custom open-source GPT Chatbot for organizationscited by 59
  5. 2021Topic-Driven and Knowledge-Aware Transformer for Dialogue Emotion Detectioncited by 56
  6. 2020Toxic Language Detection in Social Media for Brazilian Portuguese: New Dataset and Multilingual Analysiscited by 45
  7. 2017Guidelines for including grey literature and conducting multivocal literature reviews in software engineeringcited by 38
  8. 2018Hate Speech Detection: A Solved Problem? The Challenging Case of Long Tail on Twittercited by 36
  9. 2021A systematic review of Hate Speech automatic detection using Natural Language Processingcited by 26
  10. 2019Towards Robust Toxic Content Classificationcited by 22
  11. 2022Leashing the Inner Demons: Self-Detoxification for Language Modelscited by 19
  12. 2023Exploring ChatGPT for Toxicity Detection in GitHubcited by 15
  13. 2021Ground-Truth, Whose Truth? -- Examining the Challenges with Annotating Toxic Text Datasetscited by 11
  14. 2021ToxCCIn: Toxic Content Classification with Interpretabilitycited by 10
  15. 2018Context-Aware Attention for Understanding Twitter Abusecited by 9
  16. 2019Towards non-toxic landscapes: Automatic toxic comment detection using DNNcited by 8
  17. 2021Revisiting Contextual Toxicity Detection in Conversationscited by 8
  18. 2022Automated Identification of Toxic Code Reviews Using ToxiCRcited by 8
  19. 2024DeMod: A Holistic Tool with Explainable Detection and Personalized Modification for Toxicity Censorshipcited by 6
  20. 2021Towards offensive language detection and reduction in four Software Engineering communitiescited by 5
  21. 2020A Benchmark Study of the Contemporary Toxicity Detectors on Software Engineering Interactionscited by 4
  22. 2022The State of Profanity Obfuscation in Natural Language Processingcited by 4
  23. 2023Cross-Domain Toxic Spans Detectioncited by 4
  24. 2023ToxiSpanSE: An Explainable Toxicity Detection in Code Review Commentscited by 4
  25. 2022Predicting Issue Types with seBERTcited by 2
  26. 2022ModSandbox: Facilitating Online Community Moderation Through Error Prediction and Improvement of Automated Rulescited by 2
  27. 2024TaeBench: Improving Quality of Toxic Adversarial Examplescited by 2
  28. 2018Is preprocessing of text really worth your time for online comment classification?cited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.