SemanticForge: Repository-Level Code Generation through Semantic Knowledge Graphs and Constraint Satisfaction
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have transformed software development by enabling automated code generation, yet they frequently suffer from systematic errors that limit practical deployment. We identify two critical failure modes: textitlogical hallucination (incorrect control/data-flow reasoning) and textitschematic hallucination (type mismatches, signature violations, and architectural inconsistencies). These errors stem from the absence of explicit, queryable representations of repository-wide semantics. This paper presents SemanticForge, which introduces four fundamental algorithmic advances for semantically-aware code generation: (1) a novel automatic reconciliation algorithm for dual static-dynamic knowledge graphs, unifying compile-time and runtime program semantics; (2) a neural approach that learns to generate structured graph queries from natural language, achieving 73% precision versus 51% for traditional retrieval; (3) a novel beam search algorithm with integrated SMT solving, enabling real-time constraint verification during generation rather than post-hoc validation; and (4) an incremental maintenance algorithm that updates knowledge graphs in O(|Delta R| · log n) time while maintaining semantic equivalence.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 17 of its 32 references that are in the map. First posted on arXiv 10 Nov 2025.
Builds on
17 of 32 references.
References · 17
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
5 more
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
Built on by
Citing papers per year: 2026: 1.
1 paper.