Skip to main content

VDHGT: A Source Code Vulnerability Detection Method Based on Heterogeneous Graph Transformer

  • Conference paper
  • First Online:
  • 840 Accesses

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

Abstract

Vulnerability detection is still a challenging problem. The source code representation method used by the existing vulnerability detection methods cannot fully contain the context information of the vulnerability occurrence statement, and the vulnerability detection model does not fully consider the importance of the context statement to the vulnerability occurrence statement. Aiming at the problems raised above, this paper proposes a source code vulnerability detection method based on the heterogeneous graph transformer. The method proposed in this paper adopts a novel source code representation method—the vulnerability dependence representation graph, which includes the control dependence of the vulnerability occurrence statement and the data dependence of the variables involved in the statement. At the same time, this paper builds a graph learning network for vulnerability dependence representation graph based on the heterogeneous graph transformer, which can automatically learn the importance of contextual sentences for vulnerable sentences. To prove the effectiveness of the method in this paper, experiments were carried out on the SARD data set, and the average accuracy rate was 95.4% and the recall rate was 92.4%. The average performance is improved by 4.1%–62.7%.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions

References

  1. Lin, G.J.F., Wen, S.S., Han, Q.L.T.: Software vulnerability detection using deep neural networks: a survey. Proc. IEEE 108(10), 1825–1848 (2020)

    Google Scholar 

  2. Li, Z.F., Zou, D.Q.S., Xu, S.H.T.: SySeVR: a framework for using deep learning to detect software vulnerabilities. IEEE Trans. Depend. Secure Comput. 1–15 (2021)

    Google Scholar 

  3. Russell, R.F., Kim, L.S., Hamilton, L.T.: Automated vulnerability detection in source code using deep representation learning. 17th IEEE International Conference on Machine Learning and Applications 2018, ICMLA, vol. 122018, pp. 757–762. IEEE, Piscataway (2018)

    Google Scholar 

  4. Wang, H.T.F., Ye, G.X.S., Tang, Z.Y.T.: Combining graph-based learning with automated data collection for code vulnerability detection. IEEE Trans. Inform. Foren. Secur. 16, 1943–1958 (2021)

    Google Scholar 

  5. Li, Z.F., Zou, D.Q.S., Xu, S.H.T.: Vuldeepecker: A Deep Learning-Based System for Vulnerability Detection. arXiv preprint arXiv 1801, pp. 1681–1695 (2018)

    Google Scholar 

  6. Allamanis, M.F., Brockschmidt, M.S., Khademi, M.T.: Learning to Represent Programs with Graphs. arXiv preprint arXiv 1711, pp. 740–756 (2017)

    Google Scholar 

  7. Li, Y.J.F., Tarlow, D.S., Brockschmidt, M.T.: Gated Graph Sequence Neural Networks. arXiv preprint arXiv 1511, pp. 5493–5512 (2015)

    Google Scholar 

  8. Zhou, Y.Q.F., Liu, S.Q.S., Siow, J.K.T.: Devign: effective vulnerability identification by learning comprehensive program semantics via graph neural networks. Adv. Neural Inf. Process. Syst. 32, 1–11 (2019)

    Google Scholar 

  9. Hu, Z.N.F., Dong, Y.X.S., Wang, K.S.T.: Heterogeneous graph transformer. In: Proceedings of The Web Conference 2020, WWW, vol. 04202020, pp. 2704–2710.Association for Computing Machinery, New York (2020)

    Google Scholar 

  10. NVD: Software assurance reference dataset (2018). https://samate.nist.gov/SRD/index

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hongyu Yang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Yang, H., Yang, H., Zhang, L. (2022). VDHGT: A Source Code Vulnerability Detection Method Based on Heterogeneous Graph Transformer. In: Chen, X., Shen, J., Susilo, W. (eds) Cyberspace Safety and Security. CSS 2022. Lecture Notes in Computer Science, vol 13547. Springer, Cham. https://doi.org/10.1007/978-3-031-18067-5_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-18067-5_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-18066-8

  • Online ISBN: 978-3-031-18067-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics