Random Selection Reveals Implicit Knowledge Consensus in Code Generation

Ren-Biao Liu, Xin-Ye Li, Hui Sun, Yali Du, Jiang-Tian Xue, Ming Li
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:77246-77262, 2026.

Abstract

Training large language models for code generation often involves selecting data from verifiable multi-solution pools, where each problem admits multiple correct implementations. Conventional studies on data selection suggest that complex selection strategies, such as diversity maximization or difficulty ranking, should outperform naive random sampling. In this work, we systematically evaluate within-problem solution selection strategies across different representation spaces, including continuous embeddings, discrete tokens, and syntactic structures, using various base language models. Instead, simple random sampling achieves consistently competitive performance across all models, exhibiting greater cross-model stability than complex methods. We interpret these results through the lens of implicit knowledge consensus: verified solution pools may contain representative algorithmic patterns that random sampling can preserve. Our findings suggest that practitioners should treat random sampling as a low-cost default for verifiable code-generation fine-tuning and move to complex selectors when hard-tail or constraint-focused coverage is the target.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-liu26bz, title = {Random Selection Reveals Implicit Knowledge Consensus in Code Generation}, author = {Liu, Ren-Biao and Li, Xin-Ye and Sun, Hui and Du, Yali and Xue, Jiang-Tian and Li, Ming}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {77246--77262}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/liu26bz/liu26bz.pdf}, url = {https://proceedings.mlr.press/v306/liu26bz.html}, abstract = {Training large language models for code generation often involves selecting data from verifiable multi-solution pools, where each problem admits multiple correct implementations. Conventional studies on data selection suggest that complex selection strategies, such as diversity maximization or difficulty ranking, should outperform naive random sampling. In this work, we systematically evaluate within-problem solution selection strategies across different representation spaces, including continuous embeddings, discrete tokens, and syntactic structures, using various base language models. Instead, simple random sampling achieves consistently competitive performance across all models, exhibiting greater cross-model stability than complex methods. We interpret these results through the lens of implicit knowledge consensus: verified solution pools may contain representative algorithmic patterns that random sampling can preserve. Our findings suggest that practitioners should treat random sampling as a low-cost default for verifiable code-generation fine-tuning and move to complex selectors when hard-tail or constraint-focused coverage is the target.} }
Endnote
%0 Conference Paper %T Random Selection Reveals Implicit Knowledge Consensus in Code Generation %A Ren-Biao Liu %A Xin-Ye Li %A Hui Sun %A Yali Du %A Jiang-Tian Xue %A Ming Li %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-liu26bz %I PMLR %P 77246--77262 %U https://proceedings.mlr.press/v306/liu26bz.html %V 306 %X Training large language models for code generation often involves selecting data from verifiable multi-solution pools, where each problem admits multiple correct implementations. Conventional studies on data selection suggest that complex selection strategies, such as diversity maximization or difficulty ranking, should outperform naive random sampling. In this work, we systematically evaluate within-problem solution selection strategies across different representation spaces, including continuous embeddings, discrete tokens, and syntactic structures, using various base language models. Instead, simple random sampling achieves consistently competitive performance across all models, exhibiting greater cross-model stability than complex methods. We interpret these results through the lens of implicit knowledge consensus: verified solution pools may contain representative algorithmic patterns that random sampling can preserve. Our findings suggest that practitioners should treat random sampling as a low-cost default for verifiable code-generation fine-tuning and move to complex selectors when hard-tail or constraint-focused coverage is the target.
APA
Liu, R., Li, X., Sun, H., Du, Y., Xue, J. & Li, M.. (2026). Random Selection Reveals Implicit Knowledge Consensus in Code Generation. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:77246-77262 Available from https://proceedings.mlr.press/v306/liu26bz.html.

Related Material