This paper proposes a transformer-based framework for sentiment analysis, designed to improve both accuracy and computational efficiency across diverse datasets. The model incorporates a low-rank tensor fusion mechanism to reduce computational complexity, optimizing the transformer encoder’s performance. Through an extensive evaluation on three benchmark datasets—Airlines, CrowdFlower, and Apple—our approach demonstrates superior performance in sentiment classification tasks, achieving accuracy levels of 93.2%, 91.5%, and 92.1%, respectively. The framework utilizes standard performance metrics, including precision, recall, and F1-score, showing consistent improvements of 5-10% over traditional models. Additionally, the model's efficiency is highlighted by its reduced processing time (120 ms per sample), making it suitable for real-time applications. The ablation study reveals that components such as pre-trained embeddings and attention mechanisms significantly contribute to its performance. The results underscore the model's robustness in handling varying sentiment distributions and highlight its scalability for large-scale sentiment analysis tasks. This study provides valuable insights into the practical application of transformer-based models in sentiment analysis, offering an efficient solution for processing diverse social media data in real-time.
Copyrights © 2025