Skip to main content

Graph Neural Network for Critical Class Identification in Software System

  • Conference paper
  • First Online:
Algorithms and Architectures for Parallel Processing (ICA3PP 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14489))

  • 91 Accesses

Abstract

Most performance enhancements in software engineering practice are made by optimizing a few key codes. A key class identification method for software systems based on a graph neural network is proposed to identify these key codes in software systems effectively. First, a directed weighted class dependency network with classes as nodes and dependencies as edges is constructed based on the dependency degree in the software system and the dependency relationship between classes. Second, the initial feature of class nodes is the embedding vector generated by network embedding learning for each class node. Then, the GraphSAGE model, which is used to learn the hidden features of class nodes, is further explained. Moreover, a multi-layer perceptron turns the learned feature vector into a scalar score. By descending sorting the node scores, the key classes are then identified. Two open datasets are used to test the proposed approach. The experimental results show that our proposed method can improve the recall and accuracy of the top 10% of key node classes by more than 10%, compared with the current work and three graph neural network methods.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Xiao, P.: Analysis and exploration of software testing technology. Comput. CD Softw. Appl. 18(02), 44–45 (2015)

    Google Scholar 

  2. Wang, S., Liu, T., Nam, J., et al.: Deep semantic feature learning for software defect prediction. IEEE Trans. Softw. Eng. 46, 1267–1293 (2018)

    Google Scholar 

  3. Li, J., He, P., Zhu, J., et al.: Software defect prediction via convolutional neural network. In: 2017 IEEE International Conference on Software Quality, Reliability and Security (QRS), pp. 318–328. IEEE (2017)

    Google Scholar 

  4. Qu, Y., Liu, T., Chi, J., et al.: node2defect: using network embedding to improve software defect prediction. In: 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 844–849. IEEE (2018)

    Google Scholar 

  5. Huang, C., Liu, X., Deng, M., et al.: A survey on algorithms for epidemic source identification on complex networks. Chin. J. Comput. 41(06), 1156–1179 (2018)

    Google Scholar 

  6. Kabir, K.A., Kuga, K., Tanimoto, J.: Analysis of SIR epidemic model with information spreading of awareness. Chaos Solitons Fractals 119, 118–125 (2019)

    Article  MathSciNet  Google Scholar 

  7. Firth, J.A., Hellewell, J., Klepac, P., et al.: Using a real-world network to model localized Covid-19 control strategies. Nat. Med. 26, 1616–1622 (2020)

    Article  Google Scholar 

  8. Rahmani, H., Blockeel, H., Bender, A.: Using a human drug network for generating novel hypotheses about drugs. Intell. Data Anal. 20(1), 183–197 (2016)

    Article  Google Scholar 

  9. Gu, Q., Ju, C., Wu, G.: Knowledge communication model of social network with user cooperation and leadership encouragement. Telecommun. Sci. 36(10), 172–182 (2020)

    Google Scholar 

  10. Yada, K., Motoda, H., Washio, T., Miyawaki, A.: Consumer behavior analysis by graph mining technique. New Math. Natural Comput. 2(01), 59–68 (2006)

    Article  Google Scholar 

  11. Ma, S., Liu, J., Zuo, X.: Survey on graph neural network. J. Comput. Res. Develop. 59(01), 47–80 (2022)

    Google Scholar 

  12. Zhan, W., Guan, J., Zhang, Z.: Advance in the research of complex network: model and application. J. Chin. Comput. Syst. 32(2), 193–202 (2011)

    Google Scholar 

  13. Watts, D.J., Strogatz, S.H.: Collective dynamics of ‘small-world’ networks. Nature 393, 440–442 (1998)

    Article  Google Scholar 

  14. Barabási, A.L., Albert, R.: Emergence of scaling in random networks. Science 286, 509–512 (1999)

    Article  MathSciNet  Google Scholar 

  15. Li, X., Chen, G.R.: A local-world evolving network model. Physica A: Stat. Mech. Appl. 328(1–2), 274–286 (2003). https://doi.org/10.1016/s0378-4371(03)00604-6]

  16. Yook, S.H., Jeong, H., Barabasi, A.L., et al.: Weighted evolving networks. Phys. Rev. Lett. 86(25), 5835–5838 (2001). https://doi.org/10.1103/PhysRevLett.86.5835]

  17. Wu, Z., Chen, Y.: Link prediction using matrix factorization with bagging. In: 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS). IEEE (2016)

    Google Scholar 

  18. Koene, J.: Applied network analysis : a methodological introduction. North-Holland 17(3), 422–423 (1984)

    Google Scholar 

  19. Chen, D.B, Lul, Y., Shang, M.S., et al.: Identifying influential nodes in complex networks. Physica A: Stat. Mech. Appl. 391(4), 1777–1787 (2012)

    Google Scholar 

  20. Freeman, L.C.: Centrality in social networks conceptual clarification. Soc. Netw. 1(3), 215–239 (1978–1979)

    Google Scholar 

  21. Wang, J., Ai, J., Yang. Y., et al.: Identifying key classes of object-oriented software based on software complex network. In: International Conference on System Reliability & Safety, pp. 444–449. IEEE (2017)

    Google Scholar 

  22. Newman Me, J.: A measure of betweenness centrality based on random walks. Soc. Netw. 27(1), 39–54 (2005)

    Google Scholar 

  23. Kitsak, M., Gallos, L.K., Havlin, S., et al.: Identification of influential spreaders in complex networks. Nat. Phys. 6(11), 888–893 (2010)

    Article  Google Scholar 

  24. Kleinberg, J.M.: Authoritative sources in a hyperlinked environment. J. ACM 46(5), 604–632 (1999)

    Article  MathSciNet  Google Scholar 

  25. Brin, S., Page, L.: The anatomy of a large-scale hypertextual web search engine. Comput. Netw. 56(18), 3825–3833 (2012)

    Article  Google Scholar 

  26. Opsahl, T., Agneessens, F., Skvoretz, J.: Node centrality in weighted networks: generalizing degree and shortest paths. Soc. Netw. 32(3), 245–251 (2010)

    Article  Google Scholar 

  27. Osman, M.H., Chaudron, M.R.V., Putten, P.V.D.: An analysis of machine learning algorithms for condensing reverse engineered class diagrams. In: Proceedings of the 2013 IEEE International Conference on Software Maintenance (ICSM 2013), Eindhoven, The Netherlands, pp. 140–149 (2013)

    Google Scholar 

  28. Li, Q., Zhou, T., LüL, C.D.: Identifying influential spreaders by weighted LeaderRank. Phys A 404, 47–55 (2014)

    Google Scholar 

  29. Yin, L., Deng, Y.: Toward uncertainty of weighted networks: an entropy-based model. Physica A 508, 176–186 (2018)

    Article  Google Scholar 

  30. Valverde, S., Cancho, R.F., Solé, R.V.: Scale free networks from optimal design. Europhys. Lett. 60(4), 512–517 (2002)

    Article  Google Scholar 

  31. Ding, Y.: Research on measurement method in open software ecosystem based on complex network. Wuhan University (2017)

    Google Scholar 

  32. Pan, W., Li, B., Ma, Y., et al.: Identifying the key packages using weighted PageRank algorithem. Acta Electronica Sinica 42(11), 2174–2183 (2014)

    Google Scholar 

  33. Singh, S., Jha, R.K.: A survey on software defined networking: architecture for next generation network. J. Netw. Syst. Manage. 25(2), 321–374 (2017)

    Google Scholar 

  34. Srinivasan, S.M., Sangwan, R.S., Neill, C.J.: On the measures for ranking software components. Innovations Syst. Softw. Eng. 13, 161–175 (2017)

    Article  Google Scholar 

  35. Pan, W., Ming, H., Chang, C.K., Yang, Z., Kim, D.-K.: ElementRank: ranking Java Software classes and packages using multilayer complex network-based approach. IEEE Trans. Software Eng. (2019). https://doi.org/10.1109/TSE.2019.2946357

    Article  Google Scholar 

  36. Pan, W., Song, B., Li, K., Zhang, K.: Identifying key classes in object-oriented software using generalized k-core decomposition. Futur. Gener. Comput. Syst. 81, 188–202 (2018)

    Article  Google Scholar 

  37. Zhang, J., Song, K., He, P., Li, B.: Identification of key classes in software systems based on graph neural networks. Comput. Sci. 48(12), 149–158 (2021)

    Google Scholar 

  38. Ma, Y., Cheng, G., Liang, X., Li, Y., Yang, Y., Liu, Z.: Improved SDNE in weighted directed network. Comput. Sci. 47(04), 233–237 (2020)

    Google Scholar 

  39. Perozzi, B., Al-Rfou, R., Skiena, S.: Deepwalk: online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701–710 (2014)

    Google Scholar 

  40. Grover, A., Leskovec, J.: node2vec: scalable feature learning for networks. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 855–864 (2016)

    Google Scholar 

  41. Figueiredo, D.R., Ribeiro, L.F.R., Saverese, P.H.P.: struc2vec: learning node representations from structural identity. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, pp. 13–17 (2017)

    Google Scholar 

  42. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. In: Proceedings of ICLR (2017)

    Google Scholar 

  43. Velikovi, P., Cucurull, G., Casanovam A., et al.: Graph Attention Networks (2017)

    Google Scholar 

  44. Kipf, T.N., Welling, M.: Variational graph auto-encoders. In: NIPS Workshop on Bayesian Deep Learning (2016)

    Google Scholar 

  45. Hamilton, W., Ying, Z., Leskovec, J.: Inductive representation learning on large graphs. In: Proceedings of NIPS, pp. 1024–1034 (2017)

    Google Scholar 

  46. Fan, C., Zeng, L., Ding, Y., et al.: Learning to identify high betweenness centrality nodes from scratch: a novel graph neural network approach. arXiv:1905.10418v1 (2019)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peng He .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zhang, MY., He, P. (2024). Graph Neural Network for Critical Class Identification in Software System. In: Tari, Z., Li, K., Wu, H. (eds) Algorithms and Architectures for Parallel Processing. ICA3PP 2023. Lecture Notes in Computer Science, vol 14489. Springer, Singapore. https://doi.org/10.1007/978-981-97-0798-0_11

Download citation

  • DOI: https://doi.org/10.1007/978-981-97-0798-0_11

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-97-0797-3

  • Online ISBN: 978-981-97-0798-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics