A multilabel approach to morphosyntactic probing

Naomi Tachikawa Shapiro, Amandalynne Paullada, Shane Steinert-ThrelkeldEMNLP 2021

Abstract

Traditional probing techniques in Natural Language Processing (NLP) often evaluate grammatical features in isolation, failing to capture the interconnected nature of morphosyntax. We present a multilabel probing framework that predicts "multi-hot" vectors of features simultaneously. Applying this to multilingual BERT (mBERT), we find that grammatical information is most concentrated in the middle layers (layer 6) and that multilingual training enhances probe selectivity. Our results demonstrate that mBERT learns robust, cross-linguistically stable representations of grammar that can be efficiently extracted using this holistic approach.

Introduction

In the world of NLP, "probing" is a technique used to understand the internal representations of neural language models. If a simple linear model (a "probe") can predict a grammatical feature like "plural" from a word's embedding, we assume the language model has "learned" that feature. However, traditional probing is often a "one-at-a-time" affair, training separate probes for part-of-speech, gender, or tense. This approach is computationally expensive and ignores the reality of language: grammatical features do not exist in isolation. In many languages, a single word ending might signal person, number, and gender all at once.

Researchers at the University of Washington have introduced a more efficient and holistic way to probe what large language models know about grammar. By switching to a multilabel approach, they demonstrate that mBERT simultaneously encodes a wide array of morphosyntactic features and that these representations are often shared across related languages.

Methodology

The authors propose multilabel morphosyntactic probing. Instead of predicting a single category, the probe predicts a "multi-hot" vector—a long string of 0s and 1s where multiple positions can be "on" to represent concurrent features (e.g., a word marked as both NOUN and Number=Plur).

Figure 1: Example of multi-hot vector representations used in the multilabel probing framework.

The study utilized "mBERT-base-cased," freezing the model and training simple linear classifiers on top of its 12 layers. They tested even-numbered layers to identify where grammatical information is most concentrated. To ensure the probe wasn't just "memorizing" word-to-label mappings, they used a control task to measure selectivity—the gap between diagnostic performance and control performance.

The study relies on Universal Dependencies (UD) for consistent grammatical annotation. The training set included seven typologically diverse languages (Afrikaans, Croatian, Finnish, Hebrew, Korean, Spanish, and Turkish), while six additional languages served as a zero-shot set to test cross-lingual transfer.

Results and Discussion

The "Middle Layer" Sweet Spot

Across almost all languages, mBERT layer 6 (the middle of the model) provided the best representations for morphosyntactic features. As the model moves toward the final layers, performance drops as the embeddings become more specialized for the "cloze" task (predicting missing words) it was trained on.

Figure 2: Micro-averaged F1 scores and selectivity across mBERT layers for seven primary languages.

Selectivity and Multilingualism

While probes trained on a single language had high F1 scores (between 0.83 and 0.97), probes trained on a mix of languages showed higher selectivity. This suggests that seeing multiple languages forces the probe to rely on actual linguistic features rather than memorizing language-specific quirks.

Grammar is Shared

Zero-shot experiments revealed that mBERT "understands" language families. For example, a probe trained on Hebrew performed remarkably well on Arabic, indicating mBERT has learned a generalized representation of "Semitic-ness." Furthermore, in a case study on Hebrew, the authors found that mBERT could often "see" definite articles that were orthographically invisible (covert) by looking at the grammatical agreement of surrounding words.

Conclusion

The multilabel approach allowed researchers to evaluate 166 different feature labels simultaneously, significantly streamlining the probing process. While the authors acknowledge limitations regarding domain narrowness in UD datasets, the study establishes that mBERT develops robust internal representations of grammar. Future work will investigate how these internal "grammatical scores" correlate with the performance of downstream tasks like machine translation.

Summary updated

BibTeX
@inproceedings{shapiro2021multilabel,
  author = {Naomi Tachikawa Shapiro and Amandalynne Paullada and Shane Steinert-Threlkeld},
  title = {{A multilabel approach to morphosyntactic probing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.382},
}
Figure