TASK-AGNOSTIC GRAPH EXPLANATIONS
Year: 2021

Abstract:
Graph Neural Networks (GNNs) have emerged as powerful tools to encode graph structured data. Due to their broad applications, there is an increasing need to develop tools to explain how GNNs make decisions given graph structured data. Existing learning-based GNN explanation approaches are task-specific in training and hence suffer from crucial drawbacks. Specifically, they are incapable of producing explanations for a multitask prediction model with a single explainer. They are also unable to provide explanations in cases where the GNN is trained in a self-supervised manner, and the resulting representations are used in future downstream tasks. To address these limitations, we propose a Task-Agnostic GNN Explainer (TAGE) trained under self-supervision with no knowledge of downstream tasks. TAGE enables the explanation of GNN embedding models without downstream tasks and allows efficient explanation of multitask models. Our extensive experiments show that TAGE can significantly speed up the explanation efficiency by using the same model to explain predictions for multiple downstream tasks while achieving explanation quality as good as or even better than current state-of-the-art GNN explanation approaches.

heading: 1 INTRODUCTION
text: Graph neural networks (GNNs) (Kipf & Welling, 2017; Veličković et al., 2018; Xu et al., 2019) have achieved remarkable success in learning from real-world graph-structured data due to their unique ability to capture both feature-wise and topological information. Extending their success, GNNs are widely applied in various research fields and industrial applications including quantum chemistry (Gilmer et al., 2017), drug discovery (Wu et al., 2018; Wang et al., 2020), social networks (Fan et al., 2019), and recommender systems (Ying et al., 2018). While multiple approaches have been proposed and studied to improve GNN performance, GNN explainability is an emerging area and has a smaller body of research behind it. Recently, explainability has gained more attention due to an increasing desire for GNNs with more security, fairness, and reliability. Being able to provide a good explanation to a GNN prediction increases model reliability and reduces the risk of incorrect predictions, which is crucial in fields such as molecular biology, chemistry, fraud detection, etc.
Existing methods adapting the explanation methods for convolutional neural networks (CNNs) or specifically designed for GNNs have shown promising explanations on multiple types of graph data. A recent survey (Yuan et al., 2020) categorizes existing explanation methods into gradient-based, perturbation, decomposition, and surrogate methods. In particular, perturbation methods involve learning or optimization (Ying et al., 2019; Luo et al., 2020; Yuan et al., 2021; Lin et al., 2021) and, while bearing higher computational costs, generally achieve state-of-the-art performance in terms of explanation quality. These methods train post-hoc explanation models on top of the prediction model to be explained. Earlier approaches like GNNExplainer (Ying et al., 2019) require training or optimizing an individual explainer for each data instance, i.e., a graph or a node to be explained. In contrast, PGExplainer (Luo et al., 2020) performs inductive learning, i.e., it only requires a one-time training, and the explainer can be generalized to explain all data instances without individual optimization. Compared to other optimization-based explanation methods, PGExplainer significantly improves the efficiency in terms of time cost without performance loss by learning.
However, even state-of-the-art explanation methods like PGExplainer are still task-specific at training and hence suffer from two crucial drawbacks. First, current methods are inefficient in explaining multitask prediction for graph-structured data. For example, one may need to predict multiple chemical properties in drug discovery for a molecular graph. In particular, ToxCast from MoleculeNet has
167 prediction tasks. In these cases, it is common to apply a single GNN model with multiple output dimensions to make predictions for all tasks. However, one is unable to employ a single explainer to explain the above model, since current explainers are trained specifically to explain one prediction task. As a result, in the case of ToxCast, one must train 167 explainers to explain the GNN model. Second, in industry settings, it is common to train GNN models in a two-stage fashion due to scaling, latency, and label sparsity issues. The first stage trains a GNN-based embedding model with a massive amount of unlabeled data in an unsupervised manner to learn embeddings for nodes or graphs. The second stage trains lightweight models such as multilayer perceptrons (MLPs) using the frozen embeddings as input to predict the downstream tasks. In the first stage, the downstream tasks are usually unknown or undefined, and existing task-specific explainers cannot be applied. Also, there can be tens to hundreds of downstream tasks trained on these GNN embeddings, and training a separate explainer for each task is undesirable and downright impossible.
To address the above limitations, we present a new task-agnostic explanation pipeline, shown in Figure 1, where we decompose a prediction model into a GNN embedding model and a downstream model, designing separate explainers for each component. We design the downstream explainers to cooperate with the embedding explainer. The embedding explainer is trained using a self-supervised training framework, which we dub Task-Agnostic GNN Explainer (TAGE), with no knowledge of downstream tasks, models, or labels. In contrast to existing explainers, the learning objective for TAGE is computed at the graph or node embeddings without involving task-related predictions. In addition to eliminating the need for downstream tasks in TAGE, we argue that the self-supervision performed on the embeddings can bring additional performance boost in terms of the explanation quality compared to existing task-specific baselines such as GNNExplainer and PGExplainer.
We summarize our contributions as follows: 1) We introduce the task-agnostic explanation problem and propose a two-stage explanation pipeline involving an embedding explainer and a downstream explainer. This enables the explanation of multiple downstream tasks with a single embedding explainer. 2) We propose a self-supervised training framework TAGE, which is based on conditioned contrastive learning to train the embedding explainer. TAGE requires no knowledge of downstream tasks. 3) We perform experiments on real-world datasets and observe that TAGE outperforms existing learning-based explanation baselines in terms of explanation quality, universal explanation ability, and the time required for training and inference.

