Research map / Large language models / Agents, code and math
VERSE: Verification-based Self-Play for Code Instructions
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes VERSE, a verification-based self-play method where Code LLMs generate code instructions, responses, and executable verification scripts, then rank responses by execution and self-consistency scores for rejection-sampling fine-tuning.
Problem
Self-generated instruction-response data for code LLMs is not guaranteed to be functionally correct, and direct verification of responses to diverse code instructions (including non-executable natural-language outputs) is challenging.
Approach
Code LLMs self-generate verifications and test scripts for each response, execute them in a sandbox, and combine execution results with equivalence-based self-consistency and verification confidence into a score used to rank and select training data via rejection sampling fine-tuning.
Key results
- VERSE improves CodeLlama-7B average score from 26.2 (Self-Instruct) to 33.5 and from 21.3 (base) overall, and Deepseek-Coder-6.7B-Base from 42.6 to 45.5 on average.
- Starting from Evol-instruction-66k checkpoints, VERSE raises CodeLlama-7B average from 42.6 to 45.6 and Deepseek-Coder-6.7B from 49.1 to 53.0.
- Reported average improvement of 7.6% across base Code LLMs; distilled 1.3B model gains 7.1% over base on average.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Train CodeLlama-7B with VERSE from the base model instead of using the strongest reported non-VERSE result | CodeLlama-7B · BigCloneBench | F1: 61.2 -> 39.2 | Hurt |
| Train CodeLlama-7B with VERSE from the base model instead of Evol-instruction-66k | CodeLlama-7B · Devign | accuracy: 53.2 -> 47.6 | Hurt |
| Train CodeLlama-7B with VERSE from the base model instead of Evol-instruction-66k | CodeLlama-7B · HumanEvalSynthesis | Pass@1: 44.9 -> 38.4 | Hurt |
| Train CodeLlama-7B with VERSE from the base model instead of Evol-instruction-66k | CodeLlama-7B · HumanEvalFix | Pass@1: 34.2 -> 10.5 | Hurt |
| Train CodeLlama-7B with VERSE from the base model instead of Evol-instruction-66k | CodeLlama-7B · HumanEvalExplain | Pass@1: 32.7 -> 31.8 | Hurt |
| Train Deepseek-Coder-6.7B-Base with VERSE from the base model instead of the base model result | Deepseek-Coder-6.7B-Base · BigCloneBench | F1: 51.8 -> 53.1 | Helped |
| Train Deepseek-Coder-6.7B-Base with VERSE from the base model instead of Evol-instruction-66k | Deepseek-Coder-6.7B-Base · Devign | accuracy: 53.9 -> 54.5 | Helped |
| Train Deepseek-Coder-6.7B-Base with VERSE from the base model instead of Evol-instruction-66k | Deepseek-Coder-6.7B-Base · HumanEvalSynthesis | Pass@1: 56.7 -> 55.3 | Hurt |
| Train Deepseek-Coder-6.7B-Base with VERSE from the base model instead of Evol-instruction-66k | Deepseek-Coder-6.7B-Base · HumanEvalFix | Pass@1: 47.9 -> 27.1 | Hurt |
| Train Deepseek-Coder-6.7B-Base with VERSE from the base model instead of Deepseek-Coder-6.7B-Instruct | Deepseek-Coder-6.7B-Base · HumanEvalExplain | Pass@1: 49.7 -> 37.6 | Hurt |
| Add VERSE training to CodeLlama-7B fine-tuned on CodeAlpaca-20k | CodeLlama-7B · BigCloneBench | F1: 17.8 -> 37.3 | Helped |
| Add VERSE training to Deepseek-Coder-6.7B-Base fine-tuned on Evol-instruction-66k | Deepseek-Coder-6.7B-Base · HumanEvalSynthesis | Pass@1: 56.7 -> 60.7 | Helped |
Surprising findings
- Self-Instruct and CodeAlpaca-20k fine-tuning sometimes reduce metrics below the base model on some tasks, such as clone detection for Deepseek-Coder (12.3 vs 51.8).
- Defect detection and program repair benefit little from VERSE, which the authors attribute to difficulty generating realistic human-like errors.
Limitations
- Depends on program execution; code instructions with complex dependencies or multiple files are hard to execute.
- Evaluated mainly on 7B-scale models; larger models not sufficiently tested due to resources.
- Gains on defect detection and program repair are limited.
Experimental setup
Datasets: CodeAlpaca-20k Evol-instruction-66k BigCloneBench Devign HumanEvalSynthesis HumanEvalFix HumanEvalExplain
Benchmarks: BigCloneBench Devign HumanEvalSynthesis HumanEvalFix HumanEvalExplain
Metrics: F1 Accuracy Pass@1
Baselines: Self-Instruct CodeAlpaca-20k Evol-instruction-66k CodeLlama-7B-Instruct Deepseek-Coder-6.7B-Instruct GPT-4
Builds on: Self-Instruct rejection sampling fine-tuning self-consistency HumanEvalPack
Closest papers by meaning
- Self-play with Execution Feedback: Improving Instruction-following Capabilities of Large Language Models (ICLR 2025 · similarity 0.90)
- SelfCodeAlign: Self-Alignment for Code Generation (NeurIPS 2024 · similarity 0.89)
- Beyond Accuracy: Evaluating Self-Consistency of Code Large Language Models with IdentityChain (ICLR 2024 · similarity 0.88)
- Teaching Large Language Models to Self-Debug (ICLR 2024 · similarity 0.87)
- NExT: Teaching Large Language Models to Reason about Code Execution (ICML 2024 · similarity 0.87)
- Rethinking Verification for LLM Code Generation: From Generation to Testing (NeurIPS 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
