Automatic Detection of Emotions and Mental Health Conditions from Social Networks in Panama

A Comparative Study of Large Language Models and Transformers

Authors

  • Denis Cedeno-Moreno Universidad Tecnologica de Panama, Panama, Panama https://orcid.org/0000-0002-9640-1284
  • Alan Delgado-Herrera Universidad Tecnologica de Panama, Panama, Panama
  • Miguel Vargas-Lombardo Universidad Tecnologica de Panama, Panama, Panama https://orcid.org/0000-0002-2074-2939
  • Nelson Montilla-Herrera Universidad de Panama, Panama, Panama

DOI:

https://doi.org/10.3991/ijoe.v21i12.57173

Keywords:

Emotions,, automatic emotion recognition,, , mental health,, large language models,, natural language processing

Abstract


Social media platforms such as X publish millions of emotionally charged comments every day. These posts can be classified into several categories, and automatic emotion recognition (AER) can be applied to identify the human emotions associated with them based on aspects such as text, speech, or facial expressions. From these emotions, we can detect mental health conditions, which represent a complex, multi-layered problem with negative impacts. The aim of this study is to perform an analysis of the emotions expressed via Panama’s social networks by extracting a dataset from the X network and evaluating it using some existing lightweight Transformer models to detect mental health conditions that could then be referred to Panamanian hospitals. Methods: Natural language processing (NLP) has undergone major development thanks to the emergence of large language models (LLMs). These models are based on the Transformer, a powerful neural network architecture that has revolutionized the field of deep learning. We show that lightweight models generally outperform alternative approaches. This study demonstrates the potential for automatic emotion detection, with the aim of developing predictive models that can support authorities in decision-making processes.

Downloads

Published

2025-10-10

How to Cite

Cedeno-Moreno, D., Delgado-Herrera, A., Vargas-Lombardo, M., & Montilla-Herrera, N. (2025). Automatic Detection of Emotions and Mental Health Conditions from Social Networks in Panama: A Comparative Study of Large Language Models and Transformers. International Journal of Online and Biomedical Engineering (iJOE), 21(12), 84–93. https://doi.org/10.3991/ijoe.v21i12.57173

Issue

Section

Papers