Elamur Research⌕
☰
home / papers / 2025 / Multi-task Learning with Active Learning for Arabic Offensive Speech Detection

Multi-task Learning with Active Learning for Arabic Offensive Speech Detection

Summary

Arabic social media posts often contain insults, threats and obscenity. Automatic detection is difficult because labeled data is scarce, dialects vary widely, and much meaning is carried by context and emojis. Alansari and Luqman address this by detecting offensive speech with one shared model that is also trained on two related auxiliary tasks: violent speech and vulgar speech. Each task has its own loss, and the authors compare several ways of weighting these losses, including fixed and dynamically adjusted schemes. To reduce how much labeled data is needed, they add active learning. Entropy-based uncertainty sampling picks the examples the model is least sure about, which are then used for fine-tuning. Emojis are kept in the text, and a hand-picked set of emojis associated with offensiveness receives extra weight. On OSACT2022 the best setup reaches a macro F1 of 85.42%, which the authors report as state of the art. It used only 3,336 fine-tuning examples, while competing systems used 8,557 or more. The work shows that related labels plus careful sample selection can stand in for large annotated corpora.

Key points

  • Benchmark: OSACT2022. Main task is offensive speech; auxiliary tasks are violent and vulgar speech, trained jointly on a shared ArabBERT-style encoder.
  • Best result: macro F1 85.42% with 3,336 training samples. The authors' own single-task model scores 85.31% on 8,557 samples. Prior systems include Mostafa et al. (85.17%, 8,557 samples) and Shapiro et al. (84.10%, 19,906 samples).
  • The winning configuration combines dynamic MTL task weighting, the "Equal" uncertainty approach, weighted emojis, and 10 samples selected per round. Larger selection sizes (20–40) did not reliably help.
  • Under static loss weighting, the best split was offensive 0.70, violent 0.15, vulgar 0.15 (85.19%). Pushing the main task to 0.80 lowered scores.
  • Ablations: keeping emojis beat removing them, and weighting a predefined offensive-emoji list gave the largest gains. Stated limitations are implicit sarcasm, cultural references, and untested generalization to other datasets.

Interesting ideas

  • I1. Train a main task together with closely related auxiliary labels on one shared encoder, giving the main loss the largest but not overwhelming weight; past a certain share, the auxiliary signal stops helping. — For Mova (tree): gparse could train its dependency head together with auxiliary UPOS/morphology heads, tuning the main-loss share on a dev set rather than assuming more weight on LAS is always better.
  • I2. Use prediction entropy to choose the few examples worth labeling, and add them in small rounds; here, 10 per round worked best. — For Mova (learn): sentences where the witness parsers disagree or where gparse's arc distribution has high entropy could be sent first to the LLM teacher tier, in small batches, instead of sending random silver data.
  • I3. Do not treat all surface cues equally: a short, curated list of strongly indicative tokens can get extra weight while remaining inspectable. — For Mova (frames): the irony and speech-act components in prag could keep an explicit, weighted cue lexicon (emojis, interjections, intensifiers) that appears in the explanation trace.
  • I4. Report training-set size next to the score and run the full grid of design choices, since the paper found that more selected samples did not consistently improve results. — For Mova (learn): evaluation tables could list how much silver or teacher data each model consumed and include ablations over data quantity, so gains are not simply attributed to more data.

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

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2506.02753 · arXiv 2506.02753

@misc{alansari2025multi,
  title = {{Multi-task Learning with Active Learning for Arabic Offensive Speech Detection}},
  author = {Alansari, Aisha and Luqman, Hamzah},
  year = {2025},
  doi = {10.48550/arxiv.2506.02753},
  eprint = {2506.02753},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2506.02753}
}

