AutoTest: Evolutionary Code Solution Selection with Test Cases
Zhihua Duan, Jialin Wang

TL;DR
AutoTest introduces an evolutionary approach that combines automated test case generation and code execution to improve code solution selection, achieving about 10% better accuracy on the HumanEval benchmark.
Contribution
It presents a novel method integrating large language models, automated testing, and genetic algorithms for optimized code solution selection.
Findings
10% improvement in pass@1 score on HumanEval
Effective use of genetic algorithms for code ranking
Enhanced solution accuracy over baseline methods
Abstract
With the development of code generation techniques, selecting the correct code solution from multiple candidate solutions has become a crucial task. This study proposes AutoTest, a novel technique that combines automated test case generation with code solution execution to optimize the selection process using an evolutionary genetic algorithm. Firstly, AutoTest utilizes large pre-trained language models such as codegen-16B, code-davinci-002, and incoder-6B to provide code solutions and their corresponding test cases. Then, by executing the code solutions and evaluating their performance on the test cases, a consensus set is formed. Fine-grained ranking is achieved through the selection, mutation, and crossover mechanisms based on the evolutionary genetic algorithm, with the adjustment of alpha and beta parameters. Finally, the best code solution is chosen. AutoTest demonstrates…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Evolutionary Algorithms and Applications · Software Engineering Research
MethodsSparse Evolutionary Training
