ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation

Code generation plays a crucial role in various tasks, such as code auto-completion and mathematical reasoning.Previous work has proposed numerous methods to enhance code generation performance, including integrating feedback from the compiler.Inspired by this, we present ReflectionCoder, a novel approach that effectively leverages reflection sequences constructed by integrating compiler feedback to improve one-off code generation performance.Furthermore, we propose reflection self-distillation and dynamically masked distillation to effectively utilize these reflection sequences.Extensive experiments on three benchmarks, i.e., HumanEval (+), MBPP (+), and MultiPL-E, demonstrate that models fine-tuned with our method achieve state-of-the-art performance.Beyond the code domain, we believe this approach can benefit other domains that focus on final results and require long reasoning paths.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.494
Citations
1
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
2.31
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation

Aojun Zhou, Zhongyuan Wu, Mingjie Zhan, Houxing Ren et al.
1 citations
Model-Driven Software Engineering Techniques
2.31
article

ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation

Aojun Zhou, Zhongyuan Wu, Mingjie Zhan, Houxing Ren, Hongsheng Li, Junting Pan
article en
1 citations

Abstract

Code generation plays a crucial role in various tasks, such as code auto-completion and mathematical reasoning.Previous work has proposed numerous methods to enhance code generation performance, including integrating feedback from the compiler.Inspired by this, we present ReflectionCoder, a novel approach that effectively leverages reflection sequences constructed by integrating compiler feedback to improve one-off code generation performance.Furthermore, we propose reflection self-distillation and dynamically masked distillation to effectively utilize these reflection sequences.Extensive experiments on three benchmarks, i.e., HumanEval (+), MBPP (+), and MultiPL-E, demonstrate that models fine-tuned with our method achieve state-of-the-art performance.Beyond the code domain, we believe this approach can benefit other domains that focus on final results and require long reasoning paths.

Openalex Percentile: Top 11%
Model-Driven Software Engineering Techniques
2.31
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation — Aojun Zhou, Zhongyuan Wu, et al. · (2025) | TGRS Research Map | TGRS