Chain of Stance: Stance Detection with Large Language Models
Stance detection is an active task in natural language processing (NLP) that aims to identify the author’s stance towards a particular target within a text. Given the remarkable language understanding capabilities and encyclopedic prior knowledge of large language models (LLMs), how to explore the potential of LLMs in stance detection has received significant attention. Unlike existing LLM-based approaches that focus solely on fine-tuning with large-scale datasets, we propose a new prompting method, called Chain of Stance (CoS). In particular, it positions LLMs as expert stance detectors by decomposing the stance detection process into a series of intermediate, stance-related assertions that culminate in the final judgment. This approach leads to significant improvements in classification performance.
Recently, the rapid development of social media platforms such as X, WeChat, and TikTok has led to an explosive growth in user-generated content. The increasing availability of massive amounts of textual data has created a need to automatically analyze the opinions, emotions, and stances expressed. This is because understanding the stance tendencies of the public offers significant benefits for political analysis, public opinion polling, and rumor detection. Hence, stance detection has been an active topic in NLP. Stance detection aims to identify the author’s attitude or stance towards a specific target (such as an entity, concept, or event)(?), typically classified into categories such as support, opposition, or neutrality.
But the key difference is that we capture the relation between human’s emotion and his/her stance, instead of letting LLMs think freely. In particularly, it positions LLMs as expert stance detectors by decomposing the stance detection process into a series of intermediate, stance-related assertions that culminate in the final judgment. This approach leads to significant improvements in classification performance. In this work, assertion is similar to thought, which is a coherent language sequence related to context, emotion, or opinion that serves as an intermediate indicator toward identifying stance.
The task of stance detection is defined as follows: Given a text S and a target t, the model needs to determine the stance polarity y towards t, such as favor, against, and none. We now use a chain of stance prompt-based approach to solve the stance detection task. Specifically, we use the following prompt template as the input to the LLM: Given the text S and the chain of stance C, what is the stance polarity towards t? Specifically, the LLM returns the answer using Formula 1.
ˆy = argmax p(y | S,C, t) We propose a method called chain of stance(CoS), a CoT-style paradigm that allows LLMs to decompose the problem of stance detection into intermediate steps and solve each before making decision (Fig.1). Each step will be sampled sequentially, then the output is summarized based on the above steps.
Unlike traditional stance detection input/output prompts, we do not require the LLM to directly provide the stance detection result. Instead, we ask the LLM to consider various aspects and fully account for potential information before giving the final result to enhance detection accuracy. Specifically, CoS involves the following steps:
Step 1. We first use the following template to help the LLM understand the contextual information I of the text. Given text S, understand the contextual information i of the text, which includes the topic of the text, the identity of the author, the target audience, and the relevant sociocultural background.
This step can be formulated as I = argmax p(i | S, t), where I is the contextual information contained in the text S.
Step 2. Next, based on S, t, and i, we ask the LLM to interpret the main idea V of the text S. What are the core viewpoints and main intentions to be expressed in the text? This step can be formulated as V = argmax p(v | S, t, i), where V are the main ideas in the text S.
Step 3. In this step, we instruct the LLM to analyze the language expression and emotional attitude E of the text.
Analyze the language expression and emotional inclination of the text. Identify the emotional words and rhetorical devices used within the text, and analyze the tone adopted by the author (e.g., affirmative, negative, interrogative, exclamatory, etc.). Based on this analysis, describe the author’s emotional attitude E.
This step can be formulated as E = argmax p(e | S, t, i, v), where E is the emotional attitude expressed in the text S. Step 4. In this step, we let the LLM compare the text S with three possible stances (e.g., favor, against, none), and obtain the similarities and contrasts between the text and each potential stance. For each stance, calculate its probability given S, t, i, v, e.
Compare similarities and contrasts between text S and various possible stances (favor, against, none), based on the abovementioned information.
The calculated probabilities for each stance are combined to form a set A: A = {favor:P(favor|S, t, i, v, e), against:P(against| S, t, i, v, e), none:P(none|S, t, i, v, e)}.
Step 5. We ask the LLM to confirm the consistency and rationality of the stance. Conduct logical inference based on the context and other relevant information to confirm the consistency and rationality of the stance.
This step can be formulated as L = argmax p(l | S, t, i, v, e, a), where L is the result of logical reasoning performed by the LLM.
Step 6. With the complete stance skeleton (S, t, i, v, e, a, l) as context, we ask the LLM to make the final decision.
Based on the above information, determine the stance polarity towards t. We note this step as ˆy = argmax p(y