{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,12]],"date-time":"2025-10-12T03:33:41Z","timestamp":1760240021732,"version":"build-2065373602"},"reference-count":35,"publisher":"MDPI AG","issue":"2","license":[{"start":{"date-parts":[[2019,2,18]],"date-time":"2019-02-18T00:00:00Z","timestamp":1550448000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Science Foundation of China","doi-asserted-by":"publisher","award":["61232001,61173169, 91646115, and 60903222"],"award-info":[{"award-number":["61232001,61173169, 91646115, and 60903222"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Science Foundation of Hunan","award":["2016JJ2149"],"award-info":[{"award-number":["2016JJ2149"]}]},{"name":"Major Science and Technology Research Program for Strategic Emerging Industry of Hunan","award":["2012GK4054"],"award-info":[{"award-number":["2012GK4054"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Symmetry"],"abstract":"<jats:p>Recently, source code mining has received increasing attention due to the rapid increase of open-sourced code repositories and the tremendous values implied in this large dataset, which can help us understand the organization of functions or classes in different software and analyze the impact of these organized patterns on the software behaviors. Hence, learning an effective representation model for the functions of source code, from a modern view, is a crucial problem. Considering the inherent hierarchy of functions, we propose a novel hyperbolic function embedding (HFE) method, which can learn a distributed and hierarchical representation for each function via the Poincar\u00e9 ball model. To achieve this, a function call graph (FCG) is first constructed to model the call relationship among functions. To verify the underlying geometry of FCG, the Ricci curvature model is used. Finally, an HFE model is built to learn the representations that can capture the latent hierarchy of functions in the hyperbolic space, instead of the Euclidean space, which are usually used in those state-of-the-art methods. Moreover, HFE is more compact in terms of lower dimensionality than the existing graph embedding methods. Thus, HFE is more effective in terms of computation and storage. To experimentally evaluate the performance of HFE, two application scenarios, namely, function classification and link prediction, have been applied. HFE achieves up to 7.6% performance improvement compared to the chosen state-of-the-art methods, namely, Node2vec and Struc2vec.<\/jats:p>","DOI":"10.3390\/sym11020254","type":"journal-article","created":{"date-parts":[[2019,2,19]],"date-time":"2019-02-19T04:08:20Z","timestamp":1550549300000},"page":"254","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["Hyperbolic Function Embedding: Learning Hierarchical Representation for Functions of Source Code in Hyperbolic Space"],"prefix":"10.3390","volume":"11","author":[{"given":"Mingming","family":"Lu","sequence":"first","affiliation":[{"name":"School of Computer Science and Engineering, Central South University, Changsha 410083, China"}]},{"given":"Yan","family":"Liu","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Central South University, Changsha 410083, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1173-6593","authenticated-orcid":false,"given":"Haifeng","family":"Li","sequence":"additional","affiliation":[{"name":"School of Geosciences and Info-Physics, Central South University, Changsha 410083, China"},{"name":"Henan Laboratory of Spatial Information Application on Ecological Environment Protection, Zhengzhou 450000, China"}]},{"given":"Dingwu","family":"Tan","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Central South University, Changsha 410083, China"}]},{"given":"Xiaoxian","family":"He","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Central South University, Changsha 410083, China"}]},{"given":"Wenjie","family":"Bi","sequence":"additional","affiliation":[{"name":"School of Business, Central South University, Changsha 410083, China"}]},{"given":"Wendbo","family":"Li","sequence":"additional","affiliation":[{"name":"Institute of Technology Innovation, Hefei Institutes of Physical Science, Chinese Academy of Sciences, Hefei 230088, China"}]}],"member":"1968","published-online":{"date-parts":[[2019,2,18]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3212695","article-title":"A Survey of Machine Learning for Big Code and Naturalness","volume":"51","author":"Allamanis","year":"2018","journal-title":"ACM Comput. Surv."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Gupta, R., Pal, S., Kanade, A., and Shevade, S. (2017, January 4\u20139). DeepFix: Fixing Common C Language Errors by Deep Learning. Proceedings of the AAAI, San Francisco, CA, USA.","DOI":"10.1609\/aaai.v31i1.10742"},{"key":"ref_3","unstructured":"Hu, X., Wei, Y., Li, G., and Jin, Z. (arXiv, 2017). CodeSum: Translate Program Language to Natural Language, arXiv."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"97","DOI":"10.1093\/comjnl\/27.2.97","article-title":"Literate Programming","volume":"27","author":"Knuth","year":"1984","journal-title":"Comput. J."},{"key":"ref_5","first-page":"3111","article-title":"Distributed representations of words and phrases and their compositionality","volume":"26","author":"Mikolov","year":"2013","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Gu, X., Zhang, H., Zhang, D., and Kim, S. (2016, January 13\u201319). Deep API Learning. Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering 2016, Seattle, WA, USA.","DOI":"10.1145\/2950290.2950334"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Iyer, S., Konstas, I., Cheung, A., and Zettlemoyer, L. (2016, January 7\u201312). Summarizing source code using a neural attention model. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany.","DOI":"10.18653\/v1\/P16-1195"},{"key":"ref_8","unstructured":"Piech, C., Huang, J., Nguyen, A., Phulsuksombati, M., Sahami, M., and Guibas, L. (arXiv, 2015). Learning Program Embeddings to Propagate Feedback on Student Code, arXiv."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Nguyen, T.D., Nguyen, A.T., Phan, H.D., and Nguyen, T.N. (2017, January 20\u201328). Exploring API Embedding for API Usages and Applications. Proceedings of the 2017 IEEE\/ACM 39th International Conference on Software Engineering (ICSE), Buenos Aires, Argentina.","DOI":"10.1109\/ICSE.2017.47"},{"key":"ref_10","unstructured":"Mou, L., Li, G., Zhang, L., Wang, T., and Jin, Z. (2014, January 27\u201331). Convolutional Neural Networks over Tree Structures for Programming Language Processing. Proceedings of the AAAI, Qu\u00e9bec City, QC, Canada."},{"key":"ref_11","unstructured":"Chamberlain, B.P., Clough, J., and Deisenroth, M.P. (arXiv, 2017). Neural Embeddings of Graphs in Hyperbolic Space, arXiv."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"036106","DOI":"10.1103\/PhysRevE.82.036106","article-title":"Hyperbolic Geometry of Complex Networks","volume":"82","author":"Krioukov","year":"2010","journal-title":"Phys. Rev. E Stat. Nonlinear Soft Matter Phys."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Verbeek, K., and Suri, S. (2016). Metric Embedding, Hyperbolic Space, and Social Networks, Elsevier Science Publishers, B.V.","DOI":"10.1016\/j.comgeo.2016.08.003"},{"key":"ref_14","unstructured":"Nickel, M., and Kiela, D. (2017, January 4\u20139). Poincar\u00e9 Embeddings for Learning Hierarchical Representations. Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"655","DOI":"10.2307\/2118620","article-title":"Metrics of Negative Ricci Curvature","volume":"140","author":"Lohkamp","year":"1994","journal-title":"Ann. Math."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"810","DOI":"10.1016\/j.jfa.2008.11.001","article-title":"Ricci curvature of Markov chains on metric spaces","volume":"256","author":"Ollivier","year":"2009","journal-title":"J. Funct. Anal."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Grover, A., and Leskovec, J. (2016, January 13\u201317). Node2vec: Scalable Feature Learning for Networks. Proceedings of the ACM Sigkdd International Conference on Knowledge Discovery & Data Mining, San Francisco, CA, USA.","DOI":"10.1145\/2939672.2939754"},{"key":"ref_18","unstructured":"Ribeiro, L.F.R., Saverese, P.H.P., and Figueiredo, D.R. (2017, January 13\u201317). Struc2vec: Learning Node Representations from Structural Identity. Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada."},{"key":"ref_19","unstructured":"Vilnis, L., and Mccallum, A. (arXiv, 2014). Word Representations via Gaussian Embedding, arXiv."},{"key":"ref_20","unstructured":"Allamanis, M., Peng, H., and Sutton, C. (2016, January 19\u201324). A Convolutional Attention Network for Extreme Summarization of Source Code. Proceedings of the International Conference on Machine Learning, New York City, NY, USA."},{"key":"ref_21","unstructured":"Dam, H.K., Tran, T., and Pham, T.T.M. (arXiv, 2016). A deep language model for software code, arXiv."},{"key":"ref_22","unstructured":"Allamanis, M., Brockschmidt, M., and Khademi, M. (arXiv, 2017). Learning to Represent Programs with Graphs, arXiv."},{"key":"ref_23","unstructured":"Allamanis, M., Chanthirasegaran, P., Kohli, P., and Sutton, C. (2017, January 6\u201311). Learning Continuous Semantic Representations of Symbolic Expressions. Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia."},{"key":"ref_24","unstructured":"Li, Y., Tarlow, D., Brockschmidt, M., and Zemel, R. (arXiv, 2015). Gated Graph Sequence Neural Networks, arXiv."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"300","DOI":"10.1007\/s00454-013-9558-1","article-title":"Ollivier\u2019s Ricci Curvature, Local Clustering and Curvature-Dimension Inequalities on Graphs","volume":"51","author":"Liu","year":"2014","journal-title":"Discr. Comput. Geometry"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Villani, C. (2009). Optimal Transport. Grundlehren Der Mathematischen Wissenschaften. The Analysis of Linear Partial Differential Operators, Springer.","DOI":"10.1007\/978-3-540-71050-9"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"983","DOI":"10.1137\/11085966X","article-title":"A Curved Brunn--Minkowski Inequality on the Discrete Hypercube, Or: What Is the Ricci Curvature of the Discrete Hypercube?","volume":"26","author":"Ollivier","year":"2012","journal-title":"SIAM J. Discr. Math."},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Shi, J., Zhang, W., and Wang, Y. (2016, January 27\u201330). Shape Analysis with Hyperbolic Wasserstein Distance. Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.","DOI":"10.1109\/CVPR.2016.546"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Santambrogio, F. (2015). Optimal transport for applied mathematicians. Progress in Nonlinear Differential Equations & Their Applications, Springer.","DOI":"10.1007\/978-3-319-20828-2"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Gromov, M. (1987). Hyperbolic groups. Essays in Group Theory, Springer.","DOI":"10.1007\/978-1-4613-9586-7_3"},{"key":"ref_31","unstructured":"Zhang, H., Reddi, S.J., and Sra, S. (2016, January 5\u201310). Riemannian SVRG: Fast Stochastic Optimization on Riemannian Manifolds. Proceedings of the Advances in Neural Information Processing Systems, Barcelona, Spain."},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"2217","DOI":"10.1109\/TAC.2013.2254619","article-title":"Stochastic Gradient Descent on Riemannian Manifolds","volume":"58","author":"Bonnabel","year":"2013","journal-title":"IEEE Trans. Autom. Control"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1080\/15427951.2010.554320","article-title":"Euclidean versus Hyperbolic Congestion in Idealized versus Experimental Networks","volume":"7","author":"Jonckheere","year":"2011","journal-title":"Internet Math."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"3951","DOI":"10.1007\/s11128-016-1394-9","article-title":"Differential geometric treewidth estimation in adiabatic quantum computation","volume":"15","author":"Wang","year":"2016","journal-title":"Quant. Inf. Process."},{"key":"ref_35","unstructured":"Gulcehre, C., Denil, M., Malinowski, M., Razavi, A., Pascanu, R., Hermann, K.M., Battaglia, P., Bapst, V., Raposo, D., and Santoro, A. (arXiv, 2010). Hyperbolic Attention Networks, arXiv."}],"container-title":["Symmetry"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-8994\/11\/2\/254\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T12:32:56Z","timestamp":1760185976000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-8994\/11\/2\/254"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,2,18]]},"references-count":35,"journal-issue":{"issue":"2","published-online":{"date-parts":[[2019,2]]}},"alternative-id":["sym11020254"],"URL":"https:\/\/doi.org\/10.3390\/sym11020254","relation":{},"ISSN":["2073-8994"],"issn-type":[{"type":"electronic","value":"2073-8994"}],"subject":[],"published":{"date-parts":[[2019,2,18]]}}}