Sentiment Analysis of Social Media Data Using an Ensemble of Classical Models and RoBERTa
Keywords:
Sentiment analysis, Ensemble learning, RoBERTa, Support Vector Machine, Logistic Regression, XGBoost, Soft voting, Natural language processing, Text classificationAbstract
The use of social media data for sentiment analysis presents a number of important challenges because the nature of user-generated text is often informal and noisy and is heavily dependent on context. Classical machine learning algorithms provide efficient computations but do not typically account for the very deep semantic properties of the text they analyse, whereas transformer-based models, such as RoBERTa, are able to provide a much richer understanding of context but require substantial computational resources. In this research, we employ an ensemble architecture which combines three classical classifiers (SVM, LR, and XGBoost) with a fine-tuned RoBERTa model, making predictions with this combined framework using a soft-vote method for classifying the sentiments of social media textual data. We evaluate the ensemble architecture on three benchmark datasets (Sentiment140, IMDb, Twitter US Airline) and find that the ensemble outperformed RoBERTa alone on the IMDb dataset by 1.42 percentage points (92.51% accuracy), with the ensemble much more closely matching the performance of RoBERTa on the Sentiment140 and Twitter US Airline datasets while maintaining significantly more balanced scores for precision and recall. The ensemble produced no additional training overhead in comparison to RoBERTa and the total inference cost was negligible when compared to the time required to fine-tune the RoBERTa model (up to 3,096 seconds). The results of this research indicate that the combination of lightweight classical classifiers with a transformer architecture via a soft voting ensemble yields a generalisable and computationally practical architecture for performing sentiment analysis of social media data
Published
How to Cite
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.