Inferensys

Glossary

Correlated Topic Model (CTM)

An extension of Latent Dirichlet Allocation that uses a logistic normal distribution to explicitly model correlations between topic proportions within a document corpus.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
DEFINITION

What is Correlated Topic Model (CTM)?

The Correlated Topic Model (CTM) is a probabilistic graphical model that extends Latent Dirichlet Allocation by replacing the Dirichlet prior with a logistic normal distribution to explicitly model correlations between latent topics.

The Correlated Topic Model (CTM) is a hierarchical Bayesian model that represents documents as mixtures of latent topics, where the topic proportions are drawn from a logistic normal distribution rather than a Dirichlet distribution. This substitution allows CTM to capture the natural co-occurrence patterns between topics—for instance, a document about genetics is likely to also discuss bioinformatics—via a covariance matrix over the topic space.

Unlike Latent Dirichlet Allocation (LDA), which assumes near-independence of topics through its Dirichlet prior, CTM models the pairwise correlations between topics explicitly. Inference is typically performed using variational inference due to the non-conjugacy of the logistic normal prior, making it computationally more intensive but yielding richer representations of thematic structure in corpora where topics are inherently correlated.

CORRELATED TOPIC MODEL

Key Features of CTM

The Correlated Topic Model (CTM) extends LDA by replacing the Dirichlet prior with a logistic normal distribution, enabling the explicit modeling of correlations between topic proportions within a document corpus.

01

Logistic Normal Prior

CTM replaces the Dirichlet prior of LDA with a logistic normal distribution over the topic simplex. This is achieved by drawing a multivariate Gaussian vector and mapping it to the simplex via a softmax transformation. This prior naturally captures the intuition that the presence of one topic (e.g., 'genetics') increases the probability of a related topic (e.g., 'disease'), a correlation structure the Dirichlet cannot model due to its near-independent neutrality property.

02

Covariance Matrix Estimation

The core innovation of CTM is the estimation of a topic covariance matrix from the corpus. This matrix quantifies the pairwise correlations between all latent topics.

  • Positive covariance: Topics tend to co-occur in documents.
  • Negative covariance: Topics tend to be mutually exclusive. This explicit correlation graph provides a richer semantic map of the domain than LDA's independent topics.
03

Non-Conjugacy and Inference

Unlike LDA, the logistic normal prior is not conjugate to the multinomial likelihood, making exact Bayesian inference intractable. CTM relies on variational inference with a novel bound on the logistic normal integral. The inference algorithm uses a Taylor approximation or a more accurate Laplace approximation within the variational EM loop to optimize the model parameters, making it computationally more intensive than standard LDA Gibbs sampling.

04

Topic Graph Visualization

The estimated covariance matrix allows for the construction of a topic correlation graph, where nodes represent topics and weighted edges represent correlation strength. This graph can be visualized using force-directed layouts or circular dendrograms, providing an intuitive map of the thematic landscape. Analysts can identify clusters of related topics and bridge topics that connect different semantic domains, offering deeper insight than flat topic lists.

05

Predictive Performance Gains

By modeling topic correlations, CTM often achieves a lower perplexity score on held-out documents compared to LDA, especially in corpora with highly correlated themes. The model's ability to leverage co-occurrence patterns means it can better predict the presence of unseen words. However, this improved predictive power comes at the cost of increased computational complexity and a more challenging optimization landscape.

TOPIC MODEL ARCHITECTURE COMPARISON

CTM vs. LDA: Key Differences

A technical comparison of the Correlated Topic Model against standard Latent Dirichlet Allocation across statistical assumptions, inference methods, and performance characteristics.

FeatureLDACTMStructural Topic Model (STM)

Topic Prior Distribution

Dirichlet

Logistic Normal

Logistic Normal

Models Topic Correlation

Conjugate Prior

Inference Method

Variational Inference / Gibbs Sampling

Variational EM with Laplace Approximation

Variational EM

Document-Level Covariates

Computational Complexity

O(K * V)

O(K^2 * V)

O(K^2 * V + C)

Interpretability of Priors

High (Alpha/Beta)

Moderate (Covariance Matrix)

Moderate (Covariance + Covariates)

Risk of Overfitting

Low

Moderate

Moderate to High

CORRELATED TOPIC MODEL INSIGHTS

Frequently Asked Questions

Explore the mechanics, advantages, and practical considerations of the Correlated Topic Model (CTM), an advanced probabilistic framework that explicitly captures relationships between latent themes in text corpora.

A Correlated Topic Model (CTM) is a hierarchical probabilistic model that extends Latent Dirichlet Allocation (LDA) by explicitly modeling correlations between topic proportions within a document corpus. Unlike LDA, which assumes topics are nearly independent due to its single Dirichlet prior, CTM replaces this with a logistic normal distribution over the topic simplex. This is achieved by drawing a latent multivariate Gaussian vector for each document, which is then mapped to topic proportions via a softmax transformation. The covariance matrix of this Gaussian distribution captures the rich correlational structure—for example, a document about 'genetics' is likely to also discuss 'healthcare' rather than 'astrophysics'. Inference is typically performed using variational expectation-maximization (EM) with Laplace approximations or non-conjugate variational inference, as the non-conjugacy introduced by the logistic normal prevents the use of simple collapsed Gibbs sampling.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.