Dependency-Guided Code Generation: Structured Matrix Decomposition and Consistency-Guided Refinement

Mingqiao Mo, Yangchen Zeng, Zikai Xiao, Xin Xiao, Wenhua Nie +5 more
7/18/2026
cs.SEcs.CL

No confident code implementation found for this paper.

Abstract

The increasing complexity of modern software systems has made automated code generation a fundamental task in software engineering. However, existing approaches often fail to adequately capture the intricate, multi-level dependencies among code entities, leading to generated code that is logically incomplete or difficult to integrate into real-world systems.

Show full abstract

To address this limitation, we propose a dependency-aware code generation framework that explicitly models interactions among code entities through a graph-based representation. We decompose dependencies into two complementary components: a quantized matrix that captures strong, explicit relations, and a sparse low-rank factorization that models weaker, implicit interactions. The decomposition is efficiently learned via an alternating optimization procedure. During code generation, the learned dependency structure is incorporated as a constraint, ensuring both semantic coherence and structural consistency of the generated code. Furthermore, we introduce a sparse triplet representation for strong dependencies, significantly improving storage efficiency and computational scalability. Extensive experiments demonstrate that our approach consistently produces code with superior semantic alignment and structural fidelity compared to existing methods.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mo2026dependencyguided,
  title  = {Dependency-Guided Code Generation: Structured Matrix Decomposition and Consistency-Guided Refinement},
  author = {Mingqiao Mo and Yangchen Zeng and Zikai Xiao and Xin Xiao and Wenhua Nie and Zhaolu Kang and Guangyuan Dong and Kai Shu and Hao Zhang and Xiaodong Fan},
  year   = {2026},
  eprint = {2607.16692},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.16692v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.16692.svg)](https://codeofpaper.com/paper/2607.16692)

Discussion