Enhancing Sentiment Analysis with Transformers: Tackling Sarcasm Misclassification in Noisy Reviews
Students & Supervisors
Student Authors
Supervisors
Abstract
Abstract—Sarcasm poses a significant challenge in sentiment analysis, often causing misclassifications in traditional models by negating apparent sentiment. We present a novel approach that explicitly addresses sarcasm by transforming sentiment analysis into a four-class classification problem. Our method leverages a pre-trained RoBERTa model to identify and label sarcastic instances in the Amazon Product Reviews Dataset, adding” sarcastic” as a distinct fourth class alongside positive, negative, and neutral sentiments. Extensive validation through manual annotation, cross-dataset testing, and linguistic pattern analysis confirms the reliability of our approach. This labeled dataset is then used to fine tune a BERT model for comprehensive sentiment classification. The model achieves exceptional perfor mance with 98.55% overall accuracy and balanced F1-scores of approximately 0.985 across all categories, with particularly strong sarcasm detection (recall: 0.99). This research advances sentiment analysis in e-commerce and social media contexts where sarcastic content frequently undermines traditional sentiment classification methods
Keywords
Publication Details
- Type of Publication:
- Conference Name: 2025 International Conference on Quantum Photonics, Artificial Intelligence, and Networking (QPAIN)
- Date of Conference: 31/07/2025 - 31/07/2025
- Venue: Rangpur
- Organizer: IEEE Photonics Society Bangladesh Chapter