Syntactic Topic Models

Jordan L. Boyd-Graber, David M. Blei

Abstract

The Syntactic Topic Model (STM) bridges the gap between probabilistic syntax models and topic models by simultaneously capturing both the grammatical structure of sentences and the overarching themes of a document. By convolving document-level topic weights with local syntactic transitions in a dependency tree, the STM discovers latent word clusters that are both semantically and syntactically coherent, resulting in a more predictive language model than using syntax or semantics alone.

Introduction

When humans process language, we employ two distinct types of reasoning: syntactic reasoning to understand how words fit together in a sentence, and semantic reasoning to understand how those words contribute to the broader theme of the document. Historically, probabilistic language models have forced a choice between these two. Topic models, such as Latent Dirichlet Allocation (LDA), treat documents as "bags of words," successfully identifying thematic patterns but ignoring sentence structure. Conversely, syntax models, like the Finite Tree with Independent Children (FTIC), analyze parse trees to understand parts of speech but neglect the broader thematic context.

The Syntactic Topic Model (STM) addresses this dichotomy. For example, in a sentence like "Next weekend, you could be relaxing in ____," a syntax model might predict any noun (e.g., "bed"), while a topic model might predict any travel-related word (e.g., "sailed"). The STM combines these constraints to correctly predict a contextually and grammatically appropriate word like "Bermuda."

The Syntactic Topic Model

The STM is a hierarchical Bayesian model that takes a corpus of documents parsed into dependency trees as input. The core innovation lies in the assignment of latent topics to words. Instead of drawing from a single distribution, the STM selects a topic based on the intersection of document-level weights (semantics) and parse-tree transitions (syntax).

Plate notation for the Syntactic Topic Model showing document-level and corpus-level parameters.

As shown in the plate diagram above, the model incorporates document-specific topic distributions $\theta_d$ and topic-word distributions $\tau_k$. The generative process for a word's topic $z$ is governed by both the document's theme and the topic of the word's parent in the dependency tree.

The model utilizes a "product of experts" approach, multiplying these two probability distributions and renormalizing them. This ensures that the chosen topic is highly probable under both the document's theme and the local grammar. Furthermore, the STM is nonparametric, employing stick-breaking processes to automatically determine the optimal number of topics. Due to the non-conjugate nature of the resulting distributions, the authors derive a fast approximate posterior inference algorithm using variational methods.

Experimental Evaluation

The model was evaluated using two primary datasets:

  • Synthetic Data: A custom dataset with a fixed grammar and thematic vocabularies for different parts of speech.
  • Penn Treebank: A real-world corpus of manually curated parse trees, converted into dependency parses.

Key Results

The STM demonstrated superior predictive power compared to models using only semantics (Hierarchical Dirichlet Process) or only syntax (Infinite Tree), as measured by perplexity on held-out data. Notably, the STM matched syntax-only models in predicting function words (e.g., prepositions) while remaining competitive with topic-only models for content words (e.g., nouns).

Discussion and Insights

The STM reveals several key linguistic properties:

  • The Power of Intersection: By satisfying dual constraints, the model identifies specialized clusters, such as distinguishing "financial nouns" from "corporate titles."
  • Syntactic Sources and Sinks: The model identifies verbs as syntactic "sources" that transition into specific thematic noun topics, while pronouns often serve as syntactic "sinks."
  • Functional vs. Topical Separation: The model naturally separates "functional" topics (common across documents) from "semantic" topics (specific to document content).

Conclusion and Future Work

While the STM represents a significant advancement, it currently relies on external parsers and assumes independence between sibling nodes in the dependency tree. Future work includes integrating native parsing into the model, removing sibling independence restrictions, and incorporating labeled dependency relations to create a fully domain-aware parser.

Summary updated

BibTeX
@inproceedings{boydgraber2008syntactic,
  author = {Jordan L. Boyd-Graber and David M. Blei},
  title = {{Syntactic Topic Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2008},
  url = {https://openreview.net/forum?id=Hyb8Iv-ObH},
}
Figure