mlsanityData to 7 Oct 2026

Learning to Align Human Code Preferences

arXiv 2507.20109 ↗First posted 27 Jul 2025cs.SE cs.AIcited by 1

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

Abstract (arXiv)

Large Language Models (LLMs) have demonstrated remarkable potential in automating software development tasks. While recent advances leverage Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) to align models with human preferences, the optimal training strategy remains unclear across diverse code preference scenarios. This paper systematically investigates the roles of SFT and DPO in aligning LLMs with different code preferences. Through both theoretical analysis and empirical observation, we hypothesize that SFT excels in scenarios with objectively verifiable optimal solutions, while applying SFT followed by DPO (S&D) enables models to explore superior solutions in scenarios without objectively verifiable optimal solutions. Based on the analysis and experimental evidence, we propose Adaptive Preference Optimization (APO), a dynamic integration approach that adaptively amplifies preferred responses, suppresses dispreferred ones, and encourages exploration of potentially superior solutions during training. Extensive experiments across six representative code preference tasks validate our theoretical hypotheses and demonstrate that APO consistently matches or surpasses the performance of existing SFT and S&D strategies. Our work provides both theoretical foundations and practical guidance for selecting appropriate training strategies in different code preference alignment scenarios.

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 18 of its 42 references that are in the map. First posted on arXiv 27 Jul 2025.

Builds on

18 of 42 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Cases11 Jun

Other references · 17

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  3. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  4. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  5. 2021Measuring Coding Challenge Competence With APPScited by 879
  6. 2023Instruction Tuning for Large Language Models: A Surveycited by 617
  7. 2024From r to Q^*: Your Language Model is Secretly a Q-Functioncited by 242
  8. 2024Smaug: Fixing Failure Modes of Preference Optimisation with DPO-Positivecited by 239
  9. 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
  10. 2024CYBERSECEVAL 3: Advancing the Evaluation of Cybersecurity Risks and Capabilities in Large Language Modelscited by 56
  11. 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 32
  12. 2024ProSec: Fortifying Code LLMs with Proactive Security Alignmentcited by 24
5 more
  1. 2024Rectifier: Code Translation with Corrector via LLMscited by 20
  2. 2025COFFE: A Code Efficiency Benchmark for Code Generationcited by 18
  3. 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiencycited by 16
  4. 2025Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Pointscited by 14
  5. 2025SolEval: Benchmarking Large Language Models for Repository-level Solidity Code Generationcited by 5

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. 2024Learning Code Preference via Synthetic Evolution
  2. 2025Teaching Your Models to Understand Code via Focal Preference Alignment
  3. 2024Intuitive Fine-Tuning: Towards Simplifying Alignment into a Single Process
  4. 2026CriterAlign: Criterion-Centric Rationale Alignment for Code Preference Judging
  5. 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus
  6. 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs
  7. 2024Aligning CodeLLMs with Direct Preference Optimization
  8. 2026Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation