United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
Get full access to United States of Banan at konradb.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00KG Compass addresses a key challenge in automated software repair, connecting natural language bug descriptions to actual code that needs fixing. Current approaches using large language models struggle because they can't effectively understand the relationships between different parts of a repository. The proposed solution combines a knowledge graph with LLMs, reducing the search space by 99% while achieving state-of-the-art results at a fraction of the cost of competing approaches. Figure 1 demonstrates how KG Compass outperforms pure LLM approaches.
SPEAKER_00In this example from the SIMPY project, the bug involves matrix expressions with special characters. The LLM alone incorrectly identifies the function name, missing the critical underscore prefix. The knowledge graph correctly traces the path from the issue through a pull request to the right function. With this context, it generates a defensive programming solution that handles edge cases, while the LLM alone creates a fix that still fails on special characters. KG Compass works in three phases. First,
SPEAKER_00it builds a knowledge graph connecting code structure, files, classes, functions, with repository artifacts. Issues, pull requests. Next, it identifies candidate bug locations using a formula that balances semantic similarity with graph distance. The system generates patches by providing the LLM with entity paths showing relationships between issues and code. Finally, it ranks patches using tests and other criteria. This structured approach helps overcome the limitations of text-only analysis.
SPEAKER_00Figure 2 illustrates the KG Compass workflow. Starting with the targeted issue, the authors build a comprehensive knowledge graph from repository artifacts and codebase. They then identify relevant functions using both graph analysis and LLM suggestions. The path-guided repair process leverages entity paths to generate precise patches. Finally, they evaluate these patches using both regression tests, existing tests that should still pass, and dynamically generated reproduction tests that verify the bug is fixed.
SPEAKER_00This multistage pipeline provides both accuracy and reliability. The authors evaluated KG Compass on SWE BenchLite, which includes 300 real-world bugs from large Python projects. Each bug comes with a natural language description, but no explicit location information, making it particularly challenging. Primary metrics track successful fixes, localization accuracy, and cost efficiency. We implemented the system using Neo4j for the graph database and Claude 3.5 for repair generation.
SPEAKER_00The experiments answer questions about overall effectiveness, the specific value added by the knowledge graph, and the impact of individual components. Results show that KG Compass outperforms existing approaches in repair success, localization accuracy, and cost efficiency. Notably, almost 70% of successfully fixed bugs required multi-hop traversals through the knowledge graph, proving that text-only approaches are fundamentally limited. The proposed hybrid approach combining knowledge graphs with LLMs significantly
SPEAKER_00improves bug localization. Ablation studies confirm that each component contributes to the overall performance, with entity paths and hybrid candidate selection being particularly important. KG Compass advances repository-level software repair by effectively connecting natural language bug descriptions with relevant code. The Knowledge Graph approach bridges the semantic gap that pure text-based methods struggle with. The system is practical for real-world use because it's language-agnostic and
SPEAKER_00supports incremental updates. It works well with various LLMs, boosting performance for both closed and open-source models. Future improvements could include integrating more domain-specific knowledge and addressing the cold start problem for repositories with limited development history.
Paper: https://arxiv.org/abs/2504.11159 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/abs/2604.16748 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/html/2604.01845v1 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United...
Paper: https://arxiv.org/abs/2604.13253 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/abs/2604.05257 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...