A transformer-based approach to irony and sarcasm detection

Figurative language (FL) seems ubiquitous in all social media discussion forums and chats, posing extra challenges to sentiment analysis endeavors. Identification of FL schemas in short texts remains largely an unresolved issue in the broader field of natural language processing, mainly due to their contradictory and metaphorical meaning content. The main FL expression forms are sarcasm, irony and metaphor. In the present paper, we employ advanced deep learning methodologies to tackle the problem of identifying the aforementioned FL forms. Significantly extending our previous work (Potamias et al., in: International conference on engineering applications of neural networks, Springer, Berlin, pp 164–175, 2019), we propose a neural network methodology that builds on a recently proposed pre-trained transformer-based network architecture which is further enhanced with the employment and devise of a recurrent convolutional neural network. With this setup, data preprocessing is kept in minimum. The performance of the devised hybrid neural architecture is tested on four benchmark datasets, and contrasted with other relevant state-of-the-art methodologies and systems. Results demonstrate that the proposed methodology achieves state-of-the-art performance under all benchmark datasets, outperforming, even by a large margin, all other methodologies and published studies.

[1]  Horacio Saggion,et al.  UPF-taln: SemEval 2015 Tasks 10 and 11. Sentiment Analysis of Literal and Figurative Language in Twitter , 2015, SemEval@NAACL-HLT.

[2]  Chu-Ren Huang,et al.  LLT-PolyU: Identifying Sentiment Intensity in Ironic Tweets , 2015, SemEval@NAACL-HLT.

[3]  Margaret J. Robertson,et al.  Design and Analysis of Experiments , 2006, Handbook of statistics.

[4]  Richárd Farkas,et al.  A comparative empirical study on social media sentiment analysis over various genres and languages , 2017, Artificial Intelligence Review.

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

[6]  Ari Rappoport,et al.  Semi-Supervised Recognition of Sarcasm in Twitter and Amazon , 2010, CoNLL.

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

[8]  Yiming Yang,et al.  Transformer-XL: Attentive Language Models beyond a Fixed-Length Context , 2019, ACL.

[9]  Davide Buscaldi,et al.  From humor recognition to irony detection: The figurative language of social media , 2012, Data Knowl. Eng..

[10]  Mathias Benedek,et al.  Creating metaphors: The neural basis of figurative language production , 2014, NeuroImage.

[11]  H. Grice Reasoning: Further Notes on Logic and Conversation , 2008 .

[12]  Alec Radford,et al.  Improving Language Understanding by Generative Pre-Training , 2018 .

[13]  Horacio Saggion,et al.  Modelling Irony in Twitter , 2014, EACL.

[14]  Загоровская Ольга Владимировна,et al.  Исследование влияния пола и психологических характеристик автора на количественные параметры его текста с использованием программы Linguistic Inquiry and Word Count , 2015 .

[15]  Hsin-Hsi Chen,et al.  Irony Detection with Attentive Recurrent Neural Networks , 2017, ECIR.

[16]  Mikhail Khodak,et al.  A Large Self-Annotated Corpus for Sarcasm , 2017, LREC.

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

[18]  Jerrold J. Katz Propositional Structure and Illocutionary Force: A Study of the Contribution of Sentence Meaning to Speech Acts , 1983 .

[19]  Kristopher Welsh,et al.  The danger of big data: Social media as computational social science , 2012, First Monday.

[20]  Véronique Hoste,et al.  Exploring the fine-grained analysis and automatic detection of irony on Twitter , 2018, Lang. Resour. Evaluation.

[21]  Byron C. Wallace,et al.  Modelling Context with User Embeddings for Sarcasm Detection in Social Media , 2016, CoNLL.

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

[23]  A. Pentland,et al.  Life in the network: The coming age of computational social science: Science , 2009 .

[24]  Ferran Plà,et al.  ELiRF: A Support Vector Machine Approach for Sentiment Analysis Tasks in Twitter at SemEval-2015 , 2015 .

[25]  Elisabetta Fersini,et al.  Unsupervised Irony Detection: A Probabilistic Model with Word Embeddings , 2016, KDIR.

[26]  Debanjan Ghosh,et al.  Sarcastic or Not: Word Embeddings to Predict the Literal or Sarcastic Meaning of Words , 2015, EMNLP.

[27]  Richard J. Gerrig,et al.  On the pretense theory of irony. , 1984, Journal of experimental psychology. General.

[28]  Sabine Bergler,et al.  CLaC-SentiPipe: SemEval2015 Subtasks 10 B,E, and Task 11 , 2015, *SEMEVAL.

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

[30]  Thorsten Brants,et al.  One billion word benchmark for measuring progress in statistical language modeling , 2013, INTERSPEECH.

