Elamur Research⌕
☰
home / papers / 2022 / Ahmed and Khalil at NADI 2022: Transfer Learning and Addressing Class Imbalance for Arabic Dialect Identification and Sentiment Analysis

Ahmed and Khalil at NADI 2022: Transfer Learning and Addressing Class Imbalance for Arabic Dialect Identification and Sentiment Analysis

Paper · 2022 · Ahmed Oumar and Khalil Mrini

Summary

The paper describes a team's system for both subtasks of the NADI 2022 shared task: country-level Arabic dialect identification in tweets (18 classes) and three-way sentiment classification of tweets written in dialects and Modern Standard Arabic. The authors first examine the label distributions. Dialect data are strongly skewed, with the biggest class about twenty times the smallest. Sentiment data are fairly balanced but small. They compare three Arabic BERT-style encoders (MarBERT, CamelBERT, AraBERT) with a simple classification head, along with several loss functions. MarBERT combined with focal loss works best. Tuning the focusing parameter γ shows that a large value gives the highest macro-F1 on dialect identification. Since external labelled data were forbidden, the sentiment model starts from the dialect-identification model and is then fine-tuned on the small sentiment set. The system placed mid-to-upper on both leaderboards. The work shows that cheap loss-level fixes for imbalance and task-to-task transfer can help in low-resource dialect settings.

Key points

  • Subtask 1 data: 20,398 training tweets and 4,871 validation tweets over 18 countries. Egypt has 4,283 training samples, while Bahrain, Sudan and Qatar have only 215 each. Subtask 2 has 1,500 training and 500 validation tweets.
  • Setup: fine-tuned BERT plus one classification layer (extra dense layers did not help), learning rate 4·10⁻⁵, 10 epochs, Adam with weight decay, and batch size 32 (subtask 1) or 8 (subtask 2), implemented in PyTorch.
  • Losses compared: SelfAdjDiceLoss, NLLLoss, CrossEntropyLoss with and without class weights, and FocalLoss. FocalLoss was best on both subtasks.
  • γ values tried were 5, 10, 20 and 25. γ = 25 gave the lowest validation loss, but γ = 20 gave the best accuracy and F1. Validation scores peaked at epoch 2, which indicates later overfitting.
  • Validation macro-F1 was 0.3305 for subtask 1 and 0.7334 for subtask 2. On test, the results section reports 7th of 19 teams for subtask 1 and 5th of 10 for subtask 2. The abstract states these ranks in the opposite order.

Interesting ideas

  • I1. Focal loss down-weights examples the model already gets right, so training concentrates on hard, rare-class cases, and it beat explicit class weighting here.
  • I2. When outside labelled data are unavailable, a model trained on a large related task can serve as the starting point for a much smaller target task.
  • I3. The checkpoint with the lowest validation loss was not the one with the best F1, so model selection should follow the metric that actually matters.
  • I4. Reporting macro-F1, plus a variant that ignores the neutral class, keeps rare or less informative classes from being hidden by the majority.
  • I5. The authors suggest, without testing it, domain-adversarial training so that sentiment features become dialect-agnostic and transfer across varieties.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (tree): Rare UD relations such as vocative, dislocated or reparandum could get focal loss in gparse's label classifier, which would lift macro-level LAS on infrequent labels without resampling the treebank.
  • I2 (frames): A speech-act or irony classifier in prag could be initialized from the encoder already trained for parsing or tagging, so the scarce pragmatic annotations go further.
  • I3 (learn): Training runs should choose checkpoints and hyperparameters by task metrics (LAS, per-label F1) rather than by loss, and log both so these disagreements are visible.
  • I4 (learn): Evaluation reports could add per-class macro scores for rare dependency labels or frame roles, so that rare-class regressions surface instead of disappearing into micro averages.
  • I5 (tree): A similar adversarial signal could push the parser toward genre- or dialect-invariant representations when training on converted treebanks from different English varieties.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Ahmed Oumar and Khalil Mrini. 2022. Ahmed and Khalil at NADI 2022: Transfer Learning and Addressing Class Imbalance for Arabic Dialect Identification and Sentiment Analysis. Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2022.wanlp-1.46

@inproceedings{oumar2022ahmed,
  title = {{Ahmed and Khalil at NADI 2022: Transfer Learning and Addressing Class Imbalance for Arabic Dialect Identification and Sentiment Analysis}},
  author = {Ahmed Oumar and Khalil Mrini},
  booktitle = {Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP)},
  year = {2022},
  doi = {10.18653/v1/2022.wanlp-1.46},
  url = {https://doi.org/10.18653/v1/2022.wanlp-1.46}
}

References

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

  1. Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. 2017. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980–2988. ↗
  2. Amine Abdaoui, Mohamed Berrimi, Mourad Oussalah, and Abdelouahab Moussaoui. 2021. Dziribert: a pre-trained language model for the algerian dialect. arXiv preprint arXiv:2109.12346. ↗
  3. Abderrahmane Issam and Khalil Mrini. 2022. Goud. ma: a news article dataset for summarization in moroccan darija. In 3rd Workshop on African Natural Language Processing. find
  4. Xiaoya Li, Xiaofei Sun, Yuxian Meng, Junjun Liang, Fei Wu, and Jiwei Li. 2020. Dice loss for data-imbalanced nlp tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 465–476.
  5. Muhammad Abdul-Mageed, AbdelRahim Elmadany, et al. 2021a. Arbert & marbert: Deep bidirectional transformers for arabic. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 7088–7105. ↗
  6. Muhammad Abdul-Mageed, Chiyu Zhang, Houda Bouamor, and Nizar Habash. 2020. NADI 2020: The first nuanced Arabic dialect identification shared task. In Proceedings of the Fifth Arabic Natural Language Processing Workshop, pages 97–110, Barcelona, Spain (Online). Association for Computational Linguistics. ↗
  7. Muhammad Abdul-Mageed, Chiyu Zhang, AbdelRahim Elmadany, Houda Bouamor, and Nizar Habash. 2021b. Nadi 2021: The second nuanced arabic dialect identification shared task. In Proceedings of the Sixth Arabic Natural Language Processing Workshop, pages 244–259. ↗
  8. Muhammad Abdul-Mageed, Chiyu Zhang, AbdelRahim Elmadany, Houda Bouamor, and Nizar Habash. 2022. NADI 2022: The Third Nuanced Arabic Dialect Identification Shared Task. In Proceedings of the Seven Arabic Natural Language Processing Workshop (WANLP 2022).
  9. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. Arabert: Transformer-based model for arabic language understanding. arXiv preprint arXiv:2003.00104. ↗
  10. Mukhtar Elgezouli, Khalid N Elmadani, and Muhammed Saeed. 2020. Sudabert: A pre-trained encoder representation for sudanese arabic dialect. In 2020 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE), pages 1–4. IEEE. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/oumar-2022-ahmed-khalil-nadi-2022-transfer/