Investigating BERT's Knowledge of Language: Five Analysis Methods with NPIs
Summary
The paper asks how the grammatical knowledge of pretrained sentence encoders should be measured, and whether different evaluation styles agree. The authors focus on one English phenomenon, negative polarity item (NPI) licensing. Words like any need a suitable "negative" context, such as negation, and must fall within that licensor's scope. They built an artificially generated acceptability dataset covering nine licensing environments. Each sentence carries a Boolean acceptability label and three metadata flags: licensor, NPI, and scope. They tested BERT-large, BERT with intermediate training on CCG or MNLI, and a GloVe bag-of-words baseline using five methods: Boolean acceptability classification, absolute and gradient minimal-pair evaluation, a cloze test with the MLM head, and feature probing. BERT turns out to encode all relevant features. However, the methods disagree substantially. Gradient minimal pairs suggest near-perfect knowledge, while absolute pairs and probing show uneven competence, with scope being the weakest area. The takeaway for practitioners is that a single evaluation method can mask or exaggerate a model's abilities, so several complementary methods should be combined.
Key points
- Five methods are compared on one phenomenon: Boolean acceptability, absolute minimal pairs, gradient minimal pairs, cloze test, and probing. Performance is reported mainly as MCC.
- Acceptability classifiers are trained on CoLA (over 10k labelled sentences from the linguistics literature) or on the new NPI data. The nine environments are ADV, COND, D-NEG, S-NEG, ONLY, QNT, QUES, SMP-Q, and SUP.
- BERT nearly saturates the gradient minimal-pair task. Absolute, cloze, and probing results reveal differences between environments, with weaker results for quantifier and superlative contexts.
- In probing, the BoW baseline detects NPI and licensor presence almost perfectly, which suggests co-occurrence cues suffice. Scope detection is where BERT beats BoW, yet BERT remains inconsistent on it.
- Additional pretraining on CCG or MNLI did not help and sometimes hurt. This contrasts with Wilcox et al. (2019), who used an RNN trained with parsing on the Penn Treebank.
Cited by
- Modelling the Morphology of Verbal Paradigms: A Case Study in the Tokenization of Turkish and Hebrew
- Climbing towards NLU: On Meaning, Form, and Understanding in the Age of Data
- Are Natural Language Inference Models IMPPRESsive? Learning IMPlicature and PRESupposition
- Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Fly
- How Context Affects Language Models' Factual Predictions
- Intermediate-Task Transfer Learning with Pretrained Language Models: When and Why Does It Work?
- Probing Natural Language Inference Models through Semantic Fragments
- Datasets for Verb Alternations across Languages: BLM Templates and Data Augmentation Strategies
- Harnessing the linguistic signal to predict scalar inferences
- Open-access Dataset on Acceptability Ratings of Korean Clausal Constructions by Humans and GPT Models
- Masked Language Modeling and the Distributional Hypothesis: Order Word Matters Pre-training for Little
- oLMpics -- On what Language Model Pre-training Captures
- BLiMP: The Benchmark of Linguistic Minimal Pairs for English
Cite
@inproceedings{warstadt2019investigating,
title = {{Investigating BERT's Knowledge of Language: Five Analysis Methods with NPIs}},
author = {Warstadt, Alex and Cao, Yu and Grosu, Ioana and Peng, Wei and Blix, Hagen and Nie, Yining and Alsop, Anna and Bordia, Shikha and Liu, Haokun and Parrish, Alicia and Wang, Sheng-Fu and Phang, Jason and Mohananey, Anhad and Htut, Phu Mon and Jeretic, Paloma and Bowman, Samuel R.},
booktitle = {Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)},
year = {2019},
doi = {10.18653/v1/d19-1286},
url = {https://doi.org/10.18653/v1/d19-1286}
}References
- Yossi Adi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. 2016. Fine-grained analysis of sentence embeddings using auxiliary prediction tasks. arXiv preprint arXiv:1608.04207. find our card
- Samuel R. Bowman, Ellie Pavlick, Edouard Grave, Benjamin Van Durme, Alex Wang, Jan Hula, Patrick Xia, Raghavendra Pappagari, R. Thomas McCoy, Roma Patel, Najoung Kim, Ian Tenney, Yinghui Huang, Katherin Yu, Shuning Jin, and Berlin Chen. 2018. Looking for elmo’s friends: Sentence-level pretraining be… — [arXiv:1812.10860](https://arxiv.org/abs/1812.10860) find
- Gilles Fauconnier. 1975. Polarity and the scale principle. Proceedings of the Chicago Linguistics Society, 11:188–199. find
- Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson F Liu, Matthew Peters, Michael Schmitz, and Luke Zettlemoyer. 2018. Allennlp: A deep semantic natural language processing platform. In Proceedings of Workshop for NLP Open Source Software (NLP-OSS), pages 1–6. find our card
- Anastasia Giannakidou. 1994. The semantic licensing of NPIs and the Modern Greek subjunctive. Language and Cognition, 4:55–68. find
- Gennaro Chierchia. 2013. Logic in grammar: Polarity, free choice, and intervention. Oxford University Press. find
- Anastasia Giannakidou. 1998. Polarity sensitivity as (non) veridical dependency, volume 23. John Benjamins Publishing. find
- Noam Chomsky. 1965. Aspects of the Theory of Syntax. MIT Press. find
- Mario Giulianelli, Jack Harding, Florian Mohnert, Dieuwke Hupkes, and Willem H. Zuidema. 2018. Under the hood: Using diagnostic classifiers to investigate and improve how language models track agreement information. CoRR, abs/1808.08079. find
- Noam Chomsky. 1981. Lectures on Government and Binding. Number 9 in Studies in Generative Grammar. Foris Publications, Dordrecht, Holland ; Cinnaminson, [N.J.]. find
- Noam Chomsky. 1995. The Minimalist Program. Number 28 in Current Studies in Linguistics. The MIT Press, Cambridge, Mass. find
- Alexis Conneau, Douwe Kiela, Holger Schwenk, Loı̈c Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. CoRR, abs/1705.02364. find our card
- Alexis Conneau, German Kruszewski, Guillaume Lample, Loı̈c Barrault, and Marco Baroni. 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. arXiv preprint arXiv:1805.01070. find our card
- Ishita Dasgupta, Demi Guo, Andreas Stuhlmüller, Samuel J Gershman, and Noah D Goodman. 2018. Evaluating compositionality in sentence embeddings. arXiv preprint arXiv:1802.04302. — [arXiv:1802.04302](https://arxiv.org/abs/1802.04302) find
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint 1810.04805. find
- Allison Ettinger, Ahmed Elgohary, and Philip Resnik. 2016. Probing for semantic evidence of composition by means of simple classification tasks. In Proceedings of the First Workshop on Evaluating Vector Space Representations for NLP, pages 134–139. Association for Computational Linguistics. find our card
- Allyson Ettinger, Ahmed Elgohary, Colin Phillips, and Philip Resnik. 2018. Assessing composition in sentence vector representations. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1790–1801. Association for Computational Linguistics. find
- Julia Hockenmaier and Mark Steedman. 2007. CCGbank: A corpus of CCG derivations and dependency structures extracted from the Penn Treebank. Computational Linguistics, 33(3):355–396. find our card
- Jaap Jumelet and Dieuwke Hupkes. 2018. Do language models understand anything? on the ability of lstms to understand negative polarity items. arXiv preprint arXiv:1808.10627. find
- Nirit Kadmon and Fred Landman. 1993. Any. Linguistics and Philosophy, 16(4):353–422. find
- Katharina Kann, Alex Warstadt, and Adina Williams. 2019. Verb argument structure alternations in word and sentence embeddings. In Proceedings of the Society for Computation in Linguistics (SCiL), pages 287–297. find
- Manfred Krifka. 1995. The semantics and pragmatics of polarity items. Linguistic Analysis, 25(3-4):209– 257. find
- William Ladusaw. 1979. Negative polarity items as inherent scope relations. Unpublished Ph.D. Dissertation, University of Texas at Austin. find
- Jey Han Lau, Alexander Clark, and Shalom Lappin. 2017. Grammaticality, acceptability, and probability: A probabilistic view of linguistic knowledge. Cognitive Science, 41(5):1202–1241. find
- Marcia Christine Linebarger. 1980. The grammar of negative polarity. Ph.D. thesis, Massachusetts Institute of Technology. find
- Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. 2016. Assessing the ability of lstms to learn syntax-sensitive dependencies. Transactions of the Association for Computational Linguistics, 4:521–535. find our card
- Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. 2019. Multi-task deep neural networks for natural language understanding. CoRR, abs/1901.11504. find our card
- Alex Warstadt and Samuel R Bowman. 2019. Grammatical analysis of pretrained sentence encoders with acceptability judgments. arXiv preprint arXiv:1901.03438. — [arXiv:1901.03438](https://arxiv.org/abs/1901.03438) find
- Mitchell Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993. Building a large annotated corpus of english: The penn treebank. find our card
- Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2018. Neural network acceptability judgments. arXiv preprint 1805.12471. find
- Rebecca Marvin and Tal Linzen. 2018. Targeted syntactic evaluation of language models. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1192–1202. find
- Ethan Wilcox, Peng Qian, Richard Futrell, Miguel Ballesteros, and Roger Levy. 2019. Structural supervision improves learning of non-local grammatical dependencies. In Proceedings of the 2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics. find
- Brian W Matthews. 1975. Comparison of the predicted and observed secondary structure of t4 phage lysozyme. Biochimica et Biophysica Acta (BBA)-Protein Structure, 405(2):442–451. find
- Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1532– 1543. find
- Jason Phang, Thibault Févry, and Samuel R. Bowman. 2018. Sentence encoders on STILTs: Supplementary training on intermediate labeled-data tasks. In arXiv preprint. find our card
- Xing Shi, Inkit Padhi, and Kevin Knight. 2016. Does string-based neural mt learn source syntax? In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1526– 1534. find our card
- Frank Wilcoxon. 1945. Individual comparisons by ranking methods. Biometrics Bulletin, 1(6):80–83. find
- Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Pa… find
- Frans Zwarts. 1998. Three types of polarity. In Plurality and Quantification, pages 177–238. Springer. find
- Asa Cooper Stickland and Iain Murray. 2019. BERT and PALs: Projected attention layers for efficient adaptation in multi-task learning. CoRR, abs/1902.02671. — [arXiv:1902.02671](https://arxiv.org/abs/1902.02671) find
- Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Sam Bowman, Dipanjan Das, and Ellie Pavlick. 2019. What do you learn from context? Probing for sentence structure in contextualized word representations. In International Conference on Lear… find our card
- Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353–355. find our card
- Alex Wang, Ian F. Tenney, Yada Pruksachatkun, Katherin Yu, Jan Hula, Patrick Xia, Raghu Pappagari, Shuning Jin, R. Thomas McCoy, Roma Patel, Yinghui Huang, Jason Phang, Edouard Grave, Najoung Kim, Phu Mon Htut, Thibault F’evry, Berlin Chen, Nikita Nangia, Haokun Liu, Anhad Mohananey, Shikha Bordia,… find
This page in Markdown → https://md.research.elamur.ai/free/en/papers/warstadt-2019-investigating-bert-s-knowledge-language/