This paper, originally a submission to the PolEval 2017 competition, explores the adaptation of tree-structured neural networks for sentiment analysis in Polish. Polish presents unique challenges for natural language processing due to its complex morphology and relatively free word order. The authors demonstrate that by fine-tuning a Child-Sum Tree-LSTM and incorporating sub-word embeddings, it is possible to achieve state-of-the-art performance on phrase-level tasks.
The Challenge of Phrase-Level Sentiment
Most sentiment analysis models operate at the coarse sentence or document level. However, such approaches often fail to capture the nuances of complex language, such as negation or qualification. For instance, in the sentence "The movie was not terrible," a simple model might focus on the word "terrible" and assign a negative label, whereas a human understands that the negation flips the sentiment to neutral or positive.
To address this, researchers utilize phrase-level sentiment analysis, where every node in a sentence's syntactic tree is assigned a sentiment label. This is particularly difficult for Polish because of its morphological richness—where a single verb can have dozens of forms—and its syntactic complexity, which traditional sequential models like standard LSTMs often struggle to represent.
Methodology
The authors employ a Child-Sum Tree-LSTM. Unlike standard LSTMs that process words in a linear sequence, a Tree-LSTM calculates the hidden state of a node based on the hidden states of its children in a dependency tree. This architecture allows the model to explicitly represent how smaller phrases compose into larger semantic units.
The research introduces two primary enhancements to the standard architecture:
- Sub-word Embeddings (fastText): Instead of treating every word form as a unique atom (as in word2vec), the authors use fastText. By representing words as bags of character n-grams, the model can recognize shared roots across different inflections, effectively overcoming data sparsity issues common in morphologically rich languages.
- Tree-based Zoneout: Zoneout is a regularization technique that randomly decides to preserve a neuron's previous state rather than dropping it. Since trees lack a single "previous" state, the authors proposed two new strategies for propagating information upward: Sum-child (replacing a node's state with the sum of its children's states) and Choose-child (randomly selecting one child's state to propagate).
Key Results and Insights
The study utilized the PolEval 2017 Task 2 dataset, consisting of 1,200 training and 350 test sentences annotated with syntactic heads and sentiment labels. While the authors initially faced technical hurdles during the official competition, post-competition analysis revealed that their model significantly outperformed the winning entry.
As shown in the results, the best accuracy of 0.8070 was achieved using fastText embeddings combined with a "distinct sum-child" zoneout strategy. This surpassed the official PolEval winner's score of 0.795.
Several key insights emerged from the experiments:
- Morphology is Critical: Switching to fastText provided the most significant performance boost (reaching 0.8011 compared to 0.7482 for standard word2vec). This confirms that sub-word information is essential for Polish.
- Lemmatization vs. Inflection: While training on lemmatized words performed better than raw words, it was still inferior to fastText. This suggests that specific inflections carry useful semantic weight that lemmatization discards.
- Regularization Impact: While the proposed Zoneout variants provided a marginal improvement (approximately 0.6%), they were not a "silver bullet," suggesting that information flow in trees requires further specialized regularization research.
Conclusion
By combining the structural advantages of Tree-LSTMs with the morphological awareness of fastText, the authors established a new benchmark for Polish phrase-level sentiment analysis. Future work may involve exploring weighted summation of children based on specific syntactic relationships to further refine the model's compositional understanding.
Summary updated