All models

SVulD

A function-level detector of vulnerable source code built on learned semantic embeddings.

Language · 327 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 (27 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
125.9M
Operations
327
Framework
PyTorch
Recurrent
No
Published
ESEC/FSE 2023
Cited by
44 (as of 27 October 2026)
Authors
Chao Ni, Xin Yin, Kaiwen Yang 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
m20228
Graph hash
d406a79322dd2e1da99be96ca64893ab319430706a8d33167fcaf6e9547a0cda
Skeleton hash
df21411596889b20e6463b270fab4a11fe63dfb81d4c95614e925bcf42333e92
Architecture hash
c3550f48c28b2f6a4ce8127f8deaaa80f9998b36494a2459dc45383943152a1a
Diagram SHA-256
8b95d9ff238c99a7666a8757940cc74d843428cdf39804c369cb2a2f7f4b02b5
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

SVulD is a function-level approach to detecting vulnerabilities in code, and its name stands for Subtle semantic embedding for Vulnerability Detection. The paper names two limitations of existing deep learning detectors: they perform poorly on functions that are lexically similar but have contrary semantics, and they give developers no intuitive explanations of the detected results.

SVulD first trains a model to learn distinguishing semantic representations of functions regardless of their lexical similarity. Then, for the functions detected as vulnerable, it provides natural language explanations, such as the root cause, to help developers understand the vulnerabilities.

The authors evaluated SVulD on a widely used practical vulnerability dataset, comparing it with four other approaches on five performance measures. The paper reports improvements of 23.5%-68.0% in F1-score, 15.9%-134.8% in PR-AUC and 7.4%-64.4% in Accuracy over those approaches. In a user-case study, participants' feedback indicated that SVulD is helpful for development practice.

Key idea. SVulD learns semantic representations that separate lexically similar vulnerable and innocent functions, and adds natural language explanations for the functions it detects as vulnerable.

  • svuld
  • vulnerability detection
  • software vulnerability detection
  • vulnerable code
  • function-level vulnerability detection
  • subtle semantic embedding
  • code semantic representation
  • source code security

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

Cite the paper

@misc{ni2023distinguishinglookalikeinnocentvulnerable,
      title={Distinguishing Look-Alike Innocent and Vulnerable Code by Subtle Semantic Representation Learning and Explanation}, 
      author={Chao Ni and Xin Yin and Kaiwen Yang and Dehai Zhao and Zhenchang Xing and Xin Xia},
      year={2023},
      eprint={2308.11237},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2308.11237}, 
}