IEEE Computational Intelligence Magazine - February 2021 - 103
the StellarGraph library for GNNs
which, like Spektral, is based on Keras.
This library implements six messagepassing layers, four of which are available in Spektral (GCN, GraphSAGE,
GAT and APPNP), but does not offer
pooling layers and relies on a custom
format for graph data, which limits
flexibility. Finally, the graph_nets
package9 implements Graph Networks
as proposed by Battaglia et al. [1]. However, the package is not a full library for
GNNs and only offers a general interface that users can extend.
Spektral is currently the most feature-rich library for GNNs in TensorFlow. The extensive collection of
examples and tutorials, the Keras integration, and the transparent handling
of different data modes make it
extremely easy for new users to familiar ize with GNNs, while its good
computational performance and variety of available methods make Spektral a sensible choice even for
advanced use cases.
mental settings described in the original
papers, but we use the random data
splits suggested by Shchur et al. [51] for
a fairer evaluation.
To evaluate the pooling layers, DiffPool
[29], MinCut [31], Top-K [30], and
SAGPool [41], we consider a task of
graph-level classification, where each
graph represents an individual sample
to be classified. We use four datasets
from the Benchmark Data Sets for
Graph Kernels: Proteins, IMDB-Binary,
Mutag and NCI1. Here, we adopt a
fixed GNN architecture (described in
Appendix A) where we only change
the pooling method. To assess whether
each pooling layer is actually beneficial
for learning a representation of the data,
we also evaluate the same GNN without pooling (Flat).
quantum molecular properties using
the QM9 database of small molecules.
We train a GNN on four different continuous targets for graph-level regression: dipole moment (Mu), isotropic
polar izability (Alpha), energy of
HOMO (Homo), and internal energy
at OK (U0).
Since the molecules in QM9 have
attributed edges, we adopt a GNN
based on ECC, which is designed to
integrate edge attributes in the messagepassing operation. We note that the
architecture used for this experiment is
significantly smaller and simpler than the
current state of the art [52], and that
these results are only meant to show a
comparison between the different global
pooling methods, rather than replicating
the exact performance figures of other
works (which may be significantly different than what we report).
C. Graph Regression
D. Results
To evaluate the global pooling methods, we consider the task of predicting
The results for each experiment are
reported in Tables II, III, and IV. In the
B. Graph Classification
IV. Applications
In this section, we report some experimental results on several well-known
benchmark tasks, in order to provide a
high-level overview of how the different
methods implemented by Spektral perform in a standard research use case scenario. We report the results for three
main settings: a node classification task
and two tasks of graph-level property
prediction, one of classification and one
of regression. All experimental details are
reported in Appendix A.
A. Node Classification
In our first experiment, we consider a
task of semi-supervised node classification on the Cora, CiteSeer, and Pubmed
citation networks. In these datasets,
nodes represent text documents and the
undirected edges represent citations. The
task consists of classifying the documents
into a finite number of subject areas. We
evaluate GCN [22], ChebNet [21],
ARMA [26], GAT [24] and APPNP
[28]. We reproduce the same experi9
https://github.com/deepmind/graph_nets
TABLE I Comparison of different GNN libraries. The Framework column indicates
the backend framework supported by the library, while the MP and Pooling
columns indicate the number of different message-passing and pooling layers
implemented by the library, respectively.
LIBRARY
FRAMEWORK
MP
POOLING
Spektral
TensorFlow
15
10
PyG
PyTorch
28
14
DGL
PyTorch, others
15
7
graph_nets
TensorFlow
1
N/A
StellarGraph
TensorFlow
6
N/A
TABLE II Classification accuracy on the node classification tasks.
Dataset
ChebNet
GCN
GAT
ARMA
APPNP
CORA
77.4 ± 1.5
79.4 ± 1.3
82.0 ± 1.2
80.5 ± 1.2
82.8 ± 0.9
CITESEER
68.2 ± 1.6
68.8 ± 1.4
70.0 ± 1.0
70.6 ± 0.9
70.0 ± 1.0
PUBMED
74.0 ± 2.7
76.6 ± 2.5
73.8 ± 3.3
77.2 ± 1.6
78.2 ± 2.1
TABLE III Classification accuracy on the graph classification tasks.
Dataset
Flat
MinCut
DiffPool
Top-K
SAGPool
Proteins
74.3 ± 4.5
75.5 ± 2.0
74.1 ± 3.9
70.5 ± 3.4
71.3 ± 5.0
IMDB-B
72.8 ± 7.2
73.6 ± 5.4
70.6 ± 6.6
67.7 ± 8.2
69.3 ± 5.7
Mutag
72.5 ± 14.0
81.4 ± 10.7
83.5 ± 9.7
79.2 ± 8.0
78.5 ± 8.3
NCI1
77.3 ± 2.6
74.4 ± 1.9
71.1 ± 3.0
72.0 ± 3.0
69.4 ± 8.4
FEBRUARY 2021 | IEEE COMPUTATIONAL INTELLIGENCE MAGAZINE
103
https://github.com/deepmind/graph_nets
IEEE Computational Intelligence Magazine - February 2021
Table of Contents for the Digital Edition of IEEE Computational Intelligence Magazine - February 2021
IEEE Computational Intelligence Magazine - February 2021 - Cover1
IEEE Computational Intelligence Magazine - February 2021 - Cover2
IEEE Computational Intelligence Magazine - February 2021 - 1
IEEE Computational Intelligence Magazine - February 2021 - 2
IEEE Computational Intelligence Magazine - February 2021 - 3
IEEE Computational Intelligence Magazine - February 2021 - 4
IEEE Computational Intelligence Magazine - February 2021 - 5
IEEE Computational Intelligence Magazine - February 2021 - 6
IEEE Computational Intelligence Magazine - February 2021 - 7
IEEE Computational Intelligence Magazine - February 2021 - 8
IEEE Computational Intelligence Magazine - February 2021 - 9
IEEE Computational Intelligence Magazine - February 2021 - 10
IEEE Computational Intelligence Magazine - February 2021 - 11
IEEE Computational Intelligence Magazine - February 2021 - 12
IEEE Computational Intelligence Magazine - February 2021 - 13
IEEE Computational Intelligence Magazine - February 2021 - 14
IEEE Computational Intelligence Magazine - February 2021 - 15
IEEE Computational Intelligence Magazine - February 2021 - 16
IEEE Computational Intelligence Magazine - February 2021 - 17
IEEE Computational Intelligence Magazine - February 2021 - 18
IEEE Computational Intelligence Magazine - February 2021 - 19
IEEE Computational Intelligence Magazine - February 2021 - 20
IEEE Computational Intelligence Magazine - February 2021 - 21
IEEE Computational Intelligence Magazine - February 2021 - 22
IEEE Computational Intelligence Magazine - February 2021 - 23
IEEE Computational Intelligence Magazine - February 2021 - 24
IEEE Computational Intelligence Magazine - February 2021 - 25
IEEE Computational Intelligence Magazine - February 2021 - 26
IEEE Computational Intelligence Magazine - February 2021 - 27
IEEE Computational Intelligence Magazine - February 2021 - 28
IEEE Computational Intelligence Magazine - February 2021 - 29
IEEE Computational Intelligence Magazine - February 2021 - 30
IEEE Computational Intelligence Magazine - February 2021 - 31
IEEE Computational Intelligence Magazine - February 2021 - 32
IEEE Computational Intelligence Magazine - February 2021 - 33
IEEE Computational Intelligence Magazine - February 2021 - 34
IEEE Computational Intelligence Magazine - February 2021 - 35
IEEE Computational Intelligence Magazine - February 2021 - 36
IEEE Computational Intelligence Magazine - February 2021 - 37
IEEE Computational Intelligence Magazine - February 2021 - 38
IEEE Computational Intelligence Magazine - February 2021 - 39
IEEE Computational Intelligence Magazine - February 2021 - 40
IEEE Computational Intelligence Magazine - February 2021 - 41
IEEE Computational Intelligence Magazine - February 2021 - 42
IEEE Computational Intelligence Magazine - February 2021 - 43
IEEE Computational Intelligence Magazine - February 2021 - 44
IEEE Computational Intelligence Magazine - February 2021 - 45
IEEE Computational Intelligence Magazine - February 2021 - 46
IEEE Computational Intelligence Magazine - February 2021 - 47
IEEE Computational Intelligence Magazine - February 2021 - 48
IEEE Computational Intelligence Magazine - February 2021 - 49
IEEE Computational Intelligence Magazine - February 2021 - 50
IEEE Computational Intelligence Magazine - February 2021 - 51
IEEE Computational Intelligence Magazine - February 2021 - 52
IEEE Computational Intelligence Magazine - February 2021 - 53
IEEE Computational Intelligence Magazine - February 2021 - 54
IEEE Computational Intelligence Magazine - February 2021 - 55
IEEE Computational Intelligence Magazine - February 2021 - 56
IEEE Computational Intelligence Magazine - February 2021 - 57
IEEE Computational Intelligence Magazine - February 2021 - 58
IEEE Computational Intelligence Magazine - February 2021 - 59
IEEE Computational Intelligence Magazine - February 2021 - 60
IEEE Computational Intelligence Magazine - February 2021 - 61
IEEE Computational Intelligence Magazine - February 2021 - 62
IEEE Computational Intelligence Magazine - February 2021 - 63
IEEE Computational Intelligence Magazine - February 2021 - 64
IEEE Computational Intelligence Magazine - February 2021 - 65
IEEE Computational Intelligence Magazine - February 2021 - 66
IEEE Computational Intelligence Magazine - February 2021 - 67
IEEE Computational Intelligence Magazine - February 2021 - 68
IEEE Computational Intelligence Magazine - February 2021 - 69
IEEE Computational Intelligence Magazine - February 2021 - 70
IEEE Computational Intelligence Magazine - February 2021 - 71
IEEE Computational Intelligence Magazine - February 2021 - 72
IEEE Computational Intelligence Magazine - February 2021 - 73
IEEE Computational Intelligence Magazine - February 2021 - 74
IEEE Computational Intelligence Magazine - February 2021 - 75
IEEE Computational Intelligence Magazine - February 2021 - 76
IEEE Computational Intelligence Magazine - February 2021 - 77
IEEE Computational Intelligence Magazine - February 2021 - 78
IEEE Computational Intelligence Magazine - February 2021 - 79
IEEE Computational Intelligence Magazine - February 2021 - 80
IEEE Computational Intelligence Magazine - February 2021 - 81
IEEE Computational Intelligence Magazine - February 2021 - 82
IEEE Computational Intelligence Magazine - February 2021 - 83
IEEE Computational Intelligence Magazine - February 2021 - 84
IEEE Computational Intelligence Magazine - February 2021 - 85
IEEE Computational Intelligence Magazine - February 2021 - 86
IEEE Computational Intelligence Magazine - February 2021 - 87
IEEE Computational Intelligence Magazine - February 2021 - 88
IEEE Computational Intelligence Magazine - February 2021 - 89
IEEE Computational Intelligence Magazine - February 2021 - 90
IEEE Computational Intelligence Magazine - February 2021 - 91
IEEE Computational Intelligence Magazine - February 2021 - 92
IEEE Computational Intelligence Magazine - February 2021 - 93
IEEE Computational Intelligence Magazine - February 2021 - 94
IEEE Computational Intelligence Magazine - February 2021 - 95
IEEE Computational Intelligence Magazine - February 2021 - 96
IEEE Computational Intelligence Magazine - February 2021 - 97
IEEE Computational Intelligence Magazine - February 2021 - 98
IEEE Computational Intelligence Magazine - February 2021 - 99
IEEE Computational Intelligence Magazine - February 2021 - 100
IEEE Computational Intelligence Magazine - February 2021 - 101
IEEE Computational Intelligence Magazine - February 2021 - 102
IEEE Computational Intelligence Magazine - February 2021 - 103
IEEE Computational Intelligence Magazine - February 2021 - 104
IEEE Computational Intelligence Magazine - February 2021 - 105
IEEE Computational Intelligence Magazine - February 2021 - 106
IEEE Computational Intelligence Magazine - February 2021 - 107
IEEE Computational Intelligence Magazine - February 2021 - 108
IEEE Computational Intelligence Magazine - February 2021 - Cover3
IEEE Computational Intelligence Magazine - February 2021 - Cover4
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202311
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202308
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202305
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202302
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202211
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202208
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202205
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202202
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202111
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202108
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202105
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202102
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202011
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202008
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202005
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_202002
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201911
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201908
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201905
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201902
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201811
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201808
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201805
https://www.nxtbook.com/nxtbooks/ieee/computationalintelligence_201802
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring17
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring16
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring15
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring14
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_summer13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_spring13
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_winter12
https://www.nxtbook.com/nxtbooks/ieee/computational_intelligence_fall12
https://www.nxtbookmedia.com