Investigating BERT's Knowledge of Language: Five Analysis Methods with NPIs

Alex Warstadt, Yu Cao, Ioana Grosu, Wei Peng, Hagen Blix +11 more
9/5/2019
cs.CL

Official code: alexwarstadt/data_generation (33 stars, Python, last commit 2023-09-06).

Abstract

Though state-of-the-art sentence representation models can perform tasks requiring significant knowledge of grammar, it is an open question how best to evaluate their grammatical knowledge. We explore five experimental methods inspired by prior work evaluating pretrained sentence representation models.

Show full abstract

We use a single linguistic phenomenon, negative polarity item (NPI) licensing in English, as a case study for our experiments. NPIs like "any" are grammatical only if they appear in a licensing environment like negation ("Sue doesn't have any cats" vs. "Sue has any cats"). This phenomenon is challenging because of the variety of NPI licensing environments that exist. We introduce an artificially generated dataset that manipulates key features of NPI licensing for the experiments. We find that BERT has significant knowledge of these features, but its success varies widely across different experimental methods. We conclude that a variety of methods is necessary to reveal all relevant aspects of a model's grammatical knowledge in a given domain.

View on arXivView PDF

Code Implementations(1)

3320PythonFeb 20, 20193 years ago

Similar Papers

Cite this paper

@article{warstadt2019investigating,
  title  = {Investigating BERT's Knowledge of Language: Five Analysis Methods with NPIs},
  author = {Alex Warstadt and Yu Cao and Ioana Grosu and Wei Peng and Hagen Blix and Yining Nie and Anna Alsop and Shikha Bordia and Haokun Liu and Alicia Parrish and Sheng-Fu Wang and Jason Phang and Anhad Mohananey and Phu Mon Htut and Paloma Jeretič and Samuel R. Bowman},
  year   = {2019},
  eprint = {1909.02597},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.02597}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1909.02597.svg)](https://codeofpaper.com/paper/1909.02597)

Discussion