NoCoLA: The Norwegian Corpus of Linguistic Acceptability

Matias Jentoft, David Samuel

While there has been a surge of large language models for Norwegian in recent years, we lack any tool to evaluate their understanding of grammaticality. We present two new Norwegian datasets for this task. NoCoLA-class is a supervised binary classification task where the goal is to discriminate between acceptable and non-acceptable sentences. On the other hand, NoCoLA-zero is a purely diagnostic task for evaluating the grammatical judgement of a language model in a completely zero-shot manner, i.e. without any further training. In this paper, we describe both datasets in detail, show how to use them for different flavors of language models, and conduct a comparative study of the existing Norwegian language models.

Introduction

In recent years, the development of Large Language Models (LLMs) for Norwegian, such as NorBERT and ScandiBERT, has accelerated. However, a critical gap remained: the lack of standardized benchmarks to measure their fundamental understanding of Norwegian grammaticality. In English, the Corpus of Linguistic Acceptability (CoLA) serves this purpose. Without a Norwegian equivalent, it was difficult to determine if a model's performance stemmed from a deep linguistic understanding or merely from pattern memorization during fine-tuning. NoCoLA (Norwegian Corpus of Linguistic Acceptability) addresses this need, specifically targeting the Bokmål standard of written Norwegian.

Methodology and Datasets

NoCoLA is built upon the ASK Corpus, a collection of essays written by second-language (L2) learners of Norwegian. This choice ensures that the errors represent a natural distribution of human mistakes rather than synthetic noise. The dataset is significantly larger than its English counterpart, containing 144,867 sentences.

The researchers propose two distinct evaluation frameworks:

  1. NoCoLA_class (Supervised): A binary classification task where models are fine-tuned to distinguish between "acceptable" and "non-acceptable" sentences.
  2. NoCoLA_zero (Zero-shot): A diagnostic task requiring models to assign higher probabilities to correct sentences over their erroneous counterparts without any task-specific training. For Masked Language Models (MLMs), this is achieved using Pseudo-Log-Likelihood (PLL).
Distribution of error types in the NoCoLA dataset, showing a prevalence of inflection, word choice, and punctuation errors.

The dataset covers a wide range of error types, including inflection, word choice, punctuation, and word order, providing a comprehensive test of a model's grammatical sensitivity.

Key Results and Insights

The evaluation of various language models revealed several important trends. Language-specific models, particularly those trained on Norwegian or Scandinavian data, consistently outperformed general multilingual models like mBERT or XLM-R.

Performance comparison of various language models on the NoCoLA classification task, including accuracy and Matthews Correlation Coefficient (MCC).

The NorBERT 3 family emerged as the top performer in the classification task, reaching an accuracy of approximately 82.5%. However, the Matthews Correlation Coefficient (MCC)—a more robust metric for this binary task—peaked around 60%, indicating that linguistic acceptability remains a challenging frontier.

Interestingly, NorBERT 1 showed exceptional performance in the zero-shot task. This is attributed to its training on a smaller but "cleaner" corpus (Wikipedia and news) compared to the massive, noisier web-crawled data used for other models. This suggests that data quality is as crucial as quantity for developing an "innate" grammatical compass.

Limitations and Future Directions

While NoCoLA is a significant step forward, it currently focuses solely on Bokmål. Future work is needed to develop a similar benchmark for Nynorsk, Norway's other official written standard. Additionally, because the errors are sourced from L2 learners, they may not fully capture the specific types of slips made by native speakers.

The authors envision NoCoLA becoming a core component of a broader "Norwegian GLUE" benchmark suite, driving the development of models that don't just process Norwegian, but truly understand its structural nuances.

Summary updated

BibTeX
@inproceedings{jentoft2023nocola,
  author = {Matias Jentoft and David Samuel},
  title = {{NoCoLA: The Norwegian Corpus of Linguistic Acceptability}},
  booktitle = {NoDaLiDa},
  year = {2023},
  url = {https://openreview.net/forum?id=AbVo42OZX2},
}
Figure