Abstract
Social media is frequently plagued with undesirable phenomena such as cyberbullying and abusive content in the form of hateful and racist posts. Therefore, it is crucial to study and propose better mechanisms to automatically identify communication that promote hate speech, hostility, and aggressiveness. Traditional approaches have only focused on exploiting the content and writing style of social media posts while ignoring information related to their context. On the other hand, several recent works have reported some interesting findings in this direction, although they have lacked an exhaustive analysis of contextual information, and also an evaluation about if this same premise holds to detect different types of abusive comments, e.g. offensive, hostile and hateful. For this, we have extended seven Twitter benchmark datasets related to the detection of offensive, aggressive, hostile, and hateful communication. We evaluate our hypothesis by using three different learning models, considering classical (Bag of Words), advanced (Glove), and state-of-the-art (BERT) text representations. Experiments show statistically significant differences between the classification scores of all methods that use a combination of text and metadata in comparison to the classical view of only using the text content of the messages, thus suggesting the importance of paying attention to context to spot the different kinds of abusive comments on social networks.
Similar content being viewed by others
Data Availability
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.
Notes
Just in one minute: Facebook users upload 147,000 photos, Twitter registers 319 new users, Instagram adds 350,000 new stories, etc. Source: https://www.socialmediatoday.com/news/what-happens-on-the-internet-every-minute-2020-version-infographic/583340/
Important to remark that although this data is particular to specific posts, the privacy of its authors is never compromised.
Those tweets were probably easier to spot and deleted by Twitter itself because of the racist keywords used for corpus collection.
A zero value means both variables are independent.
References
Álvarez-Carmona, M., Guzmán-Falcón, E., Montes-y Gómez, M., & et al. (2018). Overview of MEX-A3T at IberEval 2018: Authorship and aggressiveness analysis in Mexican Spanish tweets. CEUR Workshop Proceedings, 2150, 74–96. https://ceur-ws.org/Vol-2150/overview-mex-a3t.pdf.
Amjad, M., Ashraf, N., Zhila, A., & et al. (2021). Threatening language detection and target identification in urdu tweets. IEEE Access, 9, 128,302–128,313. https://doi.org/10.1109/ACCESS.2021.3112500.
Apple, K. (2022). When the shield becomes the sword: the evolution of section 230 from a free speech shield to a sword of censorship. Working paper. https://ssrn.com/abstract=4045663.
Aragón, M. E., Jarquín-Vásquez, H. J., y Gómez, M. M., & et al. (2020). Overview of mex-a3t at iberlef 2020: Fake news and aggressiveness analysis in mexican spanish. In IberLEF@SEPLN, vol 2664. CEUR Workshop Proceedings (CEUR-WS.org, pp. 222–235). https://ceur-ws.org/Vol-2664/mex-a3t_overview.pdf.
Basile, V., Bosco, C., Fersini, E., & et al. (2019). SemEval-2019 task 5 Multilingual detection of hate speech against immigrants and women in Twitter. In Proceedings of the 13th international workshop on semantic evaluation. https://doi.org/10.18653/v1/S19-2007. https://aclanthology.org/S19-2007 (pp. 54–63). Minnesota: Association for computational linguistics.
Benavoli, A., Mangili, F., Corani, G., & et al. (2014). A bayesian wilcoxon signed-rank test based on the dirichlet process. In Proceedings of the 31st international conference on international conference on machine learning - Volume 32. JMLR.org, ICML’14, p. II–1026–II–1034. http://proceedings.mlr.press/v32/benavoli14.pdf.
Benavoli, A., Corani, G., Demšar, J., & et al. (2017). Time for a change: A tutorial for comparing multiple classifiers through bayesian analysis. The Journal of Machine Learning Research, 18(1), 2653–2688. https://jmlr.org/papers/v18/16-305.html.
Burnap, P., & Williams, M. L. (2015). Cyber hate speech on twitter: An application of machine classification and statistical modeling for policy and decision making. Policy & Internet, 7(2), 223–242. https://doi.org/10.1002/poi3.85. https://onlinelibrary.wiley.com/doi/abs/10.1002/poi3.85.
Casavantes, M., López, R., & González-Gurrola, L. C. (2019). Uach at mex-a3t 2019: Preliminary results on detecting aggressive tweets by adding author information via an unsupervised strategy. In Proceedings of the first workshop on Iberian languages evaluation forum (IberLEF 2019), CEUR WS proceedings. https://ceur-ws.org/Vol-2421/MEX-A3T_paper_8.pdf.
Casavantes, M., González, L., & López, R. (2020). UACh at MEX-A3T 2020: Detecting aggressive tweets by incorporating author and message context. In Proceedings of the 2nd SEPLN workshop on Iberian languages evaluation forum (IberLEF) 2664. https://ceur-ws.org/Vol-2664/mexa3t_paper6.pdf.
Caselli, T., Basile, V., Mitrović, J., & et al. (2021a). HateBERT: Retraining BERT for abusive language detection in English. In Proceedings of the 5th workshop on online abuse and harms (WOAH 2021). Association for computational linguistics, pp. 17–25. https://doi.org/10.18653/v1/2021.woah-1.3. https://aclanthology.org/2021.woah-1.3.
Caselli, T., Schelhaas, A., Weultjes, M., & et al. (2021b). DALC: the Dutch abusive language corpus. In Proceedings of the 5th workshop on online abuse and harms (WOAH 2021). Association for Computational Linguistics, pp. 54–66. https://doi.org/10.18653/v1/2021.woah-1.6. https://aclanthology.org/2021.woah-1.6.
Chatzakou, D., Kourtellis, N., Blackburn, J., & et al. (2017). Mean birds: Detecting aggression and bullying on twitter. In Proceedings of the 2017 ACM on web science conference, WebSci ’17 (pp. 13–22). New York: Association for computing machinery, https://doi.org/10.1145/3091478.3091487.
Chen, Y., Zhou, Y., Zhu, S., & et al. (2012). Detecting offensive language in social media to protect adolescent online safety. In 2012 International conference on privacy, security, risk and trust and 2012 international confernece on social computing, pp. 71–80, https://doi.org/10.1109/SocialCom-PASSAT.2012.55.
Dadvar, M., Trieschnigg, D., Ordelman, R., & et al. (2013). Improving cyberbullying detection with user context. In P. Serdyukov, P. Braslavski, S. O. Kuznetsov, & et al. (Eds.) Advances in information retrieval (pp. 693–696). Berlin: Springer, https://doi.org/10.1007/978-3-642-36973-5_62.
Davidson, T., Warmsley, D., Macy, M. W., & et al. (2017). Automated hate speech detection and the problem of offensive language. In International conference on web and social media, pp. 512–515, https://doi.org/10.1609/icwsm.v11i1.14955.
Devlin, J., Chang, M.-W., Lee, K., & et al. (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: human language technologies, vol 1 (Long and Short Papers). https://doi.org/10.18653/v1/N19-1423. https://aclanthology.org/N19-1423 (pp. 4171–4186). Minnesota: Association for computational linguistics.
DiLeo, D. (2017). Social media terms and conditions - the delicate balancing act between online safety and free speech censorship. In Student works 929. https://scholarship.shu.edu/student_scholarship/929.
Fersini, E., Nozza, D., & Rosso, P. (2018). Overview of the evalita 2018 task on automatic misogyny identification (ami). In EVALITA Evaluation of NLP and speech tools for Italian: proceedings of the final workshop 12-13 December 2018, Naples. Torino: Accademia University Press, https://doi.org/10.4000/books.aaccademia.4497.
Fortuna, P., & Nunes, S. (2018). A survey on automatic detection of hate speech in text. ACM Computing Surveys, 51(4), 1–30. https://doi.org/10.1145/3232676.
Gambäck, B., & Sikdar, U. K. (2017). Using convolutional neural networks to classify hate-speech. In Proceedings of the first workshop on abusive language online. https://doi.org/10.18653/v1/W17-3013. https://aclanthology.org/W17-3013(pp. 85–90). Vancouver: Association for computational linguistics.
Géron, A. (2017). Hands-on machine learning with scikit-learn and tensorflow: concepts, tools, and techniques to build intelligent systems, 1st edn. O’Reilly Media, Inc.
Gomez, R., Gibert, J., Gomez, L., & et al. (2020). Exploring hate speech detection in multimodal publications. In 2020 IEEE winter conference on applications of computer vision (WACV), pp. 1459–1467, https://doi.org/10.1109/WACV45572.2020.9093414.
Hamilton, W. L., Ying, R., & Leskovec, J. (2017). Inductive representation learning on large graphs. In Proceedings of the 31st international conference on neural information processing systems, NIPS’17 (pp. 1025–1035). Red Hook, NY: Curran Associates Inc.
Hatebase, I. (2021). Hatebase. https://hatebase.org/. Accessed 17 Feb 2023.
Jiang, A., Yang, X., Liu, Y., & et al. (2022). Swsr: A chinese dataset and lexicon for online sexism detection. Online Social Networks and Media, 27, 100,182. https://doi.org/10.1016/j.osnem.2021.100182. https://www.sciencedirect.com/science/article/pii/S2468696421000604.
Kumar, R., Ojha, A. K., Malmasi, S., & et al. (2018). Benchmarking aggression identification in social media. In Proceedings of the first workshop on trolling, aggression and cyberbullying (TRAC-2018). https://aclanthology.org/W18-4401 (pp. 1–11). New Mexico: Association for computational linguistics.
Liu, P., Li, W., & Zou, L. (2019). NULI at SemEval-2019 task 6 Transfer learning for offensive language detection using bidirectional transformers. In Proceedings of the 13th international workshop on semantic evaluation. https://doi.org/10.18653/v1/S19-2011. https://aclanthology.org/S19-2011 (pp. 87–91). Minneapolis, Minnesota: Association for computational linguistics.
Mandl, T., Modha, S., Majumder, P., & et al. (2019). Overview of the hasoc track at fire 2019: Hate speech and offensive content identification in indo-european languages, FIRE ’19, (pp. 14–17). New York: Association for computing machinery.
Mozafari, M., Farahbakhsh, R., & Crespi, N. (2020). A bert-based transfer learning approach for hate speech detection in online social media. In H. Cherifi, S. Gaito, J. F. Mendes, & et al. (Eds.) Complex networks and their applications VIII (pp. 928–940). Cham: Springer, https://doi.org/10.1007/978-3-030-36687-2_77.
Nelatoori, K., & Kommanti, H. (2022). Multi-task learning for toxic comment classification and rationale extraction. Journal of Intelligent Information Systems.
Nikolov, A., & Radivchev, V. (2019). Nikolov-radivchev at SemEval-2019 task 6: Offensive tweet classification with BERT and ensembles. In Proceedings of the 13th international workshop on semantic evaluation. https://doi.org/10.18653/v1/S19-2123. https://aclanthology.org/S19-2123 (pp. 691–695). Minneapolis, Minnesota: Association for computational linguistics.
Nobata, C., Tetreault, J., Thomas, A., & et al. (2016). Abusive language detection in online user content. In Proceedings of the 25th international conference on world wide web. international world wide web conferences steering committee, Republic and Canton of Geneva, CHE, WWW ’16, pp. 145–153, https://doi.org/10.1145/2872427.2883062.
Pamungkas, E. W., Basile, V., & Patti, V. (2021). A joint learning approach with knowledge injection for zero-shot cross-lingual hate speech detection. Information Processing & Management, 58 (4), 102,544. https://doi.org/10.1016/j.ipm.2021.102544. https://www.sciencedirect.com/science/article/pii/S0306457321000510.
Pandey, R., & Singh, J. (2022). Bert-lstm model for sarcasm detection in code-mixed social media post. Journal of Intelligent Information Systems :1–20.
Pedregosa, F., Varoquaux, G., Gramfort, A., & et al. (2011). Scikit-learn: machine learning in python. Journal of Machine Learning Research, 12 (85), 2825–2830. http://jmlr.org/papers/v12/pedregosa11a.html.
Pennington, J., Socher, R., & Manning, C. (2014). GloVe: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP). https://doi.org/10.3115/v1/D14-1162. https://aclanthology.org/D14-1162 (pp. 1532–1543). Doha: Association for Computational Linguistics.
Plaza del Arco, F. M., Molina-González, M. D., Ureña-López, L. A., & et al. (2021a). Comparing pre-trained language models for spanish hate speech detection. Expert Systems with Applications, 166, 114,120. https://doi.org/10.1016/j.eswa.2020.114120. https://www.sciencedirect.com/science/article/pii/S095741742030868X.
Plaza del Arco, F. M., Montejo-Ráez, A., Ureña-López, L. A., & et al. (2021b). OffendES: A new corpus in Spanish for offensive language research. In Proceedings of the international conference on recent advances in natural language processing (RANLP 2021), INCOMA Ltd., Held Online, pp. 1096–1108. https://aclanthology.org/2021.ranlp-1.123.
Poletto, F., Basile, V., Sanguinetti, M., & et al. (2021). Resources and benchmark corpora for hate speech detection: a systematic review. Language Resources and Evaluation, 55, 477–523. https://doi.org/10.1007/s10579-020-09502-8.
Pronoza, E., Panicheva, P., Koltsova, O., & et al. (2021). Detecting ethnicity-targeted hate speech in russian social media texts. Information Processing & Management, 58(6), 102,674. https://doi.org/10.1016/j.ipm.2021.102674. https://www.sciencedirect.com/science/article/pii/S0306457321001606.
Ribeiro, M., Calais, P., Santos, Y., & et al. (2018). Characterizing and detecting hateful users on twitter. In Proceedings of the international AAAI conference on web and social media 12(1). https://doi.org/10.1609/icwsm.v12i1.15057. https://ojs.aaai.org/index.php/ICWSM/article/view/1505.
Sanguinetti, M., Comandini, G., di Nuovo, E., & et al. (2020). Haspeede 2 @ evalita2020: Overview of the evalita 2020 hate speech detection task. In V. Basile, D. Croce, M. Di Maro, & et al. (Eds.) Proceedings of the seventh evaluation campaign of natural language processing and speech tools for Italian. Final Workshop (EVALITA 2020), vol 2765. CEUR Workshop Proceedings (CEUR-WS.org).
Schmidt, A., & Wiegand, M. (2017). A survey on hate speech detection using natural language processing. In Proceedings of the fifth international workshop on natural language processing for social media. https://doi.org/10.18653/v1/W17-1101. https://aclanthology.org/W17-1101 (pp. 1–10). Valencia: Association for computational linguistics.
Schulz, W. S., Guess, A. M., Barberá, P., & et al. (2020). (Mis)representing Ideology on Twitter: How social influence shapes online political expression. In Working paper. https://simonmunzert.github.io/meof/material/schulz-et-al-ideology-twitter-apsa.pdf.
Sharma, A., Kabra, A., & Jain, M. (2022). Ceasing hate with moh: Hate speech detection in hindi–english code-switched language. Information Processing & Management, 59(1), 102,760. https://doi.org/10.1016/j.ipm.2021.102760. https://www.sciencedirect.com/science/article/pii/S0306457321002417.
Twitter, I. (2021a). Tweet object — twitter developers. Accessed 18 Nov 2021. https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object.
Twitter, I. (2021b). User object — twitter developers. Accessed 18 Nov 2021. https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/user-object.
Vidgen, B., & Derczynski, L. (2021). Directions in abusive language training data, a systematic review: Garbage in, garbage out. PLoS ONE, 15 (12), 1–32. https://doi.org/10.1371/journal.pone.0243300. https://doi.org/10.1371/journal.pone.0243300.
Vidgen, B., Nguyen, D., Margetts, H., & et al. (2021). Introducing CAD: the contextual abuse dataset. In Proceedings of the 2021 conference of the North American chapter of the association for computational linguistics: human language technologies, Association for computational linguistics, pp. 2289–2303. https://doi.org/10.18653/v1/2021.naacl-main.182. https://aclanthology.org/2021.naacl-main.182.
Waseem, Z., & Hovy, D. (2016). Hateful symbols or hateful people? predictive features for hate speech detection on Twitter. In Proceedings of the NAACL student research workshop. https://doi.org/10.18653/v1/N16-2013. https://aclanthology.org/N16-2013(pp. 88–93). San Diego: Association for computational linguistics.
Zhang, Z., Robinson, D., & Tepper, J. (2018). Detecting hate speech on twitter using a convolution-gru based deep neural network. In A. Gangemi, R. Navigli, M.-E. Vidal, & et al. (Eds.) The semantic web (pp. 745–760). Cham: Springer, https://doi.org/10.1007/978-3-319-93417-4_48.
Funding
This work was supported by the Mexican National Council for Science and Technology (CONACYT) under grant agreements no. 701616 and no. 654803.
Author information
Authors and Affiliations
Contributions
Conceptualization: [Marco Casavantes]; Methodology: [Mario Ezra Aragón]; Formal analysis: [Marco Casavantes]; Investigation: [Marco Casavantes, Mario Ezra Aragón]; Data curation: [Marco Casavantes]; Validation: [Mario Ezra Aragón]; Writing - original draft preparation: [Marco Casavantes, Mario Ezra Aragón]; Writing -review and editing: [Luis C. González, Manuel Montes-y-Gómez]; Supervision: [Luis C. González, Manuel Montes-y-Gómez]; Project administration: [Luis C. González, Manuel Montes-y-Gómez].
Corresponding author
Ethics declarations
Competing interests
The authors have no competing interests to declare that are relevant to the content of this article.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Casavantes, M., Aragón, M.E., González, L.C. et al. Leveraging posts’ and authors’ metadata to spot several forms of abusive comments in Twitter. J Intell Inf Syst 61, 519–539 (2023). https://doi.org/10.1007/s10844-023-00779-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10844-023-00779-z