NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Evaluating and Aligning CodeLLMs on Human Preference

Jian Yang, Jiaxi Yang, Ke Jin, Yibo Miao, Lei Zhang, Liqun Yang, Zeyu Cui, Yichang Zhang, Binyuan Hui, Junyang LinarXiv 2024

Introduction

In the evolution of Code Large Language Models (CodeLLMs), evaluation has traditionally centered on functional correctness—specifically, whether generated code passes a suite of unit tests. While benchmarks like HumanEval and MBPP have driven significant progress in logical accuracy, they often fail to capture the nuances of real-world developer needs. In practice, a developer seeks more than just executable code; they require readability, clear explanations, and contextual relevance.

Researchers from Alibaba Group and several Chinese universities identify this as the "preference gap." Their work introduces CodeArena, a human-curated benchmark, and SynCode-Instruct, a massive synthetic dataset, to align model outputs with human-centric helpfulness.

Comparison between execution-based benchmarks and human preference evaluation in CodeArena.

The Alignment Gap

Traditional benchmarks are often algorithmic and self-contained, bearing little resemblance to the multi-faceted queries users submit to chat interfaces. A model might produce a logically perfect Quicksort implementation but fail a human preference test by omitting explanations or using obscure variable names.

As illustrated in Figure 1, proprietary models like Claude 3.5 often provide "detailed and beautiful" replies with breakdowns and notes, whereas many open-source models provide "short" responses without further explanation. This discrepancy highlights the need for alignment beyond mere execution, moving toward responses that satisfy human expectations for clarity and utility.

Methodology: CodeArena and SynCode-Instruct

The researchers addressed this gap through a dual approach involving a new evaluation framework and a large-scale training pipeline.

1. CodeArena Benchmark

CodeArena consists of 397 high-quality, human-curated samples spanning 40 categories (from UI/UX to DevOps) and 44 programming languages. Unlike execution-based tests, it utilizes an LLM-as-a-judge framework. Responses from different models are compared pairwise by GPT-4o to determine which is more helpful, readable, and correct.

2. SynCode-Instruct Pipeline

To bridge the performance gap, the authors developed SynCode-Instruct, a 20B-token synthetic instruction corpus. The generation process follows a sophisticated pipeline designed to maximize diversity and quality:

  • Clustering & Classification: Web-crawled code snippets are categorized by language and domain to ensure broad coverage.
  • Synthesizing: Qwen2.5-Coder-Instruct generates a massive volume of diverse coding instructions, while GPT-4o produces a "gold-standard" subset (1B tokens) focused on high-quality reasoning and explanation examples.
  • Verification: A scorer and executor verify the quality of the synthesized data before it is added to the large-scale SFT dataset.
The SynCode-Instruct data generation and verification pipeline.

Key Results and Insights

The study yielded several critical findings regarding the state of CodeLLM alignment:

  • Proprietary Dominance: OpenAI’s o1-mini dominated CodeArena with an 89.3% win rate, followed by Claude 3.5 Sonnet at ~78%, indicating that proprietary models still lead in conversational helpfulness.
  • The Power of Synthetic Data: The authors' Qwen2.5-SynCoder-32B, trained on the SynCode-Instruct corpus, achieved a 49.2% win rate. This significantly outperforms the standard Qwen2.5-Coder-32B-Instruct, proving that synthetic data can effectively teach models how to "package" their existing knowledge for humans.
  • No Logic Trade-off: Improving human preference did not degrade logical performance. SynCoder maintained a 92.7% score on EvalPlus (HumanEval), matching or exceeding GPT-4o in pure code generation.
  • Scaling Alignment: Preference alignment scores continued to improve as the synthetic instruction data scaled from 2B to 20B tokens, suggesting further gains are possible with even larger datasets.

Conclusion

The transition from "Does it run?" to "Is it helpful?" marks a significant shift in CodeLLM development. By introducing CodeArena and the SynCode-Instruct pipeline, this research provides both the metrics and the data necessary to close the alignment gap. While proprietary models currently hold the lead, the success of Qwen2.5-SynCoder demonstrates that large-scale synthetic instruction fine-tuning is a viable path for open-source models to achieve human-centric excellence.

Reference: Yang, J., et al. (2024). Evaluating and Aligning CodeLLMs on Human Preference. arXiv:2412.05210v1.

Summary updated

BibTeX
@misc{yang2024evaluating,
  author = {Jian Yang and Jiaxi Yang and Ke Jin and Yibo Miao and Lei Zhang and Liqun Yang and Zeyu Cui and Yichang Zhang and Binyuan Hui and Junyang Lin},
  title = {{Evaluating and Aligning CodeLLMs on Human Preference}},
  year = {2024},
  eprint = {2412.05210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.05210},
}
Figure