Table of Contents
Fetching ...

Confidence-Aware Sub-Structure Beam Search (CABS): Mitigating Hallucination in Structured Data Generation with Large Language Models

Chengwei Wei, Kee Kiat Koo, Amir Tavanaei, Karim Bouyarmane

TL;DR

This work tackles hallucinations in structured data generation by introducing confidence estimation at the sub-structure level. It proposes a Confidence Network that leverages internal LLM hidden states and a sub-structure–aware decoding scheme, CABS, to refine generation based on sub-structure confidence. Evaluations on product catalog data show that CN outperforms token-based confidence methods and that CABS significantly improves recall at high precision, achieving notable gains over traditional token-level decoding. The approach provides a versatile framework for improving faithfulness in structured outputs from LLMs and is applicable to broader structured data domains beyond product catalogs.

Abstract

Large Language Models (LLMs) have facilitated structured data generation, with applications in domains like tabular data, document databases, product catalogs, etc. However, concerns persist about generation veracity due to incorrect references or hallucinations, necessitating the incorporation of some form of model confidence for mitigation. Existing confidence estimation methods on LLM generations primarily focus on the confidence at the individual token level or the entire output sequence level, limiting their applicability to structured data generation, which consists of an intricate mix of both independent and correlated entries at the sub-structure level. In this paper, we first investigate confidence estimation methods for generated sub-structure-level data. We introduce the concept of Confidence Network that applies on the hidden state of the LLM transformer, as a more targeted estimate than the traditional token conditional probability. We further propose Confidence-Aware sub-structure Beam Search (CABS), a novel decoding method operating at the sub-structure level in structured data generation. CABS enhances the faithfulness of structured data generation by considering confidence scores from the Confidence Network for each sub-structure-level data and iteratively refining the prompts. Results show that CABS outperforms traditional token-level beam search for structured data generation by 16.7% Recall at 90% precision averagely on the problem of product attribute generation.

Confidence-Aware Sub-Structure Beam Search (CABS): Mitigating Hallucination in Structured Data Generation with Large Language Models

TL;DR

This work tackles hallucinations in structured data generation by introducing confidence estimation at the sub-structure level. It proposes a Confidence Network that leverages internal LLM hidden states and a sub-structure–aware decoding scheme, CABS, to refine generation based on sub-structure confidence. Evaluations on product catalog data show that CN outperforms token-based confidence methods and that CABS significantly improves recall at high precision, achieving notable gains over traditional token-level decoding. The approach provides a versatile framework for improving faithfulness in structured outputs from LLMs and is applicable to broader structured data domains beyond product catalogs.

Abstract

Large Language Models (LLMs) have facilitated structured data generation, with applications in domains like tabular data, document databases, product catalogs, etc. However, concerns persist about generation veracity due to incorrect references or hallucinations, necessitating the incorporation of some form of model confidence for mitigation. Existing confidence estimation methods on LLM generations primarily focus on the confidence at the individual token level or the entire output sequence level, limiting their applicability to structured data generation, which consists of an intricate mix of both independent and correlated entries at the sub-structure level. In this paper, we first investigate confidence estimation methods for generated sub-structure-level data. We introduce the concept of Confidence Network that applies on the hidden state of the LLM transformer, as a more targeted estimate than the traditional token conditional probability. We further propose Confidence-Aware sub-structure Beam Search (CABS), a novel decoding method operating at the sub-structure level in structured data generation. CABS enhances the faithfulness of structured data generation by considering confidence scores from the Confidence Network for each sub-structure-level data and iteratively refining the prompts. Results show that CABS outperforms traditional token-level beam search for structured data generation by 16.7% Recall at 90% precision averagely on the problem of product attribute generation.
Paper Structure (19 sections, 7 equations, 5 figures, 2 tables)

This paper contains 19 sections, 7 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Examples of structured data generation using LLMs.
  • Figure 2: In structured data generation, we tokenize the LLM output into sub-structure sequences and assign a confidence score to each prediction based on the prescribed method.
  • Figure 3: Confidence-aware sub-structure Beam Search. The beam size is set to 2 for illustration. In the decoding process, beams with higher scores (highlighted in blue) are kept.
  • Figure 4: Attribute deletion for self-supervised training the Confidence Network. Light blue denotes the incremental attributes generated by the LLM. We use the original attribute values as a reference to determine if the LLM generated values are correct.
  • Figure 5: PR curve and Average Precision of confidence methods. Confidence Network (CN) methods that only use 'Last' attribute representation are displayed to enhance visualization