SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.03837 · 2024

Learning Code Preference via Synthetic Evolution

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.03837.json · badge: /api/ran/2410.03837.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
amazon-science/llm-code-preference canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
datagen_inference Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/prompt/critic_evol.py
pointer only (licence: NOASSERTION) · get_code("3a40321ab74c0bc2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fewshot_template_improve Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/prompt/critic_evol.py
pointer only (licence: NOASSERTION) · get_code("898b72c5ee01636a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fewshot_template_no_improve Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/prompt/critic_evol.py
pointer only (licence: NOASSERTION) · get_code("fc13e41d350f62cb")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hacky_assistant_stop_seq Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/provider/base.py
pointer only (licence: NOASSERTION) · get_code("bfb3f9ec4b555806")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pairwise_classification_template Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/template.py
pointer only (licence: NOASSERTION) · get_code("74e1c40ca345d7ce")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pairwise_cot_template Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/template.py
pointer only (licence: NOASSERTION) · get_code("da043ad281c84014")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

response_parser Ran
ran, honoured the contract we drafted
amazon-science/llm-code-preference/codefavor/evaluate.py
pointer only (licence: NOASSERTION) · get_code("58badd651ef12b99")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

task_md5 Ran
ran; our contract draft was wrong, not the code
amazon-science/llm-code-preference/codefavor/evaluate.py
pointer only (licence: NOASSERTION) · get_code("1238c597ba115abe")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

merge_models Not yet run
unverified (harvested, no recorded run)
amazon-science/llm-code-preference/codefavor/merge_model.py
pointer only (licence: NOASSERTION) · get_code("081407e2793ad7f0")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, amazon-science/llm-code-preference (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large Language Models (LLMs) have recently demonstrated remarkable coding capabilities. However, assessing code generation based on well-formed properties and aligning it with developer preferences remains challenging. In this paper, we explore two key questions under the new challenge of code preference learning: (i) How do we train models to predict meaningful preferences for code? and (ii) How do human and LLM preferences align with verifiable code properties and developer code tastes? To this end, we propose CodeFavor, a framework for training pairwise code preference models from synthetic evolution data, including code commits and code critiques. To evaluate code preferences, we introduce CodePrefBench, a benchmark comprising 1364 rigorously curated code preference tasks to cover three verifiable properties-correctness, efficiency, and security-along with human preference. Our evaluation shows that CodeFavor holistically improves the accuracy of model-based code preferences by up to 28.8%. Meanwhile, CodeFavor models can match the performance of models with 6-9x more parameters while being 34x more cost-effective. We also rigorously validate the design choices in CodeFavor via a comprehensive set of controlled experiments. Furthermore, we discover the prohibitive costs and limitations of human-based code preference: despite spending 23.4 person-minutes on each task, 15.1-40.3% of tasks remain unsolved. Compared to model-based preference, human preference tends to be more accurate under the objective of code correctness, while being sub-optimal for non-functional objectives.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.03837")
get_code_for_paper("2410.03837")
have("2410.03837")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.03837.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.03837.svg)](https://syntology.ai/paper/2410.03837)

Connect an agent — have() is free.