Large Language Models Offer an Alternative to the Traditional Approach of Topic Modelling
Yida Mu, Chun Dong, Kalina Bontcheva, Xingyi Song
TL;DR
Traditional topic modelling struggles with semantic understanding and overlapping topics, particularly for unseen topics. This work proposes a prompt-driven framework where large language models (LLMs) generate topics directly from documents, paired with evaluation protocols to assess clustering quality. Through experiments with GPT-3.5 and LLaMA-2-7B on open-domain (20NG) and domain-specific (CAVS) data, the authors demonstrate that LLMs can produce interpretable, granular topics and even summarise them into final topic lists, aided by seed-guidance and summarisation steps. The authors also introduce novel evaluation metrics (topic distance, semantic similarity, recall/precision) and present a temporal case study on COVID-19 vaccine hesitancy to show practical applicability for dynamic corpora.
Abstract
Topic modelling, as a well-established unsupervised technique, has found extensive use in automatically detecting significant topics within a corpus of documents. However, classic topic modelling approaches (e.g., LDA) have certain drawbacks, such as the lack of semantic understanding and the presence of overlapping topics. In this work, we investigate the untapped potential of large language models (LLMs) as an alternative for uncovering the underlying topics within extensive text corpora. To this end, we introduce a framework that prompts LLMs to generate topics from a given set of documents and establish evaluation protocols to assess the clustering efficacy of LLMs. Our findings indicate that LLMs with appropriate prompts can stand out as a viable alternative, capable of generating relevant topic titles and adhering to human guidelines to refine and merge topics. Through in-depth experiments and evaluation, we summarise the advantages and constraints of employing LLMs in topic extraction.
