ASU_OPTO at OSACT4 - Offensive Language Detection for Arabic text
Paper · 2020 · Amr Keleg, Samhaa R. El-Beltagy and Mahmoud Khalil
Summary
The paper describes the ASU_OPTO team's entry to the OSACT4 shared task on Arabic tweets. Subtask A asks whether a tweet is offensive in any way. Subtask B asks whether it contains hate speech aimed at a person or group.
The team compared five classifiers on Subtask A:
- a tf-idf character n-gram baseline with logistic regression,
- a CNN over AraVec embeddings,
- a BiLSTM over AraVec embeddings,
- fine-tuned multilingual BERT,
- fine-tuned AraBERT, whose input is segmented with Farasa.
AraBERT performed best. Multilingual BERT came out clearly behind it, which the authors take as a sign that Arabic needs a language-specific model and tokenization.
They then combined AraBERT with a lookup step. Any tweet containing a word from a morphologically expanded profanity list is forced to the offensive label. This hybrid gave a small further gain and placed fourth in Subtask A. The same AraBERT setup, retrained for hate speech, placed third in Subtask B.
The paper closes with an error analysis of annotation problems: inconsistent labels, quoted movie lines, and outright mislabeled tweets. It is useful for anyone weighing monolingual against multilingual transformers, or adding rule-based lexicons on top of neural classifiers.
Key points
-
Development macro-F1 on Subtask A:
Model Dev macro-F1 tf-idf + LR 0.746 CNN + Aravec 0.867 BiLSTM 0.869 multilingual BERT 0.826 AraBERT 0.876 AraBERT + profanity list 0.880 -
Official results: the hybrid scored 0.896 macro-F1 (4th place, Subtask A). The BiLSTM, their second-best system, scored 0.856. AraBERT on Subtask B scored 0.807 (3rd place).
-
Profanity lexicon: a seed list of 87 bad words grew to 5497 forms. The expansion used three steps:
- orthographic swaps (Taa-marbuta→Haa, Zain→Zaal),
- words found by manually inspecting the training data,
- prefix/suffix lists by part of speech; one verb alone yielded 113 forms.
-
Training setup: AraBERT was fine-tuned on 7000 training tweets for six epochs at learning rate 1e-5, with sequence length 64. Multilingual BERT used length 75 and three epochs.
-
Reproducibility: GPU training gave different results across runs despite a fixed seed of 42. The authors' workaround was to save the weights from several runs and keep the best one.
Interesting ideas
- I1. Generating every affix combination, including invalid ones, is harmless for precision, because forms that don't exist in the language never appear in real text.
- I2. A small, high-precision lexicon can override a neural classifier's decision, adding an explicit and inspectable rule on top of the learned model.
- I3. The error analysis looked for the same cue word appearing in tweets with opposite labels, which exposes inconsistent annotation.
- I4. Quoted movie lines can be offensive in literal meaning while not offensive in use, so the meaning depends on whether the speaker is quoting someone else.
- I5. Nondeterminism on GPUs persists even with a fixed seed, so a single run is not a trustworthy measurement.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (tokens): lemma lookup tables in crate en could be built by aggressive rule-based inflection without filtering, as long as they are used only for matching and never for generation.
- I2 (frames): insult or threat speech acts in prag could fire from a curated cue lexicon whose matches are logged as the explanation, with the statistical component used only as a fallback.
- I3 (learn): silver data could be audited by grouping items that share an identical lexical or structural cue and flagging conflicting labels before training.
- I4 (frames): quoted or reported speech should be marked so its speech act is attributed to the quoted voice, not to the author, which also helps irony detection.
- I5 (learn): gparse evaluations could train several runs, keep every checkpoint, and report the spread across runs alongside the best result.
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works
🧭 Topics 3Research subjects and languages the work is about.Sentiment & emotion · 972 worksSemitic languages · 2,908 worksMultilingual & cross-lingual NLP · 828 works
Cite
Cite as Amr Keleg, Samhaa R. El-Beltagy and Mahmoud Khalil. 2020. ASU_OPTO at OSACT4 - Offensive Language Detection for Arabic text. Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection.
@inproceedings{keleg2020asu,
title = {{ASU\_OPTO at OSACT4 - Offensive Language Detection for Arabic text}},
author = {Amr Keleg, Samhaa R. El-Beltagy and Mahmoud Khalil},
booktitle = {Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection},
year = {2020},
url = {https://aclanthology.org/2020.osact-1.10/}
}References
- Abdelali, A., Darwish, K., Durrani, N., and Mubarak, H. (2016). Farasa: A fast and furious segmenter for arabic. 06.
- de Vries, W., van Cranenburgh, A., Bisazza, A., Caselli, T., van Noord, G., and Nissim, M. (2019). Bertje: A dutch bert model. ArXiv, abs/1912.09582. ↗
- Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (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, June. Association for Computational Linguistics. ↗
- Howard, J. and Ruder, S. (2018). Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 328–339, Melbourne, Australia, July. Association for Computational Linguistics. find
- Kingma, D. P. and Ba, J. (2014). Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. ↗
- Malmasi, S. and Zampieri, M. (2017). Challenges in discriminating profanity from hate speech. Journal of Experimental & Theoretical Artificial Intelligence, 30(2):187202, Dec. ↗
- Mohammad, A. B., Eissa, K., and El-Beltagy, S. (2017). Aravec: A set of arabic word embedding models for use in arabic nlp. Procedia Computer Science, 117:256–265, 11. find
- Mubarak, H., Darwish, K., and Magdy, W. (2017). Abusive language detection on Arabic social media. In Proceedings of the First Workshop on Abusive Language Online, pages 52–56, Vancouver, BC, Canada, August. Association for Computational Linguistics.
- Risch, J., Stoll, A., Ziegele, M., and Krestel, R. (2019). hpidedis at germeval 2019: Offensive language identification using a german bert model. In Preliminary proceedings of the 15th Conference on Natural Language Processing (KONVENS 2019). Erlangen, Germany: German Society for Computational Linguistics & Language Technology, pages 403–408. find
- Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., Klingner, J., Shah, A., Johnson, M., Liu, X., ukasz Kaiser, Gouws, S., Kato, Y., Kudo, T., Kazawa, H., Stevens, K., Kurian, G., Patil, N., Wang, W., Young, C., Smith, J., Riesa, J., Rudnick, A., Vinyals, O., Corrado, G., Hughes, M., and Dean, J. (2016). Google’s neural machine translation system: Bridging the gap between human and machine translation. ↗
- Zampieri, M., Malmasi, S., Nakov, P., Rosenthal, S., Farra, N., and Kumar, R. (2019). SemEval-2019 task 6: Identifying and categorizing offensive language in social media (OffensEval). In Proceedings of the 13th International Workshop on Semantic Evaluation, pages 75–86, Minneapolis, Minnesota, USA, June. Association for Computational Linguistics.
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/keleg-2020-asu-opto-osact4-offensive-language/