Skip to main content
QUICK REVIEW

[Paper Review] A Coefficient of Determination for Probabilistic Topic Models

Tommy Jones|arXiv (Cornell University)|Nov 20, 2019
Computational and Text Analysis MethodsSocial Sciences16 references9 citations
TL;DR

This paper proposes a novel coefficient of determination ($R^2$) for probabilistic topic models, interpreting it as a standard goodness-of-fit measure by comparing observed word frequencies to model-predicted frequencies. The method leverages the expected word frequency under the model, derived via the law of total expectation, and demonstrates that $R^2$ provides a consistent, interpretable metric for evaluating topic model fit across different contexts.

ABSTRACT

This research proposes a new (old) metric for evaluating goodness of fit in topic models, the coefficient of determination, or $R^2$. Within the context of topic modeling, $R^2$ has the same interpretation that it does when used in a broader class of statistical models. Reporting $R^2$ with topic models addresses two current problems in topic modeling: a lack of standard cross-contextual evaluation metrics for topic modeling and ease of communication with lay audiences. The author proposes that $R^2$ should be reported as a standard metric when constructing topic models.

Motivation & Objective

  • To address the lack of standardized, cross-contextual evaluation metrics for topic models.
  • To improve communication of topic model performance to non-expert audiences by adopting a widely understood statistical metric.
  • To formalize the interpretation of goodness of fit in topic models using $R^2$, consistent with broader statistical modeling.
  • To provide a principled method for evaluating in-sample fit by comparing observed and expected word frequencies.
  • To establish $R^2$ as a recommended standard metric in topic modeling research and practice.

Proposed method

  • The method derives the expected word frequency in a document using the law of total expectation, accounting for latent topic assignments and word-topic distributions.
  • It models the document-term matrix $\mathbf{W}$ as the product of document-topic proportions $\boldsymbol{\Theta}$ and topic-word distributions $\boldsymbol{\Phi}$, with expected values computed under independence of $\boldsymbol{\theta}_d$ and $\boldsymbol{\phi}_k$.
  • The expected value of word frequencies is shown to be proportional to the Dirichlet prior parameter $\boldsymbol{\beta}$, linking model parameters to expected term frequencies.
  • The $R^2$ metric is computed by comparing observed word frequencies to the model’s expected frequencies, using standard statistical definition of $R^2 = 1 - \frac{\text{SS}_{\text{res}}}{\text{SS}_{\text{tot}}}$.
  • The derivation assumes independence between document-topic and topic-word distributions, enabling analytical computation of expected values.
  • The approach is grounded in the generative process of topic models, where word frequencies are modeled as multinomial draws from topic-specific distributions.

Experimental results

Research questions

  • RQ1Can $R^2$ be meaningfully applied to probabilistic topic models as a goodness-of-fit measure?
  • RQ2Does the proposed $R^2$ metric enable consistent, cross-contextual evaluation of topic models?
  • RQ3How does the expected word frequency in a document relate to the model’s parameters, particularly $\boldsymbol{\beta}$?
  • RQ4Can $R^2$ improve interpretability and communication of topic model performance to non-expert audiences?
  • RQ5What is the theoretical justification for using $R^2$ in models with latent variables and hierarchical priors?

Key findings

  • The expected word frequency for a document under the topic model is proportional to the Dirichlet prior parameter $\boldsymbol{\beta}$, demonstrating a direct link between model priors and expected term frequencies.
  • The expected value of the document-term matrix $\mathbb{E}(\mathbf{W})$ is derived as $\mathbb{E}(n_d) \cdot \boldsymbol{\theta}_d \cdot \boldsymbol{\Phi}$, with expectations computed using the law of total expectation.
  • Under independence of $\boldsymbol{\theta}_d$ and $\boldsymbol{\phi}_k$, the expected value of $\mathbf{w}_d$ simplifies to $n_d \cdot \boldsymbol{\beta} / \sum_v \beta_v$, showing proportionality to $\boldsymbol{\beta}$.
  • The derivation confirms that the model’s expected output is determined by the prior parameters $\boldsymbol{\alpha}$ and $\boldsymbol{\beta}$, with $\mathbb{E}(\theta_{d,k}) = \alpha_k / \sum_k \alpha_k$ and $\mathbb{E}(\phi_{k,v}) = \beta_v / \sum_v \beta_v$.
  • The $R^2$ metric is formally justified as a valid goodness-of-fit measure by comparing observed word frequencies to the model’s expected frequencies.
  • The paper concludes that $R^2$ should be reported as a standard metric in topic modeling due to its interpretability and consistency with broader statistical practice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.