Mitigating MINA-BR Unbalanced Data using Uncensored LLM for Hate Speech Detection in Brazilian Portuguese

  • Andrew B. Campos UFPel
  • Ulisses B. Corrêa UFPel
  • Larissa A. de Freitas UFPel

Resumo


Hate speech detection plays an important role in Natural Language Processing by detecting toxic content on the internet. In this scenario, misogyny remains a recurrent problem both in social media and HS detection since the data available is scarce. To address this problem, we investigate the use of an uncensored Large Language Model for data augmentation for toxic generation. Using huihui-ai/Qwen2.5-14B-Instruct-abliterated, we generate synthetic data through dynamic few-shot prompting, balancing the minority class of the MINA-BR dataset. The augmented dataset is used to fine-tune BERTimbau under a nested cross-validation strategy with hyperparameter optimization. Our approach achieves a macro F1-score of 0.915 on a held-out test set, representing a gain of +17.8 percentage points over BERTimbau trained on the original imbalanced data (0.737) and +35.5 points over the best published baseline of 0.560. We also compare against TF-IDF + SVM with and without SMOTE, demonstrating that the quality of LLM-generated data is the primary driver of the observed improvement rather than class balancing alone. We highlight ethical concerns about the use of an uncensored model and discuss the quality of the synthetic data.

Referências

Abonizio, H. Q., Paraiso, E. C., and Barbon, S. (2022). Toward text data augmentation for sentiment analysis. IEEE Transactions on Artificial Intelligence, 3(5):657–668.

Akiba, T., Sano, S., Yanase, T., Ohta, T., and Koyama, M. (2019). Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.

Ansari, G., Kaur, P., and Saxena, C. (2024). Data augmentation for improving explainability of hate speech detection. Arabian Journal for Science and Engineering, 49(3):3609–3621.

Arditi, A., Obeso, O., Syed, A., Paleka, D., Panickssery, N., Gurnee, W., and Nanda, N. (2024). Refusal in language models is mediated by a single direction. In Globerson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., and Zhang, C., editors, Advances in Neural Information Processing Systems, volume 37, pages 136037–136083. Curran Associates, Inc.

Assis, G., Amorim, A., Carvalho, J., de Oliveira, D., Vianna, D., and Paes, A. (2024). Exploring Portuguese hate speech detection in low-resource settings: Lightly tuning encoder models or in-context learning of large models? In Gamallo, P., Claro, D., Teixeira, A., Real, L., Garcia, M., Oliveira, H. G., and Amaro, R., editors, Proceedings of the 16th International Conference on Computational Processing of Portuguese - Vol. 1, pages 301–311, Santiago de Compostela, Galicia/Spain. Association for Computational Lingustics.

Brito, I. A., Dollis, J. S., Färber, F. B., Silva, D. F. C., and Filho, A. R. G. (2025). Toxsyn: Reducing bias in hate speech detection via synthetic minority data in brazilian portuguese.

Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. (2020). Language models are few-shot learners. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS ’20, Red Hook, NY, USA. Curran Associates Inc.

Cawley, G. C. and Talbot, N. L. (2010). On over-fitting in model selection and subsequent selection bias in performance evaluation. J. Mach. Learn. Res., 11:2079–2107.

de Oliveira, A. B., de Oliveira Rocha, E., de Lima Mendes, F. I., de Souza Baptista, C., Firmino Alves, A. L., and Herminio Alves, P. M. (2026). A cross-lingual approach to detect brazilian portuguese hate speech in political discourse using linguistically similar languages. Procedia Computer Science, 278:159–167. CENTERIS - International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies.

Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2019). Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (NAACL).

Ding, B., Qin, C., Liu, L., Chia, Y. K., Li, B., Joty, S., and Bing, L. (2023). Is GPT-3 a good data annotator? In Rogers, A., Boyd-Graber, J., and Okazaki, N., editors, Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11173–11195, Toronto, Canada. Association for Computational Linguistics.

Ding, B., Qin, C., Zhao, R., Luo, T., Li, X., Chen, G., Xia, W., Hu, J., Luu, A. T., and Joty, S. (2024). Data augmentation using LLMs: Data perspectives, learning paradigms and challenges. In Ku, L.-W., Martins, A., and Srikumar, V., editors, Findings of the Association for Computational Linguistics: ACL 2024, pages 1679–1705, Bangkok, Thailand. Association for Computational Linguistics.

Ghorbanpour, F., Dementieva, D., and Fraser, A. (2025). Can prompting llms unlock hate speech detection across languages? a zero-shot and few-shot study.

Guo, K., Hu, A., Mu, J., Shi, Z., Zhao, Z., Vishwamitra, N., and Hu, H. (2024). An investigation of large language models for real-world hate speech detection.

Huang, F., Kwak, H., and An, J. (2023). Is chatgpt better than human annotators? potential and limitations of chatgpt in explaining implicit hate speech. In Companion Proceedings of the ACM Web Conference 2023, WWW ’23 Companion, page 294–297, New York, NY, USA. Association for Computing Machinery.

