用验证器辅助生成,显著提升效率与质量
On the Query Complexity of Verifier-Assisted Language Generation
- 设计数学框架分析验证器如何提升约束生成效率
- 回溯式采样比传统方法在准确率、多样性上更优
- 适合研究生成算法优化与高效推理的学者
近期大量工作提出推理时算法(如best-of-n),利用验证器辅助生成过程。尽管其在多种受限生成任务中已进行实证评估,但算法设计仍缺乏系统理解。本文构建数学框架,基于预训练语言模型生成器和可判断前缀是否可扩展为满足约束字符串的验证器,分析约束生成问题。结果表明,即使在简单场景下,验证器也能将原本信息论或计算上难解的问题变为易解。我们证明,如逐标记拒绝采样这类简单算法亦能从中获益。实验显示,允许回溯(即擦除最后几个生成标记)的自然修改版本,在计算效率、准确率和多样性上均显著优于主流基线(如块级拒绝采样、核采样),且表现稳健。
原文摘要 · Abstract (English)
Recently, a plethora of works have proposed inference-time algorithms (e.g. best-of-n), which incorporate verifiers to assist the generation process. Their quality-efficiency trade-offs have been empirically benchmarked on a variety of constrained generation tasks, but the algorithmic design landscape is still largely poorly understood. In this paper, we develop a mathematical framework for reasoning about constrained generation using a pre-trained language model generator oracle and a process verifier--which can decide whether a prefix can be extended to a string which satisfies the constraints of choice. We show that even in very simple settings, access to a verifier can render an intractable problem (information-theoretically or computationally) to a tractable one. In fact, we show even simple algorithms, like tokenwise rejection sampling, can enjoy significant benefits from access to a verifier. Empirically, we show that a natural modification of tokenwise rejection sampling, in which the sampler is allowed to "backtrack" (i.e., erase the final few generated tokens) has robust and substantive benefits over natural baselines (e.g. (blockwise) rejection sampling, nucleus sampling)--both in terms of computational efficiency, accuracy and diversity.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。