---
title: "Deep Multi-Task Model for Sarcasm Detection — Mahdaouy 2021"
description: "Sarcasm and irony often reverse the apparent polarity of a message, so Arabic sentiment analysis (SA) on social media suffers when the two problems are…"
authors: ["Abdelkader El Mahdaouy", "Abdellah El Mekki", "Kabil Essefar", "Nabil El Mamoun", "Ismail Berrada", "Ahmed Khoumsi"]
year: 2021
venue: "Proceedings of the Sixth Arabic Natural Language Processing Workshop"
source: "https://aclanthology.org/2021.wanlp-1.42/"
arxiv: "2106.12488"
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/en/papers/mahdaouy-2021-deep-multi-task-model-sarcasm/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/mahdaouy-2021-deep-multi-task-model-sarcasm/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Deep Multi-Task Model for Sarcasm Detection and Sentiment Analysis in Arabic Language

# Deep Multi-Task Model for Sarcasm Detection and Sentiment Analysis in Arabic Language

**Authors:** Abdelkader El Mahdaouy, Abdellah El Mekki, Kabil Essefar, Nabil El Mamoun, Ismail Berrada, Ahmed Khoumsi · **Year:** 2021 · **Venue:** Proceedings of the Sixth Arabic Natural Language Processing Workshop · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2021.wanlp-1.42/) · [PDF](https://aclanthology.org/2021.wanlp-1.42.pdf) · [arXiv 2106.12488](https://arxiv.org/abs/2106.12488) · [OpenAlex](https://openalex.org/W3156052545)

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

## Summary
Sarcasm and irony often reverse the apparent polarity of a message, so Arabic sentiment analysis (SA) on social media suffers when the two problems are handled separately. For the ArSarcasm shared task at WANLP 2021, the authors build one end-to-end multi-task network that learns both jointly.

The pre-trained MARBERT model encodes each tweet. Each task then gets its own attention layer, which pools the token embeddings into a task-focused vector. A Sigmoid interaction layer with a shared learnable matrix lets the two task vectors gate each other. Each classifier combines its interacted vector with the [CLS] embedding. Training minimizes the sum of binary cross-entropy (sarcasm) and cross-entropy (sentiment).

On ArSarcasm-v2, multi-task variants generally beat single-task baselines, most clearly on the sarcastic-class F1 and on the F1 averaged over positive and negative classes. The submitted system ranked first in the SA subtask and fourth in sarcasm detection. This suggests that sharing signals between these closely related tasks pays off.

## Key points
- **Data:** ArSarcasm-v2 has 12,548 training and 3,000 test tweets, labeled for sarcasm, sentiment and regional dialect.
  - Both subtasks are imbalanced, and about half of the tweets are neutral.
  - Most sarcastic tweets are in MSA or Egyptian dialect and carry negative sentiment.
- **Compared models:** The proposed MTL ATTINTER was tested against ST, ST ATT, MTL and MTL ATT.
  - Training setup: Adam optimizer, learning rate 5×10⁻⁶, batch size 64, 5 epochs, 80/20 train/dev split of the training data.
- **Dev results:** MTL ATTINTER scored best on sarcasm macro-F1 (0.7846), F1 Sarc (0.6522) and sentiment F1 PN (0.7358).
  - On the test set, MTL ATT was slightly higher on F1 Sarc (0.617) and F1 PN (0.752).
- **Official submission (MTL ATTINTER):**
  - Sentiment: F1 PN 0.7480, accuracy 0.7107.
  - Sarcasm: F1 Sarc 0.6000, macro-F1 0.7183.
  - Ranking: 1st in SA, 4th in sarcasm detection.
- **Error analysis:** Confusion matrices indicate the model exploits the link between negativity and sarcasm.
  - Negative tweets are more likely than positive ones to be sarcastic.

*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/en/shelves/linguistics/)

## Cited by

Cited by

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

