NINJA: A Navigator-Inspector Joint Architecture for Context-Efficient Issue Localization
Wenkai Fang, Shunyu Liu, Wei Luo, Zihao Wu, Yang Zhou, Tongya Zheng, Wotao Yin, Jialie Shen, Leszek Rutkowski, Mingli Song, Dacheng Tao
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.SE, cs.AI
Related papers
Does the Agent's Map Match the Territory? Architectural Claims in AI Agent Context Files and Their Fit with the Code
Shared title terminologycs.SEBachan Ghimire, Daniela Damian
GraphScent: Calibrating Directional Relevance Signals for Bounded-Context Code Localization
Shared title terminologycs.SERamesh Arvind Naagarajan
Retrieval Supersedes Scale: Efficient Log Level Prediction via Multiplex Socio-Technical Context
Shared title terminologycs.SEYoussef Esseddiq Ouatiti, Mohammed Sayagh, Bram Adams et al.
Noisy Issues, Noisy Results: Mislabeling in Information Retrieval-based Bug Localization
Shared title terminologycs.SEMoumita Asad, Rafed Muhammad Yasir, Yirui He et al.
Context-Aware Proactive Self-Adaptation: A Two-Layer Model Predictive Control Approach
Shared title terminologycs.SEZhengyin Chen, Jialong Li, Nianyu Li et al.
Agentic Root Cause Reasoning and Localization of Unsoundness in Static Call Graph Analysis
Shared title terminologycs.SEMohammad Rafieian, Michael Hicks, Shiyi Wei