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 条
  • [1] API Usage Recommendation Via Multi-View Heterogeneous Graph Representation Learning
    Chen, Yujia
    Gao, Cuiyun
    Ren, Xiaoxue
    Peng, Yun
    Xia, Xin
    Lyu, Michael R.
    IEEE Transactions on Software Engineering, 2023, 49 (05): : 3289 - 3304
  • [2] Multi-view graph contrastive representation learning for bundle recommendation
    Zhang, Peng
    Niu, Zhendong
    Ma, Ru
    Zhang, Fuzhi
    INFORMATION PROCESSING & MANAGEMENT, 2025, 62 (01)
  • [3] Heterogeneous Graph Neural Network With Multi-View Representation Learning
    Shao, Zezhi
    Xu, Yongjun
    Wei, Wei
    Wang, Fei
    Zhang, Zhao
    Zhu, Feida
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2023, 35 (11) : 11476 - 11488
  • [4] Graph neural news recommendation based on multi-view representation learning
    Li, Xiaohong
    Li, Ruihong
    Peng, Qixuan
    Yao, Jin
    JOURNAL OF SUPERCOMPUTING, 2024, 80 (10): : 14470 - 14488
  • [5] Drug Repositioning via Multi-View Representation Learning With Heterogeneous Graph Neural Network
    Peng, Li
    Yang, Cheng
    Yang, Jiahuai
    Tu, Yuan
    Yu, Qingchun
    Li, Zejun
    Chen, Min
    Liang, Wei
    IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, 2025, 29 (03) : 1668 - 1679
  • [6] Heterogeneous Graph Contrastive Multi-view Learning
    Wang, Zehong
    Li, Qi
    Yu, Donghua
    Han, Xiaolong
    Gao, Xiao-Zhi
    Shen, Shigen
    PROCEEDINGS OF THE 2023 SIAM INTERNATIONAL CONFERENCE ON DATA MINING, SDM, 2023, : 136 - 144
  • [7] Multi-view graph contrastive learning for social recommendation
    Chen, Rui
    Chen, Jialu
    Gan, Xianghua
    SCIENTIFIC REPORTS, 2024, 14 (01):
  • [8] Multi-View Graph Autoencoder for Unsupervised Graph Representation Learning
    Li, Jingci
    Lu, Guangquan
    Wu, Zhengtian
    2022 26TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), 2022, : 2213 - 2218
  • [9] Multi-View Robust Graph Representation Learning for Graph Classification
    Ma, Guanghui
    Hu, Chunming
    Ge, Ling
    Zhang, Hong
    PROCEEDINGS OF THE THIRTY-SECOND INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2023, 2023, : 4037 - 4045
  • [10] Multi-View Graph Autoencoder for Unsupervised Graph Representation Learning
    Li, Jingci
    Lu, Guangquan
    Wu, Zhengtian
    Proceedings - International Conference on Pattern Recognition, 2022, 2022-August : 2213 - 2218