heading: 2 TASK-AGNOSTIC EXPLANATIONS

heading: 2.1 NOTATIONS AND LEARNING-BASED GNN EXPLANATION
text: Our study considers the attributed graph G with node set V and edge set E. We formulate the attributed graph as a tuple of matrices (A,X), where A ∈ {0, 1}|V |×|V | denotes the adjacency matrix and X ∈ R|V |×df denotes the feature matrix with feature dimension of df . We assume that the prediction model F that is to be explained operates on graph-structured data through two components: a GNN-based embedding model and lighter downstream models. Denoting the input space by G, a node-level embedding model En : G → R|V |×d takes a graph as input and computes
embeddings of dimension d for all nodes in the graph, whereas a graph-level embedding model Eg : G → R1×d computes an embedding for the input graph. Subsequently, the downstream model D : Rd → R computes predictions for the downstream task based on the embeddings. Typical GNN explainers consider a task-specific GNN-based model as a complete unit, i.e., F := D ◦ E . Given a graph G and the GNN-based model F to be explained , our goal is to identify the subgraph Gsub that contributes the most to the final prediction made by F . In other words, we claim that a given prediction is made because F captures crucial information provided by some subgraphGsub. The learning-based (or optimization-based) GNN explanation employs a parametric explainer Tθ associated with the GNN model F to compute the subgraph Gsub of the given graph data. Concretely, the explainer Tθ computes the importance score for each node or edge, denoted as wi or wij , or masks for node attributes denoted as m. It then selects the subgraph Gsub induced by important nodes and edges, i.e., whose scores exceed a threshold t, and by masking the unimportant attributes. In our study, we follow Luo et al. (2020), focusing on the importance of edges to provide explanations to GNNs. Formally, we have Gsub := (V,Esub) = Tθ(G), where Esub = {(vi, vj) : (vi, vj) ∈ E,wij ≥ t}.

heading: 2.2 TASK-AGNOSTIC EXPLANATIONS
text: As introduced in Section 1, all existing learning-based or optimization-based explanation approaches are task-specific and hence suffer from infeasiblity or inefficiency in many real-application scenarios. In particular, they are of limited use when downstream tasks are unknown or undefined and fail to employ a single explainer to explain a multitask prediction model.
To enable the explanation of GNNs in two-stage training and multitask scenarios, we introduce a new explanation paradigm called the task-agnostic explanation. The task-agnostic explanation considers a whole prediction model as an embedding model followed by any number of downstream models. It focuses on explaining the embedding model regardless of the number or the existence of downstream models. In particular, the task-agnostic explanation trains only one explainer T (tag)θ to explain the embedding model E , which should satisfy the following features. First, given an input graph G, the explainer T (tag)θ should be able to provide different explanations according to specific downstream tasks being studied. Table 1 compares the properties of common GNN explanation methods and the desired task-agnostic explainers in multitask scenarios. Second, the explainer T (tag)θ can be trained when only the embedding model is available, e.g., at the first stage of a two-stage training paradigm, regardless of the presence of downstream tasks. When downstream tasks and models are unknown, T (tag)θ can still identify which components of the input graph are important for certain embedding dimensions of interest.

heading: 3 THE TAGE FRAMEWORK
text: Our explanation framework TAGE follows the typical scheme of GNN explanation introduced in the previous section. It provides explanations by identifying important edges in a given graph and removing the edges that lead to significant changes in the final prediction. Specifically, the goal of the TAGE is to predict the importance score for each edge in a given graph. Different from existing methods, the proposed TAGE breaks down typical end-to-end GNN explainers into two components. We now provide general descriptions and detailed formulations to the proposed framework.

