Do LLM s Think Fast and Slow? A Causal Study on Sentiment Analysis (2024)

Abstract: Sentiment analysis (SA) aims to identify the sentiment expressed in a piece of text, often in the form of a review. Assuming a review and the sentiment associated with it, in this paper we formulate SA as a combination of two tasks: (1) a causal discovery task that distinguishes whether a review “primes” the sentiment (Causal Hypothesis C1), or the sentiment “primes” the review (Causal Hypothesis C2); and (2) the traditional prediction task to model the sentiment using the review as input. Using the peak-end rule in psychology, we classify a sample as C1 if its overall sentiment score approximates an average of all the sentence-level sentiments in the review, and as C2 if the overall sentiment score approximates an average of the peak and end sentiments. For the prediction task, we use the discovered causal mechanisms behind the samples to improve the performance of LLMs by proposing causal prompts that give the models an inductive bias of the underlying causal graph, leading to substantial improvements by up to 32.13 F1 points on zero-shot five-class SA.

## introduction sentiment analysis (sa) is the task of identifying the sentiment y given a piece of text x. the field has a rich history originating from subjectivity analysis @xcite , and developed rapidly with the availability of large opinionated online data such as reviews with ratings @xcite @xcite . despite recent advances in large language models (llms), it is still challenging to address the finegrained five-class sa (which corresponds to the five star ratings in most datasets) for documentlevel classification (choi et al., 2020; fei et al., * equal contributions. 1 our code is at https://github.com/cogito233/causal-sa . 2023; @xcite , due to the subtle nature of the task including aspects such as inter-aspect relations, commonsense reasoning, among others @xcite . in this paper, we propose a causally-informed solution for the sa task. different from the approach of naïvely applying up-to-date llms, we leverage insights from causal inference to propose a reformulation for sa into two tasks, as in figure 1: (1) a causal discovery task to identify the cause-effect relation between the review x and the sentiment y , and (2) the traditional prediction task f : @xmath0. we first look into the causal discovery task. in the study of affect science @xcite @xcite , language can be the cause of emotion @xcite ) -namely a review priming the following sentiment, i.e., the causal hypothesis c1 of @xmath1; or emotion can affect the use of language @xcite -namely sentiment priming the review as an ad-hoc justification for the emotion, i.e., the causal hypothesis c2 of @xmath2. these two processes might arise from the data annotation process @xcite , but is hard to discover post-hoc in existing datasets. given the possibility of both causal directions @xmath3, we identify the actual underlying mechanism based on insights from psychology @xcite . specifically, we identify the correspondence of the above two causal mechanisms with the fast and slow thinking systems @xcite : (1) a review-driven sentiment (as in c1) largely resembles the slow thinking process applying reasoning based on evidence, and (2) the process of first coming up with the sentiment and then justifying it by a review (as in c2) conforms to fast thinking. given this correspondence, we apply the peak-end rule applying the peak-end rule to discover the causal direction peak figure 1 : an overview of the paper structure, where we first investigate the causal discovery task, and then use it to improve llm performance. for each document-level text review, we parse its emotion arc consisting of the sentiment of each sentence in the review, and then use the peak-end rule @xcite to identify whether the overall sentiment is an average of the arc (corresponding to slow thinking), or an average of the peak and end sentiments (corresponding to fast thinking). from psychology @xcite . as shown in the right part of figure 1 , we classify a sample as c1 if its overall sentiment score approximates an average of all the sentencelevel sentiments in the review, and as c2 if the overall sentiment score approximates an average of the peak and end sentiments. based on the identified causal mechanism behind sa data from the causal discovery task, we further explore how it can improve prediction performance in the era of llms. existing literature highlights "causal alignment," namely to align the prediction direction along the underlying causal direction @xcite @xcite , but to our knowledge we are the first to explore how causal alignment improves model performance of sa in the era of llms. specifically, we answer three subquestions: (q1) if using the standard sa prompt, do models perform differently on c1/c2 data? (q2) does it help if we make the prompt aware of the underlying causality, i.e., use causal prompts? and (q3) when prompted causally, do llms mechanistically understand the corresponding causal processes? our empirical results show that under the standard prompt, llms perform better on data corresponding to the c2 causal process. moreover, causal prompts aligned with the causal direction of the data can substantially improve the performance of zero-shot sa. finally, we apply mechanistic inter-pretability methods to probe the models, and find that there is still improvement space for llms to correctly grasp the essence of the two causal processes. in summary, the contributions of this paper are as follows: ## problem formulation of sa in this section, we formulate sa as a combination of two tasks: the traditional prediction task in nlp and the causal discovery task in statistics, which we will introduce in the following. ## conclusion in conclusion, we have formulated the task of sa into a prediction problem and a causal discovery problem. we first identified the cause-effect relation among existing sa datasets, namely whether the review primes the rating, or the sentimental judgment primed the review writing process. to achieve this causal discovery, we obtain insights from existing psychology studies, namely aligning the above two causal processes with the famous fast thinking and slow thinking systems, with their distinct qualitative signals. given the causal understanding of the dataset, we further improve the performance of llms on sa using our proposed causal prompts. our research paves the way for more causally-aware future research in sa.