Detecting Hope in Social Media Discourse Using Machine and Deep Learning Classifiers

Authors

  • Ahmad Imam Amjad The University of Punjab, Pakistan.
  • Hamza Imam Amjad Department of Education, Punjab, Pakistan.
  • Grigori Sidorov Center for Computing Research, National Polytechnic Institute, México.

DOI:

https://doi.org/10.61467/2007.1558.2026.v17i1.1239

Keywords:

natural language processing, hope speech detection, sentiment analysis, machine learning, deep learning

Abstract

Hope speech refers to messages that convey optimism, support, or expectations of a better future. With the increasing use of social media as a medium for self-expression, analysing such messages may provide meaningful insights into the emotional well-being of individuals. However, hope speech detection has received comparatively limited attention in social media discourse analysis when contrasted with tasks such as hate speech detection. This study addresses this gap by conducting both binary and multiclass classification of hope speech in two languages: (i) English and (ii) Spanish.

In the binary classification task, the objective is to distinguish between hopeful and non-hopeful tweets, whereas the multiclass task further categorises content into five classes: (i) Generalised Hope, (ii) Realistic Hope, (iii) Unrealistic Hope, (iv) Sarcasm, and (v) No Hope. Six traditional machine learning algorithms and three deep learning and transformer-based architectures were evaluated. The experimental results indicate that transformer-based models outperform traditional approaches in both languages. For English, RoBERTa achieved the highest performance (binary: 82.25% weighted F1; multiclass: 72.49% weighted F1), while for Spanish, XLM-RoBERTa attained the best results (binary: 86.32% weighted F1; multiclass: 77.01% weighted F1). These findings suggest the effectiveness of transformer-based models for multilingual hope speech detection.

 

Smart citations: https://scite.ai/reports/10.61467/2007.1558.2026.v17i1.1239

References

Aggarwal, P., Das, A., & Chakravarthi, B. R. (2023). Multilingual hope-speech detection using transformer-based models. In Proceedings of LT-EDI 2023. Association for Computational Linguistics. https://aclanthology.org/2023.ltedi-1.38

Ahmad, M., Shahiki-Tash, M., Jamshidi, A., & colleagues. (2024). Analyzing hope speech from psycholinguistic and emotional perspectives. Scientific Reports, 14, 23548. https://doi.org/10.1038/s41598-024-74630-y

Arif, M., Shahiki-Tash, M., Jamshidi, A., et al. (2024). Analyzing hope speech from psycholinguistic and emotional perspectives. Scientific Reports, 14, 23548. https://doi.org/10.1038/s41598-024-74630-y

Balouchzahi, F., Sidorov, G., & Gelbukh, A. (2022). Polyhope: Two-level hope speech detection from tweets, DOI: 10.48550. arXiv Preprint. https://arxiv.org/abs/2210.14136

Balouchzahi, F., Sidorov, G., & Gelbukh, A. (2023). PolyHope: Two-level hope speech detection from tweets. Expert Systems with Applications, 225, Article 120078. https://doi.org/10.1016/j.eswa.2023.120078

Bruininks, P., & Malle, B. F. (2005). Distinctive features of hope and related emotions. Cognition & Emotion, 19(2), 113–142. https://doi.org/10.1080/02699930441000292

Butt, S., Balouchzahi, F., Amjad, A. I., Amjad, M., Ceballos, H. G., & Jiménez-Zafra, S. M. (2025a). Optimism, Expectation, or Sarcasm? Multi-Class Hope Speech Detection in Spanish and English. arXiv Preprint. https://arxiv.org/abs/2504.17974

Butt, S., Balouchzahi, F., Amjad, M., Jiménez-Zafra, S. M., Ceballos, H. G., & Sidorov, G. (2025b). Overview of PolyHope at IberLEF 2025: Optimism, Expectation or Sarcasm?. Procesamiento del Lenguaje Natural, 75, 461–474. https://investigacion.ujaen.es/documentos/68ee90ae3b2e3f6b4f68f3db?lang=en

