让扩散语言模型生成更多样解法,不花额外算力
Free Lunch for Pass@$k$? Low Cost Diverse Sampling for Diffusion Language Models
- 逐个调整批量生成文本,让每条输出避开已有特征
- 在HumanEval和GSM8K上提升多样性和通过率(Pass@k)
- 无需重训练,适合需要多解探索的任务
文本生成中的多样性对复杂推理任务(如代码生成、数学解题)至关重要,此类任务依赖多个不同候选解覆盖解空间。然而传统采样常在重复失败模式上浪费算力。尽管扩散语言模型已成为自回归模型的有力替代,仍存在独立样本趋于相似的问题。为此,我们提出一种无需训练、开销极低的干预方法,通过顺序修改批次中的中间样本,使每个样本在特征空间中远离先前样本,主动惩罚冗余。相比需重训练或束搜索的方法,该策略计算开销可忽略,同时确保每条样本贡献独特视角。我们在LLaDA-8B-Instruct模型上,于HumanEval和GSM8K基准测试中验证了该方法,结果表明在多种温度设置下均显著提升多样性与Pass@k性能。作为对采样过程的简单修改,该方法可立即为当前及未来扩散语言模型在需多样解搜寻的任务中提供低成本优化。代码已公开于https://github.com/sean-lamont/odd。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。