Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation
On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis
Abstract (arXiv)
Recent advances in large language models (LLMs) have improved their performance on coding benchmarks. However, improvement is plateauing due to the exhaustion of readily available high-quality data. Prior work has shown the potential of synthetic self-instruct data, but naively training on a model's own outputs can cause error accumulation, especially in coding tasks, where generalization may collapse due to overly simple or erroneous training data, highlighting the need for rigorous quality checks on synthetic data. In this work, we explore an effective approach whereby the model itself verifies the correctness of its own data. We thus propose Sol-Ver, a self-play solver-verifier framework that jointly improves a single model's code and test generation capacity. By iteratively refining code (LLM-as-a-solver) and tests (LLM-as-a-verifier) together, we boost both capabilities without relying on human annotations or larger teacher models. Experiments with the Llama 3.1 8B model demonstrate substantial performance enhancements, achieving average relative improvements of 19.63% in code generation and 17.49% in test generation on MBPP and LiveCodeBench.
Key facts. Cited by 35 papers in the map (data through 14 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 25 of its 32 references that are in the map. First posted on arXiv 20 Feb 2025.
Builds on
25 of 32 references.
Closest ancestors · 2
Same direction, newest first
- 2024Self-play with Execution Feedback: Improving Instruction-following Capabilities of Large Language Models19 Jun
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructions20 Dec
Other references · 23
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
11 more
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2023The Curse of Recursion: Training on Generated Data Makes Models Forgetcited by 356
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 256
- 2024LLM Critics Help Catch LLM Bugscited by 147
- 2023RLTF: Reinforcement Learning from Unit Test Feedbackcited by 114
- 2024Gecko: Versatile Text Embeddings Distilled from Large Language Modelscited by 83
- 2024Automated Unit Test Improvement using Large Language Models at Metacited by 75
- 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 34
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
Built on by
Citing papers per year: 2025: 12; 2026: 23.
35 papers.
Sort:
By area:
- 2025R-Zero: Self-Evolving Reasoning LLM from Zero Datacited by 228
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligencecited by 170
- 2025Agent0: Unleashing Self-Evolving Agents from Zero Data via Tool-Integrated Reasoningcited by 75
- 2025Multi-Agent Evolve: LLM Self-Improve through Co-evolutioncited by 60
- 2025Toward Training Superintelligent Software Agents through Self-Play SWE-RLcited by 40
- 2025Trust, But Verify: A Self-Verification Approach to Reinforcement Learning with Verifiable Rewardscited by 38
- 2025Guided Self-Evolving LLMs with Minimal Human Supervisioncited by 35
- 2026TTCS: Test-Time Curriculum Synthesis for Self-Evolvingcited by 19
- 2026G-Zero: Self-Play for Open-Ended Generation from Zero Datacited by 17
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
- 2025ProRe: A Proactive Reward System for GUI Agents via Reasoner-Actor Collaborationcited by 11
- 2026R-Diverse: Mitigating Diversity Illusion in Self-Play LLM Trainingcited by 10
23 more
- 2025SPARQ: Synthetic Problem Generation for Reasoning via Quality-Diversity Algorithmscited by 7
- 2026SEAD: Self-Evolving Agent for Multi-Turn Service Dialoguecited by 7
- 2026DARC: Decoupled Asymmetric Reasoning Curriculum for LLM Evolutioncited by 6
- 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimizationcited by 4
- 2026A Deep Dive into Scaling RL for Code Generation with Synthetic Data and Curriculacited by 3
- 2026Discretizing Reward Modelscited by 3
- 2025HarnessLLM: Automatic Testing Harness Generation via Reinforcement Learningcited by 2
- 2026TTSR: Test-Time Self-Evolving via Reflectioncited by 2
- 2026Self-Evolving Coding Agentscited by 2
- 2025OptiHive: Ensemble Selection for LLM-Based Optimization via Statistical Modelingcited by 1
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Gamecited by 1
- 2026Anchored Self-Play for Code Repaircited by 1
- 2026TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generationcited by 1
- 2026Two-Stage Reinforcement Learning for Sound and Adversarial Test Generation in Code LLMscited by 1
- 2026Sci-CoE: Co-evolving Scientific Reasoning LLMs via Geometric Consensus with Sparse Supervisioncited by 0
- 2026Dynamic Adversarial Reinforcement Learning for Robust Multimodal Large Language Modelscited by 0
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026ANCORA: Learning to Question via Manifold-Anchored Self-Play for Verifiable Reasoningcited by 0
- 2026A2RBench: An Automatic Paradigm for Formally Verifiable Abstract Reasoning Benchmark Generationcited by 0
- 2026FABSVer: Faster Training and Better Self-Verification for LLM Mathematical Reasoningcited by 0
- 2026Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shapingcited by 0
- 2026Learning to Optimize through Solver-Grounded Self-Playcited by 0
- 2026Self-Evolving Visual Agent via Margin Rewardcited by 0
- 2026Self-Evolving Visual Agent via Margin Reward10 Oct 2026
- 2026Learning to Optimize through Solver-Grounded Self-Play28 Sep 2026
- 2026Two-Stage Reinforcement Learning for Sound and Adversarial Test Generation in Code LLMs3 Sep 2026
- 2026Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shaping25 Aug 2026
- 2026Self-Evolving Coding Agents4 Aug 2026
- 2026TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generation1 Aug 2026
- 2026Anchored Self-Play for Code Repair3 Jul 2026
- 2026Discretizing Reward Models19 Jun 2026
- 2026FABSVer: Faster Training and Better Self-Verification for LLM Mathematical Reasoning27 May 2026
- 2026A2RBench: An Automatic Paradigm for Formally Verifiable Abstract Reasoning Benchmark Generation17 May 2026
- 2026G-Zero: Self-Play for Open-Ended Generation from Zero Data11 May 2026
- 2026ANCORA: Learning to Question via Manifold-Anchored Self-Play for Verifiable Reasoning30 Apr 2026
23 more
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimization17 Apr 2026
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Game30 Mar 2026
- 2026A Deep Dive into Scaling RL for Code Generation with Synthetic Data and Curricula25 Mar 2026
- 2026R-Diverse: Mitigating Diversity Illusion in Self-Play LLM Training13 Feb 2026
- 2026Sci-CoE: Co-evolving Scientific Reasoning LLMs via Geometric Consensus with Sparse Supervision12 Feb 2026
- 2026TTSR: Test-Time Self-Evolving via Reflection6 Feb 2026
- 2026SEAD: Self-Evolving Agent for Multi-Turn Service Dialogue3 Feb 2026
- 2026TTCS: Test-Time Curriculum Synthesis for Self-Evolving30 Jan 2026
- 2026Dynamic Adversarial Reinforcement Learning for Robust Multimodal Large Language Models24 Jan 2026
- 2026DARC: Decoupled Asymmetric Reasoning Curriculum for LLM Evolution20 Jan 2026
- 2025Toward Training Superintelligent Software Agents through Self-Play SWE-RL21 Dec 2025
- 2025Guided Self-Evolving LLMs with Minimal Human Supervision2 Dec 2025
- 2025Agent0: Unleashing Self-Evolving Agents from Zero Data via Tool-Integrated Reasoning20 Nov 2025
- 2025HarnessLLM: Automatic Testing Harness Generation via Reinforcement Learning2 Nov 2025
- 2025Multi-Agent Evolve: LLM Self-Improve through Co-evolution27 Oct 2025
- 2025ProRe: A Proactive Reward System for GUI Agents via Reasoner-Actor Collaboration26 Sep 2025
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learning28 Aug 2025
- 2025R-Zero: Self-Evolving Reasoning LLM from Zero Data7 Aug 2025
- 2025OptiHive: Ensemble Selection for LLM-Based Optimization via Statistical Modeling4 Aug 2025
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligence28 Jul 2025
- 2025SPARQ: Synthetic Problem Generation for Reasoning via Quality-Diversity Algorithms6 Jun 2025
- 2025Trust, But Verify: A Self-Verification Approach to Reinforcement Learning with Verifiable Rewards19 May 2025
- 2025R-Zero: Self-Evolving Reasoning LLM from Zero Datacited by 228
- 2025Agent0: Unleashing Self-Evolving Agents from Zero Data via Tool-Integrated Reasoningcited by 75
- 2025Multi-Agent Evolve: LLM Self-Improve through Co-evolutioncited by 60
- 2026TTCS: Test-Time Curriculum Synthesis for Self-Evolvingcited by 19
- 2025ProRe: A Proactive Reward System for GUI Agents via Reasoner-Actor Collaborationcited by 11
- 2026R-Diverse: Mitigating Diversity Illusion in Self-Play LLM Trainingcited by 10
- 2025SPARQ: Synthetic Problem Generation for Reasoning via Quality-Diversity Algorithmscited by 7
- 2026DARC: Decoupled Asymmetric Reasoning Curriculum for LLM Evolutioncited by 6
- 2026Sci-CoE: Co-evolving Scientific Reasoning LLMs via Geometric Consensus with Sparse Supervisioncited by 0
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026A2RBench: An Automatic Paradigm for Formally Verifiable Abstract Reasoning Benchmark Generationcited by 0
- 2026FABSVer: Faster Training and Better Self-Verification for LLM Mathematical Reasoningcited by 0
- 2026FABSVer: Faster Training and Better Self-Verification for LLM Mathematical Reasoning27 May 2026
- 2026A2RBench: An Automatic Paradigm for Formally Verifiable Abstract Reasoning Benchmark Generation17 May 2026
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026R-Diverse: Mitigating Diversity Illusion in Self-Play LLM Training13 Feb 2026
- 2026Sci-CoE: Co-evolving Scientific Reasoning LLMs via Geometric Consensus with Sparse Supervision12 Feb 2026
- 2026TTCS: Test-Time Curriculum Synthesis for Self-Evolving30 Jan 2026
- 2026DARC: Decoupled Asymmetric Reasoning Curriculum for LLM Evolution20 Jan 2026
- 2025Agent0: Unleashing Self-Evolving Agents from Zero Data via Tool-Integrated Reasoning20 Nov 2025
- 2025Multi-Agent Evolve: LLM Self-Improve through Co-evolution27 Oct 2025
- 2025ProRe: A Proactive Reward System for GUI Agents via Reasoner-Actor Collaboration26 Sep 2025
- 2025R-Zero: Self-Evolving Reasoning LLM from Zero Data7 Aug 2025
- 2025SPARQ: Synthetic Problem Generation for Reasoning via Quality-Diversity Algorithms6 Jun 2025
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligencecited by 170
- 2025Toward Training Superintelligent Software Agents through Self-Play SWE-RLcited by 40
- 2026SEAD: Self-Evolving Agent for Multi-Turn Service Dialoguecited by 7
- 2026Self-Evolving Coding Agentscited by 2
- 2026Self-Evolving Coding Agents4 Aug 2026
- 2026SEAD: Self-Evolving Agent for Multi-Turn Service Dialogue3 Feb 2026
- 2025Toward Training Superintelligent Software Agents through Self-Play SWE-RL21 Dec 2025
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligence28 Jul 2025
- 2026G-Zero: Self-Play for Open-Ended Generation from Zero Datacited by 17
- 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimizationcited by 4
- 2026Discretizing Reward Modelscited by 3
- 2026Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shapingcited by 0
- 2026Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shaping25 Aug 2026
- 2026Discretizing Reward Models19 Jun 2026
- 2026G-Zero: Self-Play for Open-Ended Generation from Zero Data11 May 2026
- 2026ACE: Self-Evolving LLM Coding Framework via Adversarial Unit Test Generation and Preference Optimization17 Apr 2026
- 2026A Deep Dive into Scaling RL for Code Generation with Synthetic Data and Curriculacited by 3
- 2026TTSR: Test-Time Self-Evolving via Reflectioncited by 2
- 2026Anchored Self-Play for Code Repaircited by 1
- 2026Learning to Optimize through Solver-Grounded Self-Playcited by 0
- 2026Learning to Optimize through Solver-Grounded Self-Play28 Sep 2026
- 2026Anchored Self-Play for Code Repair3 Jul 2026
- 2026A Deep Dive into Scaling RL for Code Generation with Synthetic Data and Curricula25 Mar 2026
- 2026TTSR: Test-Time Self-Evolving via Reflection6 Feb 2026
- 2025Trust, But Verify: A Self-Verification Approach to Reinforcement Learning with Verifiable Rewardscited by 38
- 2025Guided Self-Evolving LLMs with Minimal Human Supervisioncited by 35
- 2025OptiHive: Ensemble Selection for LLM-Based Optimization via Statistical Modelingcited by 1
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Gamecited by 1
- 2026TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generationcited by 1
- 2026Two-Stage Reinforcement Learning for Sound and Adversarial Test Generation in Code LLMscited by 1
- 2026ANCORA: Learning to Question via Manifold-Anchored Self-Play for Verifiable Reasoningcited by 0
- 2026Self-Evolving Visual Agent via Margin Rewardcited by 0
- 2026Self-Evolving Visual Agent via Margin Reward10 Oct 2026
- 2026Two-Stage Reinforcement Learning for Sound and Adversarial Test Generation in Code LLMs3 Sep 2026
- 2026TaPR: Test-Aware Policy Refinement for Feedback-Conditioned Code Generation1 Aug 2026
- 2026ANCORA: Learning to Question via Manifold-Anchored Self-Play for Verifiable Reasoning30 Apr 2026
- 2026COvolve: Adversarial Co-Evolution of Large-Language-Model-Generated Policies and Environments via Two-Player Zero-Sum Game30 Mar 2026
- 2025Guided Self-Evolving LLMs with Minimal Human Supervision2 Dec 2025
- 2025OptiHive: Ensemble Selection for LLM-Based Optimization via Statistical Modeling4 Aug 2025
- 2025Trust, But Verify: A Self-Verification Approach to Reinforcement Learning with Verifiable Rewards19 May 2025
Similar, not cited
Close in wording, no citation either way
- 2026Embarrassingly Simple Self-Distillation Improves Code Generation
- 2025Propose, Solve, Verify: Self-Play Through Formal Verification
- 2025HardTests: Synthesizing High-Quality Test Cases for LLM Coding
- 2025Increasing LLM Coding Capabilities through Diverse Synthetic Coding Tasks
- 2025Rethinking Verification for LLM Code Generation: From Generation to Testing
- 2026CodeContests-O: Powering LLMs via Feedback-Driven Iterative Test Case Generation
- 2025Synthetic Data Generation Using Large Language Models: Advances in Text and Code
- 2023SelfEvolve: A Code Evolution Framework via Large Language Models