跳到正文
arXiv:cs.LG· Rakhshanda Jabeen, Morgan Ericsson, Jonas Nordqvist, Anna Wingkvist·· 3 小时前

依赖图何时有助于代码到架构映射?GAT 在 Java 与 C/C++ 系统上取得 83.5 macro-F1

When Does the Dependency Graph Help Code-to-Architecture Mapping?

AI 导读

研究将代码到架构映射建模为有向多关系依赖图上的半监督节点分类,在十个开源 Java 和 C/C++ 系统上各运行 100 次,对比 GCN、GAT 与无图 MLP 及 Naive Bayes 基线。

正文

View PDF HTML (experimental)

Abstract:Architectural technical debt arises when a system's implementation drifts from its inten ded modular decomposition, while the mapping between source files and architectural modu les is missing, incomplete, or costly to maintain manually. We formulate code-to-archite cture mapping as semi-supervised node classification over a directed multi-relational de pendency graph, with files as nodes, typed dependencies as edges, and lexical features d erived from code identifiers and directory layout. Starting from a small labeled sample,
an iterative self-training procedure expands the mapping to the remaining files. We com pare a graph convolutional network (GCN), a graph attention network (GAT), and a graph-f ree multi-layer perceptron (MLP), using identical features and training procedures for t he learned models, against a Naive Bayes reference. Across 100 runs on ten open-source J ava and C/C++ systems, all three neural models outperform the reference on both F1 metri cs. GAT achieves the highest averages of system-level median macro and micro F1, at 83.5
and 92.2, respectively, whereas MLP remains competitive or superior on several systems.
On Chrome, the largest system with 18,343 files, GAT and GCN exceed MLP by 22 and 19 ma cro-F1 points, respectively, and have substantially fewer persistently misclassified fil es. Connectivity and homophily are associated with where neural message passing helps, w hile multi-relational aggregation outperforms a single merged edge type on every system for both GCN and GAT. A follow-up study finds that several model rankings depend on the training seed, qualifying smaller advantages without removing the large graph benefit ob served on Chrome.
Subjects: Software Engineering (cs.SE); Machine Learning (cs.LG)
Cite as: arXiv:2610.19769 [cs.SE]
  (or arXiv:2610.19769v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2610.19769

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Morgan Ericsson [view email]
[v1] Wed, 14 Oct 2026 08:19:54 UTC (446 KB)

来源:arXiv:cs.LG · arxiv.org