Graph Neural Networks for Vulnerability Detection: A Counterfactual Explanation
Zhaoyang Chu, Yao Wan, Qian Li, Yang Wu, Hongyu Zhang, Yulei Sui, Guandong Xu, Hai Jin
摘要
Vulnerability detection is crucial for ensuring the security and reliability of software systems. Recently, Graph Neural Networks (GNNs) have emerged as a prominent code embedding approach for vulnerability detection, owing to their ability to capture the underlying semantic structure of source code. However, GNNs face significant challenges in explainability due to their inherently black-box nature. To this end, several factual reasoning-based explainers have been proposed. These explainers provide explanations for the predictions made by GNNs by analyzing the key features that contribute to the outcomes. We argue that these factual reasoning-based explanations cannot answer critical what-if questions: "What would happen to the GNN's decision if we were to alter the code graph into alternative structures?" Inspired by advancements of counterfactual reasoning in artificial intelligence, we propose CFExplainer, a novel counterfactual explainer for GNN-based vulnerability detection. Unlike factual reasoning-based explainers, CFExplainer seeks the minimal perturbation to the input code graph that leads to a change in the prediction, thereby addressing the what-if questions for vulnerability detection. We term this perturbation a counterfactual explanation, which can pinpoint the root causes of the detected vulnerability and furnish valuable insights for developers to undertake appropriate actions for fixing the vulnerability. Extensive experiments on four GNN-based vulnerability detection models demonstrate the effectiveness of CFExplainer over existing state-of-the-art factual reasoning-based explainers.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper6
- On Abstraction Refinement for Bayesian Program AnalysisYuanfeng Shi, Yifan Zhang, Xin ZhangOOPSLA 2025 · 被引用 4 次
- AGNNCert: Defending Graph Neural Networks against Arbitrary Perturbations with Deterministic CertificationJiate Li, Binghui WangUSENIX Security 2025
- Exploring Motif-based Heterogeneous Graph Learning for ReDoS DetectionHong Huang, Chengyu Yao, Rongchen Li, Weihao Su 等ICML 2026
- Cutting the Fuse: Actionable APT Attack Blocking in Provenance-based IDSWeiheng Wu, Wei Qiao, Teng Li, Yebo Feng 等USENIX Security 2026
- CodeSync: Synchronizing Large Language Models with Dynamic Code Evolution at ScaleChenlong Wang, Zhaoyang Chu, Zhengxiang Cheng, Xuyi Yang 等ICML 2025
它引用的顶会 Paper15
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 被引用 1,644 次
- Parameterized Explainer for Graph Neural NetworkDongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu 等NeurIPS 2020 · 被引用 888 次
- On Explainability of Graph Neural Networks via Subgraph ExplorationsHao Yuan, Haiyang Yu, Jie Wang, Kang Li 等ICML 2021 · 被引用 498 次
- Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 被引用 283 次
- Generative Causal Explanations for Graph Neural NetworksWanyu Lin, Hao Lan, Baochun LiICML 2021 · 被引用 217 次
相关 Paper
- Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection SystemsSicong Cao, Xiaobing Sun, Xiaoxue Wu, David Lo 等ICSE 2024 · 被引用 27 次
- Learning and Evaluating Graph Neural Network Explanations based on Counterfactual and Factual ReasoningJuntao Tan, Shijie Geng, Zuohui Fu, Yingqiang Ge 等WWW 2022 · 被引用 151 次
- Interpreters for GNN-Based Vulnerability Detection: Are We There Yet?Yutao Hu, Suyuan Wang, Wenke Li, Junru Peng 等ISSTA 2023 · 被引用 21 次
- Jointly Attacking Graph Neural Network and its ExplanationsWenqi Fan, Han Xu, Wei Jin, Xiaorui Liu 等ICDE 2023 · 被引用 23 次
- Generating In-Distribution Counterfactual Explanation for Graph Neural NetworksLinmao Chen, Chaobo He, Junwei Cheng, Chunying Li 等AAAI 2026
