---
title: "What does BERT Learn from Arabic Machine Reading"
description: "They build a deliberately ungrammatical distractor from question words, answer variants and a random… 28 references, cited by 2 papers here."
authors: ["Eman Albilali", "Nora Altwairesh", "Manar Hosny"]
year: 2021
venue: "Proceedings of the Sixth Arabic Natural Language Processing Workshop"
source: "https://aclanthology.org/2021.wanlp-1.4/"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/albilali-2021-what-does-bert-learn-arabic/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/albilali-2021-what-does-bert-learn-arabic/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/page/8/) / What does BERT Learn from Arabic Machine Reading Comprehension Datasets?

# What does BERT Learn from Arabic Machine Reading Comprehension Datasets?

**Authors:** [Eman Albilali](https://md.research.elamur.ai/free/en/authors/eman-albilali/), Nora Altwairesh and Manar Hosny · **Year:** 2021 · **Venue:** [Proceedings of the Sixth Arabic Natural Language Processing Workshop](https://md.research.elamur.ai/free/en/venues/wanlp/) ([WANLP 2021](https://md.research.elamur.ai/free/en/venues/wanlp/2021/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2021.wanlp-1.4/) · [PDF](https://aclanthology.org/2021.wanlp-1.4.pdf) · [OpenAlex](https://openalex.org/W3156824476)

**Citations:** 0 citations (OpenAlex, 2026-10-14) · 2 in our library, of the 149,439 papers whose bibliographies we read

## Summary
The paper asks whether the high extractive reading comprehension scores of Arabic pre-trained language models reflect real understanding. The authors fine-tune AraBERT (version 0.1) on four Arabic MRC datasets: Ar-TyDI QA, Arabic WikiReading, Ar-XQuAD and Ar-MLQA. They then probe it in two ways. The first is a black-box attack. They build a deliberately ungrammatical distractor from question words, answer variants and a random passage sentence, shuffle its word order, and attach it to the passage. A human reader skips such noise, but the model often pulls its answer from it, with relative drops of roughly 45% on some datasets. The second probe is qualitative. They project each encoder layer's token hidden states with PCA and compare correct and fooled predictions. Around layer 7, question tokens normally move next to the supporting evidence. When the distractor captures that alignment instead, the prediction fails. This is presented as the first adversarial study of Arabic MRC. It concludes that AraBERT depends on lexical overlap and entity-type cues, and that its errors are already visible in earlier layers.

## Key points
- Baseline F1 of AraBERT (version 0.1): 81.70 on Ar-TyDI QA, 68.27 on Arabic WikiReading, 41.04 on Ar-XQuAD and 39.64 on Ar-MLQA.
- With the question-random sentence attack, performance falls by about 45% on Ar-XQuAD and Ar-MLQA and by about 23% on TyDI QA. Questions and gold answers stay unchanged.
- How distractors are built:
  - parts of the question, answer and a random passage sentence are concatenated;
  - only the distractor is shuffled into an unreadable string;
  - the original passage sentences and the answer are left intact.
- Hidden-state analysis is done with PCA per layer:
  - tokens first group by topical similarity;
  - layer 7 is where the question is matched to supporting facts;
  - the last layer isolates the answer candidate from a cluster of irrelevant tokens.
- In a TyDi QA development example, the fooled model chose the year 2012 from the distractor instead of the correct 2015. The only earlier Arabic adversarial work (Alshemali and Kalita, 2019) targeted sentiment analysis, not MRC.

## Interesting ideas
- A word-salad sentence made of question keywords is a very cheap robustness test: it carries no valid meaning, so any model that takes its answer from it is matching surface overlap.
- The perturbation is tightly controlled, because only the inserted sentence changes while the question, the gold answer and the other sentences stay fixed, so any score change can be blamed on the distractor alone.
- The authors locate the layer where the question meets its supporting evidence and show that failures are already visible there, before the output.
- Candidate answers of the same type (several years) sit close together in vector space, so a model choosing by entity type alone can easily pick the wrong one.
- The paper treats "which supporting fact did the system use" as the key diagnostic for MRC errors.

## For Mova

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

- **I1** (answer): Add shuffled question-keyword noise to fable and tale QA passages, and check that the reader never answers from a span that yields no parse or frame.
- **I2** (learn): Use this as a standard negative control in evaluation, reporting each test set's score next to its distractor-augmented twin so overlap-driven shortcuts show up as a measurable gap.
- **I3** (tree): When debugging gparse, inspect intermediate-layer token geometry for misparsed sentences to find the stage where head choice goes wrong, rather than only checking final arcs.
- **I4** (world): Resolve such questions by linking each candidate value to its event and order in the text's world (who joined which club when), not by type match, and expose that link as the explanation.
- **I5** (answer): Make every answer cite the specific frame or world fact it came from, so a distractor-based error can be traced to the exact wrong evidence.

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

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (3): [Semitic languages](https://md.research.elamur.ai/free/en/topics/semitic-languages/) · 2,908 works · [❓ Question answering](https://md.research.elamur.ai/free/en/topics/question-answering/) · 441 works · [🔬 Interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/) · 130 works

## Cite

Cite as: Eman Albilali, Nora Altwairesh and Manar Hosny. 2021. What does BERT Learn from Arabic Machine Reading Comprehension Datasets?. Proceedings of the Sixth Arabic Natural Language Processing Workshop.

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

```bibtex
@inproceedings{albilali2021what,
  title = {{What does BERT Learn from Arabic Machine Reading Comprehension Datasets?}},
  author = {Eman Albilali, Nora Altwairesh and Manar Hosny},
  booktitle = {Proceedings of the Sixth Arabic Natural Language Processing Workshop},
  year = {2021},
  url = {https://aclanthology.org/2021.wanlp-1.4/}
}
```

- [← previous Using a New Nonlinear Gradient Method for Solving Large Scale Convex Optimization Problems with an Application on Arabic Medical Text](https://md.research.elamur.ai/free/en/papers/hammoud-2021-using-new-nonlinear-gradient-method/)
- [next → Whit's the Richt Pairt o Speech: PoS tagging for Scots](https://md.research.elamur.ai/free/en/papers/lameris-2021-whit-s-richt-pairt-o/)
- [↑ back to papers of 2021](https://md.research.elamur.ai/free/en/papers/2021/page/8/)

## References

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

1. Muhammad Abdul-Mageed, AbdelRahim Elmadany, and El Moatez Billah Nagoudi. 2020. [Arbert & marbert: Deep bidirectional transformers for arabic](https://md.research.elamur.ai/free/en/papers/abdul-mageed-2021-arbert-marbert-deep-bidirectional-transformers/). arXiv preprint arXiv:2101.01785. [↗](https://arxiv.org/abs/2101.01785)
2. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. [BERT: Pre-training of deep bidirectional transformers for language understanding](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/). 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. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/n19-1423)
3. Betty van Aken, Benjamin Winter, Alexander Löser, and Felix A. Gers. 2019. How does bert answer questions? a layer-wise analysis of transformer representations. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM ’19, page 1823–1832, New York, NY, USA. Association for Computing Machinery. [↗](https://doi.org/10.48550/arxiv.1909.04925)
4. Yanai Elazar, Shauli Ravfogel, Alon Jacovi, and Yoav Goldberg. 2020. When bert forgets how to pos: Amnesic probing of linguistic properties and mlm predictions. arXiv preprint arXiv:2006.00995. [↗](https://arxiv.org/abs/2006.00995)
5. Basemah Alshemali and Jugal Kalita. 2019. Adversarial examples in arabic. In 2019 International Conference on Computational Science and Computational Intelligence (CSCI), pages 371–376. IEEE. [find](https://scholar.google.com/scholar?q=Basemah+Alshemali+and+Jugal+Kalita%2E+2019%2E+Adversarial+examples+in+arabic%2E+In+2019+International+Conference+on+Computational+Science+and+Computational+Intelligence+%28CSCI%29%2C+pages+371%E2%80%93376%2E+IEEE%2E)
6. Nizar Y Habash. 2010. Introduction to arabic natural language processing. Synthesis Lectures on Human Language Technologies, 3(1):1–187. [↗](https://doi.org/10.1007/978-3-031-02139-8)
7. Moustafa Alzantot, Yash Sharma, Ahmed Elgohary, Bo-Jhang Ho, Mani Srivastava, and Kai-Wei Chang. 2018. [Generating natural language adversarial examples](https://md.research.elamur.ai/free/en/papers/alzantot-2018-generating-natural-language-adversarial-examples/). In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2890–2896, Brussels, Belgium. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/d18-1316)
8. John Hewitt and Christopher D. Manning. 2019. [A structural probe for finding syntax in word representations](https://md.research.elamur.ai/free/en/papers/hewitt-2019-structural-probe-finding-syntax-word/). 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 4129–4138, Minneapolis, Minnesota. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/n19-1419)
9. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020a. [AraBERT: Transformer-based model for Arabic language understanding](https://md.research.elamur.ai/free/en/papers/antoun-2020-arabert-transformer-based-model-arabic/). In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 9–15, Marseille, France. European Language Resource Association. [↗](https://doi.org/10.48550/arxiv.2003.00104)
10. Robin Jia and Percy Liang. 2017. [Adversarial examples for evaluating reading comprehension systems](https://md.research.elamur.ai/free/en/papers/jia-2017-adversarial-examples-evaluating-reading-comprehension/). In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2021–2031, Copenhagen, Denmark. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/d17-1215)
11. Wissam Antoun, Fady Baly, and Hazem Hajj. 2020b. [Aragpt2: Pre-trained transformer for arabic language generation](https://md.research.elamur.ai/free/en/papers/antoun-2021-aragpt2-pre-trained-transformer-arabic/). [↗](https://doi.org/10.48550/arxiv.2012.15520)
12. Divyansh Kaushik, Eduard Hovy, and Zachary C Lipton. 2020. Learning the difference that makes a difference with counterfactually-augmented data. International Conference on Learning Representations (ICLR). [↗](https://doi.org/10.48550/arxiv.1909.12434)
13. Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. 2020. [On the cross-lingual transferability of monolingual representations](https://md.research.elamur.ai/free/en/papers/artetxe-2020-cross-lingual-transferability-monolingual-representations/). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4623–4637, Online. Association for Computational Linguistics.
14. Patrick Lewis, Barlas Oguz, Ruty Rinott, Sebastian Riedel, and Holger Schwenk. 2020. [MLQA: Evaluating cross-lingual extractive question answering](https://md.research.elamur.ai/free/en/papers/lewis-2019-mlqa-evaluating-cross-lingual-extractive/). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7315– 7330, Online. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/2020.acl-main.653)
15. Yonatan Belinkov and James Glass. 2019. [Analysis methods in neural language processing: A survey](https://md.research.elamur.ai/free/en/papers/belinkov-2019-analysis-methods-neural-language-processing/). Transactions of the Association for Computational Linguistics, 7:49–72. [↗](https://doi.org/10.1162/tacl_a_00254)
16. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. [Roberta: A robustly optimized bert pretraining approach](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/). arXiv preprint arXiv:1907.11692. [↗](https://arxiv.org/abs/1907.11692)
17. Jonathan H. Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. 2020. [TyDi QA: A benchmark for information-seeking question answering in typologically diverse languages](https://md.research.elamur.ai/free/en/papers/clark-2020-tydi-qa-benchmark-information-seeking/). Transactions of the Association for Computational Linguistics, 8:454– 470. [↗](https://doi.org/10.48550/arxiv.2003.05002)
18. Hussein Mozannar, Elie Maamary, Karl El Hajal, and Hazem Hajj. 2019. [Neural Arabic question answering](https://md.research.elamur.ai/free/en/papers/mozannar-2019-neural-arabic-question-answering/). In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 108–118, Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, pages 5998–6008. Curran Associates, Inc. Florence, Italy. Association for Computational Linguistics.
19. Yixin Nie, Adina Williams, Emily Dinan, Mohit Bansal, Jason Weston, and Douwe Kiela. 2020. [Adversarial NLI: A new benchmark for natural language understanding](https://md.research.elamur.ai/free/en/papers/nie-2020-adversarial-nli-new-benchmark-natural/). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4885–4901, Online. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/2020.acl-main.441)
20. Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. In Empirical Methods in Natural Language Processing. [find](https://scholar.google.com/scholar?q=Eric+Wallace%2C+Shi+Feng%2C+Nikhil+Kandpal%2C+Matt+Gardner%2C+and+Sameer+Singh%2E+2019%2E+Universal+adversarial+triggers+for+attacking+and+analyzing+NLP%2E+In+Empirical+Methods+in+Natural+Language+Processing%2E)
21. Pedro Javier Ortiz Suárez, Laurent Romary, and Benoı̂t Sagot. 2020. [A monolingual approach to contextualized word embeddings for mid-resource languages](https://md.research.elamur.ai/free/en/papers/suarez-2020-monolingual-approach-contextualized-word-embeddings/). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1703–1714, Online. Association for Computational Linguistics.
22. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. [Deep contextualized word representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/). In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 2227–2237, New Orleans, Louisiana. Association for Computational Linguistics. [↗](https://doi.org/10.18653/v1/n18-1202)
23. Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. [find](https://scholar.google.com/scholar?q=Alec+Radford%2C+Jeff+Wu%2C+Rewon+Child%2C+David+Luan%2C+Dario+Amodei%2C+and+Ilya+Sutskever%2E+2019%2E+Language+models+are+unsupervised+multitask+learners%2E)
24. Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2020. [A primer in bertology: What we know about how bert works](https://md.research.elamur.ai/free/en/papers/rogers-2020-primer-bertology-what-we-know/). Transactions of the Association for Computational Linguistics, 8:842–866. [↗](https://doi.org/10.1162/tacl_a_00349)
25. Ali Safaya, Moutasem Abdullatif, and Deniz Yuret. 2020. [KUISAIL at SemEval-2020 task 12: BERT-CNN for offensive speech identification in social media](https://md.research.elamur.ai/free/en/papers/safaya-2020-kuisail-semeval-2020-task-12/). In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 2054–2059, Barcelona (online). International Committee for Computational Linguistics.
26. Chenglei Si, Shuohang Wang, Min-Yen Kan, and Jing Jiang. 2019. What does bert learn from multiple-choice reading comprehension datasets? arXiv preprint arXiv:1910.12391. [↗](https://arxiv.org/abs/1910.12391)
27. Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019a. [BERT rediscovers the classical NLP pipeline](https://md.research.elamur.ai/free/en/papers/tenney-2019-bert-rediscovers-classical-nlp-pipeline/). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593– 4601, Florence, Italy. Association for Computational Linguistics. [↗](https://doi.org/10.48550/arxiv.1905.05950)
28. Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R. Thomas McCoy, Najoung Kim, Benjamin Van Durme, Samuel R. Bowman, Dipanjan Das, and Ellie Pavlick. 2019b. [What do you learn from context? probing for sentence structure in contextualized word representations](https://md.research.elamur.ai/free/en/papers/tenney-2019-learn-context-probing-sentence-structure/). In International Conference on Learning Representations. [↗](https://doi.org/10.48550/arxiv.1905.06316)

*Updated 1 November 2026*
