Graph Neural Networks (GNNs) have proven highly effective in various machine learning (ML) tasks involving graphs, such as node/graph classification and link prediction. However, explaining the decisions made by GNNs poses challenges because of the aggregated relational information based on graph structure, leading to complex data transformations. Existing methods for explaining GNNs often face limitations in systematically exploring diverse substructures and evaluating results in the absence of ground truths. To address this gap, we introduce GNNAnatomy, a model- and dataset-agnostic visual analytics system designed to facilitate the generation and evaluation of multi-level explanations for GNNs. In GNNAnatomy, we employ graphlets to elucidate GNN behavior in graph-level classification tasks. By analyzing the associations between GNN classifications and graphlet frequencies, we formulate hypothesized factual and counterfactual explanations. To validate a hypothesized graphlet explanation, we introduce two metrics: (1) the correlation between its frequency and the classification confidence, and (2) the change in classification confidence after removing this substructure from the original graph. To demonstrate the effectiveness of GNNAnatomy, we conduct case studies on both real-world and synthetic graph datasets from various domains. Additionally, we qualitatively compare GNNAnatomy with a state-of-the-art GNN explainer, demonstrating the utility and versatility of our design.
翻译:图神经网络(GNNs)在处理涉及图结构的机器学习任务(如节点/图分类与链接预测)中已展现出显著成效。然而,由于基于图结构的聚合关系信息会导致复杂的数据变换,解释GNN的决策过程仍面临挑战。现有GNN解释方法往往难以系统化探索多样子结构,并在缺乏真实标注的情况下评估结果。为填补这一空白,我们提出了GNNAnatomy——一个与模型及数据集无关的可视化分析系统,旨在促进GNN多层次解释的生成与评估。在GNNAnatomy中,我们采用图元(graphlets)来阐释GNN在图级分类任务中的行为机制。通过分析GNN分类结果与图元频率之间的关联,我们构建了基于事实与反事实的假设性解释。为验证假设性图元解释,我们引入两项评估指标:(1)图元频率与分类置信度之间的相关性;(2)从原图中移除该子结构后分类置信度的变化。为验证GNNAnatomy的有效性,我们在多个领域的真实世界与合成图数据集上进行了案例研究。此外,我们通过定性对比将GNNAnatomy与前沿GNN解释工具进行比较,证明了本系统设计的实用性与普适性。