Abstract
Transformer-based language models have revolutionized NLP, but their ability to grasp the structural nuances of languages other than English remains a subject of active research. This paper, presented at the 2020 KONVENS conference, introduces a comprehensive suite of 12,426 targeted syntactic tests designed to evaluate German BERT models. Developed by researchers at DFKI, the study focuses on subject-verb agreement and reflexive anaphora, revealing that while state-of-the-art models like GBERT_large perform well on simple structures, they face significant hurdles with complex, long-distance dependencies.
Introduction
Since the advent of BERT, the NLP community has sought to "probe" these models to determine if they learn genuine linguistic rules or merely exploit statistical patterns. Most probing research has focused on English, leaving a gap for languages with richer morphology and more flexible word order like German. German presents unique challenges: complex inflectional systems (case, gender, number), flexible word order where the subject is not necessarily sentence-initial, and long-distance dependencies. This study addresses the lack of standardized syntactic "stress tests" for German Transformer Language Models (TLMs).
Methodology
The authors adapted the methodology of Marvin and Linzen (2018) for the German language. The core approach relies on:
- Minimal Pairs: Generating sentence pairs that differ by only one word, rendering one grammatical and the other ungrammatical (e.g., "Der Autor lacht" vs. "Der Autor lachen").
- Whole-Sentence Scoring: To avoid issues with sub-tokenization in standard masking approaches, the authors utilized cross-entropy loss to score entire sentences. A model "passes" a test if it assigns a lower loss (higher probability) to the grammatical sentence.
- Model Comparison: The evaluation compared GBERT_large (trained on 16GB of text) and distilGBERT (a smaller version trained on half the data).
Dataset and Test Cases
The researchers developed a new dataset comprising 12,426 sentences generated via hand-crafted Context-Free Grammars (CFGs). To ensure failures were due to syntactic misunderstanding rather than lexical ignorance, a controlled vocabulary of only 88 common lexemes was used.
The suite includes 14 test cases covering simple sentences, non-local agreement (with distractors like prepositional phrases or relative clauses), and German-specific structures like "Pre-field" (object-first) and "Extended Modifiers."
Results and Discussion
The evaluation revealed several key insights into the linguistic capabilities of German TLMs.
Scale and Syntax
Model size significantly impacts syntactic performance. GBERT_large outperformed distilGBERT in 13 out of 14 tasks, suggesting that deeper linguistic intuition is a byproduct of larger-scale training.
Robustness to Distractors
Models generally handled "attractors"—nouns with a different number than the subject—quite well. For instance, in "Der Autor neben den Landstrichen lacht," the models correctly ignored the plural "Landstrichen" to agree the verb with the singular "Autor."
The Long-Distance Dependency Wall
The most significant failure point was VP Coordination. When multiple verbs are linked to a single subject (e.g., "The author talks... and laughs"), accuracy dropped sharply. For "Medium VP Coordination," distilGBERT's accuracy fell to 48.13%, performing worse than random chance.
Morphological Cues
Unlike English models, German TLMs appear to leverage case marking (e.g., der vs. den) to identify subjects in scrambled word orders. The models achieved approximately 80% accuracy on "Pre-field" (object-first) sentences, demonstrating a grasp of German's flexible syntax.
Conclusion
While German Transformer models show a strong command of basic grammar, their performance on complex dependencies like VP coordination reveals clear "blind spots." The use of synthetic data remains a limitation, as it lacks the lexical diversity of natural language. Future research will likely focus on real-world language samples and more granular analyses of the attention mechanisms driving these syntactic decisions.
Summary updated