Chakravarthi, B. R. (2020). HopeEDI: A multilingual hope-speech detection dataset for equality, diversity, and inclusion. In Proceedings of PEOPLES 2020 (pp. 41–53). ACL. https://doi.org/10.18653/v1/2020.peoples-1.5

Chakravarthi, B. R. (2022). Hope-speech detection in YouTube comments. Social Network Analysis and Mining, 12(1), 75. https://doi.org/10.1007/s13278-022-00901-z

Chakravarthi, B. R., & Muralidaran, V. (2021). Findings of the Shared Task on Hope Speech Detection for Equality, Diversity, and Inclusion. In Proceedings of LT-EDI 2021 (pp. 61–72). ACL. https://doi.org/10.18653/v1/2021.ltedi-1.8

Diener, E. (2009). The science of well-being: The collected works of Ed Diener. Springer.

Fazlfrs. (2025, October 19). PolyHope at IberLEF 2025: Optimism, expectation or sarcasm?. CodaBench. https://www.codabench.org/competitions/5509/

García-Baeza, D., García-Cumbreras, M. Á., Jiménez-Zafra, S. M., García-Díaz, J. A., & Valencia-García, R. (2023). Hope speech detection in Spanish: The LGBT case. Language Resources and Evaluation, 57, 1487–1514. https://doi.org/10.1007/s10579-023-09638-3

Jiménez-Zafra, S. M., et al. (2023). Overview of HOPE@IberLEF 2023: Multilingual hope-speech detection. Procesamiento del Lenguaje Natural, 71, 289–300. https://doi.org/10.26342/2023-71-29

Khanna, P., Das, A., & Chakravarthi, B. R. (2022). Transformer-based approaches for hope-speech detection. In Proceedings of LT-EDI 2022 (pp. 423–431). ACL. https://aclanthology.org/2022.ltedi-1.49

O’Hara, D. J. (2021). Three spheres of hope: generalised, particularised and transformative. In L. Ortiz, & D. O'Hara (Eds.), Phoenix rising from contemporary: Global society (pp. 3–14). Brill.

Palakodety, S., KhudaBukhsh, A. R., & Carbonell, J. G. (2019). Hope-speech detection: Helping online communities become more inclusive. In Proceedings of the 10th ACM Conference on Web Science (pp. 235–243). ACM. https://doi.org/10.1145/3292522.3326032

Riloff, E., Qadir, A., Surve, P., De Silva, L., Gilbert, N., & Huang, R. (2013). Sarcasm as contrast between a positive sentiment and negative situation. EMNLP 2013 (pp. 704–714). https://aclanthology.org/D13-1066/

Sidorov, G., Balouchzahi, F., Ramos, L., Gómez-Adorno, H., & Gelbukh, A. (2025). Multilingual identification of nuanced dimensions of hope speech in social-media texts (MIND-HOPE). Scientific Reports, 15(1), 26783. https://doi.org/10.1038/s41598-025-10683-x

Snyder, C. R. (2002). Hope theory: Rainbows in the mind. Psychological Inquiry, 13(4), 249–275. https://doi.org/10.1207/S15327965PLI1304_01

Snyder, C. R., Harris, C., Anderson, J. R., et al. (1997). The will and the ways: Development and validation of an individual-differences measure of hope. Journal of Personality and Social Psychology, 60(4), 570–585. https://doi.org/10.1037/0022-3514.60.4.570

Downloads

Published

2026-01-02

How to Cite

Imam Amjad, A., Imam Amjad, H., & Sidorov, G. (2026). Detecting Hope in Social Media Discourse Using Machine and Deep Learning Classifiers . International Journal of Combinatorial Optimization Problems and Informatics, 17(1), 67–75. https://doi.org/10.61467/2007.1558.2026.v17i1.1239

Issue

Section

Articles

Most read articles by the same author(s)