提出博弈框架解释为何启发式文本生成方法效果好
Decoding Game: On Minimax Optimality of Heuristic Text Generation Strategies
- 将文本生成建模为生成者与自然的对抗博弈,推导出最优策略
- 截断归一化方法是该最优策略的一阶近似,解释其有效性
- 涵盖贪心、温度调节等方法,理论覆盖主流生成策略
解码策略在现代语言模型文本生成中起关键作用,但理论与实践存在显著鸿沟。直观上应最优的极大后验(MAP)策略常表现不佳,而广泛使用的拓扑-k和核采样等启发式方法虽无理论支撑却表现优异。本文提出解码博弈框架,将文本生成重构为生成者(追求真实分布可信输出)与自然(恶意扭曲真实分布)之间的零和博弈。通过分析多步生成的可分解性,推导出单步解码博弈的闭式最优策略。结果表明,对抗性自然对似然最大化施加了隐式正则化,而截断归一化方法正是该正则化下的一阶近似。进一步推广目标与参数后,近优策略可涵盖贪心搜索、温度缩放及混合方法。数值实验验证了理论分析。
原文摘要 · Abstract (English)
Decoding strategies play a pivotal role in text generation for modern language models, yet a puzzling gap divides theory and practice. Surprisingly, strategies that should intuitively be optimal, such as Maximum a Posteriori (MAP), often perform poorly in practice. Meanwhile, popular heuristic approaches like Top-$k$ and Nucleus sampling, which employ truncation and normalization of the conditional next-token probabilities, have achieved great empirical success but lack theoretical justifications. In this paper, we propose Decoding Game, a comprehensive theoretical framework which reimagines text generation as a two-player zero-sum game between Strategist, who seeks to produce text credible in the true distribution, and Nature, who distorts the true distribution adversarially. After discussing the decomposibility of multi-step generation, we derive the optimal strategy in closed form for one-step Decoding Game. It is shown that the adversarial Nature imposes an implicit regularization on likelihood maximization, and truncation-normalization methods are first-order approximations to the optimal strategy under this regularization. Additionally, by generalizing the objective and parameters of Decoding Game, near-optimal strategies encompass diverse methods such as greedy search, temperature scaling, and hybrids thereof. Numerical experiments are conducted to complement our theoretical analysis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。