Table of Contents
Fetching ...

Learning Adaptive Parallel Execution for Efficient Code Localization

Ke Xu, Siyang Xiao, Ming Liang, Yichen Yu, Zhixiang Wang, Jingxuan Xu, Dajun Chen, Wei Jiang, Yong Li

TL;DR

FuseSearch tackles the cost-accuracy trade-off in code localization by learning adaptive parallel execution that explicitly optimizes tool efficiency. It introduces a minimalist, read-only toolset and a two-stage training pipeline (SFT followed by RL) to jointly maximize localization quality and efficiency via a dual-objective reward, $R(\tau) = \alpha F_1(\tau) + \gamma (F_1(\tau) \cdot e(\tau))$. On SWE-bench Verified, FuseSearch achieves state-of-the-art file-level $F_1$ of $84.7\%$ and function-level $F_1$ of $56.4\%$, with a $93.6\%$ speedup and substantial reductions in turns and tokens, while maintaining or improving accuracy over baselines. The approach generalizes to LocBench and demonstrably accelerates downstream tasks (e.g., pre-search localization reduces token usage and time for subsequent repairs), illustrating practical impact in production-grade pipelines. Overall, efficiency-aware training yields high-quality, cost-effective localization by learning when and how to parallelize tool usage across tasks and contexts.

Abstract

Code localization constitutes a key bottleneck in automated software development pipelines. While concurrent tool execution can enhance discovery speed, current agents demonstrate a 34.9\% redundant invocation rate, which negates parallelism benefits. We propose \textbf{FuseSearch}, reformulating parallel code localization as a \textbf{joint quality-efficiency optimization} task. Through defining \textbf{tool efficiency} -- the ratio of unique information gain to invocation count -- we utilize a two-phase SFT and RL training approach for learning adaptive parallel strategies. Different from fixed-breadth approaches, FuseSearch dynamically modulates search breadth according to task context, evolving from exploration phases to refinement stages. Evaluated on SWE-bench Verified, FuseSearch-4B achieves SOTA-level performance (84.7\% file-level and 56.4\% function-level $F_1$ scores) with 93.6\% speedup, utilizing 67.7\% fewer turns and 68.9\% fewer tokens. Results indicate that efficiency-aware training naturally improves quality through eliminating noisy redundant signals, enabling high-performance cost-effective localization agents.

Learning Adaptive Parallel Execution for Efficient Code Localization

TL;DR

FuseSearch tackles the cost-accuracy trade-off in code localization by learning adaptive parallel execution that explicitly optimizes tool efficiency. It introduces a minimalist, read-only toolset and a two-stage training pipeline (SFT followed by RL) to jointly maximize localization quality and efficiency via a dual-objective reward, . On SWE-bench Verified, FuseSearch achieves state-of-the-art file-level of and function-level of , with a speedup and substantial reductions in turns and tokens, while maintaining or improving accuracy over baselines. The approach generalizes to LocBench and demonstrably accelerates downstream tasks (e.g., pre-search localization reduces token usage and time for subsequent repairs), illustrating practical impact in production-grade pipelines. Overall, efficiency-aware training yields high-quality, cost-effective localization by learning when and how to parallelize tool usage across tasks and contexts.

Abstract

Code localization constitutes a key bottleneck in automated software development pipelines. While concurrent tool execution can enhance discovery speed, current agents demonstrate a 34.9\% redundant invocation rate, which negates parallelism benefits. We propose \textbf{FuseSearch}, reformulating parallel code localization as a \textbf{joint quality-efficiency optimization} task. Through defining \textbf{tool efficiency} -- the ratio of unique information gain to invocation count -- we utilize a two-phase SFT and RL training approach for learning adaptive parallel strategies. Different from fixed-breadth approaches, FuseSearch dynamically modulates search breadth according to task context, evolving from exploration phases to refinement stages. Evaluated on SWE-bench Verified, FuseSearch-4B achieves SOTA-level performance (84.7\% file-level and 56.4\% function-level scores) with 93.6\% speedup, utilizing 67.7\% fewer turns and 68.9\% fewer tokens. Results indicate that efficiency-aware training naturally improves quality through eliminating noisy redundant signals, enabling high-performance cost-effective localization agents.
Paper Structure (59 sections, 8 equations, 4 figures, 9 tables, 1 algorithm)

This paper contains 59 sections, 8 equations, 4 figures, 9 tables, 1 algorithm.

Figures (4)

  • Figure 1: Parallel execution solves sequential search's information starvation under limited turns. However, 34.9% of enforced parallel tools are redundant, exhibiting redundancy.
  • Figure 2: FuseSearch framework overview. (a) Inference: Agent executes three minimalist tools in parallel, with each tool's information gain tracked to compute trajectory efficiency $e$. (b) Training: Dual-metric filtering selects high-quality trajectories for SFT, followed by RL optimization with joint $F_1$-efficiency reward.
  • Figure 3: Evolution of average tools per turn across training stages. RL learns adaptive parallelism: high initial exploration transitioning to focused refinement.
  • Figure 4: System prompt for FuseSearch. The prompt instructs the model to output localization results in two sections: Locations to Modify (required) and Related Context (optional).