Transformer based contextualization of pre-trained word embeddings for irony detection in Twitter

Abstract Human communication using natural language, specially in social media, is influenced by the use of figurative language like irony. Recently, several workshops are intended to explore the task of irony detection in Twitter by using computational approaches. This paper describes a model for irony detection based on the contextualization of pre-trained Twitter word embeddings by means of the Transformer architecture. This approach is based on the same powerful architecture as BERT but, differently to it, our approach allows us to use in-domain embeddings. We performed an extensive evaluation on two corpora, one for the English language and another for the Spanish language. Our system was the first ranked system in the Spanish corpus and, to our knowledge, it has achieved the second-best result on the English corpus. These results support the correctness and adequacy of our proposal. We also studied and interpreted how the multi-head self-attention mechanisms are specialized on detecting irony by means of considering the polarity and relevance of individual words and even the relationships among words. This analysis is a first step towards understanding how the multi-head self-attention mechanisms of the Transformer architecture address the irony detection problem.

[1]  H. Grice Logic and conversation , 1975 .

[2]  Paolo Rosso,et al.  Irony detection via sentiment-based transfer learning , 2019, Inf. Process. Manag..

[3]  Muhammad Abdul-Mageed,et al.  Multi-Task Bidirectional Transformer Representations for Irony Detection , 2019, FIRE.

[4]  Deirdre Wilson,et al.  On verbal irony , 1992 .

[5]  Jeffrey Pennington,et al.  GloVe: Global Vectors for Word Representation , 2014, EMNLP.

[6]  Iñaki San Vicente,et al.  Elhuyar at TASS 2013 , 2013 .

[7]  Omer Levy,et al.  RoBERTa: A Robustly Optimized BERT Pretraining Approach , 2019, ArXiv.

[8]  Ewan Klein,et al.  Natural Language Processing with Python , 2009 .

[9]  Geoffrey E. Hinton,et al.  Layer Normalization , 2016, ArXiv.

[10]  Janyce Wiebe,et al.  Recognizing Contextual Polarity in Phrase-Level Sentiment Analysis , 2005, HLT.

[11]  Nathalie Aussenac-Gilles,et al.  Towards a Contextual Pragmatic Model to Detect Irony in Tweets , 2015, ACL.

[12]  Pushpak Bhattacharyya,et al.  Automatic Sarcasm Detection , 2016, ACM Comput. Surv..

[13]  Wei Shi,et al.  Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification , 2016, ACL.

[14]  Penelope Brown,et al.  Politeness: Some Universals in Language Usage , 1989 .

[15]  Paolo Rosso,et al.  A survey on author profiling, deception, and irony detection for the Arabic language , 2018, Lang. Linguistics Compass.

[16]  Véronique Hoste,et al.  SemEval-2018 Task 3: Irony Detection in English Tweets , 2018, *SEMEVAL.

[17]  Pierre Schoentjes,et al.  La poética de la ironía , 2003 .

[18]  Paolo Rosso,et al.  Overview of the EVALITA 2018 Task on Irony Detection in Italian Tweets (IronITA) , 2018, EVALITA@CLiC-it.

[19]  Chuhan Wu,et al.  THU_NGN at SemEval-2018 Task 3: Tweet Irony Detection with Densely connected LSTM and Multi-task Learning , 2018, *SEMEVAL.

[20]  José-Ángel González,et al.  ELiRF-UPV at SemEval-2019 Task 3: Snapshot Ensemble of Hierarchical Convolutional Neural Networks for Contextual Emotion Detection , 2019, *SEMEVAL.

[21]  Yann Dauphin,et al.  Convolutional Sequence to Sequence Learning , 2017, ICML.

[22]  Paul F Rouzer,et al.  The Princeton encyclopedia of poetry and poetics , 2012 .

[23]  Francisco Yus,et al.  Propositional attitude, affective attitude and irony comprehension , 2016 .

[24]  Yanfen Hao,et al.  Support Structures for Linguistic Creativity: A Computational Analysis of Creative Irony in Similes , 2009 .

[25]  Javier Iranzo-Sánchez,et al.  VRAIN at IroSva 2019: Exploring Classical and Transfer Learning Approaches to Short Message Irony Detection , 2019, IberLEF@SEPLN.

[26]  José-Ángel González,et al.  ELiRF-UPV at SemEval-2018 Tasks 1 and 3: Affect and Irony Detection in Tweets , 2018, *SEMEVAL.

[27]  Anil Kumar Singh,et al.  NLPRL-IITBHU at SemEval-2018 Task 3: Combining Linguistic Features and Emoji pre-trained CNN for Irony Detection in Tweets , 2018, *SEMEVAL.

[28]  Paolo Rosso,et al.  SemEval-2015 Task 11: Sentiment Analysis of Figurative Language in Twitter , 2015, *SEMEVAL.

[29]  José-Ángel González,et al.  ELiRF-UPV at IroSvA: Transformer Encoders for Spanish Irony Detection , 2019, IberLEF@SEPLN.

[30]  José-Ángel González,et al.  ELiRF-UPV en TASS 2018: Análisis de Sentimientos en Twitter basado en Aprendizaje Profundo (ELiRF-UPV at TASS 2018: Sentiment Analysis in Twitter based on Deep Learning) , 2018, TASS@SEPLN.

