mlsanityData to 7 Oct 2026

Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus

arXiv 2603.29292 ↗First posted 31 Mar 2026cs.SE cs.AI cs.PLcited by 1

On the map: LLM alignment / RLHF / preference optimisation → Process reward models for reasoning

also in 1 more
Abstract (arXiv)

Improving the code generation capabilities of large language models (LLMs) typically relies on supervised fine-tuning or preference optimization, both of which require costly external resources such as powerful teacher models or reliable test units. However, in real-world scenarios, it is much harder to obtain reference solutions and test oracles than problem descriptions and test inputs. In this paper, we tackle a challenging yet realistic question: Can a code language model improve itself without access to a superior teacher and a test oracle? To answer this, we propose ConSelf, a self-improving approach built upon two key ideas. First, we introduce code semantic entropy, a novel metric that measures problem-level uncertainty by assessing the functional diversity of program behaviors, enabling a curriculum construction with the most learnable problems. Second, we present consensus-driven direct preference optimization (Con-DPO), a preference-based fine-tuning method that weights each preference pair by its behavioral consensus, thereby mitigating the impact of noisy self-generated supervision. Experiments on various benchmarks and backbone LLMs demonstrate that ConSelf significantly outperforms baselines, validating the effectiveness of semantic entropy-based curriculum construction and consensus-driven optimization in improving code generation without external supervision.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Process reward models for reasoning, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 39 of its 56 references that are in the map. First posted on arXiv 31 Mar 2026.

Builds on

39 of 56 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025Dynamic Scaling of Unit Tests for Code Reward Modeling2 Jan
  2. 2024Preference Optimization for Reasoning with Pseudo Feedback25 Nov

Other references · 37

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2021Program Synthesis with Large Language Modelscited by 3,509
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  7. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  9. 2021Measuring Coding Challenge Competence With APPScited by 879
  10. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  11. 2022Large Language Models Can Self-Improvecited by 656
  12. 2022CodeT: Code Generation with Generated Testscited by 369
25 more
  1. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  2. 2023A Survey of Confidence Estimation and Calibration in Large Language Modelscited by 253
  3. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
  4. 2023TACO: Topics in Algorithmic COde generation datasetcited by 150
  5. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
  6. 2023Self-planning Code Generation with Large Language Modelscited by 121
  7. 2025KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Codingcited by 115
  8. 2023RLTF: Reinforcement Learning from Unit Test Feedbackcited by 110
  9. 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
  10. 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
  11. 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
  12. 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
  13. 2023WaveCoder: Widespread And Versatile Enhancement For Code Large Language Models By Instruction Tuningcited by 42
  14. 2024TESTEVAL: Benchmarking Large Language Models for Test Case Generationcited by 38
  15. 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 32
  16. 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 27
  17. 2024TOGLL: Correct and Strong Test Oracle Generation with LLMscited by 23
  18. 2025HardTests: Synthesizing High-Quality Test Cases for LLM Codingcited by 22
  19. 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
  20. 2025Revisit Self-Debugging with Self-Generated Tests for Code Generationcited by 21
  21. 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiencycited by 16
  22. 2025Learning to Generate Unit Tests for Automated Debuggingcited by 16
  23. 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
  24. 2025Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Pointscited by 14
  25. 2024DolphCoder: Echo-Locating Code Large Language Models with Diverse and Multi-Objective Instruction Tuningcited by 11

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Learning to Align Human Code Preferences
  2. 2024Learning Code Preference via Synthetic Evolution
  3. 2024CodeLutra: Boosting LLM Code Generation via Preference-Guided Refinement
  4. 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation
  5. 2026Ensemble-Based Uncertainty Estimation for Code Correctness Estimation ↗
  6. 2025CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfer
  7. 2024Comments as Natural Logic Pivots: Improve Code Generation via Comment Perspective
  8. 2025Alignment with Fill-In-the-Middle for Enhancing Code Generation