Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMs Article Swipe
YOU?
·
· 2025
· Open Access
·
· DOI: https://doi.org/10.48550/arxiv.2508.07434
Large Language Models (LLMs) with inference-time scaling techniques show promise for code generation, yet face notable efficiency and scalability challenges. Construction-based tree-search methods suffer from rapid growth in tree size, high token consumption, and lack of anytime property. In contrast, improvement-based methods offer better performance but often struggle with uninformative reward signals and inefficient search strategies. In this work, we propose \textbf{ReLoc}, a unified local search framework which effectively performs step-by-step code revision. Specifically, ReLoc explores a series of local revisions through four key algorithmic components: initial code drafting, neighborhood code generation, candidate evaluation, and incumbent code updating, each of which can be instantiated with specific decision rules to realize different local search algorithms such as Hill Climbing (HC) or Genetic Algorithm (GA). Furthermore, we develop a specialized revision reward model that evaluates code quality based on revision distance to produce fine-grained preferences that guide the local search toward more promising candidates. Finally, our extensive experimental results demonstrate that our approach achieves superior performance across diverse code generation tasks, significantly outperforming both construction-based tree search as well as the state-of-the-art improvement-based code generation methods.
Related Topics
- Type
- preprint
- Language
- en
- Landing Page
- http://arxiv.org/abs/2508.07434
- https://arxiv.org/pdf/2508.07434
- OA Status
- green
- OpenAlex ID
- https://openalex.org/W4416242158
Raw OpenAlex JSON
- OpenAlex ID
-
https://openalex.org/W4416242158Canonical identifier for this work in OpenAlex
- DOI
-
https://doi.org/10.48550/arxiv.2508.07434Digital Object Identifier
- Title
-
Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMsWork title
- Type
-
preprintOpenAlex work type
- Language
-
enPrimary language
- Publication year
-
2025Year of publication
- Publication date
-
2025-08-10Full publication date if available
- Authors
-
Zhiyi Lyu, Jianguo Huang, Yan Deng, Steven C. H. Hoi, Bo AnList of authors in order
- Landing page
-
https://arxiv.org/abs/2508.07434Publisher landing page
- PDF URL
-
https://arxiv.org/pdf/2508.07434Direct link to full text PDF
- Open access
-
YesWhether a free full text is available
- OA status
-
greenOpen access status per OpenAlex
- OA URL
-
https://arxiv.org/pdf/2508.07434Direct OA link when available
- Cited by
-
0Total citation count in OpenAlex
Full payload
| id | https://openalex.org/W4416242158 |
|---|---|
| doi | https://doi.org/10.48550/arxiv.2508.07434 |
| ids.doi | https://doi.org/10.48550/arxiv.2508.07434 |
| ids.openalex | https://openalex.org/W4416242158 |
| fwci | |
| type | preprint |
| title | Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMs |
| biblio.issue | |
| biblio.volume | |
| biblio.last_page | |
| biblio.first_page | |
| is_xpac | False |
| apc_list | |
| apc_paid | |
| language | en |
| locations[0].id | pmh:oai:arXiv.org:2508.07434 |
| locations[0].is_oa | True |
| locations[0].source.id | https://openalex.org/S4306400194 |
| locations[0].source.issn | |
| locations[0].source.type | repository |
| locations[0].source.is_oa | True |
| locations[0].source.issn_l | |
| locations[0].source.is_core | False |
| locations[0].source.is_in_doaj | False |
| locations[0].source.display_name | arXiv (Cornell University) |
| locations[0].source.host_organization | https://openalex.org/I205783295 |
| locations[0].source.host_organization_name | Cornell University |
| locations[0].source.host_organization_lineage | https://openalex.org/I205783295 |
| locations[0].license | |
| locations[0].pdf_url | https://arxiv.org/pdf/2508.07434 |
| locations[0].version | submittedVersion |
| locations[0].raw_type | text |
| locations[0].license_id | |
| locations[0].is_accepted | False |
| locations[0].is_published | False |
| locations[0].raw_source_name | |
| locations[0].landing_page_url | http://arxiv.org/abs/2508.07434 |
| locations[1].id | doi:10.48550/arxiv.2508.07434 |
| locations[1].is_oa | True |
| locations[1].source.id | https://openalex.org/S4306400194 |
| locations[1].source.issn | |
| locations[1].source.type | repository |
| locations[1].source.is_oa | True |
| locations[1].source.issn_l | |
| locations[1].source.is_core | False |
| locations[1].source.is_in_doaj | False |
| locations[1].source.display_name | arXiv (Cornell University) |
| locations[1].source.host_organization | https://openalex.org/I205783295 |
| locations[1].source.host_organization_name | Cornell University |
| locations[1].source.host_organization_lineage | https://openalex.org/I205783295 |
| locations[1].license | cc-by |
| locations[1].pdf_url | |
| locations[1].version | |
| locations[1].raw_type | article |
| locations[1].license_id | https://openalex.org/licenses/cc-by |
| locations[1].is_accepted | False |
| locations[1].is_published | |
| locations[1].raw_source_name | |
| locations[1].landing_page_url | https://doi.org/10.48550/arxiv.2508.07434 |
| indexed_in | arxiv, datacite |
| authorships[0].author.id | https://openalex.org/A5120402679 |
| authorships[0].author.orcid | |
| authorships[0].author.display_name | Zhiyi Lyu |
| authorships[0].author_position | first |
| authorships[0].raw_author_name | Lyu, Zhiyi |
| authorships[0].is_corresponding | False |
| authorships[1].author.id | https://openalex.org/A5100651268 |
| authorships[1].author.orcid | https://orcid.org/0000-0003-0825-3056 |
| authorships[1].author.display_name | Jianguo Huang |
| authorships[1].author_position | middle |
| authorships[1].raw_author_name | Huang, Jianguo |
| authorships[1].is_corresponding | False |
| authorships[2].author.id | https://openalex.org/A5101944962 |
| authorships[2].author.orcid | https://orcid.org/0000-0002-2419-5805 |
| authorships[2].author.display_name | Yan Deng |
| authorships[2].author_position | middle |
| authorships[2].raw_author_name | Deng, Yanchen |
| authorships[2].is_corresponding | False |
| authorships[3].author.id | https://openalex.org/A5074834854 |
| authorships[3].author.orcid | https://orcid.org/0000-0002-4584-3453 |
| authorships[3].author.display_name | Steven C. H. Hoi |
| authorships[3].author_position | middle |
| authorships[3].raw_author_name | Hoi, Steven |
| authorships[3].is_corresponding | False |
| authorships[4].author.id | https://openalex.org/A5101518692 |
| authorships[4].author.orcid | https://orcid.org/0000-0003-0805-4268 |
| authorships[4].author.display_name | Bo An |
| authorships[4].author_position | last |
| authorships[4].raw_author_name | An, Bo |
| authorships[4].is_corresponding | False |
| has_content.pdf | False |
| has_content.grobid_xml | False |
| is_paratext | False |
| open_access.is_oa | True |
| open_access.oa_url | https://arxiv.org/pdf/2508.07434 |
| open_access.oa_status | green |
| open_access.any_repository_has_fulltext | False |
| created_date | 2025-10-10T00:00:00 |
| display_name | Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMs |
| has_fulltext | False |
| is_retracted | False |
| updated_date | 2025-11-28T09:05:08.361442 |
| primary_topic | |
| cited_by_count | 0 |
| locations_count | 2 |
| best_oa_location.id | pmh:oai:arXiv.org:2508.07434 |
| best_oa_location.is_oa | True |
| best_oa_location.source.id | https://openalex.org/S4306400194 |
| best_oa_location.source.issn | |
| best_oa_location.source.type | repository |
| best_oa_location.source.is_oa | True |
| best_oa_location.source.issn_l | |
| best_oa_location.source.is_core | False |
| best_oa_location.source.is_in_doaj | False |
| best_oa_location.source.display_name | arXiv (Cornell University) |
| best_oa_location.source.host_organization | https://openalex.org/I205783295 |
| best_oa_location.source.host_organization_name | Cornell University |
| best_oa_location.source.host_organization_lineage | https://openalex.org/I205783295 |
| best_oa_location.license | |
| best_oa_location.pdf_url | https://arxiv.org/pdf/2508.07434 |
| best_oa_location.version | submittedVersion |
| best_oa_location.raw_type | text |
| best_oa_location.license_id | |
| best_oa_location.is_accepted | False |
| best_oa_location.is_published | False |
| best_oa_location.raw_source_name | |
| best_oa_location.landing_page_url | http://arxiv.org/abs/2508.07434 |
| primary_location.id | pmh:oai:arXiv.org:2508.07434 |
| primary_location.is_oa | True |
| primary_location.source.id | https://openalex.org/S4306400194 |
| primary_location.source.issn | |
| primary_location.source.type | repository |
| primary_location.source.is_oa | True |
| primary_location.source.issn_l | |
| primary_location.source.is_core | False |
| primary_location.source.is_in_doaj | False |
| primary_location.source.display_name | arXiv (Cornell University) |
| primary_location.source.host_organization | https://openalex.org/I205783295 |
| primary_location.source.host_organization_name | Cornell University |
| primary_location.source.host_organization_lineage | https://openalex.org/I205783295 |
| primary_location.license | |
| primary_location.pdf_url | https://arxiv.org/pdf/2508.07434 |
| primary_location.version | submittedVersion |
| primary_location.raw_type | text |
| primary_location.license_id | |
| primary_location.is_accepted | False |
| primary_location.is_published | False |
| primary_location.raw_source_name | |
| primary_location.landing_page_url | http://arxiv.org/abs/2508.07434 |
| publication_date | 2025-08-10 |
| publication_year | 2025 |
| referenced_works_count | 0 |
| abstract_inverted_index.a | 62, 76, 126 |
| abstract_inverted_index.In | 38, 56 |
| abstract_inverted_index.as | 115, 175, 177 |
| abstract_inverted_index.be | 102 |
| abstract_inverted_index.in | 27 |
| abstract_inverted_index.of | 35, 78, 99 |
| abstract_inverted_index.on | 136 |
| abstract_inverted_index.or | 119 |
| abstract_inverted_index.to | 108, 139 |
| abstract_inverted_index.we | 59, 124 |
| abstract_inverted_index.and | 17, 33, 52, 94 |
| abstract_inverted_index.but | 45 |
| abstract_inverted_index.can | 101 |
| abstract_inverted_index.for | 10 |
| abstract_inverted_index.key | 83 |
| abstract_inverted_index.our | 153, 159 |
| abstract_inverted_index.the | 145, 178 |
| abstract_inverted_index.yet | 13 |
| abstract_inverted_index.(HC) | 118 |
| abstract_inverted_index.Hill | 116 |
| abstract_inverted_index.both | 171 |
| abstract_inverted_index.code | 11, 71, 87, 90, 96, 133, 166, 181 |
| abstract_inverted_index.each | 98 |
| abstract_inverted_index.face | 14 |
| abstract_inverted_index.four | 82 |
| abstract_inverted_index.from | 24 |
| abstract_inverted_index.high | 30 |
| abstract_inverted_index.lack | 34 |
| abstract_inverted_index.more | 149 |
| abstract_inverted_index.show | 8 |
| abstract_inverted_index.such | 114 |
| abstract_inverted_index.that | 131, 143, 158 |
| abstract_inverted_index.this | 57 |
| abstract_inverted_index.tree | 28, 173 |
| abstract_inverted_index.well | 176 |
| abstract_inverted_index.with | 4, 48, 104 |
| abstract_inverted_index.(GA). | 122 |
| abstract_inverted_index.Large | 0 |
| abstract_inverted_index.ReLoc | 74 |
| abstract_inverted_index.based | 135 |
| abstract_inverted_index.guide | 144 |
| abstract_inverted_index.local | 64, 79, 111, 146 |
| abstract_inverted_index.model | 130 |
| abstract_inverted_index.offer | 42 |
| abstract_inverted_index.often | 46 |
| abstract_inverted_index.rapid | 25 |
| abstract_inverted_index.rules | 107 |
| abstract_inverted_index.size, | 29 |
| abstract_inverted_index.token | 31 |
| abstract_inverted_index.which | 67, 100 |
| abstract_inverted_index.work, | 58 |
| abstract_inverted_index.(LLMs) | 3 |
| abstract_inverted_index.Models | 2 |
| abstract_inverted_index.across | 164 |
| abstract_inverted_index.better | 43 |
| abstract_inverted_index.growth | 26 |
| abstract_inverted_index.reward | 50, 129 |
| abstract_inverted_index.search | 54, 65, 112, 147, 174 |
| abstract_inverted_index.series | 77 |
| abstract_inverted_index.suffer | 23 |
| abstract_inverted_index.tasks, | 168 |
| abstract_inverted_index.toward | 148 |
| abstract_inverted_index.Genetic | 120 |
| abstract_inverted_index.anytime | 36 |
| abstract_inverted_index.develop | 125 |
| abstract_inverted_index.diverse | 165 |
| abstract_inverted_index.initial | 86 |
| abstract_inverted_index.methods | 22, 41 |
| abstract_inverted_index.notable | 15 |
| abstract_inverted_index.produce | 140 |
| abstract_inverted_index.promise | 9 |
| abstract_inverted_index.propose | 60 |
| abstract_inverted_index.quality | 134 |
| abstract_inverted_index.realize | 109 |
| abstract_inverted_index.results | 156 |
| abstract_inverted_index.scaling | 6 |
| abstract_inverted_index.signals | 51 |
| abstract_inverted_index.through | 81 |
| abstract_inverted_index.unified | 63 |
| abstract_inverted_index.Climbing | 117 |
| abstract_inverted_index.Finally, | 152 |
| abstract_inverted_index.Language | 1 |
| abstract_inverted_index.achieves | 161 |
| abstract_inverted_index.approach | 160 |
| abstract_inverted_index.decision | 106 |
| abstract_inverted_index.distance | 138 |
| abstract_inverted_index.explores | 75 |
| abstract_inverted_index.methods. | 183 |
| abstract_inverted_index.performs | 69 |
| abstract_inverted_index.revision | 128, 137 |
| abstract_inverted_index.specific | 105 |
| abstract_inverted_index.struggle | 47 |
| abstract_inverted_index.superior | 162 |
| abstract_inverted_index.Algorithm | 121 |
| abstract_inverted_index.candidate | 92 |
| abstract_inverted_index.contrast, | 39 |
| abstract_inverted_index.different | 110 |
| abstract_inverted_index.drafting, | 88 |
| abstract_inverted_index.evaluates | 132 |
| abstract_inverted_index.extensive | 154 |
| abstract_inverted_index.framework | 66 |
| abstract_inverted_index.incumbent | 95 |
| abstract_inverted_index.promising | 150 |
| abstract_inverted_index.property. | 37 |
| abstract_inverted_index.revision. | 72 |
| abstract_inverted_index.revisions | 80 |
| abstract_inverted_index.updating, | 97 |
| abstract_inverted_index.algorithms | 113 |
| abstract_inverted_index.efficiency | 16 |
| abstract_inverted_index.generation | 167, 182 |
| abstract_inverted_index.techniques | 7 |
| abstract_inverted_index.algorithmic | 84 |
| abstract_inverted_index.candidates. | 151 |
| abstract_inverted_index.challenges. | 19 |
| abstract_inverted_index.components: | 85 |
| abstract_inverted_index.demonstrate | 157 |
| abstract_inverted_index.effectively | 68 |
| abstract_inverted_index.evaluation, | 93 |
| abstract_inverted_index.generation, | 12, 91 |
| abstract_inverted_index.inefficient | 53 |
| abstract_inverted_index.performance | 44, 163 |
| abstract_inverted_index.preferences | 142 |
| abstract_inverted_index.scalability | 18 |
| abstract_inverted_index.specialized | 127 |
| abstract_inverted_index.strategies. | 55 |
| abstract_inverted_index.tree-search | 21 |
| abstract_inverted_index.Furthermore, | 123 |
| abstract_inverted_index.consumption, | 32 |
| abstract_inverted_index.experimental | 155 |
| abstract_inverted_index.fine-grained | 141 |
| abstract_inverted_index.instantiated | 103 |
| abstract_inverted_index.neighborhood | 89 |
| abstract_inverted_index.step-by-step | 70 |
| abstract_inverted_index.Specifically, | 73 |
| abstract_inverted_index.outperforming | 170 |
| abstract_inverted_index.significantly | 169 |
| abstract_inverted_index.uninformative | 49 |
| abstract_inverted_index.inference-time | 5 |
| abstract_inverted_index.\textbf{ReLoc}, | 61 |
| abstract_inverted_index.state-of-the-art | 179 |
| abstract_inverted_index.improvement-based | 40, 180 |
| abstract_inverted_index.Construction-based | 20 |
| abstract_inverted_index.construction-based | 172 |
| cited_by_percentile_year | |
| countries_distinct_count | 0 |
| institutions_distinct_count | 5 |
| citation_normalized_percentile |