Unsupervised Parsing via Constituency Tests

Steven Cao, Nikita Kitaev, Dan Klein

TL;DR

This paper introduces a novel unsupervised parsing method that operationalizes classic linguistic "constituency tests"—such as replacing a phrase with a pronoun—to discover the hierarchical structure of sentences. By combining these tests with a neural grammaticality model and a self-refining optimization loop, the authors achieved a new state-of-the-art F1 score of 62.8 on the Penn Treebank, outperforming previous methods by a significant 7.6 points.

What Problem Does This Paper Address?

Parsing is the process of determining the hierarchical structure of a sentence (e.g., identifying that "the big dog" is a single unit or "constituent"). While supervised parsers are highly accurate, they require massive amounts of human-labeled data, which is expensive and unavailable for most of the world's languages.

Unsupervised parsing attempts to learn these structures from raw text alone. Historically, this has been incredibly difficult. Most recent approaches rely on indirect signals, like trying to predict the next word in a sentence (language modeling) and hoping the model learns syntax as a byproduct. This paper tackles the problem by returning to linguistic roots: using the same diagnostic tests linguists use to define what a "constituent" is in the first place.

Methods

The authors' approach, which they call "parsing via constituency tests," involves four main components:

  1. Constituency Tests: They define a set of transformations that can be applied to any span of words in a sentence. For example, if you have the sentence "The london market was in full retreat," and you want to test the span "the london market," you might try:
  2. Substitution: Replace it with a pronoun ("It was in full retreat").
  3. Clefting: Wrap it in a specific frame ("It was the london market that was in full retreat").
  4. Movement: Move it to the front of the sentence.
  5. Neural Grammaticality Model: To judge if these transformed sentences "sound right," they fine-tune a RoBERTa model on a "real vs. fake" task. They generate "fake" sentences by randomly shuffling, dropping, or swapping words in a large unlabeled corpus (English Gigaword).
  6. Parsing Algorithm: To parse a new sentence, the model scores every possible span by averaging the grammaticality scores of its various constituency tests. It then uses the CKY algorithm—a standard dynamic programming tool—to find the binary tree that maximizes the total score of all its spans.
  7. Refinement Loop: The initial model is a bit noisy. To improve it, they use an alternating optimization procedure: they use the current model to predict trees for a set of sentences, then treat those predicted trees as "pseudo-gold" labels to further fine-tune the grammaticality model.

Datasets

  • English Gigaword: 5 million sentences used for the initial "real/fake" pre-training of the grammaticality model.
  • Penn Treebank (PTB): The gold-standard benchmark for English parsing. The authors used the standard training sections (02-21) for their refinement procedure and the test section (23) for final evaluation.

Key Insights and Ideas

  • Linguistic Intuition as Inductive Bias: Instead of being "tabula rasa," this model is seeded with human linguistic knowledge (the tests), which provides a powerful "inductive bias" that guides the unsupervised learning process more effectively than language modeling alone.
  • Grammaticality as a Proxy for Structure: The core "aha moment" is that a model trained to distinguish random word salad from real sentences can effectively judge the subtle awkwardness of an invalid linguistic transformation.
  • Self-Consistency via Refinement: The refinement step is crucial. It forces the model to be self-consistent: if the parser decides a span is a constituent, the grammaticality model should learn to highly value the tests associated with that span.
This figure illustrates the evolution of a predicted tree. (a) shows the initial noisy tree, (b) shows the improvement after refinement, (c) shows the result after further enhancement with a URNNG model, and (d) is the human-labeled 'gold' standard. Note how the model corrects errors in prepositional phrase attachment as it progresses.

Key Results

  • State-of-the-Art Performance: The refined model achieved a mean 62.8 F1 score on the PTB, a massive jump over the previous best published result of 55.2 (Compound PCFG).
  • Closing the Gap: When the authors used their induced trees to initialize an Unsupervised Recurrent Neural Network Grammar (URNNG), the performance climbed to 71.3 F1. This is remarkably close to the performance of a supervised version of the same model (72.8 F1).
  • Interpretability: Unlike "black box" neural parsers, this method is interpretable. By looking at which constituency tests "fired" for a particular span, researchers can understand why the model made a specific decision.

Limitations and Future Work

  • Specific Error Patterns: The model still struggles with certain structures, such as correctly identifying adjectives that modify nouns (ADJPs) or correctly attaching complex modifying phrases.
  • Manual Test Design: Currently, the constituency tests are manually specified by the researchers. A promising future direction is to have the model learn or induce the best tests automatically.
  • Semantic Blindness: The model only cares about grammaticality, not meaning. A transformation like "stock prices rose" $\rightarrow$ "stock it" is grammatical but semantically nonsensical. Incorporating semantic preservation could further improve accuracy.

Summary updated

BibTeX
@inproceedings{cao2020unsupervised,
  author = {Steven Cao and Nikita Kitaev and Dan Klein},
  title = {{Unsupervised Parsing via Constituency Tests}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  url = {https://openreview.net/forum?id=9P0Fwm5i3I},
}
Figure