Ibrahim, N., Mulford, F., and Batista-Navarro, R. (2025). Large language models as detectors or instigators of hate speech in low-resource Ethiopian languages. In Zhang, C., Allaway, E., Shen, H., Miculicich, L., Li, Y., M’hamdi, M., Limkonchotiwat, P., Bai, R. H., T.y.s.s., S., Han, S. S., Thapa, S., and Rim, W. B., editors, Proceedings of the 9th Widening NLP Workshop, pages 197–209, Suzhou, China. Association for Computational Linguistics.

Junqueira, J., Luis Junior, C., Silva, F., Côrrea, U., and Freitas, L. d. (2023). Albertina in action: An investigation of its abilities in aspect extraction, hate speech detection, irony detection, and question-answering. In Souza, J. W. d. C., Caseli, H. d. M., and Bocorny, F. M. J., editors, Proceedings of the 14th Brazilian Symposium in Information and Human Language Technology, pages 155–164, Belo Horizonte, Brazil. Association for Computational Linguistics.

Kotu, V. and Deshpande, B. (2019). Chapter 4 - classification. In Data Science (Second Edition), pages 65–163. Morgan Kaufmann, second edition edition.

Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., and Stoica, I. (2023). Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles.

Leite, J. A., Silva, D. F., Bontcheva, K., and Scarton, C. (2020). Toxic language detection in social media for brazilian portuguese: New dataset and multilingual analysis. CoRR, abs/2010.04543.

Ma, H., Zhang, C., Bian, Y., Liu, L., Zhang, Z., Zhao, P., Zhang, S., Fu, H., Hu, Q., and Wu, B. (2023). Fairness-guided few-shot prompting for large language models.

Malik, J. S., Qiao, H., Pang, G., et al. (2025). Deep learning for hate speech detection: a comparative study. International Journal of Data Science and Analytics, 20:3053–3068.

Mao, Y., Liu, Q., and Zhang, Y. (2024). Sentiment analysis methods, applications, and challenges: A systematic literature review. Journal of King Saud University - Computer and Information Sciences, 36(4):102048.

Pakray, P., Gelbukh, A., and Bandyopadhyay, S. (2025). Natural language processing applications for low-resource languages. Natural Language Processing, 31(2):183–197.

Plath, H. O., Paiva, M. E. O., Pinto, D. L., and Costa, P. D. P. (2022). Detecção de discurso de Ódio contra mulheres em textos em português brasileiro: Construção da base MINA-BR e modelo de classificação. Revista Eletrônica de Iniciação Científica em Computação, 20(3):71–80.

Poletto, F., Basile, V., Sanguinetti, M., Bosco, C., and Patti, V. (2021). Resources and benchmark corpora for hate speech detection: a systematic review. Language Resources and Evaluation, 55(2):477–523.

Rosillo-Rodes, P., San Miguel, M., and Sánchez, D. (2025). Entropy and type-token ratio in gigaword corpora. Physical Review Research, 7(3).

Souza, F., Nogueira, R., and Lotufo, R. (2020). BERTimbau: pretrained BERT models for Brazilian Portuguese. In 9th Brazilian Conference on Intelligent Systems, BRACIS, Rio Grande do Sul, Brazil, October 20-23 (to appear).

Tan, Z., Li, D., Wang, S., Beigi, A., Jiang, B., Bhattacharjee, A., Karami, M., Li, J., Cheng, L., and Liu, H. (2024). Large language models for data annotation and synthesis: A survey. In Al-Onaizan, Y., Bansal, M., and Chen, Y.-N., editors, Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 930–957, Miami, Florida, USA. Association for Computational Linguistics.

United Nations (2019). United nations strategy and plan of action on hate speech.

Vargas, F., Carvalho, I., Rodrigues de Góes, F., Pardo, T., and Benevenuto, F. (2022). HateBR: A large expert annotated corpus of Brazilian Instagram comments for offensive language and hate speech detection. In Calzolari, N., Béchet, F., Blache, P., Choukri, K., Cieri, C., Declerck, T., Goggi, S., Isahara, H., Maegaard, B., Mariani, J., Mazo, H., Odijk, J., and Piperidis, S., editors, Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 7174–7183, Marseille, France. European Language Resources Association.

Varma, S. and Simon, R. (2006). Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics, 7(1):91.

Young, R. J. (2026). Comparative analysis of llm abliteration methods: A cross-architecture evaluation.
Publicado
19/10/2026
CAMPOS, Andrew B.; CORRÊA, Ulisses B.; FREITAS, Larissa A. de. Mitigating MINA-BR Unbalanced Data using Uncensored LLM for Hate Speech Detection in Brazilian Portuguese. In: ENCONTRO NACIONAL DE INTELIGÊNCIA ARTIFICIAL E COMPUTACIONAL (ENIAC), 23. , 2026, Cuiabá/MT. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 2349-2360. ISSN 2763-9061. DOI: https://doi.org/10.5753/eniac.2026.31595.