arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2610.15043cs.LG
收藏

在线温度采样的信息论基础

Information-Theoretic Foundations of Online Temperature Sampling

Purdue University(普渡大学)

Jin Sima, Nikolaos Papagiannis, Ananth Grama, Wojciech Szpankowski

AI总结:

针对LLM解码的重复退化问题,该研究提出熵在线采样(EOS)方法,在信息论框架下解决在线温度采样的最优策略问题,其性能在$\log n$因子内达到最优,且实验表现优于固定温度采样。

摘要:

重复、退化生成是大语言模型(LLM)解码中持续存在的问题,而标准的补救措施(温度采样、核采样、top-k采样)均为静态启发式方法。根据Kac引理和AEP(渐近均分性质),平稳信源重复一个块所需时间与其熵呈指数关系。因此,我们在保持输出符合模型合理性的单个交叉熵预算约束下,最大化采样分布的熵。在离线场景中,该解决方案为温度采样,其中逆温度作为预算的拉格朗日乘子。我们的贡献在于在线问题:条件分布$p_1,p_2,\dots$逐次揭示,采样分布$q_t$必须由$p_1,\dots,p_t$因果选择,同时预算耦合整个时间范围。最优温度因此是需从前缀估计的全局影子价格。我们提出熵在线采样(EOS),其在每个前缀重新求解温度。我们证明,与离线最优相比,EOS的熵损失为$O(R\log n)$,同时预算超支为$O(R\log n)$,其中$R$为实例相关的漂移参数。预算收紧变体在相同速率下完全可行;反之,每个完全可行的在线算法必须损失$\Omega(R)$,因此EOS在$\log n$因子内是最优的。当条件分布来自有限混合时,$R=\tilde{O}(\sqrt{n})$。实验证实,EOS可跟踪离线温度,且在熵上优于固定温度采样。

英文摘要:

Repetitive, degenerate generation is a persistent failure of LLM decoding, and the standard remedies (temperature, nucleus, and top-$k$ sampling) are static heuristics. By Kac's lemma and the AEP, a stationary source takes time exponential in its entropy to repeat a block. We therefore maximize the entropy of the sampling distributions under one cross-entropy budget that keeps the output plausible under the model. Offline, the solution is temperature sampling, with the inverse temperature as the budget's Lagrange multiplier. \emph{Our contribution is the online problem}: the conditionals $p_1, p_2, \dots$ are revealed one at a time, and the sampling distribution $q_t$ must be chosen causally from $p_1, \dots, p_t$ while the budget couples the entire horizon. The optimal temperature is thus a global shadow price that must be estimated from a prefix. We propose Entropic Online Sampling (EOS), which re-solves for the temperature on each prefix. We prove it loses $O(R\log n)$ entropy against the offline optimum while overshooting the budget by $O(R\log n)$, with $R$ an instance-dependent drift parameter. A budget-tightened variant is exactly feasible at the same rate. Conversely, every exactly feasible online algorithm must lose $Ω(R)$, so EOS is optimal up to a $\log n$ factor. When the conditionals are drawn from a finite mixture, $R=\tilde{O}(\sqrt{n})$. Experiments confirm that EOS tracks the offline temperature and beats fixed-temperature sampling in entropy.

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

↑