Curupira: Arquiteturas Híbridas Transformer-BiLSTM para Detecção de Discurso Ofensivo em Português Brasileiro

  • Gabrielly Alves Gomes UFPI
  • Iago de Sousa Aragão UFPI
  • Patricia Medyna Lauritzen de Lucena Drumond UFPI

Resumo


Este trabalho apresenta o Curupira, estudo empírico controlado de arquiteturas neurais para detecção de discurso ofensivo em português brasileiro sob protocolo metodológico rigoroso: split treino/validação/teste honesto, cinco sementes aleatórias, controle explícito de capacidade paramétrica e teste de significância via bootstrap pareado. Oito configurações são avaliadas no OLID-BR, cobrindo quatro ordens de magnitude em parâmetros. Os resultados devem ser interpretados para este conjunto de dados e regime de treinamento, e indicam cinco achados principais: (i) o desempenho se concentra próximo de Macro-F1 = 0,70, com o BERTimbau (110M de parâmetros) superando um híbrido Transformer→BiLSTM leve (350K) em 4,3 pontos; (ii) a atenção global produz ganho estatisticamente significativo sobre uma BiLSTM equiparada em capacidade; (iii) aumentar a capacidade neural não melhora o desempenho no cenário avaliado; (iv) a ordem de composição importa, com Transformer→BiLSTM superando BiLSTM→Transformer em 6,3 pontos; (v) codificação posicional senoidal sobre embeddings congelados degrada substancialmente o desempenho, reduzindo o Macro-F1 de 0,66 para 0,26.

Referências

Bojanowski, P., Grave, E., Joulin, A. e Mikolov, T. (2017). Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5:135–146.

Davidson, T., Warmsley, D., Macy, M. W. e Weber, I. (2017). Automated hate speech detection and the problem of offensive language. In Proceedings of the 11th International AAAI Conference on Web and Social Media, p. 512–515.

Demšar, J. (2006). Statistical comparisons of classifiers over multiple data sets. Journal of Machine Learning Research, 7:1–30.

Devlin, J., Chang, M.-W., Lee, K. e Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACLHLT, p. 4171–4186.

Dror, R., Baumer, G., Shlomov, S. e Reichart, R. (2018). The hitchhiker’s guide to testing statistical significance in natural language processing. In Proceedings of ACL, p. 1383–1392.

Efron, B. e Tibshirani, R. J. (1994). An Introduction to the Bootstrap. CRC Press, Boca Raton.

Fortuna, P. e Nunes, S. (2018). A survey on automatic detection of hate speech in text. ACM Computing Surveys, 51(4):1–30.

Fortuna, P., Rocha da Silva, J., Soler-Company, J., Wanner, L. e Nunes, S. (2019). A hierarchically-labeled Portuguese hate speech dataset. In Proceedings of the Third Workshop on Abusive Language Online, p. 94–104.

Hochreiter, S. e Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8):1735–1780.

Huang, Z., Xu, P., Liang, D., Mishra, A. e Xiang, B. (2020). TRANS-BLSTM: Transformer with bidirectional LSTM for language understanding. arXiv preprint arXiv:2003.07000.

Khan, S., Fazil, M., Sejwal, V. K., Alshara, M. A., Alotaibi, R. M., Kamal, A. e Baig, A. R. (2022). BiCHAT: BiLSTM with deep CNN and hierarchical attention for hate speech detection. Journal of King Saud University, Computer and Information Sciences, 34(7):4335–4344.

Leite, J. A., Silva, D. F., Bontcheva, K. e Aker, A. (2020). Toxic language detection in social media for Brazilian Portuguese: New dataset and multilingual analysis. In Proceedings of AACL-IJCNLP, p. 914–924.

Malik, J. S., Pang, G. e van den Hengel, A. (2023). Deep learning for hate speech detection: A comparative study. arXiv preprint arXiv:2202.09517.

Moreira, L. S., Gibrim, P. T. M., Rocha, L. e Reis, J. C. S. (2026). Anatomy of Data Repositories for the Analysis and Detection of Toxicity in Portuguese. In Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) – Vol. 1, p. 456–466.

Oliveira, A., Cecote, T., Silva, P., Gertrudes, J., Freitas, V. e Luz, E. (2023). How Good Is ChatGPT For Detecting Hate Speech In Portuguese? In Proceedings of the 14th Brazilian Symposium in Information and Human Language Technology, p. 103–112.

Ramos, G., Batista, F., Ribeiro, R., Fialho, P., Moro, S., Fonseca, A., Guerra, R., Carvalho, P., Marques, C. e Silva, C. (2024). A comprehensive review on automatic hate speech detection in the age of the transformer. Social Network Analysis and Mining, 14:204.

Reimers, N. e Gurevych, I. (2017). Reporting score distributions makes a difference: Performance study of LSTM-networks for sequence tagging. In Proceedings of EMNLP, p. 338–348.

Souza, F., Nogueira, R. e Lotufo, R. (2020). BERTimbau: Pretrained BERT models for Brazilian Portuguese. In Proceedings of BRACIS, p. 403–417.

Silva, L. A., Mondal, M., Correa, D., Benevenuto, F. e Weber, I. (2016). Analyzing the targets of hate in online social media. In Proceedings of the Tenth International AAAI Conference on Web and Social Media, p. 687–690.

Vargas, F. A., Carvalho, I., Rodrigues de Góes, F., Pardo, T. A. S. e Benevenuto, F. (2022). HateBR: A large expert annotated corpus of Brazilian Instagram comments for offensive language and hate speech detection. In Proceedings of LREC, p. 7174–7183.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł. e Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems 30, p. 5998–6008.

Zampieri, M., Malmasi, S., Nakov, P., Rosenthal, S., Farra, N. e Kumar, R. (2019). Predicting the type and target of offensive posts in social media. In Proceedings of NAACL-HLT, p. 1415–1420.

Trajano, Douglas, Bordini, Rafael H. e Vieira, Renata (2024). OLID-BR: offensive language identification dataset for Brazilian Portuguese. Language Resources and Evaluation, 58(4):1263–1289.
Publicado
19/10/2026
GOMES, Gabrielly Alves; ARAGÃO, Iago de Sousa; DRUMOND, Patricia Medyna Lauritzen de Lucena. Curupira: Arquiteturas Híbridas Transformer-BiLSTM para Detecção de Discurso Ofensivo em Português Brasileiro. In: SIMPÓSIO BRASILEIRO DE TECNOLOGIA DA INFORMAÇÃO E DA LINGUAGEM HUMANA (STIL), 17. , 2026, Cuiabá/MT. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 163-174. DOI: https://doi.org/10.5753/stil.2026.25230.