Think While You Write: Hypothesis Verification Promotes Faithful Knowledge-to-Text Generation

Yifu Qiu, Varun Embar, Shay B. Cohen, Benjamin Han

Abstract

Knowledge-to-text (K2T) generation often suffers from hallucinations, where models produce fluent but factually incorrect text. We present TWEAK (Think While Effectively Articulating Knowledge), a model-agnostic decoding method that enhances faithfulness by verifying hypotheses during the generation process. TWEAK ranks candidates based on both their likelihood and a faithfulness score derived from a Hypothesis Verification Model (HVM). By evaluating both the generated prefix (backward hypothesis) and a projected future sequence (forward hypothesis), TWEAK effectively steers models away from hallucinations. Experimental results on WebNLG, TekGen, and GenWiki datasets demonstrate that TWEAK significantly improves factual consistency with minimal impact on fluency, outperforming standard beam search and NLI-based baselines.

Introduction

The primary challenge in Knowledge-to-Text (K2T) generation is ensuring that the natural language output accurately reflects the structured input data (e.g., triples). While large-scale pre-trained models like BART and T5 excel at fluency, they frequently generate "hallucinations"—information that is either absent from or contradicts the source facts. Standard decoding strategies, such as beam search, prioritize token probability over factual accuracy, often leading to cumulative errors due to exposure bias. TWEAK addresses this by integrating a verification step directly into the decoding process.

Methods

TWEAK introduces a "think-while-writing" paradigm into the decoding process. At each step of generation, the model considers multiple candidate tokens. For each candidate, TWEAK constructs two hypotheses:

  1. Backward Hypothesis: The sequence generated up to the current step.
  2. Forward Hypothesis: A "look-ahead" sequence generated greedily from the current candidate to the end of the sentence.
Overview of the TWEAK decoding process using forward and backward hypotheses for verification.

These hypotheses are evaluated by a Hypothesis Verification Model (HVM). The HVM assigns a faithfulness score based on how well the hypotheses are supported by the input triples. The final ranking of candidates is determined by a weighted combination of the original model's log-probability and the HVM's faithfulness score. To train a robust HVM, the authors introduced the FATE (Fact-Aligned Textual Entailment) dataset, which contains fine-grained factual alignments and perturbations.

Results and Key Insights

TWEAK was evaluated against standard greedy and beam search decoding using BART-large and T5-large models. The primary metrics included FactKB (FKB) for faithfulness and BLEU/METEOR/BERTScore (BS) for text quality.

Performance comparison of TWEAK-HVM against standard decoding and NLI baselines across BART and T5 models.

Key findings include:

  • Significant Faithfulness Gains: TWEAK-HVM consistently achieved the highest FactKB scores. For BART-large, it improved FKB by 2.43 points over standard beam search. On out-of-distribution datasets (TekGen and GenWiki), TWEAK showed even more substantial improvements, with FKB gains of up to 7.17 points.
  • Forward Hypothesis Efficacy: The "look-ahead" forward hypothesis proved crucial for detecting hallucinations early, particularly in the latter half of sentences where relations and objects are typically generated. Hallucinations are most likely to occur toward the end of sentences, and TWEAK is particularly effective at catching these "forward" errors.
  • Quality-Faithfulness Balance: While increasing the weight of the HVM score improves faithfulness, it can lead to a slight decrease in BLEU. However, TWEAK maintains a superior balance compared to general NLI-based verification methods.

Conclusion

TWEAK provides a powerful, plug-and-play solution for reducing hallucinations in K2T generation without requiring model retraining. By verifying both past and potential future text, it ensures that generated narratives remain grounded in factual data. Future work will focus on optimizing the computational efficiency of the forward hypothesis generation through techniques like knowledge distillation to reduce inference overhead.

Summary updated

BibTeX
@inproceedings{qiu2024think,
  author = {Yifu Qiu and Varun Embar and Shay B. Cohen and Benjamin Han},
  title = {{Think While You Write: Hypothesis Verification Promotes Faithful Knowledge-to-Text Generation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.106},
}
Figure