An Empirical Study of Compound PCFGs

Yanpeng Zhao, Ivan Titov

Abstract

Compound probabilistic context-free grammars (C-PCFGs) have recently established a new state of the art for unsupervised phrase-structure grammar induction. However, due to the high space and time complexities of chart-based representation and inference, it is difficult to investigate C-PCFGs comprehensively. In this work, we rely on a fast implementation of C-PCFGs to conduct an evaluation complementary to that of Kim et al. (2019). We start by analyzing and ablating C-PCFGs on English treebanks. Our findings suggest that (1) C-PCFGs are data-efficient and can generalize to unseen sentence/constituent lengths; and (2) C-PCFGs make the best use of sentence-level information in generating preterminal rule probabilities. We further conduct a multilingual evaluation of C-PCFGs. The experimental results show that the best configurations of C-PCFGs, which are tuned on English, do not always generalize to morphology-rich languages.

Introduction

Unsupervised grammar induction—the task of learning the hierarchical structure of language without labeled treebanks—has long been a "holy grail" in computational linguistics. Recently, Compound Probabilistic Context-Free Grammars (C-PCFGs) have emerged as the dominant approach. Unlike traditional PCFGs that use a fixed set of rule probabilities across an entire corpus, C-PCFGs treat rule probabilities as a latent variable ($z$) that varies per sentence, effectively creating a "mixture" of infinite grammars.

Despite their success, C-PCFGs have remained somewhat of a "black box" due to the high computational complexity of chart-based inference. This study provides a much-needed empirical deep dive into C-PCFGs, exploring their data efficiency, generalization capabilities, and the specific components that drive their performance.

Methodology

The authors leverage a fast implementation of C-PCFGs (using the Torch-Struct library) to conduct extensive experiments across fourteen domains in ten languages, including English (WSJ, Brown, Enweb), Chinese (CTB), and eight morphology-rich languages from the SPMRL 2014 shared task.

The core of the methodology involves systematic Ablation Studies. By "freezing" different parts of the C-PCFG to behave like a standard Neural PCFG (N-PCFG), the researchers tested what happens when the latent sentence embedding $z$ is removed from start rules, nonterminal rules, and preterminal rules (word generation). This allowed them to pinpoint exactly where the "compounding" effect provides the most value.

Data Efficiency and Length Generalization

A key finding of the study is that C-PCFGs are remarkably data-efficient and demonstrate strong compositionality. A model trained only on sentences shorter than 11 tokens still performs reasonably well on longer sequences. Furthermore, a C-PCFG trained only on WSJ sentences with fewer than 31 tokens achieved a 54.8% F1 on the full test set, proving it can successfully compose smaller learned structures into larger, unseen ones.

Recall performance of C-PCFG vs N-PCFG across constituent lengths on three English test sets.

As shown in the recall analysis, while performance naturally declines as constituent length increases, the C-PCFG generally maintains a performance edge or parity with the N-PCFG, particularly in the short-to-medium length range where the majority of constituents reside.

Structural Insights: The Preterminal Priority

The study reveals that sentence-level information is most crucial for preterminal rules. When the model is forced to use global (corpus-level) probabilities for generating words from tags, performance collapses, often regressing to standard N-PCFG levels. This suggests the model's primary strength lies in "sentence-aware" part-of-speech induction.

However, the model exhibits specific structural biases. It excels at identifying Noun Phrases (NPs) but struggles with Verb Phrases (VPs) and Subordinate Clauses (SBARs).

Distribution of gold constituent types across lengths 2-12 for WSJ, Brown, and Enweb test sets.

The heatmaps above illustrate that NPs are the most frequent constituents at short lengths (2-3), where the model receives its strongest learning signal. Interestingly, for longer VPs, a simple "right-branching" baseline often outperforms the C-PCFG, suggesting that the model's context-free assumptions may struggle with the complexity of long-range verbal dependencies.

Multilingual Challenges and Limitations

While C-PCFGs achieved the highest overall mean F1 (33.6%) across nine languages, configurations tuned for English do not generalize well to morphology-rich languages like Polish or Swedish. In these languages, the "word" is a more complex unit, and the current model's treatment of words as atomic units creates a performance gap.

Additionally, the authors noted high variance in results depending on random seeds, particularly in Chinese and Swedish. Future work will likely need to incorporate sub-word or morphological knowledge into sentence embeddings to bridge this gap and move beyond the limitations of the context-free assumption.

Conclusion

This empirical study confirms that C-PCFGs are a powerful tool for unsupervised parsing, primarily due to their ability to use sentence-level context for word generation and their capacity for length generalization. However, their struggle with complex constituents like VPs and their inconsistent performance across diverse languages highlight clear paths for future architectural improvements in grammar induction.

Summary updated

Abstract

Compound probabilistic context-free grammars (C-PCFGs) have recently established a new state of the art for unsupervised phrase-structure grammar induction. However, due to the high space and time complexities of chart-based representation and inference, it is difficult to investigate C-PCFGs comprehensively. In this work, we rely on a fast implementation of C-PCFGs to conduct an evaluation complementary to that of~\citet{kim-etal-2019-compound}. We start by analyzing and ablating C-PCFGs on English treebanks. Our findings suggest that (1) C-PCFGs are data-efficient and can generalize to unseen sentence/constituent lengths; and (2) C-PCFGs make the best use of sentence-level information in generating preterminal rule probabilities. We further conduct a multilingual evaluation of C-PCFGs. The experimental results show that the best configurations of C-PCFGs, which are tuned on English, do not always generalize to morphology-rich languages.
BibTeX
@inproceedings{zhao2021empirical,
  author = {Yanpeng Zhao and Ivan Titov},
  title = {{An Empirical Study of Compound PCFGs}},
  booktitle = {EACL},
  year = {2021},
}
Figure