
various sizes. Therefore, the learned prototype graphs of class cyclic
can provide class-level explanation to show representative graphs of
class cyclic. For a test graph
G𝑡
, we will match it with the prototype
graphs of each class to give the prediction. Specically, the instance-
level explanation for predicting
G𝑡
can be: “Graph
G𝑡
is classied
as cyclic, because it is most similar to the second prototype graph
of class cyclic." Though promising, learning representative graphs
for self-explainable classication remains an open problem.
Therefore, in this work,we investigate a novel problem of learn-
ing prototype-based self-explainable graph neural network. How-
ever, this is a non-trivial task. There are two main challenges: (
i
)
how to eciently learn high-quality prototypes that are representa-
tives of each class for class-level explanation. Though some existing
works [
6
,
21
] have studied prototype learning for self-explanations,
they are mainly proposed for i.i.d data. Recently, ProtGNN [
45
]
applies a Monte Carlo tree search to identify subgraphs from raw
graph as prototypes. However, the search algorithm is very time
consuming. And the prototypes are limited to the subgraphs in
the dataset, which might not be that representative; and (
ii
) how
to simultaneously give an accurate prediction and provide correct
prototype-based instance-level explanation. Dierent from images,
the matching process between the test graph and prototype graphs
cannot directly use simple metric such as Euclidean distance. More-
over, the supervision of the matching result is not available. How
to eectively leverage the classication supervision for prototype
learning and correct explanations needs further investigation.
In an attempt to address the above challenges, we develop a
novel
P
rototype-Based Self-E
x
plainable
GNN
(PxGNN)
1
. To e-
ciently obtain the prototype graphs, PxGNN adopts a prototype
graph generator to attain the prototype graphs from the learnable
prototype embeddings. A constraint on the learnable prototype
embeddings and self-supervision from graph reconstruction are
utilized to guarantee the quality of learned prototype embeddings
and generated prototype graphs, respectively. An encoder is de-
ployed to match the test graph with the generated prototype graphs
for self-explainable classication. Since representative prototype
graphs of a certain class is supposed to be similar to the test graphs
in the same class, the labels can provide implicit supervision to
ensure the representativeness of the prototype graphs and guide
the matching process. More specically, a novel classication loss is
proposed to simultaneously ensure the accuracy of prediction and
the quality of prototype-based instance-level explanation. And the
classication loss is utilized to jointly train the model and prototype
embeddings to learn prototypes well represent their corresponding
classes. In summary, our main contributions are:
•
We investigate a novel problem of learning prototype graphs for
self-explainable classication on graph-structured data;
•
We develop a new framework PxGNN, which learns an eective
prototype generator with self-supervision to obtain high-quality
prototype graphs for accurate predictions and explanations;
•
We construct a synthetic dataset which can quantitatively evalu-
ate the prototype-base explanation; and
•
Extensive experiments on both real-world and synthetic datasets
demonstrate the eectiveness of our PxGNN in learning repre-
sentative prototypes for accurate self-explainable classication.
1Code and datasets will be released upon acceptance
2 RELATED WORK
2.1 Graph Neural Networks
Graph Neural Networks (GNNs) [
4
,
17
,
31
,
37
] have shown great
ability for representation learning on graphs, which facilitate var-
ious applications such as trac analysis [
46
], recommendation
system [
37
], and drug generation [
4
]. Generally, existing GNNs [
7
–
9
,
12
,
17
,
19
,
31
,
36
] utilize a message-passing mechanism that a
node’s representation is updated by aggregating and combining the
features from its neighbors. For example, GCN [
17
] averages the
representations of neighbors and the target node followed by an
non-linear transformation. GAT [
31
] adopts an attention mecha-
nism to better aggregate the representations of the nodes from the
neighbors. Recently, various GNN models are proposed to further
improve the performance of GNNs [
7
,
8
,
16
,
20
,
26
,
39
,
47
]. For in-
stance, FastGCN [
7
] is proposed to alleviate the scalability issue of
GCN. In addition, some methods [
8
,
20
] focus on overcoming the
oversmoothing issue of GCN and design deep GNNs to incorporate
more hops of neighbors. Moreover, to facilitate the downstream
tasks that are short of labels, self-supervised GNNs [
16
,
26
,
39
,
47
]
are investigated to learn better representations.
2.2 Explainability of Graph Neural Networks
Despite the great success of graph neural networks, the problem
of lacking explainability hinders the adoption of GNNs to various
high-stake domains such as credit estimation. Though extensive
methods [
1
,
11
,
13
,
29
,
40
,
44
] have been proposed to explain neural
networks, they are overwhelmingly developed for i.i.d data such
as images and texts and cannot be directly applied to explain GNN
models. Recently, some works in explainability of GNNs are emerg-
ing [
3
,
10
,
22
,
25
,
38
,
41
]. The majority of these GNN explainers
give the explanations by extracting the crucial nodes, edges, and/or
node features. For instance, GNNExplainer [
38
] learns soft masks
for edges and node features to explain the predictions with the
identied subgraphs and features. PGExplainer [
22
] proposes to
combine the global view of GNNs to facilitate the extraction of im-
portant graphs by applying a parameterized explainer. XGNN [
41
]
generates representative graphs for a class as model-level explana-
tions for graph classication.
However, the aforementioned methods focus on post-hoc ex-
planations for a trained GNN, i.e., they usually require additional
explainer to explain the target GNN, which might misrepresent the
decision reasons of the model. There are very few initial eorts
for self-explainable GNNs [
10
,
45
], which aims to simultaneously
give predictions and explanations on the predictions. SE-GNN [
10
]
simultaneously give the predictions and explanations of a target
node by identifying the K-nearest labeled nodes. ProtGNN [
45
] is
the most similar work to ours, which nds subgraphs from the raw
graphs as prototypes to give self-explanations. However, ProtGNN
only focuses on graph classication and the computational cost
is very large due to the searching phase in nding the prototype
subgraphs. Our proposed method is inherently dierent from this
work: (
i
) we propose a novel prototype-based self-explainable GNN
that is eective in both node and graph-level classication tasks;
(
ii
) a prototype generator is deployed to eciently learn more
representative prototypes for self-explainable classication.