Elamur Research⌕
☰
home / papers / 2021 / ArabGlossBERT: Fine-Tuning BERT on Context-Gloss Pairs for WSD

ArabGlossBERT: Fine-Tuning BERT on Context-Gloss Pairs for WSD

Paper · 2021 · Moustafa Al-Hajj and Mustafa Jarrar

Summary

The paper tackles Arabic Word Sense Disambiguation (WSD), which is hard because Arabic has no WordNet-style sense inventory with labeled examples. The authors built such a resource from the Arabic Ontology and Birzeit University's lexicographic database (about 400K glosses from roughly 150 lexicons). They parsed definitions into separate glosses and example contexts, chose one lexicon's sense list per lemma, generated negative pairs, and found the target word in each context. That last step is difficult because the word usually appears inflected and may occur more than once with different meanings.

The result is about 167K context-gloss pairs. WSD is cast as binary sentence-pair classification: given a context and a gloss, decide whether the gloss is the right sense. Three Arabic BERT models were fine-tuned, and several ways of marking the target word were compared. AraBERTv02 performed best at about 84% accuracy. Target markers added only around 1%. The work also stresses a clean evaluation: no context appears in both train and test. The authors note that an earlier Arabic result was inflated because of exactly this kind of overlap.

Key points

  • Dataset size: 167,207 pairs in total, of which 60,323 are True and 106,884 are False. They cover 26,169 undiacritized lemmas, 32,839 glosses and 60,272 contexts.

  • Data selection rules:

    • Lemmas were kept only if every gloss had at least one example.
    • One-word glosses and contexts were removed.
    • When a lemma appeared in several lexicons, the lexicon with the most glosses was used, to avoid duplicate senses.
  • Models and setup: AraBERTv02, QARiB (base) and CAMeLBERT were fine-tuned with BertForSequenceClassification on the [CLS] token. Settings were learning rate 2e-5, 1412 warmup steps, batch size 16, 4 epochs, on a single Tesla P100.

  • Results with single-quote markers:

    ModelAccuracyF1 (True)F1 (False)
    AraBERTv0284%7289
    CAMeLBERT82%——
    QARiB80%——
  • Marker variants: four were tested on AraBERTv02: no marker, single quotes, [UNUSED0] on both sides, and [UNUSED0]/[UNUSED1] as open/close. All marked variants also start the gloss with the target word and a colon. Gains over no marker were about 1%. The dataset and models are released by Birzeit.

Interesting ideas

  • I1. Instead of a per-word sense classifier, each (context, candidate gloss) pair is scored separately, so one model covers every lemma and the chosen sense comes with its human-readable definition.
  • I2. The authors re-ran a prior Arabic WSD experiment and found its high F1 came from test contexts that had also been seen in training, so they split by context.
  • I3. When merging many overlapping dictionaries, they keep the single source with the richest sense list for each lemma rather than taking the union, which avoids near-duplicate senses.
  • I4. A lemma enters the data only if all of its senses have examples, so negative pairs always contrast real, attested alternatives.
  • I5. The target occurrence is highlighted with delimiters, and the word is also prefixed to the gloss; this helps a little even for a strong encoder.

For Mova

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

  • I1 (world): WordNet sense selection could score context-gloss pairs, and the winning gloss would serve directly as the explanation for the ontology link.
  • I2 (learn): silver-data train/test splits should be made by source sentence, and evaluations should include a leakage check as a standard negative control.
  • I3 (world): when combining WordNet, FrameNet and Wikidata entries for a lemma, choosing one primary inventory per lemma could prevent inflated, redundant sense sets.
  • I4 (learn): when building sense or frame training sets, dropping incompletely attested lemmas keeps the negatives meaningful instead of skewed toward senses that lack examples.
  • I5 (frames): marking the predicate token, for example with reserved tokens, when classifying VerbNet roles or frames could cheaply focus the model on the right verb in sentences with repeated words.

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 Moustafa Al-Hajj and Mustafa Jarrar. 2021. ArabGlossBERT: Fine-Tuning BERT on Context-Gloss Pairs for WSD. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2021).

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

@inproceedings{alhajj2021arabglossbert,
  title = {{ArabGlossBERT: Fine-Tuning BERT on Context-Gloss Pairs for WSD}},
  author = {Moustafa Al-Hajj and Mustafa Jarrar},
  booktitle = {Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2021)},
  year = {2021},
  doi = {10.26615/978-954-452-072-4\_005},
  url = {https://doi.org/10.26615/978-954-452-072-4_005}
}

References

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

  1. Ahmed Abdelali, Sabit Hassan, Hamdy Mubarak, Kareem Darwish, and Younes Samih. 2021. Pre-training bert on arabic tweets: Practical considerations. arXiv preprint arXiv:2102.10684. True False Accuracy Precision 80 85 Recall 64 92 83 F1-score 71 88 Precision 81 85 Recall 64 93 84 F1-score 71 89 Precision 81 85 Recall 64 93 84 F1-score 71 89 ↗
  2. Moustafa Al-Hajj and Mustafa Jarrar. 2021. LU-BZU at SemEval-2021 task 2: Word2Vec and Lemma2Vec performance in Arabic word-in-context disambiguation. In Proceedings of the 15th International Workshop on Semantic Evaluation (SemEval-2021), pages 748–755, Online. Association for Computational Linguistics.
  3. Diana Alhafi, Anton Deik, and Mustafa Jarrar. 2019. Usability evaluation of lexicographic e-services. In The 2019 IEEE/ACS 16th International Conference on Computer Systems and Applications (AICCSA), pages 1–7. IEE. *Table 4: Achieved results (%) with AraBERTv02 using the other three supervised signals around the target word.* Marwah Alian and Arafat Awajan. 2020. Sense inventories for arabic texts. In 2020 21st International Arab Conference on Information Technology (ACIT), pages 1–4. IEEE. pair classification, and we achieved a promising accuracy of 84%, especially as we used a large set of senses. Our experiments show that the use of different supervised signals around target words did not bring significant improvements (about 1%). find
  4. Ali Alkhatlan, Jugal Kalita, and Ahmed Alhaddad. 2018. Word sense disambiguation for arabic exploiting arabic wordnet and word embedding. Procedia computer science, 142:50–60. find
  5. Hamzeh Amayreh, Mohammad Dwaikat, and Mustafa Jarrar. 2019. Lexicon digitization-a framework for structuring, normalizing and cleaning lexical entries. Technical Report, Birzeit University. ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/hajj-2021-arabglossbert-fine-tuning-bert-context/