PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Models
Simin Chen, Xiaoning Feng, Xiaohong Han, Cong Liu, Wei Yang
TL;DR
The paper addresses the challenge of benchmarking large code generation models by automatically generating diverse programming problems. It introduces Programming Problem Merging (PPM), which creates new problems by merging seed tasks and applying metamorphic transformations guided by return-value analysis, with Lambda Programming Problems ensuring natural descriptions. Two implementations, PPM-T and PPM-V, along with eight LCGMs and nine baselines, are evaluated on HumanEval and MBPP, demonstrating significantly increased semantic diversity, more natural prompts, and improved data integrity, while substantially reducing model correctness on the generated benchmarks. The results show that PPM provides stable benchmarking across random trials and hyperparameter settings, offering a practical, replication-friendly approach to robustly evaluate code-generation capabilities in real-world scenarios.
Abstract
In recent times, a plethora of Large Code Generation Models (LCGMs) have been proposed, showcasing significant potential in assisting developers with complex programming tasks. Benchmarking LCGMs necessitates the creation of a set of diverse programming problems, and each problem comprises the prompt (including the task description), canonical solution, and test inputs. The existing methods for constructing such a problem set can be categorized into two main types: manual methods and perturbation-based methods. However, manual methods demand high effort and lack scalability, while also risking data integrity due to LCGMs' potentially contaminated data collection, and perturbation-based approaches mainly generate semantically homogeneous problems with the same canonical solutions and introduce typos that can be easily auto-corrected by IDE, making them ineffective and unrealistic. In this work, we propose the idea of programming problem merging (PPM) and provide two implementation of this idea, we utilize our tool on two widely-used datasets and compare it against nine baseline methods using eight code generation models. The results demonstrate the effectiveness of our tool in generating more challenging, diverse, and natural programming problems, comparing to the baselines.
