Targeted Sentiment Analysis (TSA) is a critical task in Natural Language Processing that involves determining the sentiment polarity toward specific entities within a sentence. For example, in the sentence "I love the camera but hate the battery life," a TSA model must correctly assign a positive sentiment to "camera" and a negative one to "battery life." Achieving this requires a deep understanding of syntax—knowing which modifiers relate to which targets.
Presented at IJCNLP 2017, this research introduces a robust method for incorporating syntactic knowledge into sentiment models without the fragility of traditional linguistic rules. By leveraging "implicit" syntactic features, the authors avoid the common pitfalls of analyzing messy, real-world text like social media posts.
The Challenge: Error Propagation in Noisy Text
Traditional approaches to TSA often rely on explicit syntactic parsers to generate dependency trees. However, these parsers are typically trained on formal news text (like the Penn Treebank). When applied to the noisy environment of social media—filled with hashtags, slang, and non-standard grammar—these parsers frequently produce broken or incorrect trees. If a sentiment model relies on a flawed tree, its predictions will likely be incorrect. This phenomenon is known as error propagation.
Methodology: Neural Stacking and Implicit Features
To solve this, the authors propose a neural stacking approach. Instead of using the final, discrete output of a parser (like a specific dependency arc), they "peek" into the parser's internal representations.
The Stacking Process
- Bottom Syntactic Model: The researchers use pre-trained syntactic models (a POS tagger and a dependency parser) trained on formal news data.
- Implicit Feature Extraction: Rather than extracting tags or arcs, they extract the hidden layer vectors ($f_b$) from these models. These vectors encode rich, latent structural information about word relationships without committing to a single, potentially incorrect grammatical structure.
- Top Sentiment Model: An attention-based BiLSTM (Bidirectional Long Short-Term Memory) network serves as the sentiment classifier. It receives word embeddings concatenated with the implicit syntactic features from the bottom model.
- Attention Mechanism: The model employs an attention layer to dynamically weigh which words in the sentence are most relevant to the specific target entity being analyzed, guided by the structural hints provided by the implicit features.
Experimental Setup and Datasets
The model was evaluated on two primary benchmarks representing different levels of linguistic complexity:
- Z-Set: A combination of the MPQA corpus and Mitchell et al.’s dataset (approx. 10k sentences).
- T-Set: A benchmark Twitter dataset from Tang et al. (approx. 6k sentences).
As shown in the distribution above, both datasets contain a significant number of longer sentences (30+ words). These instances are particularly challenging for standard LSTMs because the sentiment-bearing words may be far removed from the target entity.
Key Results and Insights
The "stacked" model achieved state-of-the-art results at the time of publication, outperforming strong baselines like recursive neural networks and standard LSTMs.
- Performance Gains: Accuracy on the Z-Set improved from 73.0% to 74.3% with dependency features. On the T-Set, accuracy rose from 71.7% to 72.8%.
- Local vs. Global Syntax: The authors observed that Part-of-Speech (POS) features help most with local syntax in short sentences. In contrast, dependency features are crucial for resolving long-distance dependencies in complex sentences.
- Robustness to Length: The model showed its greatest advantage on sentences with 30-40 words. The implicit syntactic features acted as a "map," helping the attention mechanism focus on the correct distant verbs or adjectives despite the intervening noise.
Conclusion
This research demonstrates that you don't need a perfect parse tree to benefit from syntactic knowledge. By treating syntax as a latent feature rather than a rigid rule, models can become more robust to the irregularities of social media text. Future work may explore joint training, where the parser and sentiment model are fine-tuned together to further align syntactic representations with the nuances of sentiment analysis.
Summary updated