Comparative Analysis of Machine Learning and Deep Learning Models for Text Emotion Classification in Federated Learning

Text sentiment analysis is an important aspect of natural language processing (NLP), playing an essential role in understanding public opinion, enhancing customer experience, and informing data-driven decisions in sectors such as business and policy-making. This study aims to systematically compare the performance of traditional machine learning models (Support Vector Machine (SVM) and Logistic Regression) with Bidirectional Encoder Representations from Transformers (BERT) with a federated learning framework. To represent text features, SVM and Logistic Regression are implemented using Term Frequency-Inverse Document Frequency (TF-IDF) vectorization. At the same time, the pre-trained BERT model is fine-tuned to leverage its contextualised embeddings. The models are evaluated on the Text Emotion Recognition dataset using accuracy, F1-score, and recall rate metrics. Experimental results show that BERT achieves the highest accuracy (0.9765), significantly outperforming Logistic Regression (0.9570) and SVM (0.4992). However, SVM demonstrates superior training efficiency, 5-10 times faster than BERT, while Logistic Regression provides enhanced interpretability through coefficient analysis. These findings offer valuable insights for practitioners in selecting models based on precision, resource constraints, and deployment speed. This study also highlights potential real-time mental health support applications, social media monitoring, and customer sentiment analysis.

Authors

Institutions

Publication Details

Journal
Applied and Computational Engineering
Published
2025-05-30
DOI
https://doi.org/10.54254/2755-2721/2025.gl23568
Primary Topic
Privacy-Preserving Technologies in Data
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative Analysis of Machine Learning and Deep Learning Models for Text Emotion Classification in Federated Learning

Jiaqi Wang
Applied and Computational Engineering
Privacy-Preserving Technologies in Data
article

Comparative Analysis of Machine Learning and Deep Learning Models for Text Emotion Classification in Federated Learning

Jiaqi Wang
article en

Abstract

Text sentiment analysis is an important aspect of natural language processing (NLP), playing an essential role in understanding public opinion, enhancing customer experience, and informing data-driven decisions in sectors such as business and policy-making. This study aims to systematically compare the performance of traditional machine learning models (Support Vector Machine (SVM) and Logistic Regression) with Bidirectional Encoder Representations from Transformers (BERT) with a federated learning framework. To represent text features, SVM and Logistic Regression are implemented using Term Frequency-Inverse Document Frequency (TF-IDF) vectorization. At the same time, the pre-trained BERT model is fine-tuned to leverage its contextualised embeddings. The models are evaluated on the Text Emotion Recognition dataset using accuracy, F1-score, and recall rate metrics. Experimental results show that BERT achieves the highest accuracy (0.9765), significantly outperforming Logistic Regression (0.9570) and SVM (0.4992). However, SVM demonstrates superior training efficiency, 5-10 times faster than BERT, while Logistic Regression provides enhanced interpretability through coefficient analysis. These findings offer valuable insights for practitioners in selecting models based on precision, resource constraints, and deployment speed. This study also highlights potential real-time mental health support applications, social media monitoring, and customer sentiment analysis.

Applied and Computational EngineeringVol. 155(1)
Macao Polytechnic University (MO)
Openalex Percentile: Top 94%
Privacy-Preserving Technologies in Data
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.