Leveraging Offensive Language for Sarcasm and Sentiment Detection in Arabic
Summary
The authors address sarcasm detection and three-way sentiment classification for informal, multi-dialect Arabic tweets in the WANLP 2021 shared task. They hypothesize that sarcastic and negative tweets often contain offensive language. To test this, they first fine-tune a BERT model on nine Arabic offensive-language datasets, with all labels collapsed to offensive vs. not offensive. They then fine-tune it again on ArSarcasm-v2. Before training, each tweet gets a word naming its dialect appended as an extra token.
Two systems were submitted:
- one built on AraBERT;
- one built on SalamBERT, an AraBERT variant with an enlarged vocabulary and further pre-training on the dialectal MADAR corpus.
On the development data, the offensive-language transfer models and the plain baselines performed almost the same. On the official test set, SalamBERT did better on sarcasm (12th of 27 teams) and AraBERT did better on sentiment (12th of 22). The authors conclude that the transfer helps sarcasm more than sentiment. However, no transfer-free baseline was scored on the test set. The work matters mainly as an early probe of how offensive, ironic and negative language overlap.
Key points
- Data: ArSarcasm-v2 has 15,548 tweets, each labeled for sentiment, sarcasm and dialect. The authors split the training portion 80/20 for development. Sarcastic tweets are a small minority (1,749 vs. 8,289 in their training part).
- Transfer corpora: nine offensive and hate-speech sets, including OSACT4, L-HSAB, T-HSAB, MPOLD, Religious Hate Speech and Aljazeera.net Deleted Comments. Hate and abusive classes were merged into a single offensive label.
- Model: aubmindlab/bert-base-arabert with a feed-forward classification head, fine-tuned with max length 256, batch size 8, 4 epochs and learning rate 3e-5. SalamBERT extends it with MADAR dialect data.
- Development results: differences between models were described as insignificant.
- Sarcasm-class F1 rose slightly with transfer for SalamBERT (0.56 → 0.58).
- It fell for AraBERT (0.57 → 0.54).
- Test results:
- Sarcasm F1: SalamBERT 0.5348, AraBERT 0.5041.
- Sentiment F-PN: AraBERT 0.6877, SalamBERT 0.6259.
Interesting ideas
- I1. Metadata such as dialect is fed to the model by appending a meaningful word to the input, instead of adding a separate feature channel. This is a cheap way to condition a pretrained encoder on context. — For Mova (tree): when training gparse on mixed treebanks, a pseudo-token naming the source treebank or UD dialect could let one parser learn per-convention differences explicitly and inspectably.
- I2. Heterogeneous corpora with incompatible label schemes were reduced to one shared coarse label so they could all feed a single training stage. — For Mova (learn): silver and gold sources with differing annotation detail could be mapped to a common coarse layer before agreement voting, with the mapping table kept as an explainable artifact.
- I3. The authors treat hostility, negativity and sarcasm as related but distinct phenomena, using one as an auxiliary signal for another. — For Mova (frames): the irony component in prag could use an evaluative or hostility cue as one explicit piece of evidence, without equating hostility with irony.
- I4. The error analysis exposed lexical confounds. Insulting but literal tweets were flagged as sarcastic, and neutral sports news containing "hit" was marked negative. — For Mova (learn): build negative-control sets where trigger words appear without the target phenomenon, to check that irony and sentiment decisions rest on structure rather than single words.
Cited by
- Towards the Development of Balanced Synthetic Data for Correcting Grammatical Errors in Arabic: An Approach Based on Error Tagging Model and Synthetic Data Generating Model
- Arabic Sentiment Analysis with Noisy Deep Explainable Model
- Overview of the WANLP 2021 Shared Task on Sarcasm and Sentiment Detection in Arabic
Cite
@inproceedings{husain2021leveraging,
title = {{Leveraging Offensive Language for Sarcasm and Sentiment Detection in Arabic}},
author = {Husain, Fatemah and Uzuner, Ozlem},
booktitle = {Proceedings of the Sixth Arabic Natural Language Processing Workshop},
year = {2021},
url = {https://aclanthology.org/2021.wanlp-1.47/}
}References
- AbdelRahim Elmadany, Chiyu Zhang, Muhammad Abdul-Mageed, and Azadeh Hashemi. 2020. Leveraging affective bidirectional transformers for offensive language detection. find
- Ibrahim Abu Farha and Walid Magdy. 2019. Mazajak: An online arabic sentiment analyser. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 192–198. find
- Hatem Haddad, Hala Mulki, and Asma Oueslati. 2019. T-hsab: A tunisian hate speech and abusive dataset. In Arabic Language Processing: From Theory to Practice, pages 251–263, Cham. Springer International Publishing. find
- Batoul Haidar, Maroun Chamoun, and Ahmed Serhrouchni. 2017. Multilingual cyberbullying detection system: Detecting cyberbullying in arabic content. In 2017 1st Cyber Security in Networking Conference (CSNet), pages 1–8. find
- Amr Keleg, Samhaa R. El-Beltagy, and Mahmoud Khalil. 2020. ASU_OPTO at OSACT4 - offensive language detection for Arabic text. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 66–70, Marseille, France. European Language Resource Association. find
- Hamdy Mubarak, Kareem Darwish, and Walid Magdy. 2017. Abusive language detection on Arabic social media. In Proceedings of the First Workshop on Abusive Language Online, pages 52–56, Vancouver, BC, Canada. Association for Computational Linguistics. find our card
- Hamdy Mubarak, Kareem Darwish, Walid Magdy, Tamer Elsayed, and Hend Al-Khalifa. 2020. Overview of osact4 arabic offensive language detection shared task. 4. find
- Hala Mulki, Hatem Haddad, Chedi Bechikh Ali, and Halima Alshabani. 2019. L-HSAB: A Levantine twitter dataset for hate speech and abusive language. In Proceedings of the Third Workshop on Abusive Language Online, pages 111–118, Florence, Italy. Association for Computational Linguistics. find
- Ahmed Omar, Tarek M. Mahmoud, and Tarek Abd-El-Hafeez. 2020. Comparative performance of machine learning and deep learning algorithms for arabic hate speech detection in osns. In Proceedings of the International Conference on Artificial Intelligence and Computer Vision (AICV2020), pages 247– 257, Cham. Springer International Publishing. find
- Silviu Oprea and Walid Magdy. 2019. Exploring author context for detecting intended vs perceived sarcasm. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2854–2859, Florence, Italy. Association for Computational Linguistics. ↗ our card
- Mohammad Salameh, Houda Bouamor, and Nizar Habash. 2018. Fine-grained Arabic dialect identification. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1332–1344, Santa Fe, New Mexico, USA. Association for Computational Linguistics. find our card
This page in Markdown → https://md.research.elamur.ai/free/en/papers/husain-2021-leveraging-offensive-language-sarcasm-sentiment/