Neural Network Acceptability Judgments

Alex Warstadt, Amanpreet Singh, Samuel R. Bowman

Abstract

This paper investigates the ability of artificial neural networks to judge the grammatical acceptability of a sentence, with the goal of testing their linguistic competence. We introduce the Corpus of Linguistic Acceptability (CoLA), a set of 10,657 English sentences labeled as grammatical or ungrammatical from published linguistics literature. As baselines, we train several recurrent neural network models on acceptability classification, and find that our models outperform unsupervised models by Lau et al (2016) on CoLA. Error-analysis on specific grammatical phenomena reveals that both Lau et al.'s models and ours learn systematic generalizations like subject-verb-object order. However, all models we test perform far below human level on a wide range of grammatical constructions.

Introduction: Testing Linguistic Competence

Artificial Neural Networks (ANNs) have achieved remarkable success in practical Natural Language Processing (NLP) tasks, such as machine translation and sentiment analysis. However, a model's ability to perform a specific task does not necessarily imply a deep understanding of the underlying grammatical structure of a language. In linguistics, the standard measure of "linguistic competence" is the acceptability judgment: the ability of a native speaker to determine whether a sentence is grammatically "legal."

To rigorously test this capability in AI, we introduce the Corpus of Linguistic Acceptability (CoLA). CoLA consists of 10,657 sentences drawn from 23 different linguistics publications, including textbooks and theoretical papers. Unlike previous datasets that relied on machine-generated errors, CoLA uses expert-labeled examples designed to probe subtle and complex grammatical rules.

Examples of grammatical and ungrammatical sentences from CoLA.

Methodology

We evaluate several neural network architectures to establish baselines for the acceptability judgment task:

  • Unsupervised Models: We utilize $n$-gram models and LSTM Language Models (LMs) trained on the British National Corpus (BNC). These models flag sentences as unacceptable if they have a low probability relative to the individual words they contain.
  • Supervised Pooling Classifiers: These models employ a bidirectional LSTM (BiLSTM) to encode sentences into fixed-length vectors, which are then processed by a classification layer.
  • Transfer Learning and Auxiliary Tasks: We experiment with contextualized word representations (ELMo-style) and a "Real/Fake" auxiliary pre-training task. In this task, the model learns to distinguish authentic BNC sentences from "fake" ones generated through word permutation or LM sampling.

Performance is measured using the Matthews Correlation Coefficient (MCC), a metric that accounts for the class imbalance in CoLA (which is approximately 70% grammatical).

Experimental Results

Our findings indicate a significant performance gap between current neural models and human experts. While the best-performing models significantly outperform unsupervised baselines and simple bag-of-words models, they remain far from human-level proficiency.

Performance of neural models vs. human benchmarks.

As shown in the results table, human experts achieve an MCC of 0.697 (roughly 87% accuracy). In contrast, our best model—a pooling classifier using ELMo-style embeddings and "Real/Fake" pre-training—achieved an MCC of 0.341 on in-domain data and 0.281 on out-of-domain data.

Discussion and Conclusion

Error analysis reveals that while neural models successfully learn basic generalizations, such as Subject-Verb-Object (SVO) word order, they struggle with "non-local dependencies." These are linguistic rules where a word at the beginning of a sentence determines the legality of a structure much later (e.g., complex "Wh-" question extractions).

The drop in performance on out-of-domain data—sentences from linguistic sources not encountered during training—suggests that models may be overfitting to specific stylistic patterns rather than internalizing general principles of English grammar. This research highlights the "poverty of the stimulus" challenge: while neural networks can learn a great deal from raw data, they currently lack the robust, generalized linguistic intuition characteristic of human speakers. Future work will focus on developing regularization and pre-training strategies to help models learn the fundamental ingredients of grammaticality more efficiently.

Summary updated

BibTeX
@article{warstadt2019neural,
  author = {Alex Warstadt and Amanpreet Singh and Samuel R. Bowman},
  title = {{Neural Network Acceptability Judgments}},
  journal = {Trans. Assoc. Comput. Linguistics2019},
  year = {2019},
  url = {https://openreview.net/forum?id=FlfCFPwkyG},
}
Figure