heading: 3.1 TASK-AGNOSTIC EXPLANATION PIPELINE
text: Following the principle of the desired task-agnostic explanations, we introduce the task-agnostic explanation pipeline, where a typical explanation procedure is performed in two steps. In particular, we decompose the typical end-to-end learning-based GNN explainer into two parts: the embedding explainer TE and the downstream explainer Tdown, corresponding to the two components in the two-stage training and prediction procedure. We compare the typical explanation pipeline and the two-stage explanation pipeline in Figure 1. The embedding explainer and downstream explainers can be trained or constructed independently from each other. In addition, the embedding explainer can cooperate with any downstream explainers to perform end-to-end explanations on input graphs.
The downstream explainer aims to explain task-specific downstream models. As downstream models are usually lightweight MLPs, we simply adopt gradient-based explainers for downstream explainers without training. The downstream explainer takes a downstream model and the graph or node embedding vector as inputs and computes the importance score of each dimension on the embedding vector. The importance scores then serve as a condition vector input to the embedding explainer. Given the condition vector, the embedding explainer explains the GNN-based embedding model by identifying an important subgraph from the input graph data. In other words, given different condition vectors associated with different downstream tasks or models, the embedding explainer can provide corresponding explanations for the same embedding model. Formally, we denote the downstream explainer for models from D by Tdown : D × Rd → Rd, which maps input models and embeddings into importance scores m for all embedding dimensions. We denote the embedding explainer associated with the embedding model E by TE : Rd × G → G, which maps a given graph into a subgraph of higher importance, conditioned on the embedding dimension importance m ∈ Rd. The training procedures of the embedding explainer are independent of downstream tasks or downstream explainers. In particular, the downstream explainer is obtained from the downstream model only, and the training of the embedding explainer only requires the embedding model and the input graphs. As downstream models are usually constructed as stacked fully connected (FC) layers and the explanation of FC layers has been well studied, our study mainly focuses on the non-trivial training procedure and design of the embedding explainer.

heading: 3.2 TRAINING EMBEDDING EXPLAINER UNDER SELF-SUPERVISION
text: A straightforward idea of explaining an embedding model with no knowledge of downstream tasks is to employ existing explainers and perform explanation on the pretext task, such as graph reconstruction (Kipf & Welling, 2016) or context prediction (Hu et al., 2020), used during the pre-training of GNNs. However, such explanations cannot generalize to future downstream tasks as there are limited dependencies between the pretext task and downstream tasks. Therefore, training an embedding explainer without downstream models or labels is challenging, and it is desirable to develop a generalizable training approach for the embedding explainer. To this end, we propose a self-supervised learning framework for the embedding explainer.
The learning objective of the proposed framework seeks to maximize the mutual information (MI) between two embeddings with certain dimensions masked, i.e., one of the given graphs and one of the corresponding subgraph of high importance induced by the explainer. We introduce a masking vector p ∈ Rd to indicate specific dimensions of embeddings on which to maximize MI. During explanation, we obtain the masking vector from the importance vector computed by any downstream explainer Tdown. As no downstream importance vector is available at training, we sample the masking vector p from a multivariate Laplace distribution due to the sparse gradient assumption, i.e., only a few dimensions are of high importance. Formally, the MI-based learning objective is
max θ
Ep[MI(p⊗ E(G),p⊗ E(Tθ(p, G)))], (1)
where MI(·, ·) computes the mutual information between two random vectors, p denotes the random masking vector sampled from a certain distribution, Tθ(p, G) computes the subgraph of high importance, and ⊗ denotes the element-wise multiplication, which applies masking to the embeddings E(·). Figure 2 outlines the training framework and objective. Intuitively, given an input graph and the desired embedding dimensions to be explained, the explainer Tθ predicts the subgraph whose
embedding shares the maximum mutual information with the original embedding on the desired dimensions.
Practically, the mutual information is intractable and is hence hard to directly compute. A common approach to achieve efficient computation and optimization is to adopt the upper bound estimations of mutual information, namely, the Jenson-Shannon Estimator (JSE) (Nowozin et al., 2016) and the InfoNCE (Gutmann & Hyvärinen, 2010). These upper bound estimations are also referred to as contrastive loss and are widely applied in self-supervised representation learning (Hjelm et al., 2019; Sun et al., 2019; Veličković et al., 2019) for both images and graphs. Adopting these estimators, the objectives are efficiently computed as
min θ
1
N N∑ i=1 log [ σ ( (p⊗ zi)T (p⊗ zi,θ) )] +
1 N2 −N ∑ i 6=j log [ 1− σ ( (p⊗ zi)T (p⊗ zj,θ) )] ,
(2)
min θ − 1 N N∑ i=1
[ log
exp{(p⊗ zi)T (p⊗ zi,θ)}∑ j 6=i exp{(p⊗ zi)T (p⊗ zj,θ)}
] , (3)
for JSE and InfoNCE, respectively, where N denotes the number of samples in a mini-batch, σ denotes Sigmoid function, zi and zi,θ are embeddings of the original graph Gi and its subgraph Tθ(Gi), or target nodes of the two graphs. Our objective involves condition vectors as masks on the embeddings, which differs from typical contrastive loss used in self-supervised representation learning. We hence call the proposed objective the conditioned contrastive loss.
To restrict the size of subgraphs given by the explainer, we additionally add a size regularization term R, computed as the averaged importance score, to the above objectives. In the case where edge importance scores wij ∈ [0, 1] are computed, the regularization term is computed as
R(G) = ∑
(vi,vj)∈E
λs|wij | − λe [wij logwij − (1− wij) log(1− wij)] , (4)
where λs and λe are hyper-parameters controlling the size and the entropy of edge importance scores, respectively.

