Skip to content

Improving Sentiment Analysis with Multi-task Learning of Negation

Notifications You must be signed in to change notification settings

ltgoslo/multitask_negation_for_sa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Improving Sentiment Analysis with Multi-task Learning of Negation

This repo accompanies the paper by the same name published in Natural Language Engineering (Volume 27, Issue 2) 2020, by
Jeremy Barnes, Lilja Øvrelid, and Erik Velldal. Pre-print available on arXiv.

Summary

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 a data-driven manner. We describe our approach, a cascading neural architecture with selective sharing of LSTM 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 datasets 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.

Models

  1. Single-task model
  2. Multi-task SFU
  3. Multi-task CD
  4. Transfer-learning

Datasets

  1. SST
  2. SemEval 2013 SA task
  3. SFU Review Corpus
  4. Conan Doyle Neg (*Sem 2012)
  5. Streusle Dataset

Embeddings

You can find the embeddings used in the experiments here. Untar the file and use the 'google.txt' embeddings.

Requirements

  1. Python 3
  2. sklearn pip install -U scikit-learn
  3. Pytorch pip install torch torchvision torchtext
  4. nltk pip install nltk
  5. matplotlib pip install matplotlib
  6. tqdm pip install tqdm

About

Improving Sentiment Analysis with Multi-task Learning of Negation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published