Cargando…

Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT

With the growth that social networks have experienced in recent years, it is entirely impossible to moderate content manually. Thanks to the different existing techniques in natural language processing, it is possible to generate predictive models that automatically classify texts into different cat...

Descripción completa

Detalles Bibliográficos
Autores principales: Benítez-Andrades, José Alberto, González-Jiménez, Álvaro, López-Brea, Álvaro, Aveleira-Mata, Jose, Alija-Pérez, José-Manuel, García-Ordás, María Teresa
Formato: Online Artículo Texto
Lenguaje:English
Publicado: PeerJ Inc. 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9044360/
https://www.ncbi.nlm.nih.gov/pubmed/35494847
http://dx.doi.org/10.7717/peerj-cs.906
_version_ 1784695088839917568
author Benítez-Andrades, José Alberto
González-Jiménez, Álvaro
López-Brea, Álvaro
Aveleira-Mata, Jose
Alija-Pérez, José-Manuel
García-Ordás, María Teresa
author_facet Benítez-Andrades, José Alberto
González-Jiménez, Álvaro
López-Brea, Álvaro
Aveleira-Mata, Jose
Alija-Pérez, José-Manuel
García-Ordás, María Teresa
author_sort Benítez-Andrades, José Alberto
collection PubMed
description With the growth that social networks have experienced in recent years, it is entirely impossible to moderate content manually. Thanks to the different existing techniques in natural language processing, it is possible to generate predictive models that automatically classify texts into different categories. However, a weakness has been detected concerning the language used to train such models. This work aimed to develop a predictive model based on BERT, capable of detecting racist and xenophobic messages in tweets written in Spanish. A comparison was made with different Deep Learning models. A total of five predictive models were developed, two based on BERT and three using other deep learning techniques, CNN, LSTM and a model combining CNN + LSTM techniques. After exhaustively analyzing the results obtained by the different models, it was found that the one that got the best metrics was BETO, a BERT-based model trained only with texts written in Spanish. The results of our study show that the BETO model achieves a precision of 85.22% compared to the 82.00% precision of the mBERT model. The rest of the models obtained between 79.34% and 80.48% precision. On this basis, it has been possible to justify the vital importance of developing native transfer learning models for solving Natural Language Processing (NLP) problems in Spanish. Our main contribution is the achievement of promising results in the field of racism and hate speech in Spanish by applying different deep learning techniques.
format Online
Article
Text
id pubmed-9044360
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher PeerJ Inc.
record_format MEDLINE/PubMed
spelling pubmed-90443602022-04-28 Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT Benítez-Andrades, José Alberto González-Jiménez, Álvaro López-Brea, Álvaro Aveleira-Mata, Jose Alija-Pérez, José-Manuel García-Ordás, María Teresa PeerJ Comput Sci Artificial Intelligence With the growth that social networks have experienced in recent years, it is entirely impossible to moderate content manually. Thanks to the different existing techniques in natural language processing, it is possible to generate predictive models that automatically classify texts into different categories. However, a weakness has been detected concerning the language used to train such models. This work aimed to develop a predictive model based on BERT, capable of detecting racist and xenophobic messages in tweets written in Spanish. A comparison was made with different Deep Learning models. A total of five predictive models were developed, two based on BERT and three using other deep learning techniques, CNN, LSTM and a model combining CNN + LSTM techniques. After exhaustively analyzing the results obtained by the different models, it was found that the one that got the best metrics was BETO, a BERT-based model trained only with texts written in Spanish. The results of our study show that the BETO model achieves a precision of 85.22% compared to the 82.00% precision of the mBERT model. The rest of the models obtained between 79.34% and 80.48% precision. On this basis, it has been possible to justify the vital importance of developing native transfer learning models for solving Natural Language Processing (NLP) problems in Spanish. Our main contribution is the achievement of promising results in the field of racism and hate speech in Spanish by applying different deep learning techniques. PeerJ Inc. 2022-03-01 /pmc/articles/PMC9044360/ /pubmed/35494847 http://dx.doi.org/10.7717/peerj-cs.906 Text en © 2022 Benítez-Andrades et al. https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.
spellingShingle Artificial Intelligence
Benítez-Andrades, José Alberto
González-Jiménez, Álvaro
López-Brea, Álvaro
Aveleira-Mata, Jose
Alija-Pérez, José-Manuel
García-Ordás, María Teresa
Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title_full Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title_fullStr Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title_full_unstemmed Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title_short Detecting racism and xenophobia using deep learning models on Twitter data: CNN, LSTM and BERT
title_sort detecting racism and xenophobia using deep learning models on twitter data: cnn, lstm and bert
topic Artificial Intelligence
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9044360/
https://www.ncbi.nlm.nih.gov/pubmed/35494847
http://dx.doi.org/10.7717/peerj-cs.906
work_keys_str_mv AT benitezandradesjosealberto detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert
AT gonzalezjimenezalvaro detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert
AT lopezbreaalvaro detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert
AT aveleiramatajose detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert
AT alijaperezjosemanuel detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert
AT garciaordasmariateresa detectingracismandxenophobiausingdeeplearningmodelsontwitterdatacnnlstmandbert