arXiv:2610.19769cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.19769

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

Rakhshanda Jabeen, Morgan Ericsson, Jonas Nordqvist, Anna Wingkvist

ARTICLE INFO

Keywords:

Software Architecture

Code-to-Architecture Mapping

Graph Neural Networks

Semi-Supervised Learning

ABSTRACT

Architectural technical debt arises when a system's implementation drifts from its intended modular decomposition, while the mapping between source files and architectural modules is missing, incomplete, or costly to maintain manually. We formulate code-to-architecture mapping as semi-supervised node classification over a directed multi-relational dependency graph, with files as nodes, typed dependencies as edges, and lexical features derived 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 compare a graph convolutional network (GCN), a graph attention network (GAT), and a graph-free multi-layer perceptron (MLP), using identical features and training procedures for the learned models, against a Naive Bayes reference. Across 100 runs on ten open-source Java and C/C++ systems, all three neural models outperform the reference on both F1 metrics. 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 macro-F1 points, respectively, and have substantially fewer persistently misclassified files. Connectivity and homophily are associated with where neural message passing helps, while 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 observed on Chrome.

References (41)