mlsanityData to 14 Oct 2026

Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation

arXiv 2606.28998 ↗First posted 27 Jun 2026cs.SE cs.AIcited by 0

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

Abstract (arXiv)

Large Language Model (LLM) alignment trains an LLM using preference data to produce outputs that better meet established quality standards. While LLM alignment techniques are studied for non-coding tasks, we know little about their usefulness for coding tasks. It is unclear whether LLM code alignment could support both functional requirements (producing executable, correct code) and non-functional requirements (code readability, style, maintainability). It is also unknown whether alignment for a code LLM should begin with base pretrained version or the finetuned (i.e., instruction-tuned) version of the LLM. In this paper, we offer insights on the above two research questions by conducting an empirical study. We studied five state-of-the-art (SOTA) LLMs using two widely used LLM alignment techniques: Direct Preference Optimization (DPO) and BoNBoN. For each training record, we created a preference pair as accepted and rejected instances by using the SelfCodeAlign pipeline. DPO and BoNBoN are reward-free models, i.e., they eliminate the need for multiple reward scores for output preferences. We tuned each LLM using the two alignment techniques in two settings: pretrained and finetuned versions of an LLM. We evaluated functional requirements using four SOTA benchmarks (HumanEval+, MBPP+, EvalPerf, EvoEval) and non-functional requirements using the CODAL benchmark, which evaluates code quality across five dimensions derived from software engineering practices. We find that pretrained-to-aligned pathways achieve larger improvements in the aligned variant over its pretrained variant. But the pretrained variant is generally less accurate than its finetuned variant. However, finetuned- to-aligned offers smaller performance improvements or, in some cases, degradation in the aligned variant than its finetuned variant.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Process reward models for reasoning, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 49 of its 66 references that are in the map. First posted on arXiv 27 Jun 2026.

Builds on

49 of 66 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024Iterative Reasoning Preference Optimization30 Apr

Other references · 48

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  6. 2016Overcoming catastrophic forgetting in neural networkscited by 4,787
  7. 2017Deep reinforcement learning from human preferencescited by 3,912
  8. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,796
  9. 2021Program Synthesis with Large Language Modelscited by 3,637
  10. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  11. 2020Learning to summarize from human feedbackcited by 2,588
  12. 2023Code Llama: Open Foundation Models for Codecited by 2,139
36 more
  1. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  2. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  3. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  4. 2024Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluatorscited by 897
  5. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  6. 2024A Survey on Large Language Models for Code Generationcited by 658
  7. 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 639
  8. 2023RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedbackcited by 625
  9. 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 562
  10. 2022The Stack: 3 TB of permissively licensed source codecited by 359
  11. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  12. 2023GPT4RoI: Instruction Tuning Large Language Model on Region-of-Interestcited by 302
  13. 2024KTO: Model Alignment as Prospect Theoretic Optimizationcited by 264
  14. 2024Is DPO Superior to PPO for LLM Alignment? A Comprehensive Studycited by 262
  15. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 256
  16. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
  17. 2023Understanding Catastrophic Forgetting in Language Models via Implicit Inferencecited by 144
  18. 2024BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Samplingcited by 121
  19. 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 62
  20. 2024Analyzing and Reducing Catastrophic Forgetting in Parameter Efficient Tuningcited by 60
  21. 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 60
  22. 2025Overtrained Language Models Are Harder to Fine-Tunecited by 58
  23. 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 57
  24. 2024LLaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generationcited by 45
  25. 2024Top Leaderboard Ranking = Top Coding Proficiency, Always? EvoEval: Evolving Coding Benchmarks via LLMcited by 40
  26. 2024Relative Preference Optimization: Enhancing LLM Alignment through Contrasting Responses across Identical and Diverse Promptscited by 36
  27. 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 34
  28. 2023InstructCoder: Instruction Tuning Large Language Models for Code Editingcited by 29
  29. 2023Knowledgeable Preference Alignment for LLMs in Domain-specific Question Answeringcited by 29
  30. 2024Robustness, Security, Privacy, Explainability, Efficiency, and Usability of Large Language Models for Codecited by 28
  31. 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 26
  32. 2024Code Less, Align More: Efficient LLM Fine-tuning for Code Generation with Data Pruningcited by 20
  33. 2024Balancing Continuous Pre-Training and Instruction Fine-Tuning: Optimizing Instruction-Following in LLMscited by 12
  34. 2025Small or Large? Zero-Shot or Finetuned? Guiding Language Model Choice for Specialized Applications in Healthcarecited by 5
  35. 2025From Requirements to Code: Understanding Developer Practices in LLM-Assisted Software Engineeringcited by 4
  36. 2025Automated Non-Functional Requirements Generation in Software Engineering with Large Language Models: A Comparative Studycited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Aligning CodeLLMs with Direct Preference Optimization
  2. 2025Teaching Your Models to Understand Code via Focal Preference Alignment
  3. 2025Enhancing the Non-Functional Quality Compliance of LLM-Generated Code through Quality-Aware Preference Learning
  4. 2025Reward-aware Preference Optimization: A Unified Mathematical Framework for Model Alignment
  5. 2024CodecLM: Aligning Language Models with Tailored Synthetic Data
  6. 2025Data Selection for LLM Alignment Using Fine-Grained Preferences
  7. 2025A Comprehensive Evaluation framework of Alignment Techniques for LLMs
  8. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning