Improving aspect-based sentiment analysis with contrastive learning
Lingling Xu, Weiming Wang
Abstract
As a fine-grained sentiment analysis task focusing on detecting the sentiment polarity of aspect(s) in a sentence, aspect-based sentiment analysis (ABSA) plays a significant role in opinion analysis and review analysis. Recently, a number of methods have emerged to leverage contrastive learning techniques to enhance the performance of ABSA by learning fine-grained sentiment representations. In this paper, we present and compare two commonly used contrastive learning approaches for enhancing ABSA performance: sentiment-based supervised contrastive learning and augmentation-based unsupervised contrastive learning. Sentiment-based supervised contrastive learning employs sentiment labels to distinguish between positive and negative samples. Augmentation-based unsupervised contrastive learning aims to utilize various data augmentation strategies to generate positive samples. Experimental results on three public ABSA datasets demonstrate that both contrastive learning methods significantly improve the performance of ABSA. Sentiment-based supervised contrastive learning outperforms augmentation-based unsupervised contrastive learning in terms of overall performance improvements. Furthermore, we conduct additional experiments to illustrate the effectiveness and generalizability of these two contrastive learning approaches. The experimental code and data are publicly available at the link: https://github.com/Linda230/ABSA-CL.