arxiv-2502-09183 SRC-0535 · paper

RefineCoder: Iterative Improving of Large Language Models via Adaptive Critique Refinement for Code Generation

Changzhi Zhou, Xinyu Zhang, Dan-Dan Song, Xiancai Chen, Wanli Gu, Hui-Peng Ma

Created: 2025-02-13 · Ingested: 2026-09-23

https://arxiv.org/abs/2502.09183(opens in a new tab)

Code generation has attracted increasing attention with the rise of Large Language Models (LLMs). Many studies have developed powerful code LLMs by synthesizing code-related instruction data and applying supervised fine-tuning. However, these methods are limited by teacher model distillation and ignore the potential of iterative refinement by self-generated code. In this paper, we propose Adaptive Critique Refinement (ACR), which enables the model to refine itself by self-generated code and external critique, rather than directly imitating the code responses of the teacher model. Concretely, A

In brief

Training a code model on its own samples plus a teacher's critique of them beats fine-tuning on the teacher's code directly, and the gains keep accruing across iterations.

Adaptive Critique Refinement (ACR) samples 7 responses at temperature 0.7, scores them with Qwen2.5-32B-Instruct as judge plus a code executor, and either replaces the dataset answer with the winning self-generated one or builds 2-turn data where the teacher critiques the losing self-generated code. Applied for 3 iterations to DSCoder-6.7B-Base and Qwen2.5-Coder-7B-Base over an 80K GPT-4o-built Python SFT set.

Average pass@1 on LiveCodeBench and BigCodeBench-hard rose 2.7 and 3.1 points; the largest single jump was iter0 to iter1 (2.0 and 2.3). On HumanEval(+), MBPP(+) and BigCodeBench, averages rose 2.7 and 4.5. On MultiPL-E, despite Python-only training, averages rose 1.0 and 2.1.

Evidence includes an ablation removing each ACR module (both hurt, the 2-turn critique data more), a scoring-system check where best-scored code beat worst-scored by 15.8 and 8.6 on HumanEval+, and a TLI leakage analysis showing 3 baseline datasets contaminated on HumanEval(+)/MBPP(+), which complicates the headline comparison.

Only 2 base models, 1 judge model, Python-only training data, no matched-compute distillation baseline, and no test on math or other reasoning tasks.

If you fine-tune code models, self-sampling plus critique is worth trying before scaling teacher distillation.

Written from the abstract by claude-opus-5 on 2026-10-24, with every figure checked against it. Not a substitute for the paper.

Referenced by

Claims in this catalog that draw on this source, and whether as support or counterpoint.

No claims cite this yet.