arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.18292cs.LGcs.AI
收藏

解码作为概率单纯形上的优化:从Top-K到Top-P(核)到Best-of-K采样器

Decoding as Optimisation on the Probability Simplex: From Top-K to Top-P (Nucleus) to Best-of-K Samplers

Xiaotong Ji, Rasul Tutunov, Matthieu Zimmer, Haitham Bou-Ammar

AI总结:

本文提出了一种基于概率单纯形优化的解码框架,统一了Top-K、Top-P等采样方法,并引入Best-of-K采样器提升多样本流程性能。

摘要:

解码位于语言模型和我们使用它的所有事情之间,但仍然被视为一种启发式调参练习。我们主张解码应被理解为一种原则性的优化层:在每个token时,我们解决一个在概率单纯形上的正则化问题,权衡模型得分与结构偏好和约束。这一单一模板恢复了贪婪解码、Softmax采样、Top-K、Top-P和Sparsemax风格的稀疏性作为特殊情况,并通过最优条件解释了它们的共同结构。更重要的是,该框架使发明新的解码器变得容易,无需依赖传统方法。我们通过设计Best-of-K(BoK),一个基于KL锚定的覆盖目标,旨在多样本流程(自我一致性、重排序、验证者选择)中进行演示。BoK旨在在固定K样本预算内覆盖良好的替代方案,并提高实证性能。我们显示,这样的样本可以提高准确性,例如在高采样温度下,Qwen2.5-Math-7B在MATH500上的准确率提高18.6%。

英文摘要:

Decoding sits between a language model and everything we do with it, yet it is still treated as a heuristic knob-tuning exercise. We argue decoding should be understood as a principled optimisation layer: at each token, we solve a regularised problem over the probability simplex that trades off model score against structural preferences and constraints. This single template recovers greedy decoding, Softmax sampling, Top-K, Top-P, and Sparsemax-style sparsity as special cases, and explains their common structure through optimality conditions. More importantly, the framework makes it easy to invent new decoders without folklore. We demonstrate this by designing Best-of-K (BoK), a KL-anchored coverage objective aimed at multi-sample pipelines (self-consistency, reranking, verifier selection). BoK targets the probability of covering good alternatives within a fixed K-sample budget and improves empirical performance. We show that such samples can improve accuracy by, for example, +18.6% for Qwen2.5-Math-7B on MATH500 at high sampling temperatures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