By Diana Patricia Madera Espíndola, Zoé Caballero Domínguez y Valeria Jassive Ramírez Macías | AMATEUR SCIENCE
Reviewing Author Héctor Gibrán Ceballos Cancino
Language is at the core of what makes us human. That’s why so much effort has gone into teaching computers not only to recognize words, but also to grasp the meaning behind them.
This field is called Natural Language Processing (NLP), a branch of artificial intelligence that powers tools like Alexa and Siri, grammar autocorrect, spam filters, and—more recently—models like ChatGPT and Gemini.
At the heart of advanced NLP systems lies Sentiment Analysis, which enables machines to go beyond processing text and start interpreting the emotions embedded in it. From flagging harmful social media posts to gauging public opinion on key topics, this technology is already influencing how we communicate and engage online.
Emotions: an algorithmic challenge
Despite its wide range of applications, sentiment analysis still faces hurdles—particularly when it comes to detecting complex emotions like hope or sarcasm.
Hope is difficult to pin down because it involves layers of meaning. It can be expressed directly (“I hope,” “I wish”) or indirectly (“Maybe things will change”). Sarcasm is trickier still, playing with the gap between literal words and actual intent—often positive-sounding phrases masking negative feelings.
The ability to detect subtle emotions, such as hope or sarcasm, isn’t just a technical milestone. It has real-world stakes, as seen during the pandemic, when a single post could signal either despair or encouragement.
With the rise of generative AI, researchers are now examining how effectively these models can capture emotional nuance.
At Tecnológico de Monterrey, a group of students set out to compare popular generative models—ChatGPT, DeepSeek, Claude, and Llama—against RoBERTa, a widely used pre-trained NLP model. Their focus was on identifying hope and sarcasm in Twitter posts across multiple languages.
Their findings were accepted at two major international NLP conferences: RANLP and IBERLEF.
Hope and sarcasm
In recent years, NLP techniques have made remarkable strides in their ability to detect emotions in text. One of the most well-known models is RoBERTa, a pre-trained model trained on millions of texts from books, articles, and social media.
This extensive training adapts easily to new tasks, even with very little additional information. To better understand this, we can imagine a professional chef: even if they have never cooked a specific dish before, their experience allows them to prepare it perfectly with just a brief description.
Generative models such as ChatGPT take this concept even further. They don’t just understand language—they produce it, simulating human conversations with remarkable fluency and contextual sensitivity. Rather than following a recipe, they are like improvisational chefs: they not only recognize the ingredients but can also create an entirely new dish according to the diner’s preferences.
Despite this, RoBERTa continues to outperform generative models in detecting emotions, which is notable given that newer models like ChatGPT are considered more advanced because they can not only understand language but also generate it fluently and naturally.
This may be because generative models rely more heavily on message context, which can hinder their performance on Twitter posts that consist of very few characters.
Models like RoBERTa have become widely used in the research community for emotion detection tasks. One of their key advantages is that they are not limited to English—the most common language in research—but can also adapt to other languages.
This is particularly important in a globalized world, where emotions are expressed depending on language and culture. Using models capable of understanding multiple languages allows for the development of more inclusive and effective tools for people in diverse contexts.
Although generative models like ChatGPT do not yet perform best in sentiment analysis tasks, studying their behavior remains essential—especially given their widespread use today.
Pursuing this line of research is not just a technical achievement—it’s a step toward a more empathetic future. Enhancing machines’ ability to recognize complex emotions could unlock applications with deep social impact: from early detection of mental health challenges to better customer service, stronger safeguards against hate speech, and more human-like interactions between people and intelligent systems.
.
References
- Madera-Espíndola, D. P., Caballero-Domínguez, Z., Ramírez-Macías, V. J., Butt, S., & Ceballos, H. (2025). Transformers and Large Language Models for Hope Speech Detection: A Multilingual Approach for PolyHope-M at RANLP 2025. Proceedings of the 16th International Conference on Recent Advances in Natural Language Processing.
- Madera-Espíndola, D. P., Caballero-Domínguez, Z., Ramírez-Macías, V. J., Butt, S., & Ceballos, H. (2025). Hope Speech Detection Using Transformers and Large Language Models: A Bilingual Approach at IberLEF 2025. CEUR Workshop Proceedings.
- Jim, J. R., Talukder, M. A. R., Malakar, P., Kabir, M. M., Nur, K., & Mridha, M. F. (2024). Recent advancements and challenges of NLP-based sentiment analysis: A state-of-the-art review. Natural Language Processing Journal, 6.
.
Autoras
Diana Patricia Madera Espíndola. Graduate student in the Master’s program in Computational Sciences at Tecnológico de Monterrey. Research assistant at the Living Lab & Data Hub of the Institute for the Future of Education (IFE), Tecnológico de Monterrey, Mexico. Her work at IFE focuses on projects related to Natural Language Processing (NLP), Machine Learning (ML), and Deep Learning techniques.
Zoé Caballero Domínguez. Graduate student in the Master’s program in Computer Science with a specialization in Machine Learning at Tecnológico de Monterrey.
Valeria Jassive Ramírez Macías. Graduate student in the Master’s program in Computational Sciences at Tecnológico de Monterrey.
.
This article was supervised by Héctor Gibrán Ceballos Cancino, director of the Living Lab & Data Hub of the Institute for the Future of Education (IFE) at Tecnológico de Monterrey. Full-time faculty member of the Graduate Program in Computer Science (DCC) and affiliated with the Research Group with Strategic Focus on Intelligent Systems. Member of the Mexican National System of Researchers (SNI) and an adherent member of the Mexican Academy of Computing (AMEXCOMP).







