Lune

FSE2023Top-tier venue

Distinguishing Look-Alike Innocent and Vulnerable Code by Subtle Semantic Representation Learning and Explanation

Chao Ni, Xin Yin, Kaiwen Yang, Dehai Zhao, Zhenchang Xing, Xin Xia

Abstract

Though many deep learning (DL)-based vulnerability detection approaches have been proposed and indeed achieved remarkable performance, they still have limitations in the generalization as well as the practical usage. More precisely, existing DL-based approaches (1) perform negatively on prediction tasks among functions that are lexically similar but have contrary semantics; (2) provide no intuitive developer-oriented explanations to the detected results.

In this paper, we propose a novel approach named SVulD, a function-level Subtle semantic embedding for Vulnerability Detection along with intuitive explanations, to alleviate the above limitations. Specifically, SVulD firstly trains a model to learn distinguishing semantic representations of functions regardless of their lexical similarity. Then, for the detected vulnerable functions, SVulD provides natural language explanations (e.g., root cause) of results to help developers intuitively understand the vulnerabilities. To evaluate the effectiveness of SVulD, we conduct large-scale experiments on a widely used practical vulnerability dataset and compare it with four state-of-the-art (SOTA) approaches by considering five performance measures. The experimental results indicate that SVulD outperforms all SOTAs with a substantial improvement (i.e., 23.5%-68.0% in terms of F1-score, 15.9%-134.8% in terms of PR-AUC and 7.4%-64.4% in terms of Accuracy). Besides, we conduct a user-case study to evaluate the usefulness of SVulD for developers on understanding the vulnerable code and the participants' feedback demonstrates that SVulD is helpful for development practice.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • MVD: Memory-Related Vulnerability Detection Based on Flow-Sensitive Graph Neural Networks cites Vulnerability detection with fine-grained interpretations
  • Chasing Shadows: Pitfalls in LLM Security Research cites SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection
  • What You See is What You Get: Attention-Based Self-Guided Automatic Unit Test Generation cites ThinkRepair: Self-Directed Automated Program Repair
  • What You See is What You Get: Attention-Based Self-Guided Automatic Unit Test Generation cites Vulnerability detection with fine-grained interpretations
  • What You See is What You Get: Attention-Based Self-Guided Automatic Unit Test Generation cites SimCSE: Simple Contrastive Learning of Sentence Embeddings
  • SimCSE: Simple Contrastive Learning of Sentence Embeddings cites A Simple Framework for Contrastive Learning of Visual Representations
  • Enhancing LLM's Ability to Generate More Repository-Aware Unit Tests Through Precise Context Injection cites ThinkRepair: Self-Directed Automated Program Repair
  • Enhancing LLM's Ability to Generate More Repository-Aware Unit Tests Through Precise Context Injection cites What You See is What You Get: Attention-Based Self-Guided Automatic Unit Test Generation
  • SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection cites VulCNN: An Image-inspired Scalable Vulnerability Detection System
  • SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detection cites Vulnerability detection with fine-grained interpretations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. ThinkRepair: Self-Directed Automated Program RepairXin Yin, Chao Ni, Shaohua Wang, Zhenhao Li et al.ISSTA 2024 · 37 citations
  2. Chasing Shadows: Pitfalls in LLM Security ResearchJonathan Evertz, Niklas Risse, Nicolai Neuer, Andreas Müller et al.NDSS 2026 · 17 citations
  3. SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability DetectionXin-Cheng Wen, Cuiyun Gao, Shuzheng Gao, Yang Xiao et al.ISSTA 2024 · 17 citations
  4. What You See is What You Get: Attention-Based Self-Guided Automatic Unit Test GenerationXin Yin, Chao Ni, Xiaodan Xu, Xiaohu YangICSE 2025 · 8 citations
  5. Enhancing LLM's Ability to Generate More Repository-Aware Unit Tests Through Precise Context InjectionXin Yin, Chao Ni, Xinrui Li, Liushan Chen et al.ASE 2025 · 2 citations

Builds on11

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
  3. Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 283 citations
  4. VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang et al.ICSE 2022 · 141 citations
  5. MVD: Memory-Related Vulnerability Detection Based on Flow-Sensitive Graph Neural NetworksSicong Cao, Xiaobing Sun, Lili Bo, Rongxin Wu et al.ICSE 2022 · 100 citations

Related papers

  1. VulSim: Leveraging Similarity of Multi-Dimensional Neighbor Embeddings for Vulnerability DetectionSamiha Shimmi, Ashiqur Rahman, Mohan Gadde, Hamed Okhravi et al.USENIX Security 2024 · 13 citations
  2. Enhancing Vulnerability Detection via Inter-procedural Semantic CompletionBozhi Wu, Chengjie Liu, Zhiming Li, Yushi Cao et al.ISSTA 2025 · 2 citations
  3. DeepVD: Toward Class-Separation Features for Neural Network Vulnerability DetectionWenbo Wang, Tien N. Nguyen, Shaohua Wang, Yi Li et al.ICSE 2023 · 32 citations
  4. An Empirical Study of Deep Learning Models for Vulnerability DetectionBenjamin Steenhoek, Md Mahbubur Rahman, Richard Jiles, Wei LeICSE 2023 · 107 citations
  5. Enhancing Deep Learning-based Vulnerability Detection by Building Behavior Graph ModelBin Yuan, Yifan Lu, Yilin Fang, Yueming Wu et al.ICSE 2023 · 20 citations
Dusk over the sea between two cliffs drawn in fine vertical lines