TL;DR
This paper introduces a novel pretraining strategy that injects explicit hierarchical syntactic biases into BERT by distilling knowledge from a Recurrent Neural Network Grammar (RNNG). By approximating the teacher's word predictions in a bidirectional context, the authors create a "structure-distilled" BERT that significantly outperforms standard models on complex linguistic tasks like parsing and semantic role labeling, especially when training data is scarce.
What Problem Does This Paper Address?
Large-scale language models like BERT have shown a surprising ability to handle the syntax of natural language despite having no explicit "knowledge" of grammar or hierarchical structure. This has led to a debate: is massive data scale all we need, or do models still benefit from explicit inductive biases (built-in assumptions about how data is structured)?
The authors argue that while BERT is a powerful "denoising autoencoder," it lacks the hierarchical bias inherent in human language. However, the models that do have these biases—like RNNGs—are notoriously difficult to scale to the massive datasets BERT uses. The challenge is to find a way to give the scalable BERT the "syntactic wisdom" of the hierarchical RNNG without losing BERT's efficiency and bidirectional nature.
Methods
The researchers use Knowledge Distillation (KD), a process where a smaller or more specialized "teacher" model guides the learning of a "student" model.
- The Teacher: They use a subword-augmented RNNG (Recurrent Neural Network Grammar). Unlike standard models that see text as a flat sequence, RNNGs use a stack-based mechanism to explicitly build phrase-structure trees as they process text.
- The Mismatch Challenge: BERT is bidirectional (it looks at the whole sentence at once), while the RNNG teacher is autoregressive (it predicts the next word based only on the left context). Simply telling BERT to copy the RNNG's "next-word" prediction would ignore the right-hand context BERT already has access to.
- The Solution (Posterior Approximation): To bridge this gap, the authors develop a way to approximate the RNNG’s posterior distribution—essentially asking the teacher, "Given the words to the left and the words to the right, what is the probability of this specific word?" They achieve this efficiently by combining a standard left-to-right RNNG with a "reverse" right-to-left RNNG using a Product-of-Experts (PoE) style approximation.
- Pretraining: They pretrain BERT on a large corpus where the objective is a mix of the standard Masked Language Model (MLM) loss and the new Syntactic Distillation loss.
Datasets
- Teacher Training: The RNNG teachers were trained on a subset of the BERT pretraining data (3.6M sentences) annotated with "silver-grade" trees from a high-quality parser.
- Student Pretraining: The BERT student was pretrained on the standard mix of Wikipedia and the BooksCorpus.
- Evaluation:
- Syntactic/Structured Tasks: Penn Treebank (PTB) for phrase-structure and dependency parsing; Brown, Genia, and English Web Treebank (EWT) for out-of-domain parsing.
- Semantic Tasks: CoNLL 2012 for Semantic Role Labeling (SRL) and Coreference Resolution.
- Probing: CCG supertagging.
- General NLU: The GLUE benchmark.
Key Insights and Ideas
- Hierarchical Bias > Data Scale: The results support the idea that explicit structural biases are more important for syntactic competence than simply adding more data to a "flat" model.
- Bidirectionality Matters in Distillation: The "Aha!" moment in the methodology is that for a bidirectional student like BERT, the teacher must also provide a bidirectional signal. Distilling from just a left-to-right teacher is significantly less effective than using the authors' posterior approximation.
- Sample Efficiency: Syntactic biases act as a "force multiplier" in low-data regimes. The structure-distilled BERT showed its largest gains when fine-tuned on only 5% of the available task data, suggesting that a better "structural foundation" helps the model learn new tasks faster.
- The GLUE Trade-off: Interestingly, while the model crushed structured tasks, it showed mixed results on GLUE. This suggests a "dissociation" between the skills needed for grammatical/structural tasks and the lexical/semantic reasoning often required for GLUE.
Key Results
- Structured Prediction: The structure-distilled BERT (
UG-KD) reduced relative error by 2% to 21% across six different tasks compared to a standard BERT baseline. - CCG Supertagging: This task saw the most dramatic improvement, with a 21.57% relative error reduction, proving the model's superior grasp of how words function within complex syntactic frames.
- Parsing: On the Penn Treebank, the model achieved a 95.70 F1 score, a significant jump over the 95.35 baseline.
- Low-Resource Performance: In a 5% data scenario for SRL, the distilled model improved F1 from 79.9 to 80.6, a 3.5% error reduction compared to the baseline.
Limitations and Future Work
- Dependency on "Silver" Trees: The method requires a high-quality parser to generate the initial trees used to train the RNNG teacher. This makes it harder to apply to low-resource languages that don't already have good parsers.
- Pretraining Overhead: The current implementation is about 50% slower than standard BERT pretraining due to I/O bottlenecks involved in processing the teacher's distributions.
- The "Meaning" Gap: The slight dip in some GLUE tasks suggests that while the model is a better "grammarian," it might have slightly less "common-sense" or lexical knowledge, possibly because the teacher was trained on a smaller subset of data. Future work could involve scaling the teacher further or finding better ways to balance syntactic and semantic signals.
Summary updated