Neurosymbolic Repo-level Code Localization

📅 2026-04-17
📈 Citations: 0
Influential: 0
📄 PDF

career value

205K/year
🤖 AI Summary
This work addresses the limitations of existing code localization methods, which rely heavily on keyword matching and suffer significant performance degradation in the absence of naming cues. To overcome this, we propose LogicLoc, a novel framework that introduces the first keyword-agnostic logical code localization (KA-LCL) task and accompanying diagnostic benchmark, KA-LogicQuery. LogicLoc leverages large language models to extract code facts and synthesize Datalog logic programs, which are then verified to enable precise, keyword-free code localization. The approach integrates parser-gated validation and a mutation-based rule diagnosis mechanism to ensure both correctness and efficiency of the generated logic programs. Experimental results demonstrate that LogicLoc substantially outperforms existing methods on KA-LogicQuery while remaining competitive on mainstream benchmarks, achieving high-precision, verifiable code localization with lower token consumption and faster execution.

Technology Category

Application Category

📝 Abstract
Code localization is a cornerstone of autonomous software engineering. Recent advancements have achieved impressive performance on real-world issue benchmarks. However, we identify a critical yet overlooked bias: these benchmarks are saturated with keyword references (e.g. file paths, function names), encouraging models to rely on superficial lexical matching rather than genuine structural reasoning. We term this phenomenon the Keyword Shortcut. To address this, we formalize the challenge of Keyword-Agnostic Logical Code Localization (KA-LCL) and introduce KA-LogicQuery, a diagnostic benchmark requiring structural reasoning without any naming hints. Our evaluation reveals a catastrophic performance drop of state-of-the-art approaches on KA-LogicQuery, exposing their lack of deterministic reasoning capabilities. We propose LogicLoc, a novel agentic framework that combines large language models with the rigorous logical reasoning of Datalog for precise localization. LogicLoc extracts program facts from the codebase and leverages an LLM to synthesize Datalog programs, with parser-gated validation and mutation-based intermediate-rule diagnostic feedback to ensure correctness and efficiency. The validated programs are executed by a high-performance inference engine, enabling accurate and verifiable localization in a fully automated, closed-loop workflow. Experimental results demonstrate that LogicLoc significantly outperforms SOTA methods on KA-LogicQuery while maintaining competitive performance on popular issue-driven benchmarks. Notably, LogicLoc attains superior performance with significantly lower token consumption and faster execution by offloading structural traversal to a deterministic engine, reducing the overhead of iterative LLM inference.
Problem

Research questions and friction points this paper is trying to address.

code localization
keyword bias
structural reasoning
neurosymbolic
logical code localization
Innovation

Methods, ideas, or system contributions that make the work stand out.

Neurosymbolic
Code Localization
Datalog
Logical Reasoning
Keyword-Agnostic
🔎 Similar Papers
No similar papers found.