- [Overview of the WANLP 2021 Shared Task on Sarcasm and Sentiment Detection in Arabic](https://md.research.elamur.ai/free/en/papers/farha-2021-overview-wanlp-2021-shared-task/)
- [Sarcasm Detection is Way Too Easy! An Empirical Comparison of Human and Machine Sarcasm Detection](https://md.research.elamur.ai/free/en/papers/farha-2022-sarcasm-detection-is-way-too/)
- [Multi-source Semantic Graph-based Multimodal Sarcasm Explanation Generation](https://md.research.elamur.ai/free/en/papers/jing-2023-multi-source-semantic-graph-based/)

## Cite

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

```bibtex
@inproceedings{mahdaouy2021deep,
  title = {{Deep Multi-Task Model for Sarcasm Detection and Sentiment Analysis in Arabic Language}},
  author = {Mahdaouy, Abdelkader El and Mekki, Abdellah El and Essefar, Kabil and Mamoun, Nabil El and Berrada, Ismail and Khoumsi, Ahmed},
  booktitle = {Proceedings of the Sixth Arabic Natural Language Processing Workshop},
  year = {2021},
  eprint = {2106.12488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.12488}
}
```

- [← previous DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representations](https://md.research.elamur.ai/free/en/papers/giorgi-2021-declutr-deep-contrastive-learning-unsupervised/)
- [next → Defining Definiteness in Turoyo](https://md.research.elamur.ai/free/en/papers/lingbulk-2021-yifrach-defining-definiteness-turoyo/)
- [↑ back to papers of 2021](https://md.research.elamur.ai/free/en/papers/2021/)

## References

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

1. Ibrahim Abu Farha, Wajdi Zaghouani, and Walid Magdy. 2021. Overview of the wanlp 2021 shared task on sarcasm and sentiment detection in arabic. In Proceedings of the Sixth Arabic Natural Language Processing Workshop. [find](https://scholar.google.com/scholar?q=Ibrahim+Abu+Farha%2C+Wajdi+Zaghouani%2C+and+Walid+Magdy%2E+2021%2E+Overview+of+the+wanlp+2021+shared+task+on+sarcasm+and+sentiment+detection+in+arabic%2E+In+Proceedings+of+the+Sixth+Arabic+Natural+Language+Proc) [our card](https://md.research.elamur.ai/free/en/papers/farha-2021-overview-wanlp-2021-shared-task/)
2. Ines Abbes, Wajdi Zaghouani, Omaima El-Hardlo, and Faten Ashour. 2020. DAICT: A dialectal arabic irony corpus extracted from twitter. In Proceedings of The 12th Language Resources and Evaluation Conference, LREC 2020, Marseille, France, May 11-16, 2020, pages 6265–6271. European Language Resources Association. [find](https://scholar.google.com/scholar?q=Ines+Abbes%2C+Wajdi+Zaghouani%2C+Omaima+El%2DHardlo%2C+and+Faten+Ashour%2E+2020%2E+DAICT%3A+A+dialectal+arabic+irony+corpus+extracted+from+twitter%2E+In+Proceedings+of+The+12th+Language+Resources+and+Evaluation+Confe) [our card](https://md.research.elamur.ai/free/en/papers/abbes-2020-daict-dialectal-arabic-irony-corpus/)
3. Muhammad Abdul-Mageed, AbdelRahim Elmadany, and El Moatez Billah Nagoudi. 2020. Arbert & marbert: Deep bidirectional transformers for arabic. arXiv preprint arXiv:2101.01785. [↗](https://arxiv.org/abs/2101.01785) [our card](https://md.research.elamur.ai/free/en/papers/abdul-2021-mageed-arbert-marbert-deep-bidirectional-transformers/)
4. Ibrahim Abu Farha and Walid Magdy. 2020. From arabic sentiment analysis to sarcasm detection: The arsarcasm dataset. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 32–39. [find](https://scholar.google.com/scholar?q=Ibrahim+Abu+Farha+and+Walid+Magdy%2E+2020%2E+From+arabic+sentiment+analysis+to+sarcasm+detection%3A+The+arsarcasm+dataset%2E+In+Proceedings+of+the+4th+Workshop+on+Open%2DSource+Arabic+Corpora+and+Processing+Too) [our card](https://md.research.elamur.ai/free/en/papers/farha-2020-arabic-sentiment-analysis-sarcasm-detection/)
5. Mahmoud Al-Ayyoub, Abed Allah Khamaiseh, Yaser Jararweh, and Mohammed N. Al-Kabi. 2019. A comprehensive survey of arabic sentiment analysis. Information Processing & Management, 56(2):320 – 342. Advance Arabic Natural Language Processing (ANLP) and its Applications. [↗](https://doi.org/10.1016/j.ipm.2018.07.006)
6. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. Arabert: Transformer-based model for arabic language understanding. In LREC 2020 Workshop Language Resources and Evaluation Conference 11–16 May 2020, page 9. [↗](https://doi.org/10.48550/arxiv.2003.00104) [our card](https://md.research.elamur.ai/free/en/papers/antoun-2020-arabert-transformer-based-model-arabic/)
7. Gilbert Badaro, Ramy Baly, Hazem Hajj, Wassim El-Hajj, Khaled Bashir Shaban, Nizar Habash, Ahmad Al-Sallab, and Ali Hamdi. 2019. A survey of opinion mining in arabic: A comprehensive system perspective covering challenges and advances in tools, resources, models, applications, and visualizations. ACM Trans. Asian Low-Resour. Lang. Inf. Process., 18(3). [find](https://scholar.google.com/scholar?q=Gilbert+Badaro%2C+Ramy+Baly%2C+Hazem+Hajj%2C+Wassim+El%2DHajj%2C+Khaled+Bashir+Shaban%2C+Nizar+Habash%2C+Ahmad+Al%2DSallab%2C+and+Ali+Hamdi%2E+2019%2E+A+survey+of+opinion+mining+in+arabic%3A+A+comprehensive+system+perspectiv)
8. 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: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/n19-1423)
9. Delia Irazú Hernańdez Farı́as, Viviana Patti, and Paolo Rosso. 2016. Irony detection in twitter: The role of affective content. ACM Trans. Internet Technol., 16(3). [find](https://scholar.google.com/scholar?q=Delia+Irazu%CC%81+Hernan%CC%81dez+Far%C4%B1%CC%81as%2C+Viviana+Patti%2C+and+Paolo+Rosso%2E+2016%2E+Irony+detection+in+twitter%3A+The+role+of+affective+content%2E+ACM+Trans%2E+Internet+Technol%2E%2C+16%283%29%2E)
10. Bilal Ghanem, Jihen Karoui, Farah Benamara, Véronique Moriceau, and Paolo Rosso. 2019. Idat at fire2019: Overview of the track on irony detection in arabic tweets. In Proceedings of the 11th Forum for Information Retrieval Evaluation, FIRE ’19, page 10–13, New York, NY, USA. Association for Computing Machinery. [find](https://scholar.google.com/scholar?q=Bilal+Ghanem%2C+Jihen+Karoui%2C+Farah+Benamara%2C+Ve%CC%81ronique+Moriceau%2C+and+Paolo+Rosso%2E+2019%2E+Idat+at+fire2019%3A+Overview+of+the+track+on+irony+detection+in+arabic+tweets%2E+In+Proceedings+of+the+11th+Forum+fo)
11. Bilal Ghanem, Jihen Karoui, Farah Benamara, Paolo Rosso, and Véronique Moriceau. 2020. Irony detection in a multilingual context. In Advances in Information Retrieval - 42nd European Conference on IR Research, ECIR 2020, Lisbon, Portugal, April 14-17, 2020, Proceedings, Part II, volume 12036 of Lecture Notes in Computer Science, pages 141–149. Springer. [find](https://scholar.google.com/scholar?q=Bilal+Ghanem%2C+Jihen+Karoui%2C+Farah+Benamara%2C+Paolo+Rosso%2C+and+Ve%CC%81ronique+Moriceau%2E+2020%2E+Irony+detection+in+a+multilingual+context%2E+In+Advances+in+Information+Retrieval+%2D+42nd+European+Conference+on+IR)
12. Delia Irazú Farias Hernández Farı́as and Paolo Rosso. 2017. Chapter 7 - irony, sarcasm, and sentiment analysis. In Federico Alberto Pozzi, Elisabetta Fersini, Enza Messina, and Bing Liu, editors, Sentiment Analysis in Social Networks, pages 113–128. Morgan Kaufmann, Boston. [find](https://scholar.google.com/scholar?q=Delia+Irazu%CC%81+Farias+Herna%CC%81ndez+Far%C4%B1%CC%81as+and+Paolo+Rosso%2E+2017%2E+Chapter+7+%2D+irony%2C+sarcasm%2C+and+sentiment+analysis%2E+In+Federico+Alberto+Pozzi%2C+Elisabetta+Fersini%2C+Enza+Messina%2C+and+Bing+Liu%2C+editors%2C+Se)
13. Jihen Karoui, Farah Banamara Zitoune, and Véronique Moriceau. 2017. Soukhria: Towards an irony detection system for arabic in social media. Procedia Computer Science, 117:161–168. Arabic Computational Linguistics. [find](https://scholar.google.com/scholar?q=Jihen+Karoui%2C+Farah+Banamara+Zitoune%2C+and+Ve%CC%81ronique+Moriceau%2E+2017%2E+Soukhria%3A+Towards+an+irony+detection+system+for+arabic+in+social+media%2E+Procedia+Computer+Science%2C+117%3A161%E2%80%93168%2E+Arabic+Computationa)
14. Man Lan, Jianxiang Wang, Yuanbin Wu, Zheng-Yu Niu, and Haifeng Wang. 2017. Multi-task attention-based neural networks for implicit discourse relationship representation and identification. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pages 1299–1308. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Man+Lan%2C+Jianxiang+Wang%2C+Yuanbin+Wu%2C+Zheng%2DYu+Niu%2C+and+Haifeng+Wang%2E+2017%2E+Multi%2Dtask+attention%2Dbased+neural+networks+for+implicit+discourse+relationship+representation+and+identification%2E+In+Proceedi) [our card](https://md.research.elamur.ai/free/en/papers/lan-2017-multi-task-attention-based-neural/)
15. Oumaima Oueslati, Erik Cambria, Moez Ben HajH-mida, and Habib Ounelli. 2020. A review of sentiment analysis research in arabic language. Future Generation Computer Systems, 112:408 – 430. [find](https://scholar.google.com/scholar?q=Oumaima+Oueslati%2C+Erik+Cambria%2C+Moez+Ben+HajH%2Dmida%2C+and+Habib+Ounelli%2E+2020%2E+A+review+of+sentiment+analysis+research+in+arabic+language%2E+Future+Generation+Computer+Systems%2C+112%3A408+%E2%80%93+430%2E)
16. Shiwei Zhang, Xiuzhen Zhang, Jeffrey Chan, and Paolo Rosso. 2019. Irony detection via sentiment-based transfer learning. Information Processing Management, 56(5):1633–1644. [↗](https://doi.org/10.1016/j.ipm.2019.04.006)
