Unsupervised Parsing via Constituency Tests

Steven Cao, Nikita Kitaev, Dan Klein

Abstract

We propose a method for unsupervised parsing based on the linguistic notion of a constituency test. One type of constituency test involves modifying the sentence via some transformation (e.g. replacing the span with a pronoun) and then judging the result (e.g. checking if it is grammatical). Motivated by this idea, we design an unsupervised parser by specifying a set of transformations and using an unsupervised neural acceptability model to make grammaticality decisions. To produce a tree given a sentence, we score each span by aggregating its constituency test judgments, and we choose the binary tree with the highest total score. While this approach already achieves performance in the range of current methods, we further improve accuracy by fine-tuning the grammaticality model through a refinement procedure, where we alternate between improving the estimated trees and improving the grammaticality model. The refined model achieves 62.8 F1 on the Penn Treebank test set, an absolute improvement of 7.6 points over the previously best published result.

1. Introduction

Parsing—the process of determining the hierarchical structure of a sentence—is a fundamental task in natural language processing. Traditionally, high-performing parsers require large amounts of human-annotated "gold" trees. Unsupervised parsing aims to discover these structures from raw text alone, which is crucial for low-resource languages or specialized domains where labeled data is scarce.

Previous unsupervised methods typically relied on latent variable models or signals from language modeling, which often lack a direct connection to linguistic theory. This paper bridges that gap by operationalizing classical linguistic constituency tests. The core idea is that if a sequence of words is a true constituent, it should be possible to transform the sentence in specific ways (e.g., substitution or movement) without making it ungrammatical.

2. Methodology

The proposed approach leverages modern neural models to automate linguistic testing through a four-step process:

  1. Constituency Transformations: Several tests are defined, such as Substitution (replacing a span with a pro-form like "it"), Clefting (moving a span into an "It is [span] that..." structure), and Movement (shifting the span to the front or end of the sentence).
  2. Grammaticality Judgment: A RoBERTa model acts as the judge. It is initially trained on a "real vs. fake" task to distinguish actual sentences from those corrupted by random shuffling or word dropping.
  3. Scoring and Parsing: To score a span, all transformations are applied and the model's grammaticality scores are averaged. The CKY algorithm is then used to find the binary tree that maximizes the total expected number of constituents.
  4. Refinement (Self-Training): The initial model is improved through an alternating optimization: producing trees with the current model, then using those predicted trees as "pseudo-gold" labels to further fine-tune the RoBERTa model. This allows the model to bootstrap from detecting random noise to making subtle linguistic judgments.

3. Key Results and Evaluation

The model was evaluated on the Penn Treebank (PTB), the standard benchmark for English parsing. The refinement process proved highly effective, significantly improving the accuracy of the induced trees.

Comparison of parsing results across different stages: (a) Before Refinement, (b) After Refinement, (c) After Refinement + URNNG, and (d) the Gold standard tree.
  • New State-of-the-Art: The refined model achieved 62.8 F1 on the PTB, a significant leap over the previous best of 55.2 F1.
  • Maximum Performance: When combined with an Unsupervised Recurrent Neural Network Grammar (URNNG), performance climbed to 71.3 F1, remarkably close to supervised binary parsing performance (~72.8 F1).
  • Qualitative Success: Analysis showed the model is particularly strong at identifying Adjective Phrases (ADJP) and Adverbial Phrases (ADVP), which are often difficult for other unsupervised parsers.

4. Discussion and Future Work

This work demonstrates that classical linguistic tests provide a powerful inductive bias for modern neural models. The refinement procedure allows the system to be robust; even if a specific test for one span is noisy, the requirement to form a valid, high-scoring global tree helps filter out false positives.

Future research could address current limitations, such as incorporating semantic checks to ensure transformations preserve meaning, or automatically learning which transformations are valid tests for languages other than English. Currently, the model still faces challenges with specific structures like complex nested prepositional phrases or certain infinitive attachments.

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