[31]  Martin Wattenberg,et al.  SmoothGrad: removing noise by adding noise , 2017, ArXiv.

[32]  Alessandra Teresa Cignarella,et al.  ATC at IroSvA 2019: Shallow Syntactic Dependency-based Features for Irony Detection in Spanish Variants , 2019, IberLEF@SEPLN.

[33]  Lei Zhang,et al.  Sentiment Analysis and Opinion Mining , 2017, Encyclopedia of Machine Learning and Data Mining.

[34]  Verónica Pérez-Rosas,et al.  Towards Multimodal Sarcasm Detection (An _Obviously_ Perfect Paper) , 2019, ACL.

[35]  Andrew Slavin Ross,et al.  Right for the Right Reasons: Training Differentiable Models by Constraining their Explanations , 2017, IJCAI.

[36]  Lukasz Kaiser,et al.  Attention is All you Need , 2017, NIPS.

[37]  Ellen Riloff,et al.  Sarcasm as Contrast between a Positive Sentiment and Negative Situation , 2013, EMNLP.

[38]  Richard Evans,et al.  WLV at SemEval-2018 Task 3: Dissecting Tweets in Search of Irony , 2018, *SEMEVAL.

[39]  José-Ángel González,et al.  ELiRF-UPV en TASS 2018: Categorización Emocional de Noticias(ELiRF-UPV at TASS 2018: Emotional Categorization of News Articles) , 2018, TASS@SEPLN.

[40]  Hal Daumé,et al.  Deep Unordered Composition Rivals Syntactic Methods for Text Classification , 2015, ACL.

[41]  José-Ángel González,et al.  ELiRF-UPV at SemEval-2017 Task 4: Sentiment Analysis using Deep Learning , 2017, SemEval@ACL.

[42]  Finn Årup Nielsen,et al.  A New ANEW: Evaluation of a Word List for Sentiment Analysis in Microblogs , 2011, #MSM.

[43]  Ming-Wei Chang,et al.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding , 2019, NAACL.

[44]  Preslav Nakov,et al.  SemEval-2014 Task 9: Sentiment Analysis in Twitter , 2014, *SEMEVAL.

[45]  Luis Alfonso Ureña López,et al.  Bilingual Experiments on an Opinion Comparable Corpus , 2013, WASSA@NAACL-HLT.

[46]  Paolo Rosso,et al.  Figurative messages and affect in Twitter: Differences between #irony, #sarcasm and #not , 2016, Knowl. Based Syst..

[47]  Adrián Pastor López-Monroy,et al.  Early Fusion of Traditional and Deep Features for Irony Detection in Twitter , 2019, IberLEF@SEPLN.

[48]  Byron C. Wallace,et al.  Sparse, Contextually Informed Models for Irony Detection: Exploiting User Communities, Entities and Sentiment , 2015, ACL.

[49]  Pushpak Bhattacharyya,et al.  Harnessing Context Incongruity for Sarcasm Detection , 2015, ACL.

[50]  Paolo Rosso,et al.  Overview of the Task on Irony Detection in Spanish Variants , 2019, IberLEF@SEPLN.

[51]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[52]  Nitish Srivastava,et al.  Dropout: a simple way to prevent neural networks from overfitting , 2014, J. Mach. Learn. Res..

[53]  RossoPaolo,et al.  Figurative messages and affect in Twitter , 2016 .

[54]  Paolo Rosso,et al.  Irony Detection in Twitter , 2016, ACM Trans. Internet Techn..

[55]  Jeffrey Dean,et al.  Distributed Representations of Words and Phrases and their Compositionality , 2013, NIPS.

[56]  Herbert L. Colston,et al.  A brief history of irony. , 2007 .

[57]  Dai Quoc Nguyen,et al.  NIHRIO at SemEval-2018 Task 3: A Simple and Accurate Neural Network Model for Irony Detection in Twitter , 2018, *SEMEVAL.

[58]  Saif Mohammad,et al.  CROWDSOURCING A WORD–EMOTION ASSOCIATION LEXICON , 2013, Comput. Intell..

[59]  Fernando Poyatos,et al.  La comunicación no verbal , 1994 .

[60]  Verena Rieser,et al.  An Arabic Twitter Corpus for Subjectivity and Sentiment Analysis , 2014, LREC.

[61]  Shrikanth Narayanan,et al.  NTUA-SLP at SemEval-2018 Task 1: Predicting Affective Content in Tweets with Deep Attentive RNNs and Transfer Learning , 2018, *SEMEVAL.

[62]  Yoon Kim,et al.  Convolutional Neural Networks for Sentence Classification , 2014, EMNLP.

[63]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[64]  Véronique Hoste,et al.  We Usually Don’t Like Going to the Dentist: Using Common Sense to Detect Irony on Twitter , 2018, CL.

[65]  Jonathon Shlens,et al.  Explaining and Harnessing Adversarial Examples , 2014, ICLR.

[66]  Erik Cambria,et al.  A Deeper Look into Sarcastic Tweets Using Deep Convolutional Neural Networks , 2016, COLING.