[31]  Srini Narayanan,et al.  The Cambridge Handbook of Psycholinguistics: Computational Approaches to Figurative Language , 2012 .

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

[33]  V VasilakosAthanasios,et al.  Machine learning on big data , 2017 .

[34]  Dimitris Spathis,et al.  A comparison between semi-supervised and supervised text mining techniques on detecting irony in greek political tweets , 2016, Eng. Appl. Artif. Intell..

[35]  Puneet Agrawal,et al.  A Sentiment-and-Semantics-Based Approach for Emotion Detection in Textual Conversations , 2017, ArXiv.

[36]  Akshi Kumar,et al.  Sarcasm Detection Using Soft Attention-Based Bidirectional Long Short-Term Memory Model With Convolution Network , 2019, IEEE Access.

[37]  Kang Liu,et al.  Book Review: Sentiment Analysis: Mining Opinions, Sentiments, and Emotions by Bing Liu , 2015, CL.

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

[39]  K. Kendrick,et al.  Women prefer men who use metaphorical language when paying compliments in a romantic context , 2017, Scientific Reports.

[40]  Sebastian Ruder,et al.  Universal Language Model Fine-tuning for Text Classification , 2018, ACL.

[41]  Pushpak Bhattacharyya,et al.  "Having 2 hours to write a paper is fun!": Detecting Sarcasm in Numerical Portions of Text , 2017, ArXiv.

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

[43]  Tiger Zhou,et al.  Whole exome sequencing implicates eye development, the unfolded protein response and plasma membrane homeostasis in primary open-angle glaucoma , 2017, PloS one.

[44]  Tony Veale,et al.  Fracking Sarcasm using Neural Network , 2016, WASSA@NAACL-HLT.

[45]  Jeffrey Dean,et al.  Efficient Estimation of Word Representations in Vector Space , 2013, ICLR.

[46]  Omer Levy,et al.  SpanBERT: Improving Pre-training by Representing and Predicting Spans , 2019, TACL.

[47]  Guillaume Lample,et al.  Cross-lingual Language Model Pretraining , 2019, NeurIPS.

[48]  Philipp Cimiano,et al.  An Impact Analysis of Features in a Classification Approach to Irony Detection in Product Reviews , 2014, WASSA@ACL.

[49]  George Kurian,et al.  Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation , 2016, ArXiv.

[50]  Ekaterina Shutova,et al.  Computational approaches to figurative language , 2011 .

[51]  Matthijs Douze,et al.  FastText.zip: Compressing text classification models , 2016, ArXiv.

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

[53]  Joshua I Gold,et al.  Context Matters , 2004, Neuron.

[54]  Roman Klinger,et al.  A Survey on Sentiment and Emotion Analysis for Computational Literary Studies , 2018, ArXiv.

[55]  Quoc V. Le,et al.  Sequence to Sequence Learning with Neural Networks , 2014, NIPS.

[56]  Kazutaka Shimada,et al.  Sarcasm Detection Using Features Based on Indicator and Roles , 2018, SCDM.

[57]  Georgios Siolas,et al.  NTUA-ISLab at SemEval-2019 Task 9: Mining Suggestions in the wild , 2019, SemEval@NAACL-HLT.

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

[59]  Christopher D. Manning,et al.  Baselines and Bigrams: Simple, Good Sentiment and Topic Classification , 2012, ACL.

[60]  Jian Su,et al.  Reasoning with Sarcasm by Reading In-Between , 2018, ACL.

[61]  A. Pentland,et al.  Computational Social Science , 2009, Science.

[62]  Yutaka Matsuo,et al.  Deep contextualized word representations for detecting sarcasm and irony , 2018, WASSA@EMNLP.

[63]  Luke S. Zettlemoyer,et al.  Deep Contextualized Word Representations , 2018, NAACL.

[64]  Sanja Fidler,et al.  Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books , 2015, 2015 IEEE International Conference on Computer Vision (ICCV).

[65]  Richard Socher,et al.  Learned in Translation: Contextualized Word Vectors , 2017, NIPS.

[66]  L. Fogassi,et al.  How the Context Matters. Literal and Figurative Meaning in the Embodied Language Paradigm , 2014, PloS one.

[67]  Rada Mihalcea,et al.  CASCADE: Contextual Sarcasm Detection in Online Discussion Forums , 2018, COLING.

[68]  Ralph Grishman,et al.  Relation Extraction: Perspective from Convolutional Neural Networks , 2015, VS@HLT-NAACL.

[69]  D. Sperber,et al.  Irony and the Use-Mention Distinction , 1981 .

