Reducing Spurious Correlations in Aspect-based Sentiment Analysis with Explanation from Large Language Models (2023)

Abstract: Recently, aspect-based sentiment analysis (ABSA) models have yielded promising results. However, they are susceptible to learning spurious correlations between certain words of the input text and output labels while modeling the sentiment feature of the aspect. This spurious correlation will potentially undermine the performance of ABSA models. One direct solution for this problem is to make the model see and learn an explanation of sentiment expression rather than certain words. Motivated by this, we exploit explanations for the sentiment polarity of each aspect from large language models (LLMs) to reduce spurious correlations in ABSA. First, we formulate a prompt template that wraps the sentence, an aspect, and the sentiment label. This template is utilized to prompt LLMs to generate an appropriate explanation that states the sentiment cause. Then, we propose two straightforward yet effective methods to leverage the explanation for preventing the learning of spurious correlations. We conducted extensive comparative experiments on five datasets by integrating them with some representative ABSA models. Results show that our methods can achieve performance gains and enhance the performance and generalization ability of ABSA models.

## introduction aspect-based sentiment analysis (absa) aims to identify the sentiment polarity (e.g., positive, neutral, and negative) of a specified aspect in a review @xcite . for example, given a review "great food but the service was dreadful!" and two aspects "food" and "service", this task needs to infer their sentiment polarities "positive" and "negative", respectively. traditional absa methods primarily rely on machine learning techniques, which incorporate some handcrafted features to enhance performance, such as linguistic features @xcite . however, feature engineering could be a time-consuming process, requiring significant effort and expertise. to solve this dilemma, deep learning solutions are utilized to address absa due to their powerful contextual feature modeling capability. from conventional neural networks @xcite @xcite to attention mechanisms @xcite @xcite , these solutions focus on modeling the dependency relationship between an aspect and its corresponding opinion expressions. with the emergence of finetuning paradigm, the attention mechanism armed with pre-trained language models (plms) @xcite @xcite @xcite further strengthens the connection between the aspect and its context. despite their satisfactory results, most neural network methods may indulge in learning statistically spurious correlations while modeling the sentiment feature of aspect on the context. here, spurious correlation @xcite refers to the dependence of the model on certain words of the input text without a deeper understanding of the contextual semantics, which has a know-it-when-you-see-it character. taking the example in figure 1 for illustration, the opinion word "fast" expresses different sentiment polarities of the aspect terms in distinct contexts. here, 92% of aspect sentiment is "positive" in the training samples when counting the proportion of aspect sentiment polarity that co-occurs with "fast". due to this unbalanced distribution, in the training phase, the neural models assume that there is a strong correlation between "fast" and "positive", especially for short texts. consequently, when faced with a testing sample containing a derivative "faster", the trained models will predict the incorrect sentiment label "positive" based on this spurious correlation learned superficially before. thus, most neural models may encounter difficulty in navigating spurious correlations because of a shallow understanding. besides, they lack the capacity to self-correct, resulting in undermining their effectiveness and generalization. one straightforward solution to alleviate the spurious correlation problem is to make models attend to an explanation of sentiment expression rather than certain words in the context. here, explanation refers to the reasons for the sentiment polarity of aspect term obtained by deeply understanding the contextual semantics. however, for each training sample, it is a tricky problem to derive the sentiment explanation given the aspect and its sentiment. recently, large language models (llms) @xcite have achieved remarkable success in a wide range of nlp capabilities, including generation and contextual understanding. in addition, they are knowledgeable due to the substantial linguistic @xcite and factual world knowledge learned. thus, llms can be exploited to generate an explanation toward the sentiment of aspect through prompt-driven contextual understanding @xcite . taking the second training sample in figure 1 as an example, llms can yield an explanation, "the sentiment towards 'final cut pro' is positive because the speaker praises its efficiency and user-friendliness on the laptop, indicating satisfaction and favorable feelings about the software.". inspired by this, we leverage explanations from llms to reduce spurious correlations in absa. specifically, we first design a prompt containing an aspect term and its sentiment to induce llms to provide a relevant explanation according to the context. in this way, the output explanation can provide the reason for sentiment and may contain some external knowledge thanks to the powerful capabilities of llms. then, we propose two methods to employ this explanation to improve the effectiveness and generalization of absa models. one is the augmentation-based method, which directly treats these explanations containing the aspect term as training samples. we mix these explanations with the original training samples to train a more robust absa model. this method can not only relieve the statistical bias in original samples but also learn a range of sample patterns. the other is the distillation-based method, whose basic idea is to distill the knowledge embedded in the explanation into a student absa model. by the distillation loss, the student absa model can mimic the two behaviors of the teacher, i.e., sentiment representation and output logit. in this way, the explanation can guide the learning of absa models and prevent them from over-focusing on spurious correlations. in summary, our contributions are as follows: copying adjectives from the original sentence is not allowed. ## discussion percentage of spurious correlations in the dataset. in this work, spurious correlation @xcite refers to the dependence of the model on certain words in the input text without a deeper understanding of the contextual semantics. a question naturally arises how much of the correlation actually is in used datasets? to answer this question, we conduct a simple probe experiment on the aspect robustness test set (arts) @xcite . arts enrich the initial test sets from lap14 and rest14 by employing three adversarial strategies foot_7 . here, if a model predicts the same sentiment labels for an original sample as well as its adversarial samples (their true labels are different), we will assume that there is a spurious correlation between certain contextual words and the predicted label for this original sample. in other words, the predicted label does not change with the contextual semantics because the model only focuses on certain words. based on this assumption, we count the percentage of original samples in the test set that contain spurious correlations. 8 according to it can be seen that our methods perform better than all baselines, achieving the biggest improvements of 3.48% and 5.47% in accuracy and f1, respectively. this shows that the explanation from llms is more effective because of including not only a contextual understanding of sentiments but also external knowledge. besides, we find that these augmentation baselines often consistently improve the performance of bert, showing that modifying the original text may bring gains, despite the noise. ## conclusion in this paper, we introduce an effective two-step framework to mitigate spurious correlations in absa. first, we formulate a prompt template to induce llms to generate an appropriate explanation that states the sentiment cause. subsequently, we propose two straightforward methods that utilize the generated explanation to prevent the assimilation of spurious correlations. our comprehensive experiments on five absa datasets show that baselines armed with our methods outperform peers in prediction performance and generalization.