heading: 3.3 EXPLAINER ARCHITECTURES
text: Embedding explainers. Inspired by explainer architectures used by PGExplainer, we adopt the multilayer perceptron (MLP) to predict the importance score wij for each edge (ui, uj) ∈ E, on top of learned embeddings zi and zj of the two nodes connected by the edge. Edges with scores higher than a threshold are considered as important edges that remain in the selected subgraph. In order for the embedding explainer to cooperate with different downstream explainers and provide diverse explanations for different tasks, it additionally requires a condition vector as input indicating
the specific downstream task to be explained. We handle the condition vector in a similar manner to Conditional GAN (Mirza & Osindero, 2014). Formally, the graph-level embedding explainer takes the embeddings, zi and zj , and the condition vector p as inputs and computes the importance score by
wij = MLPg ( [zi; zj ]⊗ σ(fg(p)) ) , (5)
where [·; ·] denotes the concatenation along the feature dimension, ⊗ denotes the element-wise multiplication, σ denotes the activation function, and fg : Rd → R2d is a linear projection. The node-level embedding explainer takes an additional node embedding as its input, as the explainers are expected to predict different scores for the same edge when explaining different target nodes. The formulation of computing the importance score is as follows,
wij = MLPn ( [zi; zj ; ztarget]⊗ σ(fn(p)) ) , (6)
where fg : Rd → R3d is a linear projection, and ztarget denotes the embedding of the target node whose prediction is to be explained.
Downstream explainers. We adopt the gradient-based explainer to explain the downstream models. Formally, given an input embedding z and its prediction probabilities D(z) ∈ [0, 1]C among all C classes, we compute the gradient of the maximal probability w.r.t. the input embedding:
g = ∂maxc≤C D(z)[c]
∂z ∈ R1×d,
where D(z)[c] denotes the probability for class c. To convert the gradient into the condition vector, we further perform normalization and only take positive values reflecting only positive influence to the predicted class probability, i.e., p = ReLU(norm(gT )).

heading: 4 EXPERIMENTAL STUDIES
text: We conduct two groups of quantitative studies evaluating the explanation quality and the universal explanation ability, i.e., training a single explainer to explain all downstream tasks, of TAGE. We then compare the efficiency of multiple learning-based GNN explainers in terms of training and explanation time cost. We further provide visualizations to demonstrate the explanation quality as well as the ability to explain GNN models without downstream tasks.

