Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMs
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
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 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.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. First posted on arXiv 10 Aug 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 1; 2026: 6.
7 papers.
- 2026Code as Agent Harnesscited by 47
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2026Controlled Self-Evolution for Algorithmic Code Optimizationcited by 12
- 2026Token-Guard: Towards Token-Level Hallucination Control via Self-Checking Decodingcited by 2
- 2026MIND-Skill: Quality-Guaranteed Skill Generation via Multi-Agent Induction and Deductioncited by 2
- 2026AgentBrew: Offline Tool-Use Agent Learning from Raw Real-World Trajectoriescited by 2
- 2026Online Causal Kalman Filtering for Stable and Effective Policy Optimizationcited by 1
- 2026AgentBrew: Offline Tool-Use Agent Learning from Raw Real-World Trajectories5 Sep 2026
- 2026Code as Agent Harness18 May 2026
- 2026MIND-Skill: Quality-Guaranteed Skill Generation via Multi-Agent Induction and Deduction9 May 2026
- 2026Online Causal Kalman Filtering for Stable and Effective Policy Optimization11 Feb 2026
- 2026Token-Guard: Towards Token-Level Hallucination Control via Self-Checking Decoding29 Jan 2026
- 2026Controlled Self-Evolution for Algorithmic Code Optimization12 Jan 2026
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2024Seed-CTS: Unleashing the Power of Tree Search for Superior Performance in Competitive Coding Tasks
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoff
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMs
- 2024RethinkMCTS: Refining Erroneous Thoughts in Monte Carlo Tree Search for Code Generation
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap
- 2026GraphAHA: Graph-Based Adaptive Search with Heterogeneous Actions for Test-Time Code Generation