开放式生成的自一致性
Self-consistency for open-ended generations
July 11, 2023
作者: Siddhartha Jain, Xiaofei Ma, Anoop Deoras, Bing Xiang
cs.AI
摘要
在本文中,我们提出了一种新颖的方法,用于提高大规模预训练语言模型(LLMs)生成输出的质量和一致性。自一致性已被证明是一种有效的方法,适用于具有固定答案的提示,选择获得最高票数的答案。在本文中,我们引入了一个通用的自一致性框架,扩展了其适用范围,超越了具有固定答案的问题。通过大量模拟,我们证明了我们的方法能够从候选集中稳定地恢复出最优或接近最优的生成结果。我们还提出了轻量级无参数相似性函数,即使没有访问令牌对数概率,也能在代码生成、自动形式化和摘要任务中显示出显著且一致的改进。我们的方法几乎不增加计算开销,无需辅助重新排序模型或对现有模型进行修改。
English
In this paper, we present a novel approach for improving the quality and
consistency of generated outputs from large-scale pre-trained language models
(LLMs). Self-consistency has emerged as an effective approach for prompts with
fixed answers, selecting the answer with the highest number of votes. In this
paper, we introduce a generalized framework for self-consistency that extends
its applicability beyond problems that have fixed-answer answers. Through
extensive simulations, we demonstrate that our approach consistently recovers
the optimal or near-optimal generation from a set of candidates. We also
propose lightweight parameter-free similarity functions that show significant
and consistent improvements across code generation, autoformalization, and
summarization tasks, even without access to token log probabilities. Our method
incurs minimal computational overhead, requiring no auxiliary reranker models
or modifications to the existing model.