API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning

被引:8
|
作者
Chen, Yujia [1 ]
Gao, Cuiyun [1 ]
Ren, Xiaoxue [2 ]
Peng, Yun [2 ]
Xia, Xin [3 ]
Lyu, Michael R. R. [2 ]
机构
[1] Harbin Inst Technol, Shenzhen 518055, Guangdong, Peoples R China
[2] Chinese Univ Hong Kong, Hong Kong, Peoples R China
[3] Software Engn Applicat Technol Lab, Huawei 518129, Peoples R China
基金
中国国家自然科学基金; 国家重点研发计划;
关键词
Codes; !text type='Java']Java[!/text; Source coding; Benchmark testing; Software; Representation learning; Programming; API recommendation; graph representation learning; multi-view heterogeneous graphs;
D O I
10.1109/TSE.2023.3252259
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Developers often need to decide which APIs to use for the functions being implemented. With the ever-growing number of APIs and libraries, it becomes increasingly difficult for developers to find appropriate APIs, indicating the necessity of automatic API usage recommendation. Previous studies adopt statistical models or collaborative filtering methods to mine the implicit API usage patterns for recommendation. However, they rely on the occurrence frequencies of APIs for mining usage patterns, thus prone to fail for the low-frequency APIs. Besides, prior studies generally regard the API call interaction graph as homogeneous graph, ignoring the rich information (e.g., edge types) in the structure graph. In this work, we propose a novel method named MEGA for improving the recommendation accuracy especially for the low-frequency APIs. Specifically, besides call interaction graph, MEGA considers another two new heterogeneous graphs: global API co-occurrence graph enriched with the API frequency information and hierarchical structure graph enriched with the project component information. With the three multi-view heterogeneous graphs, MEGA can capture the API usage patterns more accurately. Experiments on three Java benchmark datasets demonstrate that MEGA significantly outperforms the baseline models by at least 19% with respect to the Success Rate@1 metric. Especially, for the low-frequency APIs, MEGA also increases the baselines by at least 55% regarding the Success Rate@1 score.
引用
收藏
页码:3289 / 3304
页数:16
相关论文
共 50 条
  • [31] Hierarchical graph augmented stacked autoencoders for multi-view representation learning
    Gou, Jianping
    Xie, Nannan
    Liu, Jinhua
    Yu, Baosheng
    Ou, Weihua
    Yi, Zhang
    Chen, Wu
    INFORMATION FUSION, 2024, 102
  • [32] Multi-View Joint Graph Representation Learning for Urban Region Embedding
    Zhang, Mingyang
    Li, Tong
    Li, Yong
    Hui, Pan
    PROCEEDINGS OF THE TWENTY-NINTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2020, : 4431 - 4437
  • [33] Self Supervised Multi-view Graph Representation Learning in Digital Pathology
    Ramanathan, Vishwesh
    Martel, Anne L.
    GRAPHS IN BIOMEDICAL IMAGE ANALYSIS, AND OVERLAPPED CELL ON TISSUE DATASET FOR HISTOPATHOLOGY, 5TH MICCAI WORKSHOP, 2024, 14373 : 74 - 84
  • [34] Incomplete Multi-view Learning via Consensus Graph Completion
    Zhang, Heng
    Chen, Xiaohong
    Zhang, Enhao
    Wang, Liping
    NEURAL PROCESSING LETTERS, 2023, 55 (04) : 3923 - 3952
  • [35] Multi-view heterogeneous graph learning with compressed hypergraph neural networks
    Huang, Aiping
    Fang, Zihan
    Wu, Zhihao
    Tan, Yanchao
    Han, Peng
    Wang, Shiping
    Zhang, Le
    NEURAL NETWORKS, 2024, 179
  • [36] Incomplete Multi-view Clustering via Structured Graph Learning
    Wu, Jie
    Zhuge, Wenzhang
    Tao, Hong
    Hou, Chenping
    Zhang, Zhao
    PRICAI 2018: TRENDS IN ARTIFICIAL INTELLIGENCE, PT I, 2018, 11012 : 98 - 112
  • [37] Multi-view spectral clustering via sparse graph learning
    Hu, Zhanxuan
    Nie, Feiping
    Chang, Wei
    Hao, Shuzheng
    Wang, Rong
    Li, Xuelong
    NEUROCOMPUTING, 2020, 384 : 1 - 10
  • [38] Incomplete multi-view clustering via kernelized graph learning
    Xia, Dongxue
    Yang, Yan
    Yang, Shuhong
    Li, Tianrui
    INFORMATION SCIENCES, 2023, 625 : 1 - 19
  • [39] A weighted multi-view clustering via sparse graph learning
    Zhou, Jie
    Zhang, Runxin
    CLUSTER COMPUTING-THE JOURNAL OF NETWORKS SOFTWARE TOOLS AND APPLICATIONS, 2024, 27 (10): : 13517 - 13530
  • [40] Incomplete Multi-view Learning via Consensus Graph Completion
    Heng Zhang
    Xiaohong Chen
    Enhao Zhang
    Liping Wang
    Neural Processing Letters, 2023, 55 : 3923 - 3952