LLM Reading Tea Leaves: Automatically Evaluating Topic Models with Large Language Models
Xiaohao Yang, He Zhao, Dinh Phung, Wray Buntine, Lan Du
TL;DR
This work introduces WALM, a joint evaluation framework for topic models that aligns document representations and topics by comparing LLM-generated keywords with topic-model topical words. It leverages prompts to obtain keywords (including topic-aware prompts) and assesses their agreement with the model outputs using multiple score functions, including overlap-based and embedding/transport-based metrics. Through experiments on 20News and DBpedia across seven models, WALM demonstrates alignment with human judgments and highlights its role as a complementary evaluation alongside perplexity, coherence, and downstream tasks. The approach is extended with contextualized embeddings and sensitivity analyses, offering practical guidance and open-source tooling for robust topic-model evaluation.
Abstract
Topic modeling has been a widely used tool for unsupervised text analysis. However, comprehensive evaluations of a topic model remain challenging. Existing evaluation methods are either less comparable across different models (e.g., perplexity) or focus on only one specific aspect of a model (e.g., topic quality or document representation quality) at a time, which is insufficient to reflect the overall model performance. In this paper, we propose WALM (Word Agreement with Language Model), a new evaluation method for topic modeling that considers the semantic quality of document representations and topics in a joint manner, leveraging the power of Large Language Models (LLMs). With extensive experiments involving different types of topic models, WALM is shown to align with human judgment and can serve as a complementary evaluation method to the existing ones, bringing a new perspective to topic modeling. Our software package is available at https://github.com/Xiaohao-Yang/Topic_Model_Evaluation.
