Papers › CodeIt: Self-Improving Language Models with Prioritized Hindsight Replay
CodeIt: Self-Improving Language Models with Prioritized Hindsight Replay
Natasha Butt, Blazej Manczak, Auke Wiggers, Corrado Rainone, David W. Zhang, Michaël Defferrard, Taco Cohen
Large language models are increasingly solving tasks that are commonly believed to require human-level reasoning ability. However, these models still perform very poorly on benchmarks of general intelligence such as the Abstraction and Reasoning Corpus (ARC). In this paper, we approach ARC as a programming-by-examples problem, and introduce a novel and scalable method for language model self-improvement called Code Iteration (CodeIt). Our method iterates between 1) program sampling and hindsight relabeling, and 2) learning from prioritized experience replay. By relabeling the goal of an episode (i.e., the target program output given input) to the realized output produced by the sampled program, our method effectively deals with the extreme sparsity of rewards in program synthesis. Applying CodeIt to the ARC dataset, we demonstrate that prioritized hindsight replay, along with pre-training and data-augmentation, leads to successful inter-task generalization. CodeIt is the first neuro-symbolic approach that scales to the full ARC evaluation dataset. Our method solves 15% of ARC evaluation tasks, achieving state-of-the-art performance and outperforming existing neural and symbolic baselines. Our code is available at https://github.com/Qualcomm-AI-research/codeit .
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="2402.04858")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2402.04858", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2402.04858")
Code
Syntology 41 code samples harvested from 1 repository linked to this paper: 32 ran (of which 4 constructed an object rather than computing a result; 10 with no instrument failure: 4 honoured, 2 violated, 4 with no contract checked; 22 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 16 where our contract draft was wrong; 6 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: official repository: 41 samples from 1 repository, 32 ran (10 with no instrument failure; 22 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 5 of the 32 samples that ran have no recorded date.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
41 samples harvested: 32 ran (of which 4 constructed an object rather than computing a result; 10 with no instrument failure: 4 honoured, 2 violated, 4 with no contract checked; 22 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 41 of the 41 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from Qualcomm-AI-research/codeit. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.
5a889f45ec35ace2 · report
fixture: returned PopulationTree · level recorded 2026-09-22 0ca10f7987f7e3f5 · report
fixture: returned ProgramMutator · level recorded 2026-09-22 3215558dec21b76e · report
fixture: returned Task · level recorded 2026-09-22 663e3c33f8beaa30 · report
fixture: returned TypeInferer · level recorded 2026-09-22 a792436574cb8a36 · report
fixture: signature primitives:list/1/str · returned dict · level recorded 2026-09-22 bdff87a4c2b09334 · report
fixture: signature type_to_function_mapping:dict/0/? · returned dict · level recorded 2026-09-22 ad432ec024f7e66d · report
fixture: signature solutions:dict/0/?, task_key:str/0/str · returned tuple · level recorded, date not recorded fa8e1aaf26bd9cad · report
fixture: signature I:ndarray/2/int, OBJECTS:frozenset/0/? · returned tuple · level recorded 2026-09-22 d440e9a190ac2556 · report
fixture: signature program:str/0/str, child_id:int/0/int · returned str · level recorded 2026-09-22 48365ca029cd4ade · report
fixture: signature term_type:str/0/str · returned bool · level recorded 2026-09-22 ca56e081f31c0018 · report
fixture: signature term_type:ArrowType/0/? · returned ArrowType · level recorded 2026-09-22 3a16b6289b603c98 · report
fixture: signature tasks:dict/0/?, inference_keys:list/1/str · returned dict · level recorded, date not recorded f2e43abb4b090b39 · report
fixture: signature task_population:dict/0/?, grid_size:tuple/1/int · returned dict · level recorded 2026-09-22 4054c380d9c1a16c · report
fixture: signature tasks:dict/0/?, max_rows:int/0/int, max_columns:int/0/int · returned dict · level recorded 2026-09-22 ffe7482ebd5d840d · report
fixture: signature input_string:str/0/str · returned str · level recorded 2026-09-22 27064c0c54006326 · report
fixture: signature func_def:str/0/str · returned str · level recorded 2026-09-22 113c9f4b6c4a8053 · report
fixture: signature output_type:str/0/str, type_to_function_mapping:dict/0/? · returned list · level recorded 2026-09-22 d34bd77f1580bc22 · report
fixture: signature func_def:str/0/str · returned tuple · level recorded 2026-09-22 2a25b9259dde5c3a · report
fixture: signature grid:list/1/list · returned tuple · level recorded 2026-09-22 5824e673c05bbd51 · report
fixture: signature agent:Agent/0/?, mode:str/0/str · returned int · level recorded, date not recorded 965ff5003da35606 · report
fixture: signature listoflists:list/1/list · returned tuple · level recorded 2026-09-22 258eb81b564d0b3f · report
fixture: signature cell:set/0/?, I:list/1/list · returned frozenset · level recorded 2026-09-22 30ccff49d96c238b · report
fixture: signature I:ndarray/2/int, OBJECTS:list/1/frozenset · returned frozenset · level recorded 2026-09-22 46be79408beca620 · report
fixture: signature performance_by_task:list/1/float · returned float64 · level recorded, date not recorded e017b07e36a77f43 · report
fixture: signature program_string:str/0/str · returned str · level recorded 2026-09-22 9c35b11d97682173 · report
fixture: signature program_str:str/0/str · returned str · level recorded 2026-09-22 06dd5bc91255c2eb · report
fixture: signature x_old:str/0/str, x_new:str/0/str, input_string:str/0/str · returned str · level recorded 2026-09-22 0b37eaf28f553e13 · report
fixture: signature primitive_constants:dict/0/? · returned frozenset · level recorded 2026-09-22 9b827c28751c700d · report
fixture: signature patch:list/1/int · returned frozenset · level recorded 2026-09-22 720842f503a718ef · report
fixture: signature I:ndarray/2/int, OBJECTS:frozenset/0/? · returned frozenset · level recorded 2026-09-22 35a3a514964eb409 · report
fixture: signature value:list/1/list · returned bool · level recorded 2026-09-22 b08a4ca506072484 · report
fixture: signature value:list/1/list · returned bool · level recorded, date not recorded cc17c7829a24c82e · report
0232d1b03729354b · report
12ead3ea3a548d6c · report
a9fe63eda6190bfc · report
dab2d7cbaed329ce · report
35f2d5afe53e1635 · report
b2a254a4a76ff136 · report
5761dc5c761194fc · report
5025771c421695db · report
Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.
1 assembly on this paper: 1 harvested, 0 generated.
harvested Assembly for CodeIt (graph method: CodeIt). 36 bricks; individually on a fixture: 27 ran (of which 4 constructed an object rather than computing a result; 7 with no instrument failure: 2 honoured, 1 violated, 4 with no contract checked; 20 where Syntology's instrument failed) · 9 unverified. The assembly has not been run end-to-end.
- TaskEvolver entry · level 0 · unverified ·
cc17c7829a24c82e - PopulationTree helper · level 1 · ran ·
5a889f45ec35ace2 - ProgramMutator helper · level 1 · ran ·
0ca10f7987f7e3f5 - Task helper · level 1 · ran ·
3215558dec21b76e - TypeInferer helper · level 1 · ran ·
663e3c33f8beaa30 - build_general_type_to_primitive_function_mapping helper · level 1 · ran · our draft was wrong ·
a792436574cb8a36 - build_primitive_function_to_general_type_mapping helper · level 1 · ran · our draft was wrong ·
bdff87a4c2b09334 - change_function_name helper · level 1 · ran · our draft was wrong ·
d440e9a190ac2556 - contains_non_base_type helper · level 1 · ran · violated contract ·
48365ca029cd4ade - display_type helper · level 1 · ran · our draft was wrong ·
ca56e081f31c0018 - filter_population_by_size helper · level 1 · ran · our draft was wrong ·
f2e43abb4b090b39 - filter_tasks_by_input_dimensions data_transform · level 1 · ran · our draft was wrong ·
4054c380d9c1a16c - get_function_names_with_output_type helper · level 1 · ran · our draft was wrong ·
113c9f4b6c4a8053 - handle_timeout helper · level 0 · unverified ·
dab2d7cbaed329ce - mutate_input_one_step helper · level 0 · unverified ·
35f2d5afe53e1635 - remove_redundant_lines helper · level 1 · ran · our draft was wrong ·
9c35b11d97682173 - valid_grid helper · level 1 · ran; the contract check could not run (RAISES) ·
35a3a514964eb409 - from_dict helper · level 0 · unverified ·
0232d1b03729354b - program_to_program_lines helper · level 1 · ran · our draft was wrong ·
e017b07e36a77f43 - find_first_x helper · level 1 · ran · our draft was wrong ·
ffe7482ebd5d840d - get_primitive_constant_type helper · level 0 · unverified ·
12ead3ea3a548d6c - get_primitive_function_type helper · level 0 · unverified ·
a9fe63eda6190bfc - replace_x helper · level 1 · ran · our draft was wrong ·
06dd5bc91255c2eb - get_func_name helper · level 1 · ran · our draft was wrong ·
27064c0c54006326 - get_function_types helper · level 1 · ran · our draft was wrong ·
d34bd77f1580bc22 - get_grid_size helper · level 1 · ran · honoured contract ·
2a25b9259dde5c3a - cell_sampler helper · level 1 · ran; the contract check could not run (RAISES) ·
fa8e1aaf26bd9cad - object_sampler helper · level 1 · ran; the contract check could not run (RAISES) ·
30ccff49d96c238b - sample_indices helper · level 0 · unverified ·
5761dc5c761194fc - sample_indices_set helper · level 0 · unverified ·
5025771c421695db - sample_integer_set helper · level 1 · ran · our draft was wrong ·
0b37eaf28f553e13 - sample_objects helper · level 1 · ran; the contract check could not run (RAISES) ·
720842f503a718ef - list_to_tuple helper · level 1 · ran · honoured contract ·
965ff5003da35606 - patch_sampler helper · level 0 · unverified ·
b2a254a4a76ff136 - sample_object_from_patch helper · level 1 · ran · our draft was wrong ·
9b827c28751c700d - normalise_cell helper · level 1 · ran; the contract check could not run (RAISES) ·
258eb81b564d0b3f
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2402.04858") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections