Abstract
Textual representation learners trained on large amounts of data have achieved notable success on downstream tasks; intriguingly, they have also performed well on challenging tests of syntactic competence. Given this success, it remains an open question whether scalable learners like BERT can become fully proficient in the syntax of natural language by virtue of data scale alone, or whether they still benefit from more explicit syntactic biases. To answer this question, we introduce a knowledge distillation strategy for injecting syntactic biases into BERT pretraining, by distilling the syntactically informative predictions of a hierarchical—albeit harder to scale—syntactic language model. Since BERT models masked words in bidirectional context, we propose to distill the approximate marginal distribution over words in context from the syntactic LM. Our approach reduces relative error by 2-21% on a diverse set of structured prediction tasks, although we obtain mixed results on the GLUE benchmark. Our findings demonstrate the benefits of syntactic biases, even in representation learners that exploit large amounts of data, and contribute to a better understanding of where syntactic biases are most helpful in benchmarks of natural language understanding.
Introduction
Large-scale language models like BERT have demonstrated a surprising capacity for handling natural language syntax despite lacking explicit grammatical knowledge. This success has sparked a debate: is massive data scale sufficient for syntactic proficiency, or do models still require explicit inductive biases? While BERT is a powerful denoising autoencoder, it lacks the hierarchical bias inherent in human language. Conversely, models with such biases, like Recurrent Neural Network Grammars (RNNGs), are difficult to scale. This research explores whether the efficiency of BERT can be combined with the "syntactic wisdom" of hierarchical models through knowledge distillation.
Methodology
The researchers employ Knowledge Distillation (KD) to bridge the gap between a hierarchical "teacher" and a bidirectional "student."
- The Teacher: A subword-augmented RNNG serves as the teacher. Unlike standard sequential models, RNNGs use a stack-based mechanism to explicitly construct phrase-structure trees.
- Bridging the Bidirectional Gap: BERT is bidirectional, whereas the RNNG is autoregressive (predicting words based only on left context). To ensure the teacher provides a compatible signal, the authors approximate the RNNG’s posterior distribution—asking the teacher for the probability of a word given both left and right contexts. This is achieved by combining a standard left-to-right RNNG with a reverse right-to-left RNNG using a Product-of-Experts (PoE) approximation.
- Pretraining: The BERT student is pretrained using a combined objective of the standard Masked Language Model (MLM) loss and the new Syntactic Distillation loss.
Experimental Setup
The RNNG teachers were trained on 3.6 million sentences annotated with "silver-grade" syntactic trees. The BERT student was then pretrained on a standard corpus of Wikipedia and BooksCorpus. Evaluation spanned a diverse set of tasks, including phrase-structure and dependency parsing (PTB), out-of-domain parsing (Brown, Genia, EWT), Semantic Role Labeling (SRL), Coreference Resolution, and CCG supertagging, alongside the general NLU benchmark, GLUE.
Key Results and Analysis
The structure-distilled BERT (specifically the UG-KD variant) demonstrated significant improvements across structured prediction tasks, reducing relative error by 2% to 21% compared to standard BERT baselines.
The most dramatic improvement occurred in CCG Supertagging, with a 21.57% relative error reduction. This suggests that the distilled model has a superior grasp of how words function within complex syntactic frames. On the Penn Treebank (PTB), the model achieved a 95.70 F1 score, outperforming the 95.35 baseline.
Sample Efficiency and Low-Resource Performance
A critical finding is that syntactic biases act as a "force multiplier" when training data is scarce. The structure-distilled model showed its largest gains in low-data regimes, suggesting that a stronger structural foundation allows the model to learn new tasks more efficiently.
In a scenario with only 5% of available SRL data, the distilled model improved F1 from 79.9 to 80.6, representing a 3.5% error reduction over the baseline.
Discussion and Limitations
While the model excelled at structured tasks, results on the GLUE benchmark were mixed. This suggests a dissociation between the skills required for structural/grammatical tasks and the lexical/semantic reasoning often tested by GLUE.
Limitations include a dependency on "silver" trees for teacher training, which may limit applicability to low-resource languages. Additionally, the pretraining process is approximately 50% slower than standard BERT due to the overhead of processing the teacher's distributions. Future work may focus on scaling the teacher further or better balancing syntactic and semantic signals to close the gap on general NLU benchmarks.
Summary updated