Prompt-Based Data Augmentation with Large Language Models for Indonesian Gender-Based Hate Speech Detection
Muhammad Amien Ibrahim1, Faisal2, Zefanya Delvin Sulistiya1 & Tora Sangputra Yopie Winarto1 Show affiliations
- Department of Computer Science, School of Computer Science, Bina Nusantara University, Jakarta, Indonesia
- Department of Mathematics, School of Computer Science, Bina Nusantara University, Jakarta, Indonesia
Journal of Computer Science, Volume 20, Issue 8, pp. 819–826 · doi.org/10.3844/jcssp.2024.819.826
Abstract
The increasing amount of content on social media content makes the use of automatic moderation crucial for preserving a healthy online community and reducing the spread of offensive and abusive content, such as hate speech based on gender. Developing automated social media moderation using machine learning demands a large and balanced dataset. However, difficulties such as data scarcity and class imbalance have hindered the development of gender-based hate speech detection on Indonesian Twitter communities. Creating and annotating a new dataset would be time-consuming and costly. One practical alternative is to use data augmentation methods to help address the minority class imbalance in datasets. This study investigates how prompt-based data augmentation may be used with a large language model to provide organic tweet samples for gender-based hate speech detection. Furthermore, the study investigates the preservation of labels in augmented Twitter samples. In comparison to the benchmark back translation approach, the results show that prompt-based data augmentation using a large language model may generate new and organic Twitter samples while keeping labels preserved and avoiding memorization. In conventional machine learning models, prompt-based data augmentation with a large language model shows competitive performance compared to back translation in terms of accuracy metrics. According to these results, using prompting for data augmentation on large language models is an alternative strategy that can provide new, less memorization tweet samples that maintain label integrity while achieving competitive accuracy results.
Licence and reuse
Open access. This article is licensed under a Creative Commons Attribution 4.0 International Licence (CC BY 4.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.
How to reuse this articleResponses (0)
About this article
Ibrahim, M. A., Faisal, Sulistiya, Z. D. & Winarto, T. S. Y. (2024). Prompt-Based Data Augmentation with Large Language Models for Indonesian Gender-Based Hate Speech Detection. Journal of Computer Science, 20(8), 819–826. https://doi.org/10.3844/jcssp.2024.819.826
- Licence
- CC BY 4.0
- Issue
- Volume 20, Issue 8
- Policies
- Editorial independenceUse of generative AIData availabilityAppeals and complaints
- Version
- Version of record
