Introduction
Twitter sentiment analysis presents unique challenges due to the inherent brevity and informal nature of microblogging. Tweets often lack sufficient internal context, making it difficult for both humans and machines to disambiguate sentiment. For instance, a tweet like "I can't sleep because of Clatenberg..." remains ambiguous without knowing if "Clatenberg" refers to a frustrating neighbor or an exciting event. Traditional approaches have relied on heavy manual feature engineering or isolated tweet analysis. This paper proposes a context-sensitive neural network that leverages external information—such as conversation threads, author history, and topical hashtags—to significantly improve classification accuracy.
Proposed Architecture
The authors introduce a dual-component neural network designed to capture both local and contextual features.
1. Local Sub-Network
The local component processes the target tweet using word embeddings passed through a convolutional layer to capture n-gram features. A key innovation is the use of a multi-strategy pooling layer. Unlike standard models that rely solely on max-pooling, this architecture concatenates max, min, and average pooling to extract a richer set of salient features, capturing various extremes of sentiment expression.
2. Contextualized Sub-Network
This component processes "salient words" (the top 100 words ranked by tf-idf) from three distinct contextual sources:
- Conversation-based: Previous tweets in a reply chain.
- Author-based: The user’s recent posting history, providing a "prior" for their general sentiment style.
- Topic-based: Recent tweets sharing the same hashtags, offering semantically related sentiment clusters.
3. Character-Level Enhancement
To mitigate the noise of Twitter (e.g., non-standard spelling, hashtags), a character-level CNN generates embeddings that are concatenated with standard word embeddings, creating a more robust representation of the input text.
Experimental Setup
The researchers curated a dataset of 18,000 tweets using distant supervision (labeling based on sentiment-bearing hashtags like #happy or #sadness). The data was split into a Balanced Set (6,000 positive/6,000 negative) and an Unbalanced Set (11,394 positive/6,606 negative) to reflect real-world distributions. While author and topic context were prevalent (>85%), conversation context was available for only ~3-5% of the data.
Results and Analysis
The inclusion of context led to a dramatic performance increase. While the local-only model achieved macro-F scores around 80-83%, the full model reached a peak of 92.27% on the balanced set.
Key findings include:
- Contextual Impact: Topic-based context proved most powerful, likely due to the high density of semantically related sentiment in hashtag clusters. Adding both context and prior history (+c+p) consistently yielded the highest scores.
- Representation Strategy: The model performed better when using "separated" embedding matrices for local vs. contextual words (as seen in Figure 3), suggesting that words carry different weights depending on whether they are part of the primary message or background context.
- Superiority over Sequence Models: The proposed architecture outperformed sequence-based baselines (like SVM-HMM) by approximately 10%, demonstrating that modeling context as a flexible set of features is more effective than assuming a strict sequence.
Conclusion
By moving beyond the analysis of tweets in isolation, this research demonstrates that context is essential for accurate sentiment classification. The dual-network approach effectively integrates local linguistic features with broader conversational and topical information, setting a new benchmark for performance in the field. Future work may explore graph-based structures to better model complex inter-tweet relationships and coreferences.
Summary updated