Continuous Time Dynamic Topic Models

Chong Wang, David M. Blei, David Heckerman

TL;DR

The Continuous Time Dynamic Topic Model (cDTM) uses Brownian motion to track how latent topics evolve over a continuous timeline. By exploiting the natural sparsity of words in text collections, cDTM avoids the computational and memory explosion that plagues discrete-time models at fine granularities, making it possible to analyze document streams at arbitrary time scales.

What Problem Does This Paper Address?

Traditional topic models, like Latent Dirichlet Allocation (LDA), assume that documents are "exchangeable"—meaning their order or publication time doesn't matter. However, real-world text streams like news feeds or scientific journals evolve over time; the vocabulary used to discuss "healthcare" or "elections" in 1988 looks very different from 2008.

To capture this, the discrete-time dynamic topic model (dDTM) was developed. It divides time into fixed intervals (e.g., years or months) and links topics across slices using a state-space model. But dDTM has a major flaw: it requires you to choose a specific time granularity. If the interval is too large, the assumption that documents within that interval are exchangeable fails. If the interval is too fine (e.g., days or hours), the number of parameters explodes because dDTM explicitly represents every topic for every single time tick, even if no documents were published during that interval.

Methods

The authors introduce the Continuous Time Dynamic Topic Model (cDTM), which replaces the discrete state-space model with its continuous counterpart: Brownian motion.

Instead of evolving topics step-by-step through artificial time buckets, the topic parameters ($\beta$) change continuously. The variance of a topic's distribution increases linearly with the actual elapsed time ($\Delta t$) between sequential documents:

$$\beta_{j} | \beta_{i} \sim \mathcal{N}(\beta_{i}, v\Delta t I)$$

To make this mathematically tractable, the authors developed a Sparse Variational Inference algorithm based on variational Kalman filtering. The key innovation here is leveraging text sparsity. In a very fine-grained model (e.g., timestamped by the hour), only a tiny fraction of the total vocabulary appears at any given time step.

A simplified graphical model showing how sparse variational inference works. Unobserved words at a given time step do not require explicit variational observations.

As shown in Figure 3, if a word $w$ is not observed at time step $t$, the algorithm does not instantiate or update a variational parameter for it. The forward mean simply carries over from the previous step, drastically reducing memory and CPU overhead.

Datasets

The model was evaluated on two time-stamped news corpora:

  • AP Corpus: A subset of the TREC AP corpus containing 1,342 documents focused on the 1988 U.S. presidential election (spanning May to June 1988), timestamped by the hour.
  • Election 08: A collection of 1,040 article summaries from Digg covering the 2008 U.S. presidential election (spanning Feb 2007 to Feb 2008), timestamped by the day.

Key Insights and Ideas

  • The Sparsity Paradox: Counter-intuitively, making the time resolution finer makes cDTM more computationally efficient relative to dDTM. As time intervals shrink, fewer unique words appear per interval. While dDTM chokes on the massive number of empty time ticks, cDTM's sparse inference thrives on them.
  • Continuous Modeling Simplifies Infrastructure: By treating time as continuous, you no longer have to make arbitrary preprocessing decisions about whether to bucket your data by week, month, or year. The data dictates its own natural resolution.

Key Results

  • Massive Parameter Reduction: At a daily resolution for the Election 08 dataset, the text sparsity is 0.95. This means the dDTM model would require at least 20 times more parameters than the cDTM to analyze the data at the same resolution.
  • Predictive Perplexity: The authors measured how well the model predicts the vocabulary of future documents. For the AP data, fine-grained day and week models performed best, whereas for the short Digg summaries, a coarser month-level model yielded better predictive perplexity.
Per-word predictive perplexity comparison across different time granularities for the AP and Election 08 datasets.
  • Time Stamp Prediction: The authors introduced a novel task: predicting when a document was written based solely on its text. They found that a hierarchical approach—using a coarse model to find the right month, then zooming in to the week and day—consistently outperformed a flat approach.

Limitations and Future Work

  • Shared Variance: Currently, the variance parameter $v$ (which controls how fast topics change) is fixed and shared across all topics and models. Ideally, this should be inferred directly from the data, as some topics evolve much faster than others.
  • Unbounded Variance: Brownian motion assumes variance grows infinitely over time. The authors note that exploring an Ornstein-Uhlenbeck (OU) process would be a promising next step, as it models continuous-time evolution but forces the variance to remain bounded.

Summary updated

BibTeX
@misc{wang2012continuous,
  author = {Chong Wang and David M. Blei and David Heckerman},
  title = {{Continuous Time Dynamic Topic Models}},
  year = {2012},
  eprint = {1206.3298},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1206.3298},
}
Figure