Abstract
In the process of software system evolution, software users constantly put forward a large number of expectations. For these expectations, software developers usually use the existing third-party libraries and other software resources to accelerate their development processes. At present, tons of third-party libraries are available. Therefore, appropriate recommendation methods are very important for developers to find suitable libraries for their development projects. In this paper, we present KG2Lib, a recommendation method to assist software developers in selecting suitable software libraries for their current projects. KG2Lib exploits a knowledge-graph-based convolutional network to recommend software libraries by relying on a set of libraries which were already called by current projects. The interaction matrix, weight matrix and knowledge graph are the inputs of KG2Lib. What’s more, KG2Lib recommends libraries to developers from project level and library level, which can better capture the fine-grained information to achieve better recommend performance. The performance of KG2Lib was evaluated on three datasets with four existing baseline models. The experimental results show that KG2Lib achieves better performance and helps software developers accurately select the appropriate third-party libraries.







Similar content being viewed by others
Data availability statement
All the datasets analyzed during the current study are available from the corresponding author on reasonable request.
References
Alnusair A, Rawashdeh M, Alhamid MF, Hossain MA, Muhammad G (2016) Reusing software libraries using semantic graphs. In: 2016 IEEE 17th international Conference on information reuse and integration (IRI), pp 531–540. IEEE. doi: https://doi.org/10.1109/IRI.2016.79
Yang F, Hong M, Li K (1999) Software reuse and software component technology. Acta Electronica Sinic A
Bauer V, Heinemann L, Deissenboeck F (2012) A structured approach to assess third-party library usage. IEEE. https://doi.org/10.1109/ICSM.2012.6405311
Thung F, Lo D, Lawall J (2013) Automated library recommendation. Reverse Engineering. IEEE
Nagarnaik P, Thomas A (2015) Survey on recommendation system methods. In: 2015 2nd international Conference on electronics and communication systems (ICECS). IEEE, 2015, pp 1603–1608
Wang X, Liu X, Liu J, Chen X, Wu H (2021) A novel knowledge graph embedding based API recommendation method for Mashup development. World Wide Web 24(3):869–894. https://doi.org/10.1007/s11280-021-00894-3
Null LI, Han N (2021) A time-aware hybrid recommendation scheme combining content-based and collaborative filtering. Front Comput Sci. https://doi.org/10.1007/s11704-020-0028-7
Chen J, Yu J, Lu W, Qian Y, Li P (2021) IR-Rec: an interpretive rules-guided recommendation over knowledge graph. Inf Sci 563:326–341. https://doi.org/10.1016/j.ins.2021.03.004
Pan H, Yang X (2021) Intelligent recommendation method integrating knowledge graph and Bayesian network. Soft Comput, pp 1–10. doi:https://doi.org/10.1007/s00500-021-05735-z
Yang Z, Dong S (2020) HAGERec: hierarchical attention graph convolutional network incorporating knowledge graph for explainable recommendation. Knowl-Based Syst 204:106194. https://doi.org/10.1016/j.knosys.2020.106194
Ohtomo K, Harakawa R, Ogawa T, Haseyama M, Iwahashi M (2021) Personalized recommendation of tumblr posts using graph convolutional networks with preference-aware multimodal features. ITE Trans Media Technol Appl 9(1):54–61. https://doi.org/10.3169/mta.9.54
Zhong T, Zhang S, Zhou F, Zhang K, Trajcevski G, Wu J (2020) Hybrid graph convolutional networks with multi-head attention for location recommendation. World Wide Web 23(6):3125–3151. https://doi.org/10.1007/s11280-020-00824-9
Zheng Y, Gao C, He X, Li Y, Jin D (2020) Price-aware recommendation with graph convolutional networks. In: 2020 IEEE 36th international Conference on data engineering (ICDE). IEEE, pp 133–144
Zheng Y, Gao C, He X, Li Y, Jin D (2020a) Price-aware recommendation with graph convolutional networks. In: 2020 IEEE 36th international Conference on data engineering (ICDE). IEEE, pp 133–144
Katsuragawa D, Ihara A, Kula RG, Matsumoto K (2018) Maintaining third-party libraries through domain-specific category recommendations. In: 2018 IEEE/ACM 1st international workshop on software health (SoHeal), pp 2–9. IEEE
Sun X, Xu C, Li B, Duan Y, Lu X (2019) Enabling feature location for API method recommendation and usage location. IEEE Access 7:49872–49881
Sun Z, Liu Y, Cheng Z, Yang C, Che P (2020) Req2Lib: a semantic neural model for software library recommendation. In: 2020 IEEE 27th international Conference on software analysis, evolution and reengineering (SANER), pp 542–546. IEEE. doi:https://doi.org/10.1109/SANER48275.2020.9054865
Xu C, Sun X, Li B, Lu X, Guo H (2018) MULAPI: Improving API method recommendation with API usage location. J Syst Softw 142:195–205. https://doi.org/10.1016/j.jss.2018.04.060
Deshpande N, Mkaouer MW, Ouni A, Sharma N (2022) Search-based third-party library migration at the method-level. In: International Conference on the applications of evolutionary computation (Part of EvoStar). Springer, Cham, pp 173–190
Ouni A, Kula RG, Kessentini M, Ishio T, German DM, Inoue K (2017) Search-based software library recommendation using multi-objective optimization. Inf Softw Technol 83:55–75. https://doi.org/10.1016/j.infsof.2016.11.007
Zhao X, Li S, Yu H, Wang Y, Qiu W (2019) Accurate library recommendation using combining collaborative filtering and topic model for mobile development. IEICE Trans Inf Syst 102(3):522–536. https://doi.org/10.1587/transinf.2018EDP7227
D’Souza AR, Yang D, Lopes CV (2016) Collective intelligence for smarter API recommendations in python. In: 2016 IEEE 16th international working Conference on source code analysis and manipulation (SCAM). IEEE, pp 51–60
Yun W, Zhang X, Li Z, Liu H, Han M (2021) Knowledge modeling: a survey of processes and techniques. Int J Intell Syst 36(4):1686–1720
Heiko P (2016) Knowledge graph refinement: a survey of approaches and evaluation methods. Semantic Web 8(3):489–508. https://doi.org/10.3233/SW-160218
Wang HM, Nie GH (2007) Research on collaborative filtering algorithm based on fusing user and item's correlative information. J Wuhan Univ Technol
Lei R, Gu J, Xia W (2010) An item-based collaborative filtering algorithm utilizing the average rating for items. In: Signal processing & multimedia-international Conferences. DBLP
Liu A, Li B (2015) Collaborative filtering algorithm based on the similarity of user ratings and item attributes. In: 2015 3rd international Conference on mechatronics and industrial informatics (ICMII 2015). Atlantis Press, pp 451–455
Guan Z (2018) Multi-feature collaborative filtering recommendation for sparse dataset. Springer, Cham
Jiang B, Yang J, Qin Y, Wang T, Wang M, Pan W (2021a) A service recommendation algorithm based on knowledge graph and collaborative filtering. IEEE Access 9:50880–50892. https://doi.org/10.1109/ACCESS.2021.3068570
Zhang L, Li X, Li W, Zhou H, Bai Q (2021) Context-aware recommendation system using graph-based behaviours analysis. J Syst Sci Syst Eng 30(4):482–494. https://doi.org/10.1007/s11518-021-5499-z
Dong B, Zhu Y, Li L, Wu X (2021) Hybrid collaborative recommendation of co-embedded item attributes and graph features. Neurocomputing 442:307–316. https://doi.org/10.1016/j.neucom.2021.01.129
Zhang Y, Wang J, Luo J (2020) Knowledge graph embedding based collaborative filtering. IEEE Access, 2020. https://doi.org/10.1109/ACCESS.2020.3011105
Yu B, Zhou C, Zhang C, Wang G, Fan Y (2020) A privacy-preserving multi-task framework for knowledge graph enhanced recommendation. IEEE Access 8:115717–115727
Dang D, Chen C, Li H, Yan R, Guo Z, Wang X (2021) Deep knowledge-aware framework for web service recommendation. J Supercomput 77(12):14280–14304
Zhang Y, Wang J, Luo J (2020) Knowledge graph embedding based collaborative filtering. IEEE Access, 2020
Mei D, Huang, Li X (2021) Light graph convolutional collaborative filtering with multi-aspect information. IEEE Access, 2021, doi:https://doi.org/10.1109/ACCESS.2021.3061915
Zhang Z, Bu J, Li Z, Yao C, Wang C, Wu J (2021) TigeCMN: on exploration of temporal interaction graph embedding via coupled memory neural networks. Neural Netw 140:13–26. https://doi.org/10.1016/j.neunet.2021.02.016
Saied MA, Ouni A, Sahraoui H, Kula RG, Inoue K, Lo D (2018) Improving reusability of software libraries through usage pattern mining. J Syst Softw 145:164–179. https://doi.org/10.1016/j.jss.2018.08.032
Nguyen PT, Di Rocco J, Di Ruscio D, Di Penta M (2020) CrossRec: supporting software developers by recommending third-party libraries. J Syst Softw 161:110460
Chen J, Li B, Wang J, Zhao Y, Yao L, Xiong Y (2020) Knowledge graph enhanced third-party library recommendation for mobile application development. IEEE Access 8:42436–42446
Noia TD, Ostuni VC (2015) Recommender systems and linked open data. In: Proceedings of the 11th international summer school reasoning web. web logic rules, Berlin, Germany, July 31–August 4, 2015, Tutorial Lectures, pp 88–113. doi: https://doi.org/10.1007/978-3-319-21768-0_4
Hell F, Taha Y, Hinz G, Heibei S, Müller H, Knoll A (2020) Graph convolutional neural network for a pharmacy cross-selling recommender system. Information 11(11):525. https://doi.org/10.3390/info11110525
Yin C, Shi L, Sun R, Wang J (2020) Improved collaborative filtering recommendation algorithm based on differential privacy protection. J Supercomput 76(7):5161–5174
Tran DH, Sheng QZ, Zhang WE, Aljubairy A, Zaib M, Hamad SA, Khoa NLD (2021) HeteGraph: graph learning in recommender systems via graph convolutional networks. Neural Comput Appl, pp 1–17
Robillard M, Walker R, Zimmermann T (2010) Recommendation systems for software engineering. IEEE Softw 27(4):80–86
Jiang Y, Ma H, Liu Y, Li Z, Chang L (2021) Enhancing social recommendation via two-level graph attentional networks. Neurocomputing 449:71–84. https://doi.org/10.1016/j.neucom.2021.03.076
Vargas S, Castells P (2014) Improving sales diversity by recommending users to items. In: Proceedings of the eighth ACM Conference on recommender systems, RecSys ’14, Foster City, Silicon Valley, CA, USA–October 06–10, 2014, pp 145–152
Blei DM, Ng A, Jordan MI (2003) Latent dirichlet allocation. J Mach Learn Res. https://doi.org/10.1162/jmlr.2003.3.4-5.993
Acknowledgements
This work is supported by the National Natural Science Foundation of China under Grant Nos. 61862063, 61502413, 61262025; the National Social Science Foundation of China under Grant No. 18BJL104; the Science Foundation of Young and Middle-aged Academic and Technical Leaders of Yunnan under Grant No. 202205AC160040; the Science Foundation of Yunnan Jinzhi Expert Workstation under Grant No. 202205AF150006; the Natural Science Foundation of Key Laboratory of Software Engineering of Yunnan Province under Grant No. 2020SE301; the Science Foundation of “Knowledge-driven intelligent software engineering innovation team.”
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Zhao, Jz., Zhang, X., Gao, C. et al. KG2Lib: knowledge-graph-based convolutional network for third-party library recommendation. J Supercomput 79, 1–26 (2023). https://doi.org/10.1007/s11227-022-04603-3
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-022-04603-3