Community Detection on Software Library Dependency Graphs using Graph Neural Networks
Şevket Umut Çakir, Mehmet Ali Osman Atik, Ümit Deniz Uluşar · 2024
Community detection in software dependency graphs is crucial for enhancing package recommendations, aiding project discovery, and improving software management. Traditional methods often struggle with the complexity of modern networks. This paper explores the application of Graph Neural Networks (GNNs) to detect communities within the Libraries.io dataset, which includes millions of projects and dependencies. We preprocess the data by generating node features through embeddings derived from project descriptions and additional metadata. Various unsupervised learning algorithms, including Node2Vec, Deep Graph Infomax (DGI), and Variational Graph Autoencoder (VGAE), are employed to generate node embeddings. These embeddings are then clustered using the K-Means algorithm to identify communities. Our experiments, conducted on PyPI, Maven, NuGet, and RubyGems platforms, show that while GNNs capture network structures, their performance in community detection is less effective than that of traditional methods like Louvain in certain cases. The evaluation using modularity scores highlights the potential of these methods to uncover meaningful patterns and relationships within software dependency graphs, ultimately informing better software engineering practices.