解锁预期文本生成:一种受限方法用于大型语言模型的忠实解码
Unlocking Anticipatory Text Generation: A Constrained Approach for Faithful Decoding with Large Language Models
December 11, 2023
作者: Lifu Tu, Semih Yavuz, Jin Qu, Jiacheng Xu, Rui Meng, Caiming Xiong, Yingbo Zhou
cs.AI
摘要
大型语言模型(LLMs)展示了强大的文本生成能力。然而,对于十亿级模型来说,要实现在给定提示或指令下的最佳结果可能具有挑战性。此外,不良行为,如毒性或幻觉,可能会出现。虽然更大的模型(例如ChatGPT)可能表现出在减轻这些问题方面的实力,但仍无法完全保证防止不良行为的发生。在这项工作中,我们提出将文本生成形式化为未来约束生成问题,以最小化不良行为并强制执行对指令的忠实。使用LLMs完成未来约束满足度的估计指导文本生成过程。我们的广泛实验表明了所提方法在三个不同的文本生成任务中的有效性:关键词约束生成(Lin等,2020)、毒性减少(Gehman等,2020)以及问答中的事实正确性(Gao等,2023)。
English
Large Language Models (LLMs) have demonstrated a powerful ability for text
generation. However, achieving optimal results with a given prompt or
instruction can be challenging, especially for billion-sized models.
Additionally, undesired behaviors such as toxicity or hallucinations can
manifest. While much larger models (e.g., ChatGPT) may demonstrate strength in
mitigating these issues, there is still no guarantee of complete prevention. In
this work, we propose formalizing text generation as a future-constrained
generation problem to minimize undesirable behaviors and enforce faithfulness
to instructions. The estimation of future constraint satisfaction, accomplished
using LLMs, guides the text generation process. Our extensive experiments
demonstrate the effectiveness of the proposed approach across three distinct
text generation tasks: keyword-constrained generation (Lin et al., 2020),
toxicity reduction (Gehman et al., 2020), and factual correctness in
question-answering (Gao et al., 2023).