Skip to content
Open access

A Hybrid Framework for Large-Scale Tweet Sentiment Analysis Using Classical Machine Learning, Transformer Models, and Uncertainty Estimation

2026 · International Research Journal of Multidisciplinary Scope · 0 citations · 33 references

TL;DR

The work provides a reproducible, explainable, operationally applicable model of sentiment analysis in operationally sensitive, high-stakes Twitter sentiment analysis, and validate the hypothesis that hybrid stacking is an effective method for leveraging the complementary nature of lexical and contextual representations.

Abstract

The article suggests a hybrid framework to analyse Twitter sentiment at scale by combining traditional machine learning methods with deep learning using transformers in a multi-layer stacking configuration. The system is evaluated using a dataset of 74,921 tweets, each labelled with one of three sentiment labels: negative, neutral, or positive. The architecture is 3-tier. Tier A is based on classical classifiers: Logistic Regression, Calibrated Linear SVM and Multinomial Naive Bayes, using TF-IDF features (unigrams to trigrams), with character-level n-grams added. Tier B is a response to a narrow-focused DistilBERT encoder to learn rich contextual embeddings. Tier C fuses out-of-fold predictions from tiers A and B with a stacked meta-learner that combines lexical accuracy and context depth. Removal of noise, normalisation to kenisation and stopword filtering enable complete text preprocessing, ensuring data quality and consistency throughout the pipeline. The experimental results show that the stacked Meta Logistic Regression achieves an accuracy and macro-F1 of 0.9705, which are much better than those of all the standalone classical and transformer baselines. The model has a near-perfect discriminative performance (macro-AUC = 0.994) and a very good calibration (ECE = 0.0043). Aspect and time analyses are also useful to comprehend the dynamics of sentiment and evolving attitudes towards airline services. These findings validate the hypothesis that hybrid stacking is an effective method for leveraging the complementary nature of lexical and contextual representations, thereby improving generalisation and achieving superior performance. The work provides a reproducible, explainable, operationally applicable model of sentiment analysis in operationally sensitive, high-stakes

Read PDF

Similar papers

Open access 2026

Harnessing Ensemble and Transformers for Sentiment Analysis and Emotion Detection in Hausa Text

Understanding emotional tone and sentiment in text has driven significant advancements in Natural Language Processing (NLP), particularly in sentiment analysis and emotion detection. This study addresses the challenge of developing effective NLP tools for low-resource languages, focusing on the Hausa language. By leveraging ensemble methods and pre-trained transformer models like BERT and XLM-R, along with traditional classifiers such as Logistic Regression, SVM, Naive Bayes, Random Forest, and XGBoost, we aim to improve sentiment analysis and emotion detection for Hausa text. Utilizing a balanced sentiment dataset (9,958 samples) and a complex multi-label emotion dataset (19,757 samples across 11 categories), we benchmark individual classifiers, voting ensembles, and deep contextual models. For sentiment analysis, a Hard Voting Ensemble of TF-IDF-vectorized base learners achieved a highly competitive F1-score of 0.8748. However, Transformer models significantly outperformed traditional baselines, with Multilingual BERT (mBERT) achieving a peak F1-score of 0.8983. In the multi-label emotion detection task, individual traditional models struggled with label sparsity, yielding low Subset Accuracy scores (2.88% to 8.30%) and moderate Micro-F1 scores. Standard Hard Voting ensembles further underperformed due to discrete prediction conflicts. To resolve this, a Probability-based Majority Voting mechanism with calibrated thresholding (0.3) was introduced, boosting the Micro-F1 to 0.3825 and reducing the Hamming Loss to 0.1967. Ultimately, XLM-RoBERTa emerged as the superior architecture, achieving a Subset Accuracy of 0.1545, a Micro-F1 of 0.4275, and the lowest Hamming Loss of 0.1804. This research establishes a rigorous benchmark for Hausa NLP, highlighting the indispensable role of subword tokenization, contextual embeddings, and threshold calibration in handling the morphological richness and multi-label complexities of low-resource languages

Taiwo Kolajo, Kabir Garba · 0 citations
Jul 2026

Application-Oriented intelligent sentiment analysis: Classical vs deep models with multi-embedding strategies

Experimental results show that BERT-LSTM's superior performance stems from its ability to capture bidirectional contextual dependencies, improving contextual modelling of complex linguistic constructs, however, sarcasm and negation remain important sources of error.

Mohd. Danish, Saifullah Khalid · 0 citations
Open access Jul 2026

Beyond Classification: A Multilingual mBERT Framework for Sentiment Analysis, Zero-Shot Categorization, and Severity Assessment on social media

Considering the growth of multilingual user made content within social-media platforms, there is an urgent need for developing scalable, language-agnostic approaches for their analysis. Within this paper, we analyze mBERT's performance in sentiment classification in a binary setting as well as the possibility of performing transfer learning between languages. Specifically, the fine-tuned model is applied for sentiment analysis of tweets from the preprocessed TweetEval dataset, obtaining 79.2% of accuracy and 74.7% of the F1 score. It is shown that cross-language transfer learning without any preliminary training on multilingual sentiment datasets provides quite satisfactory performance. However, a more complex approach can be used, which consists of applying filtering of negative sentiments, categorization of subcategories through a sentence transformer with zero-shot settings, and grouping the resulting data in several major categories to obtain severity scores according to frequency thresholds. The application of the sentiment classification with transformers in combination with issue prioritization makes it possible to develop an end-to-end approach to structuring multilingual social media content.

S. Nahar, P. P. Agnihotri · 0 citations
Review Open access Jul 2026

Transformer-Based Topic Modeling and Sentiment Analysis for Multilingual Text Data

An integrated framework based on transformer architecture for topic modeling and sentiment analysis for Hindi and Italian social-media discourse, customer reviews and news corpus is introduced and it is suggested that there is clear benefit for morphologically complex text and mixed script text for using contextual embeddings and language-specific pretraining.

Sunita Basalingayya, T. J. Peter · 0 citations
Review Open access Jul 2026

Enhanced Sentiment Analysis Using RoBERTa and BiLSTM: A Context-Aware Hybrid Deep Learning Approach

With the widespread growth of digital platforms, online interaction has become an essential part of everyday life. Users frequently express their opinions, feedback, and emotions through reviews and comments on various platforms. Analyzing such textual data plays a crucial role in understanding user sentiment and supporting effective decision-making. However, sentiment analysis faces several challenges, including long-range dependencies within text and the presence of unknown words and symbols. Traditional sentiment analysis approaches mainly rely on sequential models, which process text step by step and often require higher computational time. In contrast, Transformer-based models offer improved efficiency through parallel processing. To address these challenges, this paper presents a context-aware hybrid deep learning approach by integrating the Robustly Optimized BERT Pretraining Approach (RoBERTa) with Bidirectional Long Short-Term Memory (BiLSTM) networks. RoBERTa is employed to generate rich contextual word embeddings, while BiLSTM captures long-term semantic dependencies by processing text in both forward and backward directions. The proposed model is trained and evaluated on the Twitter US Airline Sentiment dataset comprising 14,299 samples across three sentiment classes. Experimental analysis demonstrates that the hybrid approach achieves an accuracy of 85.14% and an F1-score of 0.8487, highlighting its effectiveness for sentiment analysis tasks compared to baseline models

Dr. Veguru Gayatri, Dr. Rajani Rajalingam · 0 citations
Open access 2026

Comparative Analysis of Language Models for Sentiment Classification

— By comparing and analysing the performance of several machine learning algorithms on fine-grained sentiment classification problems to examine their suitability and shortcomings for use as models in sentiment analysis. Sentiment analysis remains a prominent research area in Natural Language Processing (NLP). However, systematic comparisons of whether these methods demonstrate superiority in fine-grained classification settings have yet to be conducted. Based on the GoEmotions dataset that includes 28 sentiment classes as our experiment’s reference for evaluating four kinds of models: logistic regression, BiLSTM, BERT, and the large-scale language model Claude (claude-haiku-4-5). The experiments employ TF-IDF feature extraction, sequence encoding, pre-training with fine-tuning, and zero-shot and few-shot prompting strategies. Based on this experiment, the model’s generalisation capabilities improve as architectural depth increases. The accuracy of logistic regression was only 55.11%; BERT obtained the highest F1 score and performed the best overall, and bidirectional pre-trained representations were most valuable among other methods. However, large language models perform significantly worse on the 28-class classification task in zero-shot settings, suggesting that they are better suited for generative and open-ended emotional interaction than for standardized classification benchmarks.

Shangjiafeng Guo · 0 citations