Zing Forum

Reading

From TF-IDF to Transformer: The Evolution of Sentiment Classification and New Explorations in Ensemble Learning

This article deeply explores the evolution of sentiment classification tasks from traditional machine learning to modern Transformer models. Through comparative experiments, it reveals that RoBERTa leads with an accuracy rate of 93.02% and verifies the effectiveness of the soft voting ensemble strategy.

情感分析TransformerRoBERTaBERT深度学习自然语言处理集成学习文本分类预训练模型机器学习
Published 2026-05-21 13:00Recent activity 2026-05-23 04:48Estimated read 5 min
From TF-IDF to Transformer: The Evolution of Sentiment Classification and New Explorations in Ensemble Learning
1

Section 01

Introduction: Evolution of Sentiment Classification Technology and Exploration of Ensemble Learning

This article discusses the evolution of sentiment classification tasks from traditional machine learning to modern Transformer models. Through comparative experiments on the IMDb movie review dataset, it reveals that RoBERTa leads with an accuracy rate of 93.02% and verifies the effectiveness of the soft voting ensemble strategy.

2

Section 02

Research Background: The Leap from Traditional Methods to Deep Learning

The development of sentiment classification reflects the evolution of NLP technology: early methods relied on handcrafted features like TF-IDF and statistical models such as Naive Bayes and Logistic Regression, but ignored context; after the rise of deep learning, RNN/LSTM could model sequence information, while the Transformer architecture and pre-trained models (e.g., BERT/RoBERTa) achieved better semantic understanding.

3

Section 03

Experimental Design: Multi-Model Comparison and Comprehensive Evaluation

The experiment is based on the IMDb movie review dataset. The compared models include traditional machine learning (Naive Bayes, Logistic Regression, SVM), ensemble learning (LightGBM), deep learning (LSTM), and pre-trained Transformers (RoBERTa, DistilBERT); multiple metrics including accuracy, precision, recall, F1, and ROC-AUC are used for evaluation.

4

Section 04

Key Findings: RoBERTa's Leadership and the Value of Ensemble Strategies

RoBERTa ranks first with an accuracy rate of 93.02%. Its optimized training strategies (more data, larger batches, removal of the NSP task) enable it to learn more robust language representations; soft voting ensemble improves performance by weighted averaging the prediction probabilities of each model, reflecting the complementarity of models.

5

Section 05

Technical Insights: The Key to Transformer's Success

The self-attention mechanism of Transformer can globally focus on text positions and capture long-distance dependencies; the pre-training-fine-tuning paradigm uses massive unlabeled data to learn general language knowledge, with significant transfer effects. Compared to traditional methods that rely on handcrafted features and LSTM's low efficiency in sequential processing, Transformer has obvious advantages.

6

Section 06

Practical Insights and Application Recommendations

  1. Prioritize RoBERTa when resources are sufficient; 2. Use lightweight models like DistilBERT for real-time scenarios; 3. Consider soft voting ensemble for critical businesses; future directions include multimodal, aspect-level, and cross-language sentiment analysis, with Transformer remaining the core.
7

Section 07

Conclusion: Technological Progress and Future Outlook

From TF-IDF to Transformer, sentiment classification has achieved a leap from statistical word frequency to semantic understanding. RoBERTa's high accuracy marks an important progress in machine sentiment understanding. Future technologies will play a valuable role in more fields, helping humans utilize text sentiment information.