提出动态截断方法Min-k,让生成文本更稳定且质量更高。
Min-$k$ Sampling: Decoupling Truncation from Temperature Scaling via Relative Logit Dynamics
- 通过分析对数概率分布局部形状,自动识别语义断崖点来决定截断位置。
- 在极端温度下仍保持高质量输出,比传统方法更稳定。
- 适合需要高鲁棒性的生成任务,如推理和创意写作。
大语言模型生成文本的质量高度依赖于解码采样策略。主流方法如Top-$k$、Top-$p$和Min-$p$通过概率空间截断实现多样性与准确性的平衡,但普遍存在对温度参数极度敏感的问题。近期的对数空间方法如Top-$nσ$虽实现温度不变性,却依赖全局统计量,易受长尾噪声干扰,难以捕捉候选词之间的细粒度置信结构。本文提出 extbf{Min-$k$ Sampling},一种新型动态截断策略,通过分析排序后对数概率分布的局部形态,识别“语义断崖”——从高置信核心词到不确定长尾词之间的剧烈过渡。通过计算位置加权的相对衰减率,Min-$k$在每一步生成中动态确定截断边界。我们形式化证明了Min-$k$具有严格的温度不变性,并实证其对超参数选择不敏感。在多个推理基准、创意写作任务及人工评估中,Min-$k$均持续提升文本质量,在传统方法崩溃的极端温度设置下仍保持稳健表现。代码、模型与分析工具已公开。
原文摘要 · Abstract (English)
The quality of text generated by large language models depends critically on the decoding sampling strategy. While mainstream methods such as Top-$k$, Top-$p$, and Min-$p$ achieve a balance between diversity and accuracy through probability-space truncation, they share an inherent limitation: extreme sensitivity to the temperature parameter. Recent logit-space approaches like Top-$nσ$ achieve temperature invariance but rely on global statistics that are susceptible to long-tail noise, failing to capture fine-grained confidence structures among top candidates. We propose \textbf{Min-$k$ Sampling}, a novel dynamic truncation strategy that analyzes the local shape of the sorted logit distribution to identify "semantic cliffs": sharp transitions from high-confidence core tokens to uncertain long-tail tokens. By computing a position-weighted relative decay rate, Min-$k$ dynamically determines truncation boundaries at each generation step. We formally prove that Min-$k$ achieves strict temperature invariance and empirically demonstrate its low sensitivity to hyperparameter choices. Experiments on multiple reasoning benchmarks, creative writing tasks, and human evaluation show that Min-$k$ consistently improves text quality, maintaining robust performance even under extreme temperature settings where probability-based methods collapse. We make our code, models, and analysis tools publicly available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。