heading: 4.1 DATASETS
text: To demonstrate the effectiveness of the proposed TAGE on both node-level and graph-level tasks, we evaluate TAGE on three groups of real-world datasets that contain potentially multiple tasks. The datasets are described as follows and their statistics are summarized in Appendix A.
MoleculeNet. The MoleculeNet (Wu et al., 2018) library provides a collection of molecular graph datasets for the prediction of different molecule properties. In a molecular graph, each atom in the molecule is considered as a node, and each bond is considered as an edge. The prediction of molecule properties is a graph-level task. We include three graph classification tasks from MoleculeNet to evaluate the explanation of graph-level tasks: HIV, SIDER, and BACE.
Protein-Protein Interaction. The Protein-Protein Interaction (PPI) (Zitnik & Leskovec, 2017) dataset documents the physical interactions between proteins in 24 different human tissues. In PPI graphs, each protein is considered as a node with its motif and immunological features, and there is an edge between two proteins if they interact with each other. Each node in the graphs has 121 binary labels associated with different protein functions. As different protein functions are not exclusive to each other, the prediction of each protein function is considered an individual task. We utilize the first five out of 121 tasks to evaluate the explanation of node-level tasks.
E-commerce Product Network. The E-commerce Product Network (EPN)1 is constructed with subsampled, anonymized logs from an e-commerce store, where entities including buyers, products, merchants, and reviews are considered as nodes, and interactions between entities are considered as edges. We subsample the data for the sake of experimental evaluations and the dataset characteristics
1Proprietary dataset
do not mirror actual production traffic. We study the explanation of the classification of fraudulent entities (nodes), where the prediction for different types of entities are considered as individual tasks. We evaluate our framework specifically on classifications of the buyer, merchant, and review nodes.

heading: 4.2 EXPERIMENT SETTINGS AND EVALUATION METRICS
text: For each real-world dataset, we evaluate explainers on multiple downstream tasks that share a single embedding model. For consistency with industrial use cases, we perform the two-stage training paradigm to obtain GNN models to be explained. In particular, we first use unlabeled graphs to train the GNN-based embedding model in an unsupervised fashion. We then freeze the embedding model and use the learned embeddings to train individual downstream models structured as 2-layer MLPs. Specifically, for graph-level classification tasks in MoleculeNet, we employ the GNN pretraining strategy context prediction (Hu et al., 2020) to train a 5-layer GIN (Xu et al., 2019) as the embedding model on ZINC-2M (Sterling & Irwin, 2015) containing 2 million unlabeled molecules. For the node-level classification on PPI, we employ the self-supervised training method GRACE (Zhu et al., 2020) to train a 2-layer GCN (Kipf & Welling, 2017) on all 21 graphs from PPI without using labels. For the larger-scale node-level classification on EPN, we use graph autoencoder (GAE) (Kipf & Welling, 2016) to train the embedding model on sampled subgraphs of EPN. More implementation details are provided in Appendix B.
As the involved real-world datasets do not have ground truth for explanations, we follow previous studies (Pope et al., 2019; Yuan et al., 2020; 2021) to adopt a fidelity score and a sparsity score to quantitatively evaluate the explanations. Intuitively, the fidelity score measures the level of change in the probability of the predicted class when removing important nodes or edges, whereas the sparsity score measures the relative amount of important nodes or nodes associated with important edges. A formulation of the scores are provided in Appendix B. Note that compared to explanation evaluation with ground truths, the fidelity score is considered more faithful to the model, especially when the model makes incorrect predictions, in which case the explanation ground truths become inconsistent with evidence to making the wrong predictions. In practice, one needs to trade off between the fidelity score and the sparsity score by selecting the proper threshold for the importance.

heading: 4.3 QUANTITATIVE STUDIES
text: We conduct two groups of quantitatively experimental comparisons. We first demonstrate the explanation quality of individual tasks in terms of the fidelity score and the sparsity score. We do this by comparing TAGE with multiple baseline methods including non-learning-based methods GradCAM (Pope et al., 2019) and DeepLIFT (Shrikumar et al., 2017), as well as learning-based methods GNNExplainer (Ying et al., 2019) and PGExplainer (Luo et al., 2020). We do not include other optimization or search-based methods such as Monte-Carlo tree search (Jin et al., 2020) due to the
significant time cost on real-world datasets. Note that to show the effectiveness of universal explanations over different downstream tasks, we only train one embedding explainer for all tasks in a dataset, on top of which a gradient-based downstream explainer is applied to explain multiple downstream tasks. In contrast, for existing learning-based methods, we need to train multiple explainers to explain downstream tasks individually. For all methods, we vary the threshold for selecting important nodes or edges and compare how fidelity scores change over sparsity scores on each task and dataset. The results are shown in Figure 4. In particular, TAGE outperforms other learning-based explainers on BACE, SIDER, and PPI (tasks 0 and 1). For HIV and PPI (task 2), TAGE is more effective at higher sparsity levels, i.e., when fewer nodes are considered important and masked.
To justify the necessity of task-agnostic explanation and demonstrate the universal explanation ability of TAGE, we include PGExplainer as our baseline and compare the explanation quality when adopting a single explainer to explain multiple downstream tasks. For PGExplainer, we train multiple explainers on different downstream tasks and evaluate each explainer on different downstream tasks. For TAGE, we train one explainer without downstream tasks and evaluate it on different downstream tasks. Results shown in Table 2 (PPI) and Appendix D (MoleculeNet and EPN) indicate that task-specific explainers fail to generalize to different downstream tasks and hence are unable to provide universal explanations. On the other hand, the task-agnostic explainer, although trained without downstream tasks, can provide explanations with even higher quality for any downstream tasks.
GNNExplainer and PGExplainer should generally outperform task-agnostic explainers, as they are specific to data examples or tasks. This should especially be true when TAGE and PGExplainer have the same level of parameters. However, we surprisingly find that TAGE outperforms the learningbased baselines. One possible reason can be the non-injective characteristic of the downstream MLPs on top of GNNs, where different embeddings can produce similar downstream prediction results. Due to this characteristic, the learning objective of TAGE computed between embeddings brings stronger supervision than the objective computed between final predictions, as the latter objective does not guarantee consistency between embeddings or between input graphs and subgraphs.

