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 条
  • [21] Multi-view learning-based heterogeneous network representation learning
    Chen, Lei
    Li, Yuan
    Deng, Xingye
    JOURNAL OF KING SAUD UNIVERSITY-COMPUTER AND INFORMATION SCIENCES, 2023, 35 (10)
  • [22] Multi-View Contrastive Enhanced Heterogeneous Graph Structure Learning
    Bing R.
    Yuan G.
    Meng F.
    Wang S.
    Qiao S.
    Wang Z.
    Ruan Jian Xue Bao/Journal of Software, 2023, 34 (10):
  • [23] Latent Heterogeneous Graph Network for Incomplete Multi-View Learning
    Zhu, Pengfei
    Yao, Xinjie
    Wang, Yu
    Cao, Meng
    Hui, Binyuan
    Zhao, Shuai
    Hu, Qinghua
    IEEE TRANSACTIONS ON MULTIMEDIA, 2023, 25 : 3033 - 3045
  • [24] Representation Learning with Depth and Breadth for Recommendation Using Multi-view Data
    Han, Xiaotian
    Shi, Chuan
    Zheng, Lei
    Yu, Philip S.
    Li, Jianxin
    Lu, Yuanfu
    WEB AND BIG DATA (APWEB-WAIM 2018), PT I, 2018, 10987 : 181 - 188
  • [25] Multi-view self-supervised learning on heterogeneous graphs for recommendation
    Zhang, Yunjia
    Zhang, Yihao
    Liao, Weiwen
    Li, Xiaokang
    Wang, Xibin
    APPLIED SOFT COMPUTING, 2025, 174
  • [26] Social recommendation via multi-view user preference learning
    Lu, Hanqing
    Chen, Chaochao
    Kong, Ming
    Zhang, Hanyi
    Zhao, Zhou
    NEUROCOMPUTING, 2016, 216 : 61 - 71
  • [27] Multi-view representation learning for multi-view action recognition
    Hao, Tong
    Wu, Dan
    Wang, Qian
    Sun, Jin-Sheng
    JOURNAL OF VISUAL COMMUNICATION AND IMAGE REPRESENTATION, 2017, 48 : 453 - 460
  • [28] Multi-View Representation Learning via View-Aware Modulation
    Wang, Ren
    Sun, Haoliang
    Nie, Xiushan
    Lin, Yuxiu
    Xi, Xiaoming
    Yin, Yilong
    PROCEEDINGS OF THE 31ST ACM INTERNATIONAL CONFERENCE ON MULTIMEDIA, MM 2023, 2023, : 3876 - 3886
  • [29] Multi-View MOOC Quality Evaluation via Information-Aware Graph Representation Learning
    Jiang, Lu
    Wang, Yibin
    Wang, Jianan
    Wang, Pengyang
    Yin, Minghao
    THIRTY-SEVENTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 37 NO 7, 2023, : 8070 - 8077
  • [30] Link Inference via Heterogeneous Multi-view Graph Neural Networks
    Xing, Yuying
    Li, Zhao
    Hui, Pengrui
    Huang, Jiaming
    Chen, Xia
    Zhang, Long
    Yu, Guoxian
    DATABASE SYSTEMS FOR ADVANCED APPLICATIONS (DASFAA 2020), PT I, 2020, 12112 : 698 - +