Diversity-Aware API Recommendation Based on Heterogeneous Graph Network for Cyber–Physical–Social Systems
Abstract: In recent years, innovative Web application programming interfaces (APIs) have emerged, making it easier for software developers to create mashups for cyber–physical–social systems (CPSS). With the rapid increase in the number and variety of Web APIs, finding the right APIs for mashup development has become increasingly challenging. The overabundance of Web APIs with similar functionality makes it difficult for developers to locate the most suitable APIs quickly, and thus, introducing diversity in recommender systems becomes particularly important. Recently, recommender systems based on graph neural networks (GNNs) have garnered significant attention due to their outstanding accuracy. However, most existing studies focus on analyzing the interaction between mashups and APIs, ignoring the role of APIs in providing text descriptions and category information, limiting the system’s ability to capture diverse recommendations. To address this issue, we propose a method based on heterogeneous graphs and GNNs for diversity-aware API recommendation, named HGDARec. The method constructs a mashup-API heterogeneous graph that integrates API category information and description text. Based on this, the BERT model is used to learn deep semantic representations of API descriptions and extract highly discriminative features. Then, we apply the GNN technique to aggregate information from diverse subsets of neighbors. Additionally, we introduce an attention mechanism to generate comprehensive node embeddings, ultimately achieving diverse recommendations for Top K APIs. Finally, we performed extensive experiments on real datasets that validate the effectiveness of HGDARec in enhancing recommendation diversity and accuracy.
External IDs:doi:10.1109/tcss.2025.3558997
Loading