Hostname: page-component-74656f9884-skzmx Total loading time: 0 Render date: 2026-11-05T14:58:16.655Z Has data issue: false hasContentIssue false

Improving sentiment analysis with multi-task learning of negation

Published online by Cambridge University Press:  11 November 2020

Jeremy Barnes*
Affiliation:
Language Technology Group, University of Oslo, Oslo, Norway
Erik Velldal
Affiliation:
Language Technology Group, University of Oslo, Oslo, Norway
Lilja Øvrelid
Affiliation:
Language Technology Group, University of Oslo, Oslo, Norway
*
*Corresponding author. E-mail: jeremycb@ifi.uio.no
Rights & Permissions [Opens in a new window]

Abstract

Sentiment analysis is directly affected by compositional phenomena in language that act on the prior polarity of the words and phrases found in the text. Negation is the most prevalent of these phenomena, and in order to correctly predict sentiment, a classifier must be able to identify negation and disentangle the effect that its scope has on the final polarity of a text. This paper proposes a multi-task approach to explicitly incorporate information about negation in sentiment analysis, which we show outperforms learning negation implicitly in an end-to-end manner. We describe our approach, a cascading and hierarchical neural architecture with selective sharing of Long Short-term Memory layers, and show that explicitly training the model with negation as an auxiliary task helps improve the main task of sentiment analysis. The effect is demonstrated across several different standard English-language data sets for both tasks, and we analyze several aspects of our system related to its performance, varying types and amounts of input data and different multi-task setups.

Information

Type
Article
Copyright
© The Author(s), 2020. Published by Cambridge University Press
Figure 0

Figure 1. An example of negation detection annotation on a sample sentence from the SFU data set.

Figure 1

Table 1. Overview of the data sets for sentiment and negation. Note that for SST, SFU, and Conan Doyle Neg, we show the number of sentences, while for SemEval 2013, we show the number of tweets

Figure 2

Figure 2. Our proposed multi-task model.

Figure 3

Table 2. Mean accuracy and standard deviation of STL and MTL models over five runs on the main sentiment task. The MTL model trained with negation outperforms the single-task baseline in both fine-grained and binary setups. Underlined results indicate the best overall approach, while bold results show where the MTL model outperforms the STL. A star (*) indicates that the model performs significantly better ($p < 0.01$), according to approximate randomization tests. We do not report results for SemEval-binary for baseline models or SemEval-fine for Tree-LSTM because the previous work does not report results on this data

Figure 4

Figure 3. Mean accuracy and standard deviation of STL and MTL-CD model on the SST-binary and SST-fine tasks, broken down across the two (five) classes.

Figure 5

Table 3. Mean accuracy and standard deviation of STL and MTL models on the negated and non-negated subsets of the SST test data. Bold results show the best model on each data sub-set.

Figure 6

Figure 4. Mean accuracy on the SST-binary task when training MTL negation model with differing amounts of negation data from the SFU data set (left) and sentiment data (right).

Figure 7

Table 4. Combining the SFU and CD negation data (MTL-Combined) does not lead to large improvements. Bold results show the best performing model on each dataset.

Figure 8

Table 5. Mean accuracy and standard deviation on the sentiment task for the STL model, MTL models trained to predict only negation cues or only negation scope, and finally the MTL model trained to predict both scopes and cues. Bold results show the best performing model on each dataset.

Figure 9

Table 6. Number of training, development, and test examples for the Stanford Sentiment Treebank phrase-level data

Figure 10

Table 7. Mean accuracy and standard deviation of STL, MTL, and STL-Phrase-level models. Bold results show the best performing model on each dataset.

Figure 11

Table 8. Token-level $\text{F}_1$ for the SFU and ConanDoyle-neg (CD) negation tasks. The single-task negation models outperform the multi-task (MTL) models. Note that the MTL models are not tuned to optimize negation, this being the auxiliary task

Figure 12

Table 9. Mean accuracy and standard deviation of single-task, multi-task, and transfer-learning models. Bold results show the best performing model on each dataset.

Figure 13

Table 10. Train and test splits available for each auxiliary task, as well as label entropy and kurtosis

Figure 14

Table 11. Accuracy on SST-fine with POS tagging, multi-word detection (MWE), and super-sense tagging (SEM) as auxiliary tasks. Bold results show the best performing auxiliary task.