NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Computationally Efficient Algorithm for Learning Topical Collocation Models

Zhendong Zhao, Lan Du, Benjamin Börschinger, John K. Pate, Massimiliano Ciaramita, Mark Steedman, Mark Johnson

Abstract

Traditional topic models like Latent Dirichlet Allocation (LDA) often rely on the "bag-of-words" assumption, ignoring word order and multi-word phrases. While more advanced models like Adaptor Grammars (AG) can capture these collocations, their cubic computational complexity prevents scaling to large datasets. This paper introduces the Topical Collocation Model (TCM), which reformulates phrase discovery as a Bayesian word segmentation task. By utilizing a point-wise Gibbs sampler and exploiting data sparsity, TCM achieves linear complexity and massive speedups, making it practical for large-scale natural language processing tasks.

Introduction: Beyond the Bag-of-Words

Most topic models assume words are generated independently, a simplification that often loses critical meaning. For instance, "hot dog" conveys a specific concept distinct from the individual words "hot" and "dog." Previous attempts to incorporate phrases either relied on rigid pre-processing pipelines, were limited to bigrams, or utilized computationally expensive grammar-based parsing (like AG-colloc) with $O(N^3)$ complexity relative to document length. This makes them unsuitable for processing massive web data or news archives.

The Topical Collocation Model (TCM)

The authors propose moving from a "grammar parsing" perspective to a "segmentation" view. TCM re-casts the problem as a Bayesian word segmentation task where the model moves through a document and decides whether to place a "boundary" between adjacent words. If no boundary is placed, the words form a collocation. This approach naturally learns phrases of any length—unigrams, bigrams, or longer—without requiring a predefined maximum length.

Key technical innovations include:

  • Point-wise Gibbs Sampler: This sampler jointly decides on boundaries and topic assignments. It reduces the complexity from $O(N^3)$ to $O(N)$ relative to document length.
  • Sparse Sampling: Borrowing from "SparseLDA" techniques, the model optimizes calculations by skipping word-topic combinations that are unlikely to occur. Since specific collocations are rarer than individual words, this optimization is exceptionally effective.
  • Parallelization: The algorithm is designed to be "embarrassingly parallel," allowing it to run efficiently across dozens of CPU cores.
Figure 5: Training time (seconds per iteration) comparison between AG-colloc and TCM variants. Sparse TCM provides orders of magnitude speedup.

Key Results and Insights

The TCM algorithm was evaluated against several baselines, including LDA, TNG, and the original AG-colloc, across classification and information retrieval tasks.

Efficiency and Scalability

The TCM algorithm is roughly six times faster than a standard non-sparse version and orders of magnitude faster than the original grammar-based approach. As shown in Figure 5, Sparse TCM reduces iteration times from hundreds of seconds to less than one second on benchmark datasets. Furthermore, the model exhibits strong parallel scaling, allowing it to handle hundreds of thousands of documents efficiently.

Figure 1: Speedup vs. number of processors for different datasets and models. TCM shows robust parallel efficiency.

Performance and Coherence

In text classification (e.g., Movie Reviews, Reuters-21578) and information retrieval (e.g., SJMN, AP News), TCM consistently matched or outperformed the original AG-colloc and significantly beat standard LDA. Human evaluations via "topic intrusion" tasks on Amazon Mechanical Turk confirmed that TCM produces more interpretable topics. By grouping phrases together, the resulting topic word lists are more coherent to human readers than disconnected unigrams.

Conclusion

The primary contribution of this work is the realization that the power of Adaptor Grammar models can be harnessed through a more efficient inference algorithm. By changing the underlying mechanism from parsing to segmentation, TCM makes high-quality topical collocation modeling practical for real-world, large-scale datasets. Future work may involve exploring Pitman-Yor Processes to better capture power-law distributions in language and investigating alternative inference methods like variational inference.

Summary updated

BibTeX
@inproceedings{zhao2015computationally,
  author = {Zhendong Zhao and Lan Du and Benjamin Börschinger and John K. Pate and Massimiliano Ciaramita and Mark Steedman and Mark Johnson},
  title = {{A Computationally Efficient Algorithm for Learning Topical Collocation Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-1141},
}
Figure