LLM synthetic generation to enhance online content moderation generalization in hate speech scenarios
摘要
As social media and digital platforms become more influential, the spread of hate speech has accelerated, inflicting serious harm on individuals, communities, and society as a whole. Addressing this challenge is further complicated by the limitations of traditional text data augmentation techniques—such as adding noise to the original text, substituting words based on context, or rephrasing sentences—which often fail to introduce new perspectives that could help classifiers generalize better to new instances. This limitation is especially critical in fields like hate speech detection, where creating datasets is highly labor-intensive, involving the collection of positive samples and expert labeling. In this work, we present an automatic text data augmentation method based on large language models (LLMs) using demonstration-based generation. Our approach generates diverse samples that maintain the original writing style, effectively bridging semantic gaps in the data. While our method focuses on low-resource hate speech datasets, we have empirically demonstrated its potential and consistency even in larger and more robust dataset scenarios. The careful design of the prompt, combined with token sampling strategies, positions our method as the most consistent alternative for LLM-based synthetic data generation compared to existing state-of-the-art methods and prompts. Our benchmarking includes (1) CMSB, a dataset centered on sexism; (2) ETHOS, a diverse dataset encompassing multiple forms of hate speech; (3) Stormfront, which contains white supremacist discourse; and (4) Antiasian, an anti-Asian hate speech dataset. We outperform other traditional augmentation methods such as NLPAug or BackTranslation and benchmark with promising results against another LLM-based techniques. We consistently achieve an F1-score improvement of approximately 4–6% in low-resource scenarios and 1–2% on full datasets. These gains are notably higher compared to both the absence of augmentation and alternative augmentation methods.