Skip to main content
QUICK REVIEW

[Paper Review] Addressing Topic Granularity and Hallucination in Large Language Models for Topic Modelling

Yida Mu, Peizhen Bai|arXiv (Cornell University)|May 1, 2024
Complex Network Analysis TechniquesPhysics and Astronomy4 citations
TL;DR

This paper proposes a Direct Preference Optimization (DPO)-based fine-tuning method for open-source LLMs like Mistral-7B to improve topic granularity and reduce hallucinations in zero-shot topic modelling. By using a reconstruction pipeline to generate synthetic preference signals without human annotation, the approach significantly reduces hallucinated topics and improves alignment with human instructions, achieving a 97% adherence rate and only 1% hallucination rate on adversarial prompts.

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.

Motivation & Objective

  • To address the lack of systematic investigation into hallucination risks in LLM-based topic modelling, especially in open-source models.
  • To improve topic granularity and reduce near-duplicate or irrelevant topics generated by LLMs when prompted with instructions.
  • To develop a scalable, annotation-free fine-tuning pipeline that enhances LLMs' ability to generate coherent, relevant, and precise topics aligned with human intent.
  • To provide a plug-and-play evaluation protocol for measuring topic quality in LLM-driven topic modelling.

Proposed method

  • Fine-tuning an open-source LLM (Mistral-7B) using Direct Preference Optimization (DPO) to align model outputs with desired topic characteristics.
  • Designing a reconstruction pipeline that transforms raw LLM-generated topics into synthetic preference pairs (preferred vs. rejected) without requiring human-annotated rankings.
  • Using seed topics and granularity instructions as supervision signals to guide the model toward generating relevant, non-hallucinated topics.
  • Employing attention weight analysis to investigate how fine-tuning reduces the propagation of hallucinated topic information through deep layers.
  • Training the model on synthetic preference data derived from prompt variations and topic consistency checks to improve robustness under adversarial prompting.
  • Implementing a plug-and-play evaluation framework to measure topic coherence, relevance, and hallucination rates across different LLMs and prompts.
Figure 1: Four real-world examples consist of the given document (grey), user prompt (blue), and issues associated with LLM-generated topics (see legends with different colours). Examples (a) and (b) demonstrate issues with inconsistent naming; i.e., LLMs tend to generate topics with different forma
Figure 1: Four real-world examples consist of the given document (grey), user prompt (blue), and issues associated with LLM-generated topics (see legends with different colours). Examples (a) and (b) demonstrate issues with inconsistent naming; i.e., LLMs tend to generate topics with different forma

Experimental results

Research questions

  • RQ1What is the extent of hallucination in off-the-shelf LLMs when used for topic modelling, especially under adversarial or complex prompts?
  • RQ2How effective are seed topics and granularity instructions in mitigating hallucinated topic generation in LLMs?
  • RQ3Can a DPO-based fine-tuning approach improve topic granularity and reduce near-duplicate topics without human-annotated preference data?
  • RQ4How does the attention mechanism in fine-tuned LLMs differ in aggregating hallucinated topic information compared to base models?
  • RQ5To what extent can a reconstruction-based pipeline generate effective preference signals for LLM fine-tuning in topic modelling?

Key findings

  • GPT-3.5-turbo achieves a 99.3% adherence rate to domain instructions, while off-the-shelf open-source LLMs like Mistral-7B achieve only 8.6%, indicating a high risk of hallucination in open-source models.
  • The proposed TopicMistral model reduces hallucination rates to 1% on adversarial prompts, compared to 7% for the base Mistral-7B model.
  • TopicMistral achieves a 97% adherence rate to instruction constraints, significantly outperforming the 16% adherence rate of the base Mistral-7B model.
  • The attention weight analysis shows that TopicMistral reduces the flow of hallucinated topic information in deep layers, indicating better suppression of spurious predictions.
  • When using seed topics, hallucination rates drop further, with TopicMistral maintaining only 1% hallucination even under complex prompts, highlighting the importance of seed topics as a mitigation strategy.
  • TopicMistral achieves a 76% true positive rate in detecting relevant topics, outperforming the 68% rate of the base Mistral-7B model, especially when content is absent or unrelated.
Figure 2: An example prompt used in our work: Text enclosed by the special tokens ‘ [/INST] ’ denotes the user instruction; red and blue colours denote the Granularity Description and Seed Topics, respectively.
Figure 2: An example prompt used in our work: Text enclosed by the special tokens ‘ [/INST] ’ denotes the user instruction; red and blue colours denote the Granularity Description and Seed Topics, respectively.

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.