Graph Neural Networks for Vulnerability Detection: A Counterfactual Explanation

要約

脆弱性の検出は、ソフトウェア システムのセキュリティと信頼性を確保するために重要です。
最近、グラフ ニューラル ネットワーク (GNN) は、ソース コードの基礎となるセマンティック構造を捕捉できる機能により、脆弱性検出のためのコード埋め込みアプローチとして顕著になりました。
ただし、GNN は本質的にブラックボックスであるため、説明可能性において大きな課題に直面しています。
この目的を達成するために、事実に基づく推論に基づいた説明がいくつか提案されています。
これらの説明者は、結果に寄与する主要な特徴を分析することによって、GNN による予測の説明を提供します。
私たちは、これらの事実に基づく推論に基づいた説明では、「コード グラフを別の構造に変更した場合、GNN の決定はどうなるでしょうか?」という重要な仮定の質問に答えることはできないと主張します。
人工知能における反事実推論の進歩に触発され、GNN ベースの脆弱性検出のための新しい反事実説明子である CFExplainer を提案します。
事実に基づいた推論ベースの説明とは異なり、CFExplainer は、予測の変化につながる入力コード グラフへの最小限の摂動を追求し、それによって脆弱性検出のための仮定の質問に対処します。
私たちはこの混乱を反事実的説明と呼んでおり、検出された脆弱性の根本原因を特定し、開発者が脆弱性を修正するための適切な措置を講じるための貴重な洞察を提供することができます。
4 つの GNN ベースの脆弱性検出モデルに関する広範な実験により、既存の最先端の事実推論ベースのエクスプローラーよりも CFExplainer の有効性が実証されました。

要約(オリジナル)

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.

arxiv情報

著者 Zhaoyang Chu,Yao Wan,Qian Li,Yang Wu,Hongyu Zhang,Yulei Sui,Guandong Xu,Hai Jin
発行日 2024-07-15 14:05:49+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CR, cs.SE パーマリンク