[70]  Georgios Paraskevopoulos,et al.  NTUA-SLP at SemEval-2018 Task 3: Tracking Ironic Tweets using Ensembles of Word and Character Level Attentive RNNs , 2018, *SEMEVAL.

[71]  Andreas Stafylopatis,et al.  A Robust Deep Ensemble Classifier for Figurative Language Detection , 2019, EANN.

[72]  Quoc V. Le,et al.  Semi-supervised Sequence Learning , 2015, NIPS.

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

[74]  Akshi Kumar,et al.  Empirical study of shallow and deep learning models for sarcasm detection using context in benchmark datasets , 2019, Journal of Ambient Intelligence and Humanized Computing.

[75]  Georgios Siolas,et al.  NTUA-ISLab at SemEval-2019 Task 3: Determining emotions in contextual conversations with deep learning , 2019, SemEval@NAACL-HLT.

[76]  Lance J. Rips,et al.  Reasoning : studies of human inference and its foundations , 2008 .

[77]  Véronique Hoste,et al.  LT3: Sentiment Analysis of Figurative Tweets: piece of cake #NotReally , 2015, SemEval@NAACL-HLT.

[78]  Mário J. Silva,et al.  Clues for detecting irony in user-generated contents: oh...!! it's "so easy" ;-) , 2009, TSA@CIKM.

[79]  Nan Hua,et al.  Universal Sentence Encoder , 2018, ArXiv.

[80]  Mahesh Mohan,et al.  Big Data Analytics and Social Media in Disaster Management , 2018 .

[81]  Nina Wacholder,et al.  Identifying Sarcasm in Twitter: A Closer Look , 2011, ACL.

[82]  Reza Zafarani,et al.  Sarcasm Detection on Twitter: A Behavioral Modeling Approach , 2015, WSDM.

[83]  Diego Reforgiato Recupero,et al.  Leveraging semantics for sentiment polarity detection in social media , 2019, Int. J. Mach. Learn. Cybern..

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

[85]  Yiming Yang,et al.  XLNet: Generalized Autoregressive Pretraining for Language Understanding , 2019, NeurIPS.

[86]  Charles E. Caton,et al.  Propositional Structure and Illocutionary Force: A Study of the Contribution of Sentence Meaning to Speech Acts , 1980 .

[87]  Athanasios V. Vasilakos,et al.  Machine learning on big data: Opportunities and challenges , 2017, Neurocomputing.

[88]  Paolo Rosso,et al.  A multidimensional approach for detecting irony in Twitter , 2013, Lang. Resour. Evaluation.

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

[90]  Guigang Zhang,et al.  Deep Learning , 2016, Int. J. Semantic Comput..

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

[92]  R. Gibbs On the psycholinguistics of sarcasm. , 1986 .

[93]  Arun Kumar Sangaiah,et al.  Sentiment analysis: a review and comparative analysis over social media , 2018, Journal of Ambient Intelligence and Humanized Computing.

[94]  Pushpak Bhattacharyya,et al.  “When Numbers Matter!”: Detecting Sarcasm in Numerical Portions of Text , 2019, WASSA@NAACL-HLT.

[95]  Jun Zhao,et al.  Recurrent Convolutional Neural Networks for Text Classification , 2015, AAAI.

[96]  François Laviolette,et al.  Domain-Adversarial Training of Neural Networks , 2015, J. Mach. Learn. Res..

[97]  K. Kasparian Hemispheric differences in figurative language processing: Contributions of neuroimaging methods and challenges in reconciling current empirical findings , 2013, Journal of Neurolinguistics.

[98]  Roman Klinger,et al.  An Empirical, Quantitative Analysis of the Differences Between Sarcasm and Irony , 2016, ESWC.

[99]  S. Ioannidis,et al.  Social media analysis during political turbulence , 2017, PloS one.

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

[101]  James Demmel,et al.  Reducing BERT Pre-Training Time from 3 Days to 76 Minutes , 2019, ArXiv.

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

[103]  Gui Xiaolin,et al.  Deep Convolution Neural Networks for Twitter Sentiment Analysis , 2018, IEEE Access.

[104]  Kumar Ravi,et al.  A novel automatic satire and irony detection using ensembled feature selection and data mining , 2017, Knowl. Based Syst..

[105]  Chandra Bhagavatula,et al.  Semi-supervised sequence tagging with bidirectional language models , 2017, ACL.

[106]  Cristina Bosco,et al.  Annotating Sentiment and Irony in the Online Italian Political Debate on #labuonascuola , 2016, LREC.

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

[108]  P. Schumacher,et al.  The role of literal meaning in figurative language comprehension: evidence from masked priming ERP , 2014, Front. Hum. Neurosci..