CouRGe: Counterfactual Reviews Generator for Sentiment Analysis

Research output: Chapter in Book/Report/Conference proceedingsConference proceedingpeer-review

Abstract

Past literature in Natural Language Processing (NLP) has demonstrated that counterfactual data points are useful, for example, for increasing model generalisation, enhancing model interpretability, and as a data augmentation approach. However, obtaining counterfactual examples often requires human annotation effort, which is an expensive and highly skilled process. For these reasons, solutions that resort to transformer-based language models have been recently proposed to generate counterfactuals automatically, but such solutions show limitations. In this paper, we present CouRGe, a language model that, given a movie review (i.e. a seed review) and its sentiment label, generates a counterfactual review that is close (similar) to the seed review but of the opposite sentiment. CouRGe is trained by supervised fine-tuning of GPT-2 on a task-specific dataset of paired movie reviews, and its generation is prompt-based. The model does not require any modification to the network’s architecture or the design of a specific new task for fine-tuning. Experiments show that CouRGe’s generation is effective at flipping the seed sentiment and produces counterfactuals reasonably close to the seed review. This proves once again the great flexibility of language models towards downstream tasks as hard as counterfactual reasoning and opens up the use of CouRGe’s generated counterfactuals for the applications mentioned above.

Original languageEnglish
Title of host publicationArtificial Intelligence and Cognitive Science - 30th Irish Conference, AICS 2022, Revised Selected Papers
EditorsLuca Longo, Ruairi O’Reilly
PublisherSpringer Science and Business Media Deutschland GmbH
Pages305-317
Number of pages13
ISBN (Print)9783031264375
DOIs
Publication statusPublished - 2023
Event30th Irish Conference on Artificial Intelligence and Cognitive Science, AICS 2022 - Munster, Ireland
Duration: 8 Dec 20229 Dec 2022

Publication series

NameCommunications in Computer and Information Science
Volume1662 CCIS
ISSN (Print)1865-0929
ISSN (Electronic)1865-0937

Conference

Conference30th Irish Conference on Artificial Intelligence and Cognitive Science, AICS 2022
Country/TerritoryIreland
CityMunster
Period8/12/229/12/22

Keywords

  • Counterfactual reasoning
  • Data augmentation
  • Language models
  • Natural language processing
  • Sentiment analysis

Fingerprint

Dive into the research topics of 'CouRGe: Counterfactual Reviews Generator for Sentiment Analysis'. Together they form a unique fingerprint.

Cite this