JOURNAL ARTICLE

Transformer-based models for sentiment analysis of YouTube video comments

Oussama El AzzouzyTarik ChanyourSaid Jai Andaloussi

Year: 2025 Journal:   Scientific African Vol: 29 Pages: e02836-e02836   Publisher: Elsevier BV

Abstract

The rapid expansion of online video content has positioned platforms like YouTube as substantial sources of multimedia data, rich in diverse user interactions and expressions. Among these, comments have emerged as a significant source of sentiment, opinion, and feedback. The objective of this research is to improve comprehension of the emotions conveyed in YouTube comments through the assessment and comparison of transformer-based sentiment analysis algorithms. The main objectives were to assess various transformer architectures, including BERT, GPT, RoBERTa, and T5, for their effectiveness in sentiment classification tasks. The research utilized the Just Dance dataset for training and evaluated the models on several state-of-the-art sentiment analysis datasets to ensure robustness and generalizability. Methods involved exploring different pre-training tech- niques, loss functions, optimizers, and hyperparameter settings to optimize model performance. The findings reveal that RoBERTa consistently demonstrated superior performance, achieving the highest accuracy and F1-scores across various configurations, particularly with its specialized to- kenizer and the AdamW optimizer. This study contributes novel insights into the strengths and limitations of transformer-based approaches for analyzing YouTube comments and offers valu- able recommendations for improving sentiment analysis frameworks across diverse contexts while suggesting avenues for future improvements.

Keywords:
Sentiment analysis Computer science Transformer Advertising Artificial intelligence Business Engineering Electrical engineering

Metrics

1
Cited By
4.82
FWCI (Field Weighted Citation Impact)
48
Refs
0.94
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Sentiment Analysis and Opinion Mining
Physical Sciences →  Computer Science →  Artificial Intelligence
Advanced Text Analysis Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence
Topic Modeling
Physical Sciences →  Computer Science →  Artificial Intelligence
© 2026 ScienceGate Book Chapters — All rights reserved.