NINJA:面向上下文高效问题定位的导航器-检查器联合架构
NINJA: A Navigator-Inspector Joint Architecture for Context-Efficient Issue Localization
AI总结:
本文针对现有智能体问题定位方法的局限,提出分层导航器-检查器联合架构NINJA,引入两阶段智能体微调策略,经多基准测试与LLM主干实验,其性能优于竞争基线,微调后Qwen3-Coder-30B-A3B-Instruct超越Claude-Haiku-4.5。
摘要:
基于智能体的方法近期进展已展现出问题定位的强大潜力,而问题定位是软件问题解决的关键前提。然而,多数现有基于智能体的方法依赖单个智能体,其上下文不断累积,长上下文会压缩有效推理空间;同时,扁平的探索结构难以平衡文件级广度与函数级深度。为解决这些局限,本文提出NINJA,一种面向上下文高效问题定位的分层导航器-检查器联合架构。NINJA将仓库探索分解为全局导航与局部检查:导航器维护全局搜索状态,执行文件级搜索并分派选定的入口文件;检查器在独立上下文中围绕分配的文件独立开展函数级探索。通过多轮交互,检查器返回可疑位置作为反馈,导航器更新全局状态以决定是否继续探索或完成定位。这种分层设计平衡了文件级广度与函数级深度,而检查器的独立上下文可避免局部探索痕迹在单个不断增长的上下文中累积。为进一步强化全局协调与局部探索,本文引入两阶段智能体微调策略。在多个基准测试与大语言模型(LLM)主干上开展的大量实验表明,NINJA始终优于竞争基线。值得注意的是,微调后的Qwen3-Coder-30B-A3B-Instruct模型超越了强大的闭源模型Claude-Haiku-4.5。本文代码可在指定URL获取。
英文摘要:
Recent advances in agent-based methods have demonstrated strong promise for issue localization, a critical prerequisite for software issue resolution. However, most existing agent-based methods rely on a single agent with a growing context, where long-context accumulation compresses the effective reasoning space. Meanwhile, the flat exploration structure hinders the balance between file-level breadth and function-level depth. To address these limitations, we propose NINJA, a hierarchical Navigator-Inspector Joint Architecture for context-efficient issue localization. NINJA decomposes repository exploration into global navigation and local inspection: the navigator maintains the global search state, performs file-level search, and dispatches selected entry files, while inspectors independently conduct function-level exploration around the assigned files in separate contexts. Through multi-round interactions, inspectors return suspicious locations as feedback, and the navigator updates the global state to decide whether to continue exploration or finalize localization. This hierarchical design balances file-level breadth with function-level depth, while independent inspector contexts prevent local exploration traces from accumulating in a single growing context. To further strengthen both global coordination and local exploration, we introduce a two-stage agentic fine-tuning strategy. Extensive experiments across multiple benchmarks and LLM backbones show that NINJA consistently outperforms competitive baselines. Notably, after fine-tuning, Qwen3-Coder-30B-A3B-Instruct surpasses the strong closed-source Claude-Haiku-4.5 model. Our code is available at https://github.com/wantbook-book/NINJA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。