[论文解读] Free Lunch for Pass@$k$? Low Cost Diverse Sampling for Diffusion Language Models
提出 ODD,一种训练-free、低成本的推理时方法,通过在正交方向上使新样本与先前样本彼此排斥来提高扩散语言模型采样的多样性,从而在极少开销下提升 Pass@k。
Diverse outputs in text generation are necessary for effective exploration in complex reasoning tasks, such as code generation and mathematical problem solving. Such Pass@$k$ problems benefit from distinct candidates covering the solution space. However, traditional sampling approaches often waste computational resources on repetitive failure modes. While Diffusion Language Models have emerged as a competitive alternative to the prevailing Autoregressive paradigm, they remain susceptible to this redundancy, with independent samples frequently collapsing into similar modes. To address this, we propose a training free, low cost intervention to enhance generative diversity in Diffusion Language Models. Our approach modifies intermediate samples in a batch sequentially, where each sample is repelled from the feature space of previous samples, actively penalising redundancy. Unlike prior methods that require retraining or beam search, our strategy incurs negligible computational overhead, while ensuring that each sample contributes a unique perspective to the batch. We evaluate our method on the HumanEval and GSM8K benchmarks using the LLaDA-8B-Instruct model. Our results demonstrate significantly improved diversity and Pass@$k$ performance across various temperature settings. As a simple modification to the sampling process, our method offers an immediate, low-cost improvement for current and future Diffusion Language Models in tasks that benefit from diverse solution search. We make our code available at https://github.com/sean-lamont/odd.
研究动机与目标
- 在复杂推理任务中为扩散语言模型的多样化输出提供动机。
- 引入一种低开销、无需训练的机制以在推理时增加样本多样性。
- 证明在批量样本之间的正交排斥能够提升标准基准的 Pass@k。
- 分析在不同温度设置和批量大小下的开销与鲁棒性。
提出的方法
- 定义一个对模型输出分布进行操作以创建每个样本特征向量的轻量级特征提取器。
- 引入一种正交多样性损失,通过基于 Gram–Schmidt 的正交基将每个新样本从先前样本所张成的子空间中排斥。
- 应用梯度停止传播投影,使只有当前样本的对数概率更新,从而使该过程对批量感知且高效。
- 随着扩散时间步线性退火多样性强度,以在早期探索和保留后期质量之间取得平衡。
- 与基线和全局基于 DPP 的多样性目标进行比较,以评估性能与延迟。
- 开源代码与实验数据发布。

实验结果
研究问题
- RQ1推理时的正交多样性(ODD)是否在不重新训练的情况下改善扩散语言模型的 Pass@k?
- RQ2在质量-多样性权衡方面,ODD 与全局多样性目标(如基于 DPP 的方法)的比较如何?
- RQ3相对于标准采样,ODD 的计算开销是多少,并且如何随温度和批量大小变化?
- RQ4用于多样性建模的特征选择如何影响多样性与输出质量之间的平衡?
主要发现
- ODD 在 GSM8K 与 HumanEval 上在多种温度下持续提升 Pass@k。
- ODD 引入的开销极小,与模型规模无关,适合推理时实现多样性。
- 与全局 DPP 目标相比,贪婪的、带梯度停止的正交方法可获得更高的批量多样性和覆盖率提升。
- ODD 展现出类帕累托的改进:在许多设定下,批量覆盖率提升而单个样本质量几乎不损失(甚至有提升)。
- 该方法在 HumanEval 上提高了累计问题覆盖,表明在稀疏信号条件下对解空间的探索更充分。
- 实验结果表明,ODD 的多样性增益在较低温度和较大排斥强度被谨慎使用时最为明显。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。