Context is All You Need: Why Transformers Outperform Traditional ML in Tweet Sentiment

This research paper presents a comprehensive comparative analysis of sentiment analysis techniques applied to Twitter data using Natural Language Processing (NLP) methodologies. The study evaluates the performance of conventional machine learning algorithms alongside state-of-the-art transformer-based models on the Sentiment140 dataset containing 1.6 million tweets. We implement and compare four distinct approaches: Naive Bayes and Support Vector Machine (SVM) as traditional machine learning baselines, RoBERTa as an encoder-only transformer, and GPT-2 as decoder-only transformer architecture. Our methodology encompasses extensive preprocessing pipelines, feature extraction techniques, and rigorous evaluation metrics including accuracy, precision, recall, and F1-score. Experimental results demonstrate that transformer-based models significantly outperform conventional approaches, with RoBERTa achieving 93.87% accuracy and GPT-2 attaining 89.01% accuracy, compared to SVM's 86.22% and Naive Bayes' 75.45%. The findings highlight the superior capability of transformer architectures in capturing contextual semantics and handling the complexities inherent in social media text, establishing new benchmarks for Twitter sentiment analysis applications.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-11-14
DOI
https://doi.org/10.5281/zenodo.17606042
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Context is All You Need: Why Transformers Outperform Traditional ML in Tweet Sentiment

Zenodo (CERN European Organization for Nuclear Research)
Sentiment Analysis and Opinion Mining
article

Context is All You Need: Why Transformers Outperform Traditional ML in Tweet Sentiment

article en

Abstract

This research paper presents a comprehensive comparative analysis of sentiment analysis techniques applied to Twitter data using Natural Language Processing (NLP) methodologies. The study evaluates the performance of conventional machine learning algorithms alongside state-of-the-art transformer-based models on the Sentiment140 dataset containing 1.6 million tweets. We implement and compare four distinct approaches: Naive Bayes and Support Vector Machine (SVM) as traditional machine learning baselines, RoBERTa as an encoder-only transformer, and GPT-2 as decoder-only transformer architecture. Our methodology encompasses extensive preprocessing pipelines, feature extraction techniques, and rigorous evaluation metrics including accuracy, precision, recall, and F1-score. Experimental results demonstrate that transformer-based models significantly outperform conventional approaches, with RoBERTa achieving 93.87% accuracy and GPT-2 attaining 89.01% accuracy, compared to SVM's 86.22% and Naive Bayes' 75.45%. The findings highlight the superior capability of transformer architectures in capturing contextual semantics and handling the complexities inherent in social media text, establishing new benchmarks for Twitter sentiment analysis applications.

Zenodo (CERN European Organization for Nuclear Research)
Quality Education
Openalex Percentile: Top 22%
Sentiment Analysis and Opinion Mining
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.