EMNLP Findings2025
Enhancing Hate Speech Classifiers through a Gradient-assisted Counterfactual Text Generation Strategy
Michael van Supranes, Shaowen Peng, Shoko Wakamiya, Eiji Aramaki
Abstract
Counterfactual data augmentation (CDA) is a promising strategy for improving hate speech classification, but automating counterfactual text generation remains a challenge.Strong attribute control can distort meaning, while prioritizing semantic preservation may weaken attribute alignment.We propose Gradientassisted Energy-based Sampling (GENES) for counterfactual text generation, which restricts accepted samples to text meeting a minimum BERTScore threshold and applies gradient-assisted proposal generation to improve attribute alignment.Compared to other methods that solely rely on either prompting, gradient-based steering, or energy-based sampling, GENES is more likely to jointly satisfy attribute alignment and semantic preservation under the same base model.When applied to data augmentation, GENES achieved the best macro F1-score in two of three test sets, and it improved robustness in detecting targeted abusive language.In some cases, GENES exceeded the performance of prompt-based methods using a GPT-4o-mini, despite relying on a smaller model (Flan-T5-Large).Based on our cross-dataset evaluation, the average performance of models aided by GENES is the best among those methods that rely on a smaller model (Flan-T5-L).These results position GENES as a possible lightweight and open-source alternative.Warning: this paper shows texts or examples that may be offensive or upsetting.
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.
Lineage
- COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics cites BERTScore: Evaluating Text Generation with BERT
Builds on17
- BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger et al.ICLR 2020 · 8,443 citations
- Plug and Play Language Models: A Simple Approach to Controlled Text GenerationSumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung et al.ICLR 2020 · 1,166 citations
- A Survey of Data Augmentation Approaches for NLPSteven Y. Feng, Varun Gangal, Jason Wei, Sarath Chandar et al.ACL Findings 2021 · 708 citations
- COLD Decoding: Energy-based Constrained Text Generation with Langevin DynamicsLianhui Qin, Sean Welleck, Daniel Khashabi, Yejin ChoiNeurIPS 2022 · 217 citations
- Latent Hatred: A Benchmark for Understanding Implicit Hate SpeechMai ElSherief, Caleb Ziems, David Muchlinski, Vaishnavi Anupindi et al.EMNLP 2021 · 159 citations
Related papers
- People Make Better Edits: Measuring the Efficacy of LLM-Generated Counterfactually Augmented Data for Harmful Language DetectionIndira Sen, Dennis Assenmacher, Mattia Samory, Isabelle Augenstein et al.EMNLP 2023 · 7 citations
- Fight Fire with Fire: Fine-tuning Hate Detectors using Large Samples of Generated Hate SpeechTomer Wullach, Amir Adler, Einat MinkovEMNLP Findings 2021 · 33 citations
- A little goes a long way: Improving toxic language classification despite data scarcityMika Juuti, Tommi Gröndahl, Adrian Flanagan, N. AsokanEMNLP Findings 2020 · 16 citations
- NeuroCounterfactuals: Beyond Minimal-Edit Counterfactuals for Richer Data AugmentationPhillip Howard, Gadi Singer, Vasudev Lal, Yejin Choi et al.EMNLP Findings 2022 · 15 citations
- Controlled LLM Decoding via Discrete Auto-regressive BiasingPatrick Pynadath, Ruqi ZhangICLR 2025
