Addressing Topic Granularity and Hallucination in Large Language Models for Topic Modelling
Yida Mu, Peizhen Bai, Kalina Bontcheva, Xingyi Song
TL;DR
The paper tackles granularity adherence and hallucination in LLM-based topic modelling by introducing TopicMistral, a fine-tuned Mistral-7B model trained via Direct Preference Optimisation (DPO) and a reconstruction pipeline to generate accepted and rejected topics without human labels. It demonstrates that prompt-based controls of granularity offer limited gains, while the DPO-based fine-tuning and data reconstruction substantially improve topic coherence, reduce near-duplicates, and decrease hallucinations, including under adversarial prompts. The authors provide a plug-in evaluation framework with metrics for unique topic counts, inter-topic similarity, and mutual information with human labels, and show that TopicMistral generally outperforms off-the-shelf LLMs and competitive baselines, with better generalisation to out-of-distribution data. The work highlights practical implications for robust, scalable LLM-driven topic modelling and offers dynamic seed topic strategies to adapt to new corpora, supported by attention analysis that sheds light on the mechanisms behind hallucination mitigation.
Abstract
Large language models (LLMs) with their strong zero-shot topic extraction capabilities offer an alternative to probabilistic topic modelling and closed-set topic classification approaches. As zero-shot topic extractors, LLMs are expected to understand human instructions to generate relevant and non-hallucinated topics based on the given documents. However, LLM-based topic modelling approaches often face difficulties in generating topics with adherence to granularity as specified in human instructions, often resulting in many near-duplicate topics. Furthermore, methods for addressing hallucinated topics generated by LLMs have not yet been investigated. In this paper, we focus on addressing the issues of topic granularity and hallucinations for better LLM-based topic modelling. To this end, we introduce a novel approach that leverages Direct Preference Optimisation (DPO) to fine-tune open-source LLMs, such as Mistral-7B. Our approach does not rely on traditional human annotation to rank preferred answers but employs a reconstruction pipeline to modify raw topics generated by LLMs, thus enabling a fast and efficient training and inference framework. Comparative experiments show that our fine-tuning approach not only significantly improves the LLM's capability to produce more coherent, relevant, and precise topics, but also reduces the number of hallucinated topics.