heading: 4.4 MULTITASK EXPLANATION EFFICIENCY
text: A major advantage of the task-agnostic explanation is that it removes the need for training individual explainers, which consumes the majority of the total time cost to explain a model on a dataset. We hence evaluate the efficiency of TAGE in terms of time cost for explanation and compare it to the two learning-based explainer baselines. We record the time cost for the training and inference of different explanation methods on the same dataset and device, shown in Table 3. All results are obtained from running the explanation on the PPI dataset with 121 node classification tasks with a single Nvidia Tesla V100 GPU. Although the inference time cost of TAGE is slightly higher than that of PGExplainer, the results show TAGE costs significantly less time than GNNExplainer and PGExplainer, especially in the multitask cases (T > 1). TAGE allows the explanation of many downstream tasks within a reasonable time duration.

heading: 4.5 VISUALIZATIONS AND EXPLANATION TO EMBEDDING DIMENSIONS
text: We visualize the explanations of the three learning-based explanation methods on the BACE task, which aims to predict the inhibitor effect of molecules to human β-secretase 1 (BACE-1) (Wu et al., 2018). Additional visualizations on HIV and SIDER are also provided in Appendix E. The visualization results are shown in Figure 4. Each molecule visualization shows the top 10% important edges
(bonds) predicted by an explainer with red shadow, together with the fidelity score on the molecule. The left three columns are explanation results with the BACE downstream task. The right columns are explanations by TAGE to two specific graph embedding dimensions, without downstream models. Embedding dimensions with greater values among all are selected in the visualizations. To obtain explanations to certain embedding dimensions, we input the one-hot vectors to the embedding explainer as condition vectors. The visualization results indicate that while baseline methods select scattered edges as important, TAGE tends to select edges that form a connected substructure, which is more reasonable when explaining molecule property predictions where a certain functional group is important for the property. In addition, the right three columns indicate that dimensions in the embedding correspond to different substructures and TAGE is able to provide explanations to the dimensions without downstream tasks.

heading: 5 CONCLUSIONS
text: Existing task-specific learning-based explainers become inapplicable under real scenarios when downstream tasks or models are unavailable and suffer from inefficiency when explaining real-world graph datasets with multiple downstream tasks. We introduced TAGE, including the task-agnostic GNN explanation pipeline and the self-supervised training framework to train the embedding explainer without knowing downstream tasks or models. Our experiments demonstrate that the TAGE generally achieves higher explanation quality in terms of fidelity and sparsity with the significantly reduced explanation time cost. We discuss potential limitations and their solutions in Appendix G.
REPRODUCIBILITY STATEMENT
The experiment setting and evaluation protocol are described in Section 4. In particular, we describe how the models to be explained are trained. To further ensure reproducibility, we provide implementation details including explainer configurations, training settings, and how evaluation are performed in Appendix B. The detailed computation of the sparsity and fidelity scores are provided in Appendix C. The code to fully reproduce the results will be released upon acceptance.

