Coca:改进并解释基于图神经网络的漏洞检测系统
Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection Systems
AI总结:
针对基于GNN的漏洞检测系统可解释性不足、易产生虚假冗余解释的问题,提出含训练器与解释器的Coca框架,通过组合对比学习增强模型鲁棒性,借助双视图因果推断生成高质量解释,经三类典型检测器验证效果显著。
摘要:
近年来,基于图神经网络(GNN)的漏洞检测系统已取得显著成效。然而,可解释性的缺失给这类黑盒模型在安全相关领域的部署带来了关键挑战。为此,已有若干方法通过提供一组对模型预测有正向贡献的关键语句,来解释检测模型的决策逻辑。但遗憾的是,由于检测模型鲁棒性较弱,且解释策略不够优化,这些方法存在揭示虚假相关性和产生冗余问题的风险。\n 本文提出Coca,这是一个通用框架,旨在:1)增强现有基于GNN的漏洞检测模型的鲁棒性,避免产生虚假解释;2)提供既简洁又有效的解释,对检测到的漏洞进行推理。Coca包含两个核心部分,分别称为Trainer(训练器)和Explainer(解释器)。前者基于组合对比学习,训练对随机扰动具有鲁棒性的检测模型;后者构建解释器,通过双视图因果推断推导出对检测到的漏洞最具决定性的关键代码语句作为解释。我们在三种典型的基于GNN的漏洞检测器上应用了Coca。实验结果表明,Coca能够有效缓解虚假相关性问题,并提供更具实用价值的高质量解释。
英文摘要:
Recently, Graph Neural Network (GNN)-based vulnerability detection systems have achieved remarkable success. However, the lack of explainability poses a critical challenge to deploy black-box models in security-related domains. For this reason, several approaches have been proposed to explain the decision logic of the detection model by providing a set of crucial statements positively contributing to its predictions. Unfortunately, due to the weakly-robust detection models and suboptimal explanation strategy, they have the danger of revealing spurious correlations and redundancy issue. In this paper, we propose Coca, a general framework aiming to 1) enhance the robustness of existing GNN-based vulnerability detection models to avoid spurious explanations; and 2) provide both concise and effective explanations to reason about the detected vulnerabilities. \sysname consists of two core parts referred to as Trainer and Explainer. The former aims to train a detection model which is robust to random perturbation based on combinatorial contrastive learning, while the latter builds an explainer to derive crucial code statements that are most decisive to the detected vulnerability via dual-view causal inference as explanations. We apply Coca over three typical GNN-based vulnerability detectors. Experimental results show that Coca can effectively mitigate the spurious correlation issue, and provide more useful high-quality explanations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。