Abstract
Sentiment analysis on social media data such as tweets and weibo has become a very important and challenging task. Due to the intrinsic properties of such data, tweets are short, noisy, and of divergent topics, and sentiment classification on these data requires to modeling various contexts such as the retweet/reply history of a tweet, and the social context about authors and relationships. While few prior study has approached the issue of modeling contexts in tweet, this paper proposes to use a hierarchical LSTM to model rich contexts in tweet, particularly long-range context. Experimental results show that contexts can help us to perform sentiment classification remarkably better.
Introduction
Sentiment analysis on platforms like Twitter or Weibo is notoriously difficult because posts are short, noisy, and informal. A single tweet like "Haze is the welfare of the people in Beijing!" might look positive to a machine because of words like "welfare," but it is actually biting sarcasm.
Researchers argue that sentiment is not an isolated event; it exists within a conversation. Previous models often ignored the "long-range context"—the history of retweets and replies leading up to a post. Without knowing what a user is responding to, or who they are, a model cannot accurately judge the true polarity of their message. This study introduces a Hierarchical LSTM (HLSTM) model that looks beyond individual posts to capture the entire thread of a conversation.
Methodology: Hierarchical LSTM
The core innovation is the Hierarchical Long Short-Term Memory (HLSTM) network, which processes information at two distinct levels to capture both local and global context.
- Word-level LSTM: This layer processes the individual words of a single tweet to create a vector representation (an embedding) of that specific post.
- Tweet-level LSTM: This layer takes the sequence of tweet representations in a propagation thread (from the origin tweet to the target tweet) as input. This allows the model to "remember" the sentiment flow of the entire conversation.
Incorporating Rich Features (HLSTM-f)
The authors also developed HLSTM-f, an augmented version that incorporates additional binary context features into the LSTM gates to refine the hidden state transitions:
- Social Context: Identifies if the current tweet is by the same author as the parent or root tweet.
- Conversation Context: Tracks if the tweet mentions the author of a previous tweet (using @username).
- Topic Context: Checks if tweets share hashtags or emoticons.
Experimental Setup and Dataset
The researchers collected and released a new dataset from Weibo.com (a Chinese microblogging site) consisting of approximately 14,000 tweets across 1,649 threads. Unlike standard sentiment datasets, this one preserves the tree structure of conversations (origin tweet $\rightarrow$ retweets/replies).
Analysis of this data revealed significant "sentiment drift." While 64.7% of tweets share the same sentiment as their immediate parent, only 46.9% share the same sentiment as the "root" (original) tweet. This confirms that sentiment evolves as a conversation progresses, necessitating a model that can track long-range dependencies.
Key Results
The HLSTM models consistently outperformed traditional baselines like SVMs and CNNs. The results demonstrate that simply adding the hierarchical structure (HLSTM) provides a significant boost over a standard LSTM, and adding specific social/topic features (HLSTM-f) provides the best overall performance.
As shown in the results table, HLSTM-f achieved the highest Accuracy (0.641) and Macro-F1 (0.593). The model's ability to trace a reply back to its "ancestor" tweet allows it to recognize when a seemingly positive statement is actually a sarcastic response to a negative topic, such as air pollution.
Discussion and Future Work
The paper demonstrates that neighboring tweets in a thread have a high probability of maintaining sentiment polarity, but this fades over longer distances. The authors confirmed that standard RNNs for the second layer (LSTM-RNN) performed worse than the HLSTM, proving that LSTMs are necessary to handle the long-range dependencies in deep conversation threads.
Future research may address the sparsity of context features (like hashtags and mentions) and explore more sophisticated tree-structured LSTMs to better represent the complex branching of social media conversations. Additionally, testing the model's robustness on other languages like English (Twitter) remains a logical next step.
Summary updated