Reasoning Implicit Sentiment with Chain-of-Thought Prompting (2023)

Abstract: While sentiment analysis systems try to determine the sentiment polarities of given targets based on the key opinion expressions in input texts, in implicit sentiment analysis (ISA) the opinion cues come in an implicit and obscure manner. Thus detecting implicit sentiment requires the common-sense and multi-hop reasoning ability to infer the latent intent of opinion. Inspired by the recent chain-of-thought (CoT) idea, in this work we introduce a Three-hop Reasoning (THOR) CoT framework to mimic the human-like reasoning process for ISA. We design a three-step prompting principle for THOR to step-by-step induce the implicit aspect, opinion, and finally the sentiment polarity. Our THOR+Flan-T5 (11B) pushes the state-of-the-art (SoTA) by over 6% F1 on supervised setup. More strikingly, THOR+GPT3 (175B) boosts the SoTA by over 50% F1 on zero-shot setting.

## introduction sentiment analysis (sa) aims to detect the sentiment polarity towards a given target based on the input text. sa can be classified into explicit sa (esa) and implicit sa (isa), where the former type is the current mainstream task, in which the emotional expressions explicitly occur in texts @xcite . different from esa, isa is much more challenging, because in isa the inputs contain only factual descriptions with no explicit opinion expression directly given @xcite . for example, given a text 'try the tandoori salmon!', having no salient cue word, almost all existing sentiment classifier 1 predicts a neutral polarity towards 'the tandoori salmon'. human can easily determine the sentiment states accurately, because we always grasp the real intent or opinion the environment of the hotel is so great ! ## three-hop reasoning framework the task of sa (either esa or isa) is defined as: given a sentence x with a target term t ⊂ x, a model determines the sentiment polarity y towards t, i.e., positive, neutral or negative. we solve the task using an off-the-shelf llm with prompt. for the standard prompt-based method, we can construct the following prompt template as llm's input: given the sentence x, what is the sentiment polarity towards t? the llm should return the answer via: ŷ=argmaxp(y|x, t). ## related work sentiment analysis has long been a hot research topic in nlp community @xcite @xcite . while the explicit sa models can make predictions based on the opinion expressions effortlessly, the implicit sa can be much more tricky due to the hidden opinion characteristics @xcite . and isa is often more ubiquitous in realistic scenarios. although efforts have been made to isa @xcite , existing work can still be limited to the traditional paradigm of inference. as aforementioned, isa should be addressed via reasoning, i.e., common-sense and multi-hop reasoning. thus, this work follows such intuition, targeting solving isa with a multi-hop reasoning mechanism. as a key branch of sa, the fine-grained sa has been well explored @xcite @xcite . the idea of fine-grained sa is to break down the sa into several key sentiment elements, including target, aspect, opinion and sentiment polarity, all of which together form a complete sentiment picture in detail @xcite . this work draws the same spirit of fine-grained sa. we believe the reasoning of implicit sentiment should be an incremental pro-cess, inferring the sentiment elements step by step and finally understand the sentiment polarity in an easy-to-hard manner. language model pre-training has received increasing research attention for enhancing the utility of downstream applications @xcite most recently, the large-scale language models (llms) have shown great potential to the humanlevel intelligence, e.g., chatgpt @xcite . llms have extensively demonstrated to exhibit extraordinary abilities on common-sense understanding @xcite and multi-hop reasoning @xcite . this work implements the implicit sentiment reasoning built upon lms, based on the latest proposed chain-of-thought (cot) idea. cot prompting is a gradient-free technique that induces large lms to produce intermediate reasoning steps leading to the final answer. @xcite formally study the cot prompting in language models, in which they elicit lms to generate coherent series of intermediate reasoning steps that direct to the final answer to the original question. ## conclusion in this paper, we present a three-hop reasoning prompting framework to achieve the chain-ofthought reasoning process for implicit sentiment analysis. based on the existing llm, we design three prompts for three steps of reasoning, each of which respectively infers the fine-grained aspect, the underlying opinion and the final polarity. on the isa datasets, different llms equipped with our thor show impressive performances over the existing best-performing baselines on both the supervised and zero-shot setups. we show that the larger the llms, the more significant improvement by our thor method. • case-i input text: i just need to walk downstairs to get to the metro station as it is below the hotel i'm living in. the gold sentiment label is positive towards the metro station. in fig. 6 , 7 and 8, we show that our thor successfully induces the chatgpt to finally give a correct decision on sentiment polarity, where the other two methods fail. lunch came with pickels and slaw, no extra charge. the gold sentiment label is positive towards lunch. fig. 9 , 10 and 11 shows the results and the llm's response, respectively. our thor induces the chatgpt to draw a correct decision on sentiment polarity, but the other two methods still fail.