Elamur Research

Sarcasm Identification and Detection in Conversion Context using BERT

Paper · 2020 · Kalaivani A. and Thenmozhi D.

Summary

This paper describes a system built for the FigLang 2020 shared task, which challenges participants to identify sarcasm within conversations taking place on social media. Each instance is a reply (response) to a dialogue thread (context), and the goal is to label it SARCASM or NOT_SARCASM. The authors also examine how much of the preceding conversation actually helps the decision.

They work with the organisers' Twitter and Reddit datasets. The pipeline cleans social-media noise: user mentions, URLs, hashtags, elongated words, censored profanity, contractions and run-together words. Three families of models are then compared:

  • classical classifiers on Doc2Vec or TF-IDF features;
  • an RNN-LSTM with Word2Vec embeddings;
  • a fine-tuned uncased BERT model.

Each is fed different combinations of context and response.

BERT trained on the response alone gives the best scores on both forums. Adding the conversation context did not improve results. The LSTM struggled on such small training sets. For anyone building sarcasm or offensive-language classifiers, the takeaway is practical: with little data, a pretrained transformer on the target utterance is a strong baseline, and longer dialogue context is not automatically useful.

Key points

  • Data: Twitter train has 5,000 balanced instances (2,500 per class), and Reddit train has 4,400 (2,200 per class). Each test set contains 1,800 items.
  • Best results: the system scored macro-F1 0.722 on Twitter and 0.679 on Reddit, both with BERT on the isolated response (R). On Twitter, combining context with the response (CR) dropped F1 to 0.671.
  • Classical baselines: LR, RF, XGBoost, linear SVC and Gaussian NB were tested. TF-IDF features clearly beat Doc2Vec, which stayed near chance (about 0.50 cross-validation accuracy). The authors attribute this to ungrammatical text.
  • LSTM: the RNN-LSTM performed poorly (F1 0.361 on Twitter CR), which the authors blame on the small dataset size.
  • BERT setup: uncased model with batch size 32, learning rate 2e-5, 3 epochs and warmup proportion 0.1.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works

 Topics 1Research subjects and languages the work is about.Sentiment & emotion · 1,037 works

Cite

Cite as Kalaivani A. and Thenmozhi D. 2020. Sarcasm Identification and Detection in Conversion Context using BERT. Proceedings of the Second Workshop on Figurative Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.figlang-1.10

@inproceedings{a2020sarcasm,
  title = {{Sarcasm Identification and Detection in Conversion Context using BERT}},
  author = {Kalaivani A. and Thenmozhi D.},
  booktitle = {Proceedings of the Second Workshop on Figurative Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.figlang-1.10},
  url = {https://doi.org/10.18653/v1/2020.figlang-1.10}
}

References

6 references, 5 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. Joshi, A., Bhattacharyya, P., and Carman, M. J. 2017. Automatic sarcasm detection: A survey. ACM Computing Surveys (CSUR), 50(5), 73.
  2. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
  3. Ghosh, D., Fabbri, A. R., and Muresan, S. 2018. Sarcasm analysis using conversation context. Computational Linguistics, 44(4), 755-792.
  4. Khodak, M., Saunshi, N., and Vodrahalli, K. 2017. A large self-annotated corpus for sarcasm. arXiv preprint arXiv:1704.05579.
  5. Aniruddha Ghosh, and Tony Veale. 2016. Fracking Sarcasm using Neural Network”, research gate publication, Conference Paper. DOI: 10.13140/RG.2.2.16560.15363.
  6. Keith Cortis, Andre Freitas, Tobias Daudert, Manuela Hurlimann, Manel Zarrouk, Siegfried Handschuh, and Brian Davis. 2017. SemEval-2017 Task 5: Fine-Grained Sentiment Analysis on Financial Microblogs and News”, Proceedings of the 11th OpenAlex ↗ · Scholar ↗

This page in Markdown https://md.research.elamur.ai/free/en/papers/a-2020-sarcasm-identification-detection-conversion-context/