GraphAHA: Graph-Based Adaptive Search with Heterogeneous Actions for Test-Time Code Generation
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Test-time scaling improves code generation by spending additional inference budget (e.g., calls or tokens) on direct sampling, feedback-conditioned repair, and reasoning-guided implementation. Search-based methods can allocate this budget adaptively, but two challenges remain. First, tree-structured search treats each generation history as a separate state even when trajectories converge to the same program, duplicating evaluation and preventing statistics from being shared. Second, sampling, repair, and reasoning have complementary and state-dependent payoffs, making online allocation among them difficult under a finite budget. To address these challenges, we propose an adaptive graph search method with heterogeneous actions (GraphAHA). GraphAHA organizes the test-time code generation in a typed directed acyclic graph. Equivalent programs are merged into a single code node, allowing their downstream search statistics to be reused across all discovery paths. Hierarchical Thompson sampling then selects whether to generate a new state or follow an existing successor and, for generation, chooses among the type-valid sampling, reasoning, implementation, and repair operations. Evaluated on LiveCodeBench and CodeContests with Qwen2.5-Coder and DeepSeek-Coder, GraphAHA achieves the best score in 18 of 20 cases. For Pass@1 measured using visible tests, it outperforms the strongest baseline for both models on both benchmarks by 4.1 percentage points on average, demonstrating more effective use of a fixed inference budget.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 12 of its 19 references that are in the map. First posted on arXiv 11 Sep 2026.
Builds on
12 of 19 references.
Closest ancestors · 5
Same direction, newest first
- 2026PaT: Planning-after-Trial for Efficient Test-Time Code Generation8 May
- 2025RPM-MCTS: Knowledge-Retrieval as Process Reward Model with Monte Carlo Tree Search for Code Generation25 Nov
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
- 2023Structured Chain-of-Thought Prompting for Code Generation11 May
- 2023Teaching Large Language Models to Self-Debug11 Apr
Other references · 7
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Let's Verify Step by Stepcited by 3,598
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2025TreeRL: LLM Reinforcement Learning with On-Policy Tree Searchcited by 75
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMs
- 2025Let's Revise Step-by-Step: A Unified Local Search Framework for Code Generation with LLMs
- 2025S*: Test Time Scaling for Code Generation
- 2026Code Generation by Differential Test Time Scaling
- 2025SELF-REDRAFT: Eliciting Intrinsic Exploration-Exploitation Balance in Test-Time Scaling for Code Generation
- 2024RethinkMCTS: Refining Erroneous Thoughts in Monte Carlo Tree Search for Code Generation
- 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinement
- 2024Seed-CTS: Unleashing the Power of Tree Search for Superior Performance in Competitive Coding Tasks