NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CodeEvo: Interaction-Driven Synthesis of Code-centric Data through Hybrid and Iterative Feedback

Qiushi Sun, Jingyang Gong, Lei Li, Qipeng Guo, Fei Yuan

TL;DR

CodeEvo is a novel framework that synthesizes high-quality, executable code-instruction pairs by orchestrating a collaborative loop between two LLM agents: a Coder and a Reviewer. By combining deterministic compiler feedback with flexible LLM reasoning, it produces synthetic data that is more complex, diverse, and reliable than previous methods, outperforming established baselines using significantly less data.

What Problem Does This Paper Address?

Training Large Language Models (LLMs) for code generation requires massive amounts of high-quality "instruction-code" pairs. Manually curating this data is slow and expensive. While researchers have turned to synthetic data generation (like the popular Evol-Instruct method used by WizardCoder), these approaches have a major flaw: they often produce code that looks correct but doesn't actually run or solve the problem.

The authors identify two core challenges:

  1. Instruction Quality: Heuristic-based evolution (e.g., simply telling a model to "make this harder") often leads to vague or ungrounded problems.
  2. Functional Correctness: Without a rigorous validation step, synthetic datasets become "polluted" with non-executable or logically flawed code.

Methods

CodeEvo moves away from one-shot generation toward an interaction-driven approach. It employs two specialized agents:

  • The Coder: Generates candidate solutions and unit tests for a given instruction.
  • The Reviewer: Acts as a "senior developer," providing feedback on the Coder's work and evolving instructions into more complex versions.

The framework introduces two key innovations:

  • Keyword-Guided Evolution: Instead of abstract commands, the Reviewer uses task-specific keywords (e.g., "Matrix Exponentiation," "Big Integer") as semantic anchors to evolve instructions. This ensures the new problems remain grounded and technically specific.
  • Hybrid Feedback Mechanism: This is the "secret sauce." It combines the determinism of a compiler (did the code run? did it pass tests?) with the generative flexibility of the Reviewer (is the logic sound? does it meet the prompt's spirit?). If the code fails, the agents enter a "Refine & Retry" loop to fix it.

Datasets

  • Seed Data: The process starts with a small set of ~5,000 "seed" instructions from public platforms like LeetCode, Codeforces, and Codewars.
  • Training: The authors synthesized a final dataset of 17,000 (17K) high-quality pairs.
  • Evaluation Benchmarks: The models were tested on standard benchmarks including HumanEval(+), MBPP(+), BigCodeBench, and LiveCodeBench. These "plus" versions are particularly important as they include more rigorous unit tests to catch subtle logic errors.

Key Insights and Ideas

  • Quality Trumps Quantity: Remarkably, the 17K samples from CodeEvo outperformed baselines like OSS-Instruct that used 75K samples. This proves that a smaller, "cleaner" dataset with verified executability is more valuable than a massive, noisy one.
  • The "Compiler-in-the-Loop" is Essential: LLMs are notoriously bad at judging their own code's correctness through text alone. By forcing the model to interact with a real execution environment, CodeEvo grounds the synthetic data in reality.
  • Bidirectional Difficulty Adjustment: Unlike previous methods that only try to make problems harder, CodeEvo can "simplify" a task if the Coder finds it intractable. This ensures the pipeline maintains a high "survival rate" of valid data rather than just discarding difficult attempts.

Key Results

CodeEvo consistently boosted the performance of various base models (InternLM, StarCoder2, Qwen2.5-Coder, DeepSeek-Coder):

  • StarCoder2-7B: Performance on HumanEval+ jumped from 29.9% (base) to 44.5% after fine-tuning on CodeEvo data.
  • Efficiency: CodeEvo achieved better results than Evol-Instruct while using roughly 4-5x less data.
  • LiveCodeBench: On this challenging, "contamination-free" benchmark, CodeEvo-trained models showed significant gains, whereas other synthetic datasets sometimes caused performance to plateau or even drop.

Limitations and Future Work

  • Backbone Dependency: The quality of the synthetic data is still somewhat limited by the "intelligence" of the agents used to create it. Using a weak Reviewer agent can lead to lower-quality instructions.
  • Computational Cost: The multi-turn interaction and compilation steps make CodeEvo more computationally expensive than simple one-shot prompting methods.
  • Test Case Coverage: While the Coder generates unit tests, there is no guarantee these tests cover all edge cases. The authors suggest that more robust, automated test-case generation is a promising direction for future research.

Summary updated

BibTeX
@inproceedings{sun2026codeevo,
  author = {Qiushi Sun and Jingyang Gong and Lei Li and Qipeng Guo and Fei Yuan},
  title = {{CodeEvo: Interaction-Driven Synthesis of Code-centric Data through Hybrid and Iterative Feedback}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.438},
}
Figure