---
title: "Context-Aware Sarcasm Detection Using BERT — Baruah 2020"
description: "The paper examines whether conversational context helps detect sarcasm."
authors: ["Arup Baruah", "Kaushik Das", "Ferdous Barbhuiya", "Kuntal Dey"]
year: 2020
venue: "Proceedings of the Second Workshop on Figurative Language Processing"
source: "https://aclanthology.org/2020.figlang-1.12/"
doi: "10.18653/v1/2020.figlang-1.12"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/papers/baruah-2020-context-aware-sarcasm-detection-bert/"
---
[Elamur Research](https://md.research.elamur.ai/) · [this page in HTML](https://research.elamur.ai/free/papers/baruah-2020-context-aware-sarcasm-detection-bert/)

[home](https://md.research.elamur.ai/) / [papers](https://md.research.elamur.ai/free/papers/) / [2020](https://md.research.elamur.ai/free/papers/2020/page/2/) / Context-Aware Sarcasm Detection Using BERT

# Context-Aware Sarcasm Detection Using BERT

**Authors:** Arup Baruah, Kaushik Das, Ferdous Barbhuiya, [Kuntal Dey](https://md.research.elamur.ai/free/authors/kuntal-dey/) · **Year:** 2020 · **Venue:** Proceedings of the Second Workshop on Figurative Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2020.figlang-1.12/) · [PDF](https://aclanthology.org/2020.figlang-1.12.pdf) · [DOI 10.18653/v1/2020.figlang-1.12](https://doi.org/10.18653/v1/2020.figlang-1.12) · [OpenAlex](https://openalex.org/W3045548578)

**Citations:** 50 citations (openalex-snapshot · 2026-10-14) · [9](#cited-by) in our library, of the 140673 papers whose bibliographies we read

## Summary
The paper examines whether conversational context helps detect sarcasm. It describes the authors' submission to the sarcasm detection shared task held at the second FigLang workshop, a workshop devoted to processing figurative language, at ACL 2020. The task asks whether the final reply in a dialogue thread is sarcastic, using two balanced corpora: a Twitter dataset and a Reddit dataset.

The authors compared three classifiers:
- a fine-tuned uncased large BERT;
- a BiLSTM over 300-dimensional fastText vectors;
- a linear SVM on character n-gram TF-IDF features.

Context was added by joining the reply with zero, one, two, three, or all previous turns. The turns were placed newest-first and separated by a special token.

On Twitter, adding only the immediately preceding turn gave the best BERT score, though the gain over the reply alone was marginal. On Reddit, the reply without any context worked best. Runs using two or three prior turns collapsed, which the authors attribute to excessive padding at longer sequence lengths.

The study suggests that naive concatenation of context brings little benefit. It also shows that a strong pretrained encoder alone already beats the official baselines.

## Key points
- **Data:** the Twitter set has 5,000 training and 1,800 test instances, and the Reddit set has 4,400 training and 1,800 test instances. Both training sets are split 50/50 between sarcastic and non-sarcastic.
- **Twitter results:** BERT reached F1 0.743 with the reply plus the last turn (max sequence length 140), compared with 0.741 for the reply alone. BiLSTM scored 0.672 and SVM 0.676, against a baseline of 0.670.
- **Reddit results:** the best BERT F1 was 0.658 using the reply alone, against a baseline of 0.600. Using all turns gave 0.585.
- **Context failures:** with two or three prior turns, F1 dropped to about 0.50 and 0.33 on both datasets.
- **Ranking:** the submitted runs placed 14/36 (Twitter) and 21/37 (Reddit) on the CodaLab leaderboard. The best runs arrived after the deadline and were removed from the leaderboard.

*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: [Linguistics & languages](https://md.research.elamur.ai/free/shelves/linguistics/)

## Cited by

Cited by

9 papers of our library cite it (of the 140673 whose bibliographies we read); 2 of them have a page here, 7 not yet.

- [A Report on the 2020 Sarcasm Detection Shared Task](https://md.research.elamur.ai/free/papers/ghosh-2020-report-2020-sarcasm-detection-shared/)
- [TDMulti: A Tunisian Dialect-Modern Standard Arabic Multitask Corpus with a Context-Aware Cross-Attention BERT Model](https://md.research.elamur.ai/free/papers/torjmen-2026-tdmulti-tunisian-dialect-modern-standard/)

## Cite

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{baruah2020context,
  title = {{Context-Aware Sarcasm Detection Using BERT}},
  author = {Baruah, Arup and Das, Kaushik and Barbhuiya, Ferdous and Dey, Kuntal},
  booktitle = {Proceedings of the Second Workshop on Figurative Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.figlang-1.12},
  url = {https://doi.org/10.18653/v1/2020.figlang-1.12}
}
```

- [← previous Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Steps](https://md.research.elamur.ai/free/papers/ho-2020-constructing-multi-hop-qa-dataset/)
- [next → Contextualized Embeddings for Connective Disambiguation in Shallow Discourse Parsing](https://md.research.elamur.ai/free/papers/knaebel-2020-contextualized-embeddings-connective-disambiguation-shallow/)
- [↑ back to papers of 2020](https://md.research.elamur.ai/free/papers/2020/page/2/)

## References

7 references, 3 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. David Bamman and Noah A. Smith. 2015. Contextualized sarcasm detection on twitter. In Proceedings of the Ninth International Conference on Web and Social Media, ICWSM 2015, University of Oxford, Oxford, UK, May 26-29, 2015, pages 574–577. AAAI Press. [find](https://scholar.google.com/scholar?q=David+Bamman+and+Noah+A%2E+Smith%2E+2015%2E+Contextualized+sarcasm+detection+on+twitter%2E+In+Proceedings+of+the+Ninth+International+Conference+on+Web+and+Social+Media%2C+ICWSM+2015%2C+University+of+Oxford%2C+Oxfor)
2. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics, pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Jacob+Devlin%2C+Ming%2DWei+Chang%2C+Kenton+Lee%2C+and+Kristina+Toutanova%2E+2019%2E+BERT%3A+Pre%2Dtraining+of+deep+bidirectional+transformers+for+language+understanding%2E+In+Proceedings+of+the+2019+Conference+of+the+N)
3. Debanjan Ghosh, Alexander R Fabbri, and Smaranda Muresan. 2018. Sarcasm analysis using conversation context. Computational Linguistics, 44(4):755– 792. [↗](https://doi.org/10.1162/coli_a_00336) [our card](https://md.research.elamur.ai/free/papers/ghosh-2018-sarcasm-analysis-conversation-context/)
4. Debanjan Ghosh, Alexander Richard Fabbri, and Smaranda Muresan. 2017. The role of conversation context for sarcasm detection in online interactions. In Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue, Saarbrücken, Germany, August 15-17, 2017, pages 186–196. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Debanjan+Ghosh%2C+Alexander+Richard+Fabbri%2C+and+Smaranda+Muresan%2E+2017%2E+The+role+of+conversation+context+for+sarcasm+detection+in+online+interactions%2E+In+Proceedings+of+the+18th+Annual+SIGdial+Meeting+o) [our card](https://md.research.elamur.ai/free/papers/ghosh-2017-role-conversation-context-sarcasm-detection/)
5. Sam Glucksberg. 2001. Understanding Figurative Language: From Metaphor to Idioms. Oxford University Press, New York. [find](https://scholar.google.com/scholar?q=Sam+Glucksberg%2E+2001%2E+Understanding+Figurative+Language%3A+From+Metaphor+to+Idioms%2E+Oxford+University+Press%2C+New+York%2E)
6. Devamanyu Hazarika, Soujanya Poria, Sruthi Gorantla, Erik Cambria, Roger Zimmermann, and Rada Mihalcea. 2018. CASCADE: contextual sarcasm detection in online discussion forums. In Proceedings of the 27th International Conference on Computational Linguistics, COLING 2018, Santa Fe, New Mexico, USA, August 20-26, 2018, pages 1837–1848. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Devamanyu+Hazarika%2C+Soujanya+Poria%2C+Sruthi+Gorantla%2C+Erik+Cambria%2C+Roger+Zimmermann%2C+and+Rada+Mihalcea%2E+2018%2E+CASCADE%3A+contextual+sarcasm+detection+in+online+discussion+forums%2E+In+Proceedings+of+the+2) [our card](https://md.research.elamur.ai/free/papers/hazarika-2018-cascade-contextual-sarcasm-detection-online/)
7. Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. [↗](https://doi.org/10.1162/neco.1997.9.8.1735)
