Enhancing Sentiment Analysis with Fine-Tuned DeBERTa in a Cross-Domain Study on IMDb and Amazon Polarity Datasets
Abstract
Sentiment analysis has become crucial for understanding consumer behavior in e-commerce and social media. While models based on transformers like Bidirectional Encoder Representations from Transformers (BERT) and A Robustly Optimized BERT Pretraining Approach (RoBERTa) have great performance in Natural Language Processing (NLP) tasks, challenges persist in domain-specific language nuances and context sensitivity. This study addresses these gaps by utilizing DeBERTa, an advanced model with disentangled attention mechanisms, to improve sentiment classification. The methodology involves fine-tuning the DeBERTa-base on the IMDb dataset and evaluating its generalization on the Amazon Polarity dataset. The results achieved 93.21% accuracy, 91.28% precision, 94.98% recall, and 93.32% F1 score, achieving a good balance between precision and recall while maintaining high accuracy. The result of this study demonstrates that Decoding-enhanced BERT with Disentangled Attention (DeBERTa) has strong performance in handling long, structured text and short, diverse comments. This illustrates DeBERTa's superiority in capturing complex semantic relationships and context-dependent sentiments.
References
- Muzumdar, P. (2021). Impact of review valence and perceived uncertainty on purchase of time-constrained and discounted search goods. ArXiv, abs/2110.09313.
- Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Vol. 1, pp. 4171–4186). Association for Computational Linguistics.
- Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019). RoBERTa: A robustly optimized BERT pretraining approach. ArXiv, abs/1907.11692.
- Sun, C., Qiu, X., Xu, Y., & Huang, X. (2019). How to fine-tune BERT for text classification? In M. Sun, X. Huang, H. Ji, Z. Liu, & Y. Liu (Eds.), Chinese Computational Linguistics (CCL 2019). Lecture Notes in Computer Science, vol 11856. Springer, Cham.
- He, P., Liu, X., Gao, J., & Chen, W. (2021). DeBERTa: Decoding-enhanced BERT with disentangled attention. In the International Conference on Learning Representations.
- Maas, A. L., Daly, R. E., Pham, P. T., Huang, D. T., Ng, V., Potts, C., & Dredze, M. (2011). Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies (ACL-HLT 2011), 142-150.
- McAuley, J., & Leskovec, J. (2013). Hidden factors and hidden topics: Understanding rating dimensions with review text. In Proceedings of the 7th ACM Conference on Recommender Systems (pp. 165-172).
- Zhang, X., Zhao, J., & LeCun, Y. (2015). Character-level convolutional networks for text classification. Advances in Neural Information Processing Systems 28 (NIPS 2015).