RT Journal Article T1 From data to detection: developing a corpus and training language models for the identification of anti-refugee narratives in Spanish A1 Mata Vázquez, Jacinto A1 Gualda, Estrella A1 Pachón Álvarez, Victoria A1 Rebollo Díaz, Carolina A1 Domínguez Olmedo, Juan Luis AB This study addresses the automatic detection of negative anti-refugee messages in Spanish texts, using language models based on pre-trained Transformers models. Despite numerous studies on hate speech detection, few have concentrated on Spanish, particularly regarding hostility towards refugees. To fill this void, we developed HateRADAR-es, a new corpus of Spanish-language tweets manually annotated by sociologist and social workers experts to identify the presence or absence of hateful content directed at refugees. This dataset has been made available to the research community to encourage further investigation. A comprehensive experimental framework to tackle this challenge, composed of several stages to achieve language models with a high efficacy in detecting such messages, is presented. To address the class imbalance issue in the data, data augmentation techniques are applied, and extensive experimentation is carried out to find the best values for the hyperparameters of the language models to achieve better performance. In the evaluation process, an ensemble of the fine-tuned models BETO, XLM-RoBERTa, and RoBERTa-large achieved the best results, with an accuracy of 0.891, an F1-measure of 0.860, and an AUC-ROC of 0.892. These findings underscore the effectiveness of combining multiple models into an ensemble to handle the complexity and nuances of hate speech on social media, offering a promising direction for future adaptations and applications of language models in specific hate contexts. PB Elsevier SN 2590-0056 (electrónico) YR 2025 FD 2025 LK https://hdl.handle.net/10272/27390 UL https://hdl.handle.net/10272/27390 LA eng NO Mata, J., Gualda, E., Pachón, V., Rebollo, C., & Domínguez, J. L. (2025). From data to detection: Developing a corpus and training language models for the identification of anti-refugee narratives in Spanish. Array, 28, 100526. https://doi.org/10.1016/j.array.2025.100526 NO This paper is part of the I+D+i Project titled ‘‘Conspiracy Theories and Hate Speech Online: Comparison of patterns in narratives and social networks about COVID 19, immigrants, refugees and LGBTI people [NON CONSPIRA HATE!]", PID2021 123983OB I00, funded by MCIN/AEI/10.13039/501100011033/ and by FEDER/EU. The publication is part of grant JDC2022-048239-I, funded by MCIN/AEI/10.13039/501100011033 and by the European Union‘‘NextGenerationEU’’/PRTR. We also thank for the support of the research centers at the Uni-versity of Huelva ‘‘Estudios Sociales E Intervención Social, ESEIS’’, ‘‘Pensamiento Contemporáneo e Innovación para el Desarrollo Social, COIDESO" and ‘‘Centro de Investigación en Tecnología, Energía 𝑦Sostenibilidad, CITES’’. DS Repositorio Institucional de la Universidad de Huelva RD 31 may 2026