{"ID":2844169,"CreatedAt":"2026-06-01T04:54:23.091178241Z","UpdatedAt":"2026-06-01T04:54:23.091178241Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2511.07584","arxiv_id":"2511.07584","title":"SemanticForge: Repository-Level Code Generation through Semantic Knowledge Graphs and Constraint Satisfaction","abstract":"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: \\textit{logical hallucination} (incorrect control/data-flow reasoning) and \\textit{schematic 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 \\textbf{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(|ΔR| \\cdot \\log n)$ time while maintaining semantic equivalence.","short_abstract":"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: \\textit{logical hallucination} (incorrect control/data-flow reasoning) and \\textit{schemati...","url_abs":"https://arxiv.org/abs/2511.07584","url_pdf":"https://arxiv.org/pdf/2511.07584v1","authors":"[\"Wuyang Zhang\",\"Chenkai Zhang\",\"Zhen Luo\",\"Jianming Ma\",\"Wangming Yuan\",\"Chuqiao Gu\",\"Chenwei Feng\"]","published":"2025-11-10T19:53:23Z","proceeding":"cs.SE","tasks":"[\"cs.SE\",\"cs.AI\",\"cs.DC\"]","methods":"[\"Large Language Model\",\"Language Model\"]","has_code":false}