References

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

  1. Estee Van der Walt, Jan HP Eloff, and Jacomine Grobler. Cyber-security: Identity deception detection on social media platforms. Computers & Security, 78:76–89, 2018. find
  2. Thomas Davidson, Dana Warmsley, Michael Macy, and Ingmar Weber. Automated hate speech detection and the problem of offensive language. In Proceedings of the international AAAI conference on web and social media, volume 11, pages 512–515, 2017. find our card
  3. Paula Fortuna and Sérgio Nunes. A survey on automatic detection of hate speech in text. ACM Computing Surveys (CSUR), 51(4):1–30, 2018. find
  4. Fadi Salem. Social media and the internet of things towards data-driven policymaking in the arab world: potential, limits and concerns. The Arab Social Media Report, Dubai: MBR School of Government, 7, 2017. find
  5. Maged S Al-Shaibani, Hamzah Luqman, Abdulaziz S Al-Ghofaily, and Abdullatif A Al-Najim. Wasm: A dataset for hashtag recommendation for arabic tweets. Arabian Journal for Science and Engineering, 49(9):12131–12145, 2024. find
  6. Yu Zhang and Qiang Yang. An overview of multi-task learning. National Science Review, 5(1):30–43, 2018. find
  7. Trevor Standley, Amir Zamir, Dawn Chen, Leonidas Guibas, Jitendra Malik, and Silvio Savarese. Which tasks should be learned together in multi-task learning? In International conference on machine learning, pages 9120–9132. PMLR, 2020. Uncertainty Approach None Equal Static Dynamic 84.47 84.01 83.97 84.08 84.30 84.51 85.19 84.49 82.39 84.25 83.66 83.76 84.44 83.33 84.57 83.77 find
  8. Jianquan Li, Xiaokang Liu, Wenpeng Yin, Min Yang, Liqun Ma, and Yaohong Jin. Empirical evaluation of multi-task learning in deep neural networks for natural language processing. Neural Computing and Applications, 33:4417–4428, 2021. find
  9. Zhang Y. and Yang Q. A survey on multi-task learning. IEEE Transactions on Knowledge and Data Engineering, 34(12):5586–5609, 2018. find
  10. Asma Yamani, Albandari Alyami, Hamzah Luqman, Bernard Ghanem, and Silvio Giancola. Active learning for single-stage object detection in uav images. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1860–1869, 2024. find
  11. Liat Ein Dor, Alon Halfon, Ariel Gera, Eyal Shnarch, Lena Dankin, Leshem Choshen, Marina Danilevsky, Ranit Aharonov, Yoav Katz, and Noam Slonim. Active learning for bert: an empirical study. In Proceedings of the 2020 conference on empirical methods in natural language processing (EMNLP), pages 7949–7962, 2020. find
  12. Burr Settles. Active learning literature survey. 2009. find our card
  13. Jonathan Pilault, Amine Elhattami, and Christopher Pal. Conditionally adaptive multi-task learning: Improving transfer learning in nlp using fewer parameters & less data. arXiv preprint arXiv:2009.09139, 2020. ↗
  14. Fatima Shannaq, Bassam Hammo, Hossam Faris, and Pedro A Castillo-Valdivieso. Offensive language detection in arabic social networks using evolutionary-based classifiers learned from fine-tuned embeddings. IEEE Access, 10:75018–75039, 2022. find
  15. Anas Ali Khan, M Hammad Iqbal, Shibli Nisar, Awais Ahmad, and Waseem Iqbal. Offensive language detection for low resource language using deep sequence model. IEEE Transactions on Computational Social Systems, 2023. find
  16. Ramsha Saeed, Hammad Afzal, Sadaf Abdul Rauf, and Naima Iltaf. Detection of offensive language and its severity for low resource language. ACM Transactions on Asian and Low-Resource Language Information Processing, 22(6):1–27, 2023. find
  17. Nobal B Niraula, Saurab Dulal, and Diwa Koirala. Offensive language detection in nepali social media. In Proceedings of the 5th Workshop on Online Abuse and Harms (WOAH 2021), pages 67–75, 2021. find
  18. Zakaria Boulouard, Mariya Ouaissa, Mariyam Ouaissa, Moez Krichen, Mutiq Almutiq, and Karim Gasmi. Detecting hateful and offensive speech in arabic social media using transfer learning. Applied Sciences, 12(24):12823, 2022. find
  19. Marzieh Babaeianjelodar, Gurram Poorna Prudhvi, Stephen Lorenz, Keyu Chen, Sumona Mondal, Soumyabrata Dey, and Navin Kumar. Interpretable and high-performance hate and offensive speech detection. In International Conference on Human-Computer Interaction, pages 233–244. Springer, 2022. find
  20. Manish Anand, Kishan Bhushan Sahay, Mohammed Altaf Ahmed, Daniyar Sultan, Radha Raman Chandan, and Bharat Singh. Deep learning and natural language processing in computation for offensive language detection in online social networks by feature selection and ensemble classification techniques. Theoretical Computer Science, 943:203–218, 2023. find
  21. Zhenxiong Miao, Xingshu Chen, Haizhou Wang, Rui Tang, Zhou Yang, Tiemai Huang, and Wenyi Tang. Detecting offensive language based on graph attention networks and fusion features. IEEE Transactions on Computational Social Systems, 11(1):1493–1505, 2023. find
  22. Fatemah Husain. Osact4 shared task on offensive language detection: Intensive preprocessing-based approach. arXiv preprint arXiv:2005.07297, 2020. ↗
  23. AbdelRahim Elmadany, Chiyu Zhang, Muhammad Abdul-Mageed, and Azadeh Hashemi. Leveraging affective bidirectional transformers for offensive language detection. arXiv preprint arXiv:2006.01266, 2020. ↗
  24. Bushr Haddad, Zoher Orabe, Anas Al-Abood, and Nada Ghneim. Arabic offensive language detection with attention-based deep neural networks. In Proceedings of the 4th workshop on open-source Arabic corpora and processing tools, with a shared task on offensive language detection, pages 76–81, 2020. find
  25. Abdullah I Alharbi and Mark Lee. Combining character and word embeddings for the detection of offensive language in arabic. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 91–96, 2020. find
  26. Kasper Socha. Ks@ lth at semeval-2020 task 12: Fine-tuning multi-and monolingual transformer models for offensive language detection. In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 2045–2053, 2020. find
  27. Ali Safaya, Moutasem Abdullatif, and Deniz Yuret. Kuisail at semeval-2020 task 12: Bert-cnn for offensive speech identification in social media. arXiv preprint arXiv:2007.13184, 2020. ↗ our card
  28. Fatemah Husain, Jooyeon Lee, Samuel Henry, and Ozlem Uzuner. Salamnet at semeval-2020 task12: Deep learning approach for arabic offensive language detection. arXiv preprint arXiv:2007.13974, 2020. ↗ our card
  29. Marcos Zampieri, Preslav Nakov, Sara Rosenthal, Pepa Atanasova, Georgi Karadzhov, Hamdy Mubarak, Leon Derczynski, Zeses Pitenis, and Çağrı Çöltekin. Semeval-2020 task 12: Multilingual offensive language identification in social media (offenseval 2020). arXiv preprint arXiv:2006.07235, 2020. ↗
  30. Sabit Hassan, Younes Samih, Hamdy Mubarak, and Ahmed Abdelali. Alt at semeval-2020 task 12: Arabic and english offensive language identification in social media. In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 1891–1897, 2020. find
  31. Abdullah I Alharbi and Mark Lee. Bhamnlp at semeval-2020 task 12: An ensemble of different word embeddings and emotion transfer learning for arabic offensive language identification in social media. In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 1532–1538, 2020. find
  32. Angel Felipe Magnossao de Paula, Paolo Rosso, Imene Bensalem, and Wajdi Zaghouani. Upv at the arabic hate speech 2022 shared task: Offensive language and hate speech detection using transformers and ensemble models. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 181–185, 2022. find
  33. Hamdy Mubarak, Hend Al-Khalifa, and AbdulMohsen Al-Thubaity. Overview of osact5 shared task on arabic offensive language and hate speech detection. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 162–166, 2022. find
  34. Nehal Elkaref and Mervat Abu-Elkheir. Guct at arabic hate speech 2022: Towards a better isotropy for hatespeech detection. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 209–213, 2022. find
  35. Ali Mostafa, Omar Mohamed, and Ali Ashraf. Gof at arabic hate speech 2022: breaking the loss function convention for data-imbalanced arabic offensive text detection. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 167–175, 2022. find
  36. Aya Mousa, Ismail Shahin, Ali Bou Nassif, and Ashraf Elnagar. Detection of arabic offensive language in social media using machine learning models. Intelligent Systems with Applications, 22:200376, 2024. find
  37. Sebastian Ruder, Joachim Bingel, Isabelle Augenstein, and Anders Søgaard. Latent multi-task architecture learning. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 4822–4829, 2019. find
  38. Michael Crawshaw. Multi-task learning with deep neural networks: A survey. arXiv preprint arXiv:2009.09796, 2020. ↗
  39. Sudhanshu Mishra, Shivangi Prasad, and Shubhanshu Mishra. Exploring multi-task multi-lingual learning of transformer models for hate speech and offensive speech identification in social media. SN Computer Science, 2:1–19, 2021. find
  40. Thomas Mandl, Sandip Modha, Prasenjit Majumder, Daksh Patel, Mohana Dave, Chintak Mandlia, and Aditya Patel. Overview of the hasoc track at fire 2019: Hate speech and offensive content identification in indo-european languages. In Proceedings of the 11th annual meeting of the Forum for Information Retrieval Evaluation, pages 14–17, 2019. find
  41. Adeep Hande, Siddhanth U Hegde, and Bharathi Raja Chakravarthi. Multi-task learning in under-resourced dravidian languages. Journal of Data, Information and Management, 4(2):137–165, 2022. find
  42. Flor Miriam Plaza-del Arco, M Dolores Molina-González, L Alfonso Ureña-López, and María-Teresa Martín-Valdivia. Integrating implicit and explicit linguistic phenomena via multi-task learning for offensive language detection. Knowledge-Based Systems, 258:109965, 2022. find
  43. Marcos Zampieri, Tharindu Ranasinghe, Diptanu Sarkar, and Alex Ororbia. Offensive language identification with multi-task learning. Journal of Intelligent Information Systems, 60(3):613–630, 2023. find
  44. Marc Djandji, Fady Baly, Wissam Antoun, and Hazem Hajj. Multi-task learning using arabert for offensive language detection. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 97–101, 2020. find
  45. Mohamed Aziz Bennessir, Malek Rhouma, Hatem Haddad, and Chayma Fourati. icompass at arabic hate speech 2022: Detect hate speech using qrnn and transformers. In Proceedinsg of the 5th Workshop on Open-Source Arabic Corpora and Processing Tools with Shared Tasks on Qur’an QA and Fine-Grained Hate Speech Detection, pages 176–180, 2022. find
  46. Ahmad Shapiro, Ayman Khalafallah, and Marwan Torki. Alexu-aic at arabic hate speech 2022: Contrast to classify. arXiv preprint arXiv:2207.08557, 2022. ↗
  47. Hamdy Mubarak, Sabit Hassan, and Shammur Absar Chowdhury. Emojis as anchors to detect arabic offensive language and hate speech. Natural Language Engineering, 29(6):1436–1457, 2023. find our card
  48. Wissam Antoun, Fady Baly, and Hazem Hajj. Arabert: Transformer-based model for arabic language understanding. arXiv preprint arXiv:2003.00104, 2020. ↗ our card
  49. Nora Alturayeif and Hamzah Luqman. Fine-grained sentiment analysis of arabic covid-19 tweets using bert-based transformers and dynamically weighted loss function. Applied Sciences, 11(22):10694, 2021. find
  50. Aditya Siddhant and Zachary C Lipton. Deep bayesian active learning for natural language processing: Results of a large-scale empirical study. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2904–2909, 2018. find
  51. Shaheer U Saeed, João Ramalhinho, Mark Pinnock, Ziyi Shen, Yunguan Fu, Nina Montaña-Brown, Ester Bonmati, Dean C Barratt, Stephen P Pereira, Brian Davidson, et al. Active learning using adaptable task-based prioritisation. Medical Image Analysis, 95:103181, 2024. find
  52. Vamshi Ambati. Active learning and crowdsourcing for machine translation in low resource scenarios. Carnegie Mellon University, 2012. find
  53. Vu-Linh Nguyen, Mohammad Hossein Shaker, and Eyke Hüllermeier. How to measure uncertainty in uncertainty sampling for active learning. Machine Learning, 111(1):89–122, 2022. find
  54. Nora Alturayeif, Hamzah Luqman, and Moataz Ahmed. Enhancing stance detection through sequential weighted multi-task learning. Social Network Analysis and Mining, 14(1):7, 2023. find

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/alansari-2025-multi-task-learning-active-learning/