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

Abstract: Knowledge-to-text generators often struggle to faithfully generate descriptions for the input facts: they may produce hallucinations that contradict the input, or describe facts not present in the input. To reduce hallucinations, we propose a decoding-only method, TWEAK (Think While Effectively Articulating Knowledge), which can be integrated with any generator without retraining. TWEAK treats the generated sequences at each decoding step and its future sequences as hypotheses, and ranks each generation candidate based on the extent to which their hypotheses are supported by the input facts using a Hypothesis Verification Model (HVM). We first demonstrate the effectiveness of TWEAK by using a Natural Language Inference (NLI) model as the HVM and report improved faithfulness with a minimal impact on the quality. We then replace the NLI model with a task-specific HVM trained with a first-of-a-kind dataset, FATE (Fact-Aligned Textual Entailment), which pairs input facts with their original and perturbed descriptions. We test TWEAK with two generators, and the best TWEAK variants improve on average for the two models by 2.24/7.17 points in faithfulness (FactKB) in in/out-of-distribution evaluations, respectively, and with only a 0.14/0.32-point decline in quality (BERTScore).

## introduction knowledge-to-text generation (k2t) aims to generate precise and fluent textual descriptions which are consistent with the input facts @xcite @xcite . although the neural generators are capable of generating fluent and high-quality texts on various tasks @xcite @xcite @xcite , one major challenge remains to be hallucination @xcite @xcite @xcite , i.e., the tendency of the models to produce outputs that contradict or are not supported by the inputs. in this paper, we address the hallucination problem with a model-agnostic decoding method, tweak (think while effectively articulating knowledge). different from previous works such as @xcite , we tweak only the decoding process without requiring re-training of the generative models, thus making our approach easily integratable with any k2t generator. the existing decoding methods of a generative model, such as beam search, sample candidates only from the predicted likelihood without any consideration on the faithfulness implication of these candidates. the problem of exposure bias of autoregressive generation only makes the matter worse once any deviation from a faithful generation occurs, since these errors accumulate and become unrecoverable @xcite . tweak mitigates this problem by verifying the faithfulness of the candidates at each decoding step to reduce hallucinations. as the example illustrated in fig. 1 , for each candidate at a decoding step, tweak treats the sequence generated so far and its possible future sequence as the backward and the forward hypothesis (inspired by @xcite , respectively, and feeds them into a hypothesis verification model (hvm) to estimate the candidate's faithfulness score, a measure indicating how well the candidate supports the input facts. the candidates are then ranked considering both their generation scores and faithfulness scores. we first deploy a natural language inference (nli) model @xcite as the hvm for experimentation, and observe that this approach, tweak-nli, indeed improves the faithfulness of the output compared to the baseline (beam search) in the 4th decoding step of this example, the beam search promotes the candidate leading to hallucinations (e.g., "united states"), but tweak demotes it using signals from hvm. by a significant margin. the distribution shift between nli and faithfulness assessment tasks, however, may result in reduced output quality @xcite @xcite . we therefore experiment with a second variation, tweak-hvm, where we propose a task-specific hvm trained with a first-of-a-kind dataset, fate @xcite . this dataset pairs and aligns input facts with their original and perturbed descriptions. we mimic the autoregressive decoding process where we expand the generation process one token at a time until completion to synthesize the triple-hypothesis pairs with their faithfulness labels. the hvm is then trained to predict all triple-hypothesis labels in a tabular form @xcite . experimental results on webnlg @xcite and two out-of-distribution datasets, @xcite and genwiki (perez-beltrachini and lapata, 2018), confirm the advantages of tweak-hvm. it also greatly reduces computation as it encodes both input facts and hypotheses simultaneously. we summarize our contributions as follows, ## related work knowledge-to-text generation tasks involve the transformation of structured data or knowledge into natural language texts @xcite @xcite . previous works encode the structured input explicitly as models' representations @xcite @xcite @xcite . a usual way is to serialize the structured input first and use a pre-trained model to directly generate its description @xcite @xcite . however, a notable challenge is hallucinations -models produce claims that are not supported by inputs @xcite @xcite . previous work has explored methods including plan-before-generate pipelines @xcite @xcite , architecting models to be explicitly fact-aware @xcite , and augmenting the training data with self-supervised learning @xcite @xcite . mitigating hallucinations in decoding, however, has received relatively less attention, despite its advantages in model-agnostic applications @xcite @xcite . comparing to a recent work @xcite , where effect of different decoding strategies on faithfulness of abstractive summarization is investigated, and a faithfulness re-ranking method is proposed to improve output, our work is unique in that we target a different task (k2t), use hypothesis verification instead of a faithfulness composite metric 2 to guide the ranking, and train a task-specific hvm based on our novel dataset to bring improvement to both faithfulness and quality. we use an autoregressive language model p θ with parameters θ to estimate the probability of the token sequence @xmath0. . . , y t , . . .⟩, i.e., p θ (y to decide on the final output, a decoding process finds the optimal sequence by solving y * = arg max @xmath1, where y is the set of all possible sequences, and f is an objective function. this can be accomplished by selecting the top k candidates generated from vocabulary v using an f -approximating scoring function f one token y t at a time: common decoding strategies, such as greedy and beam search, set f to log p θ (@xmath2. in greedy search k is set to 1. in sec. 4.1 we describe our scoring function that promotes faithful generation via hypothesis verification. ## tweak we now describe our approach in sec. 4.1, the fate dataset in sec. 4.2, and our task-specific hvm trained with the dataset in sec. 4.3. ## experiments and results datasets and models. we train two base generation models bart-large @xcite and t5-large @xcite , following the hyperparameter settings from (ribeiro et al., 2021a), and evaluate our decoding strategy on webnlg @xcite , tekgen (agarwal et al., 2021), and genwiki @xcite . metrics. we assess the models on faithfulness and quality. faithfulness metrics measure how much semantic distortion the output contains with respect to the input, while quality metrics measure how close a model output is to the reference. for the former we employ factkb @xcite , a state-of-the-art reference-free metric constructed via factuality pre-training. for the latter we employ the three metrics previously used by ribeiro et al. (2021a): bleu @xcite ## analysis we report additional experiments and analyses in this section. ## conclusions we introduce tweak, a model-agnostic decoding strategy incorporating hypothesis verification, to mitigate hallucinations in k2t generation. our work demonstrates the effectiveness of tweak with an off-the-shelf nli model and a task-specific hvm. future directions involve improving generalization, and reducing inference costs via techniques such as knowledge distillation @xcite . 9 1636