NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Ask KG Agent: A Multi-Agent Framework for Code Localization Using Code and Knowledge Graphs

Chanyoung Chung, Jeemin Kim, Joyce Whang

NeurIPS page · Open on the map

Category: LLM Agents, Evals & Benchmarks › Verified Code Synthesis and Testing · Type: new method · Keywords: code localization, multi-agent framework, code graphs, knowledge graphs, software engineering

Areas: Code & Coding Agents › Code Verification › Software engineering agents; AI Agents › Agent Benchmarking › Repository agents

Summary

Co-Locator is a collaborative multi-agent framework that integrates code graphs and knowledge graphs to improve code localization by leveraging functional dependencies and historical development context.

Explained to a 5-year-old

When a programmer reports a problem, we need to find the right part of the code that might be causing it. Existing methods only look at how code pieces are connected. This new idea also looks at why the code was changed before and what the developers wanted to do. It uses two helpers: one that reads the code like a map, and another that reads the history like a story. They work together to point to the right spot.

Explained to a 5-year-old, longer

When a programmer writes a note about a bug, they want the computer to find the exact lines of code that need fixing. Usually, the computer looks at how the code pieces are linked together, like a puzzle. But sometimes it misses important clues about why the code was changed before. This new idea also looks at the history of the code, like reading old notes and pictures. It creates two kinds of maps: one shows how the code works, and the other shows why changes were made. The code map helps the computer understand the structure of the program. The history map helps the computer understand the reasons behind each change. The computer uses helpers to read both maps at the same time. One helper looks at the code map and finds possible places. Another helper looks at the history map and adds extra information about developer intentions. They share what they found and point to the most likely spot for the bug. This teamwork makes the computer much better at finding the right code quickly.

For a technical reader

Co-Locator is a multi-agent framework that combines code graphs and knowledge graphs to improve code localization. It uses a Code Graph agent to explore functional hierarchies and a Knowledge Graph agent to retrieve design rationales and past fix patterns from development history. A Retriever agent assists both agents in integrating functional and historical context to pinpoint relevant code locations.

Problem

Mapping software issue descriptions to relevant code segments, known as code localization, remains challenging because existing approaches focus only on code structure and ignore design rationale and prior fix patterns.

Method

The approach constructs code graphs to capture functional dependencies among code elements and builds knowledge graphs from development history to encode design rationales and past modifications. During localization, agents explore the code graph and consult the knowledge graph to gather insights, while a retriever assists them in combining functional and historical context to pinpoint relevant code locations.

Results

The approach significantly outperforms 12 baseline methods on code localization tasks.

Contributions

It introduces a collaborative multi-agent framework that integrates code graphs and knowledge graphs to capture both functional dependencies and historical development context for localization. This holistic view improves accuracy over existing code-centric approaches.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction