Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectors

Baijun Cheng, Shengming Zhao, Kailong Wang, Meizhen Wang, Guangdong Bai +4 more
1/5/2024
cs.CRcs.LGcs.SE

No official code found. Best implementation: for-just-we/VulDetectArtifact (8 stars, last commit 2025-02-19).

Abstract

Vulnerability detectors based on deep learning (DL) models have proven their effectiveness in recent years. However, the shroud of opacity surrounding the decision-making process of these detectors makes it difficult for security analysts to comprehend. To address this, various explanation approaches have been proposed to explain the predictions by highlighting important features, which have been demonstrated effective in other domains such as computer vision and natural language processing. Unfortunately, an in-depth evaluation of vulnerability-critical features, such as fine-grained vulnerability-related code lines, learned and understood by these explanation approaches remains lacking. In this study, we first evaluate the performance of ten explanation approaches for vulnerability detectors based on graph and sequence representations, measured by two quantitative metrics including fidelity and vulnerability line coverage rate. Our results show that fidelity alone is not sufficient for evaluating these approaches, as fidelity incurs significant fluctuations across different datasets and detectors. We subsequently check the precision of the vulnerability-related code lines reported by the explanation approaches, and find poor accuracy in this task among all of them. This can be attributed to the inefficiency of explainers in selecting important features and the presence of irrelevant artifacts learned by DL-based detectors.

View on arXivView PDF

Code Implementations(1)

Artifact for TOSEM

81C, PythonNov 6, 20231 years ago

Similar Papers

Cite this paper

@article{cheng2024beyond,
  title  = {Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectors},
  author = {Baijun Cheng and Shengming Zhao and Kailong Wang and Meizhen Wang and Guangdong Bai and Ruitao Feng and Yao Guo and Lei Ma and Haoyu Wang},
  year   = {2024},
  eprint = {2401.02686},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.02686v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.02686.svg)](https://codeofpaper.com/paper/2401.02686)

Discussion