heading: A DATASET STATISTICS
text: The statistics of datasets used for evaluating TAGE are shown in Table 4.
B IMPLEMENTATION DETAILS
Structure of explainer. Our implementation is based on Pytorch (Paszke et al., 2019), Pytorch Geometric (Fey & Lenssen, 2019), and Dive-into-graphs (Liu et al., 2021). We implement the explainer with a linear projection fp that maps the condition vector p to the same dimension as concatenated embeddings, and a 2-layer MLP with ReLU activation that maps concatenated embeddings with mask to the important score.
Implementation of training objectives. We adopt the Jason-Shannon Estimator as the lower bound for mutual information maximization for the two public datasets. For graph-level tasks, given a minibatch of N samples, we consider the embeddings of a graph G and its subgraph Gs as a positive pair (with N positive pairs in total), and the embeddings of a graph Gi and the subgraph Gj,s of another sample as a negative pair (with N2 − N pairs in total). For node-level tasks, we still randomly sample N nodes from the entire graph at each iteration and compute the contrastive losses on original embeddings of theN nodes, and embedding of theN nodes when the important subgraph is selected, respectively for each node. Similar to graph-level tasks, we consider embeddings of the same node (in original graph or in subgraph) as a positive pair, and a embeddings of node i in full graph and node j in selected subgraph as a negative pair (N2 −N in total). Training configurations. We set the hyperparameters in the size regularization term to λs = 0.05 and λe = 0.002, respectively. For graph-level explanation on MoleculeNet, we train the embedding explainer on ZINC-2M with learning rate 1e − 4 and mini-batch size 256 for 1 epoch. The random condition vectors are generated from laplace distribution Laplace(0, 0.2). For node-level explanation on PPI, we train the embedding explainer on PPI without labels with learning rate 5e−6 and mini-batch size 4 for 1 epoch. The random condition vectors are generated from laplace distribution Laplace(0, 0.1). For the EPN dataset, we train the embedding explainer with InfoNCE loss, learning rate 1e− 4 and mini-batch size 16. The random condition vectors are generated from laplace distribution Laplace(0, 0.25). The hyperparameters in the size regularization term are set to λs = 0.5 and λe = 0 for the stable training with InfoNCE.
Evaluation. In molecule and protein property prediction, we are usually interested in the positive samples, i.e., the existence of what substructure lead to a certain property. For learning-based baseline methods, we find it common that only one class of the two have good explanation, and the class with higher explanation quality is not necessarily the positive class. For example, PGExplainer has a near-to-zero fidelity score for the positive class of SIDER. We hence compare only the higher fidelity score among two classes for all explanation methods and datasets.

heading: C FIDELITY AND SPARSITY
text: Given a set of graphs {Gi} and node masks m predicted by the explainer, the fidelity score and the sparsity score are computed as follows.
Fidelity prob = 1
N ∑N i=1 [ f(Gi)ci − f(G1−mii )ci ] , (7)
Sparsity = 1
N ∑N i=1 |mi|/|Vi|, (8)
where N denotes the number of graphs or nodes to be explained, f denotes the GNN model associated with a specific downstream task, ci denotes the class of interest, which can be either the labeled class or the original predicted class,Gi andG1−mii denote the original graph and graph with important nodes removed, respectively. Explanations with both scores higher are better.

heading: D ADDITIONAL RESULTS FOR UNIVERSAL EXPLANATION ABILITY
text: Universal explanation performance on MoleculeNet and EPN. Evaluation results for the universal explanation ability on the MoleculeNet and EPN datasets are shown in Table 5 and Table 6, respectively.
Comparison of explanation performance when trained on different datasets. Specifically for the MoleculeNet dataset, as there is a larger unlabeled dataset, ZINC, available for the first stage training of encoder, the training of our exlainer is also performed on the ZINC dataset. For a more strict comparison with the baseline explainer who is trained on individual MoleculeNet dataset, we additional evaluate the explanation quality when the same individual MoleculeNet dataset is used to train TAGE. The results are shown in Table 7. When trained on the same datasets individually, TAGE still performs better than the baseline explainer in terms of fidelity scores. In the individual dataset case, we need to train different explainers, similarly to the training of PGExplainer, as the datasets for the four tasks are different.
Evaluation on the synthetic dataset BA-Shapes. On the BACE dataset and task, we additionally compare TAGE with another recent SOTA learning-based method GEM (Lin et al., 2021) whose explainer is trained based on the Granger causality in Table 8. Note that GEM is not originally proposed under our setting. It assumes that there is a fixed number of important nodes when performing explanation and hence the final explanation is a boolean selection of nodes. We adapt GEM to compute fidelity scores under different sparsity scores by varying the threshold when generating explanation groundtruth with Granger causality.
E VISUALIZATIONS ON HIV AND SIDER
Visualizations on HIV and SIDER are shown in Figure 5 and Figure 6, respectively.

