All models

VulCNN

A CNN that detects vulnerable functions from images built out of their program dependency graphs.

54 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (6 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
676.8K
Operations
54
Framework
PyTorch
Recurrent
No
Published
ICSE 2022
Cited by
225 (as of 24 October 2026)
Authors
Yueming Wu, Deqing Zou, Shihan Dou and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21417
Graph hash
f0fc9db1a4627d00f093d5a42f6e67b30e8ea3bbf8a5dc587b669e6f08e7b5ba
Skeleton hash
3c97e10a86088ea266a9b4d67067a5346a5bb7ecde6eb8a3650dc04122292f3b
Architecture hash
3550cd7f7f9307ff92163939a6cba761026623db8ce7dfee07326c7f7a22fe1e
Diagram SHA-256
9123fd2e44c13f6f26fce413d47e24f0fae8aec0df32fc9f2e1ac27432ad6efc
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

VulCNN detects vulnerable functions in source code by first turning each function into an image and then classifying that image with a convolutional network. The paper starts from a trade-off: text-based detectors are scalable but not accurate because they lack program semantics, and graph-based ones are accurate but not scalable because graph analysis is time-consuming.

The image is built in steps. Static analysis extracts the program dependency graph of a function, each node of which is a line of code, and each line is embedded as a sentence vector. Three centrality measures (degree, katz and closeness) then score the importance of each line, and each measure scales the vectors to form one of three channels. The classifier uses convolution filters in 10 sizes, from 1 to 10, with 32 feature maps per size, so the fully connected layer after max pooling has length 320.

The paper evaluates VulCNN on 13,687 vulnerable and 26,970 non-vulnerable functions and reports better accuracy than eight other detectors. It also reports that VulCNN is about six times faster than Devign. In a case study on more than 25 million lines of code, the authors report finding 73 vulnerabilities that were not reported in NVD.

Key idea. VulCNN converts a function's program dependency graph into a three-channel image, weighted by centrality, so that a CNN can detect vulnerabilities at scale.

  • vulcnn
  • vulnerability detection
  • source code vulnerability
  • program dependency graph
  • code as image
  • centrality analysis
  • sent2vec
  • c/c++ vulnerabilities
  • software security

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@inproceedings{Wu_2022, series={ICSE ’22}, title={VulCNN: an image-inspired scalable vulnerability detection system}, url={http://dx.doi.org/10.1145/3510003.3510229}, DOI={10.1145/3510003.3510229}, booktitle={Proceedings of the 44th International Conference on Software Engineering}, publisher={ACM}, author={Wu, Yueming and Zou, Deqing and Dou, Shihan and Yang, Wei and Xu, Duo and Jin, Hai}, year={2022}, month=May, pages={2365–2376}, collection={ICSE ’22} }