mlsanityData to 14 Oct 2026

ReflexiCoder: Teaching Large Language Models to Self-Reflect on Generated Code and Self-Correct It via Reinforcement Learning

arXiv 2603.05863 ↗First posted 6 Mar 2026cs.CL cs.LG cs.SEcited by 7

Not on the map. Why?

Abstract (arXiv)

While Large Language Models (LLMs) have revolutionized code generation, standard ``System 1'' approaches that generate solutions in a single forward pass often hit a performance ceiling on complex algorithmic tasks. Existing iterative refinement strategies attempt to bridge this gap at inference time, yet they predominantly rely on external oracles, execution feedback, or computationally expensive prompt-response cycles. In this work, we propose ReflexiCoder, a novel reinforcement learning (RL) framework that internalizes the structured reasoning trajectory, encompassing initial generation, bug and optimization aware reflection, and self-correction, directly into the model's weights. Unlike prior methods, ReflexiCoder shifts the paradigm from external-dependent refinement to an intrinsic, fully autonomous self-reflection and self-correction capabilities at inference time. We utilize an RL-only training paradigm with granular reward functions to optimize the entire reflection-correction trajectory, teaching the model how to debug without reliance on ground-truth feedback or execution engines at inference time. Extensive experiments across seven benchmarks demonstrate that our ReflexiCoder-8B establishes a new state-of-the-art (SOTA) among leading open-source models in the 1.5B to 14B range, achieving 94.51% (87.20%) on HumanEval (Plus), 81.80% (78.57%) on MBPP (Plus), 35.00% on BigCodeBench, 52.21% on LiveCodeBench, and 37.34% on CodeForces in a single-attempt setting, rivaling or surpassing proprietary models like GPT-5.1. Notably, our framework is significantly more token-efficient than base models, reducing inference-time compute overhead by approximately 40% through disciplined, efficient reasoning and reflection patterns. The source code and data are available at https://github.com/juyongjiang/ReflexiCoder.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 21 of its 45 references that are in the map. First posted on arXiv 6 Mar 2026.

Builds on

21 of 45 references.

References · 21

  1. 2021Program Synthesis with Large Language Modelscited by 3,637
  2. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  3. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  4. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  5. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  6. 2023Teaching Large Language Models to Self-Debugcited by 988
  7. 2024A Survey on Large Language Models for Code Generationcited by 658
  8. 2023Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Modelscited by 574
  9. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  10. 2025RAGEN: Understanding Self-Evolution in LLM Agents via Multi-Turn Reinforcement Learningcited by 386
  11. 2022CodeT: Code Generation with Generated Testscited by 384
  12. 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 239
9 more
  1. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 152
  2. 2022Natural Language to Code Translation with Executioncited by 124
  3. 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 111
  4. 2022Coder Reviewer Reranking for Code Generationcited by 84
  5. 2024LeDex: Training LLMs to Better Self-Debug and Explain Codecited by 40
  6. 2020Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesiscited by 39
  7. 2024LlamaDuo: LLMOps Pipeline for Seamless Migration from Service LLMs to Small-Scale Local LLMscited by 8
  8. 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
  9. 2025BigCodeArena: Unveiling More Reliable Human Preferences in Code Generation via Executioncited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 7.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Reflect, Retry, Reward: Self-Improving LLMs via Reinforcement Learning
  2. 2025The Path of Self-Evolving Large Language Models: Achieving Data-Efficient Learning via Intrinsic Feedback
  3. 2026SRPO: Self-Reflective Policy Optimization for Long-Horizon Reasoning
  4. 2026Reinforcement Inference: Leveraging Uncertainty for Self-Correcting Language Model Reasoning
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learning
  6. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning
  7. 2025Post-Training Large Language Models via Reinforcement Learning from Self-Feedback
  8. 2024Can Large Language Models Invent Algorithms to Improve Themselves?: Algorithm Discovery for Recursive Self-Improvement through Reinforcement Learning