heading: F EXPERIMENTAL STUDIES ON THE SYNTHETIC DATASETS BA-SHAPES
text: We perform an additional evaluation on the BA-Shapes synthetic datasets used in GNNExplainer Ying et al. (2019) and provided by Pytorch-Geometric (Fey & Lenssen, 2019). The synthetic dataset is less complicated compared to the real-world datasets. We train a 3-layer GCN for the node-classification with a training accuracy of 0.95. The AUC score (for importance edges) of TAGE is 0.999 compared to 0.963 and 0.925 of PGExplainer and GNNExplainer, respectively. Note that the baseline scores are from the PGExplainer paper and some re-implementations23 of PGExplainer can also achieve an AUC score of 0.999. Our purpose to show our score on BA-Shapes is to demonstrate that TAGE is on par with its baselines even when considering the typical singletask setting. Figure 7 visualizes 20 examples of explanations. TAGE is able to provide accurate explanations for all the 20 examples.

heading: G DISCUSSION OF LIMITATIONS AND POTENTIAL SOLUTIONS
text: Inductive learning of explanations. Our study focus on the setting of inductive learning of the explanation, i.e., to train the explainer on a given dataset and perform inference on new coming data. There are many work conducted under the inductive setting, such as PGExplainer. All methods under this setting may have a potential limitation that the explainer may suffer from some dataset bias when training data and the data to be explained are inconsistent. This is an interesting problem that requires further investigation. However, we believe that this is a separate problem and applies
2https://github.com/LarsHoldijk/RE-ParameterizedExplainerForGraphNeuralNetworks 3https://openreview.net/forum?id=tt04glo-VrT
to all inductive learning methods. In addition, the size of graph could be inconsistent for training and inference. To tackle this issue, we obtain the substructure by selecting top k percentage of edges according to their important scores.
Black-box explanations. Similarly to our baseline method PGExplainer, our explainer relies on node embeddings as inputs to the explainer. In particular, the node embeddings serve as representations to allow explainers identify each node. It is required by any (inductively) learning based explanations to tell neural network-based explainers which edge they are looking at. A limitation of the inductive methods is that when the node embeddings may become unavailable when explaining a black-box model. The study of explaining black-box models (where only output is available) is a different direction of study in scenarios like attacking. Many current SOTA explanation approaches, such as Grad-Cam, GNN-LRP, and PGExplainer, fail under the black-box setting. However, if one would like to adapt our approach to the black-box setting, it is still feasible by adopting a surrogate model for the black-box model and perform explanation on the surrogate model. In addition, as mentioned above, the node embeddings are mainly used to identify which node the explainer is looking at, we does not necessarily require the original embedding. When node embedding are unavailable, we can still use any representation of nodes as long as it can identify the node based on its feature and topology.

Review summaries:
The authors propose TAGE, a task-agnostic explanation method for explaining GNNs. TAGE explains GNN embedding models without downstream tasks and allows the explanation of multi-task models. This paper maximizes the mutual information of masked graph embedding and masked subgraph embedding as the objective function. The regularization term is added to restrict the number of edges. Empirical results focus on three aspects: (1) Improvement in fidelity scores brought by TAGE; (2) Visualizations on explanations to the GNN model; and (3) Comparison of computational time cost among GNN explainers. 

This paper is motivated by the fact that existing task-specific explainers are too expensive to be applied to generating explanations for a model trained for multi-tasks. They decompose the typical end-to-end learning-based GNN explainer into two parts: the embedding explainer $\mathcal{T}_{\mathcal{E}}$ and the downstream explainer $\mathcal{T}_d$ ($d$ for down).  The downstream explainer maps embeddings into importance scores $m$ for all embedding dimensions given a trained model and certain inputs. The embedding explainer is associated with the embedding model $\mathcal{E}$, which maps a given graph into a subgraph of high importance, conditioned on the embedding dimension importance.  Finally, $\mathcal{T}_{\mathcal{E}}$ is trained via a self-supervised manner, and they use a gradient explainer for $\mathcal{T}_d$. In the experiments, TAGE outperforms the SOTA explainers w.r.t fidelity, sparsity, and especially time cost. 

In this manuscript, a new explainer for GNNs is proposed. The newly proposed method aims to provide a task-agnostic explanation for the embedding GNNs rather than a specific downstream task. The motivation of the proposed method is that the modern GNNs are typically trained in a two-stage manner, where the embedding GNN is trained in the first stage and then the task-specific lightweight MLP. The proposed method is trained based on the MI between the whole graph and sub-graph generated by the explainer.