Sarcasm Identification and Detection in Conversion Context using BERT
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.
Cited by
Cite
@inproceedings{a2020sarcasm,
title = {{Sarcasm Identification and Detection in Conversion Context using BERT}},
author = {A and 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
- Joshi, A., Bhattacharyya, P., and Carman, M. J. 2017. Automatic sarcasm detection: A survey. ACM Computing Surveys (CSUR), 50(5), 73. ↗ our card
- 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. ↗
- Ghosh, D., Fabbri, A. R., and Muresan, S. 2018. Sarcasm analysis using conversation context. Computational Linguistics, 44(4), 755-792. ↗ our card
- Khodak, M., Saunshi, N., and Vodrahalli, K. 2017. A large self-annotated corpus for sarcasm. arXiv preprint arXiv:1704.05579. ↗ our card
- Aniruddha Ghosh, and Tony Veale. 2016. Fracking Sarcasm using Neural Network”, research gate publication, Conference Paper. DOI: 10.13140/RG.2.2.16560.15363. ↗ our card
- 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 find
This page in Markdown → https://md.research.elamur.ai/free/papers/a-2020-sarcasm-identification-detection-conversion-context/