Free Lunch for Pass@k? Low Cost Diverse Sampling for Diffusion Language Models
Abstract
Diffusion language models suffer from redundant sampling, but a novel technique that repels samples from each other's feature space improves diversity and performance on code generation and math problem-solving tasks without additional computational cost.
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.
Community
Please check out the interactive demo here:
https://huggingface.co/spaces/sean-lamont/ODD-Demo
Our GitHub includes a locally hosted streamlit application if you want to test our approach on your own prompts or models.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Improving Diffusion Language Model Decoding through Joint Search in Generation Order and Token Space (2026)
- Just on Time: Token-Level Early Stopping for Diffusion Language Models (2026)
- Time-Annealed Perturbation Sampling: Diverse Generation for Diffusion Language Models (2026)
- Diffusion Language Models Are Natively Length-Aware (2026)
- Test-Time Scaling with Diffusion Language Models via Reward-Guided Stitching (2026)
- Beyond Hard Masks: Progressive Token Evolution for Diffusion Language Models (2026)
- Plan, Verify and Fill: A Structured Parallel Decoding Approach for Diffusion Language Models (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 1
Collections including this paper 0
No Collection including this paper