When finding new drugs or materials, supervised learning problems with structured data are frequently encountered. One of the most straightforward task settings is to predict the chemical properties (e.g., the toxicity) of amolecular graph, which describes how atoms such as hydrogen and oxygen are connected through chemical bonds (Wu et al., 2018). Despite a tremendous number of different molecules, their properties often solely depend on local atomic patterns. For example, specific local patterns called functional groups in organic molecules are strong evidence for determining such chemical properties (Smith, 2020). Traditionally, this type of local information is incorporated as handcrafted features (Wiener, 1947; Todeschini and Consonni, 2009).
During the past few years, numerous studies have shown the benefit of applying a graph neural network (GNN) for molecular tasks (Duvenaud et al., 2015; Gilmer et al., 2017; Coley et al., 2019; Yang et al., 2019; Jin et al., 2018; De Cao and Kipf, 2018; Bradshaw et al., 2019)
. Currently, GNNs seem to be on track to achieve what convolutional neural networks (CNNs) accomplished for image tasks, nearly eliminating the need for handcrafted image features (e.g.,(Krizhevsky et al., 2012)). However, recent theoretical and empirical results suggest a different outcome. Although the depth is an essential factor in representation learning (Bengio et al., 2013), a GNN incurs a “curse of depth”, i.e., the performance degrades when we stack too many layers (Li et al., 2018; Xu et al., 2019; NT and Maehara, 2019; Oono and Suzuki, 2020). How this problem can be overcome with a limited number of layers remains an important issue.
In this study, we revisit the idea of designing molecule features for a GNN. As a key contribution, we propose Weisfeiler-Lehman (WL) embedding, a simple, architecture-free embedding method that explicitly leverages the local atomic patterns. In contrast to a standard atomic embedding, which assigns a continuous vector to each single atom, WL embedding constructs an embedding vector by consideringneighboring atoms, from which we aim to extract subgraph information such as functional groups (Fig. 1). Although WL embedding may generate too many embedding vectors and cause the overfitting problem, we can mitigate the problem by combining the normal embedding. In terms of representability, we show WL embedding is equivalent to the normal embedding with a single hidden ReLU layer while reducing the model complexity characterized by the weight norm, which is a key factor for better trainability. We also demonstrate that WL embedding improves the prediction performance regardless of the molecular datasets or GNN architectures applied.
Let be the space of nonnegative integer. Let be an undirected -labeled multigraph where is the set of nodes (i.e., atoms) and is the multiset of edges (i.e., chemical bonds111Bonds can have multiple types (single, double, ), but bond types are not used in the embedding. After embedding, GNNs may employ the bond type information (Schlichtkrull et al., 2017; Busbridge et al., 2019).) between nodes . Each node is associated with a discrete label . We denote by the neighboring nodes of , where multiple edges are regarded as single edges. The empty set is denoted by .
2 Related Work
GNNs and Curse of Depth
After the seminal study of graph convolutional networks (GCNs) by (Kipf and Welling, 2017), various GNN architectures have been proposed. For example, Gilmer et al. (2017) proposed a family of GNNs called message passing neural networks (MPNNs) and showed that MPNNs achieve the state-of-the-art performance for multiple molecular benchmark problems. Some researchers have proposed the use of GNNs specifically tailored for specific applications of molecular graphs (Bradshaw et al., 2019; Jin et al., 2019). For general applications, a gated graph neural network (GGNN) (Li et al., 2016) is a strong GRU-based GNN. The relational graph attention network (RelGAT) (Busbridge et al., 2019) is a representative of a non-local neural network (Wang et al., 2018), which uses multiple attention mechanisms for a set of edge types.
Along with their major successes, the limitations of GNNs have been gradually revealed. Li et al. (2018) reported an over-smoothing issue, that is, as the number of layers increases, the node representations become indistinguishable from each other. Although several studies (Li et al., 2018; Xu et al., 2019; Li et al., 2019; Zhao and Akoglu, 2020) have addressed this issue, no fundamental solution has yet been found, and particularly for molecular graphs, there are no practical deep architectures containing hundreds of layers, similar to ResNet (He et al., 2016).
WL Algorithm in Machine Learning
WL algorithm (Weisfeiler and Lehman, 1968)
is a well-adopted heuristics to identify (non-)isomorphism between graphs. The essence of the algorithm is to expand a label of each node by concatenating labels of neighboring nodes and to compare these labels between graphs (see Supplementary material for the actual procedure). The WL graph kernels(Shervashidze and Borgwardt, 2009; Shervashidze et al., 2011) adopted the idea of the WL label expansions directly as kernel features. Togninalli et al. (2018) applied the same idea to compute node representations for the graph kernels. Our study is on the same line, while we focus on GNNs instead of the graph kernels. We also extended the idea so that we can concurrently use the original labels to mitigate the sparsity problem; see the next section.
In the context of GNNs, several researchers have incorporated the idea of the WL algorithm in building new layer architectures. For example, Jin et al. (2017) and Lei et al. (2017) proposed MPNNs whose layer update rules are inspired through the mimicking of the WL kernel. Xu et al. (2019) and Morris et al. (2019) revealed that the WL algorithm has the upper bound capability of an MPNN, in terms of isomorphism testing. Based on the analysis, Xu et al. (2019) proposed Graph Isomorphism Networks (GIN) where the function in each layer is modeled by MLP. Morris et al. (2019) proposed another GNN architecture that can emulate the -dimensional WL algorithm for further capability. In contrast to these studies addressing middle-layer architectures, we incorporated the label expansion operation into the node embedding layer, the cornerstone of GNNs. WL embedding is thus combined with any of the above architectures.
Encoding graph-theoretical or chemical information of molecules into a symbolic representation, known as a molecular fingerprint, has been a central problem in computational chemistry, at least dating back to the 1940s (Wiener, 1947). Fingerprints have a wide range of applications, such as a molecular similarity search or an analysis of quantitative structure-property relationships.
Owing to the long history of fingerprint in the area of computational chemistry, many methods have been proposed (c.f., Todeschini and Consonni, 2009). Among them, extended connectivity fingerprint (ECFP) (Rogers and Hahn, 2010) is one of the most popular fingerprint approaches. It is used to extract topological information of molecular graphs by enumerating and hashing the subgraphs of a graph within a specified radius. To achieve this, it aggregates the neighboring node information and expands the labels, similar to the WL algorithm. In this sense, WL embedding shares a similar design concept with ECFP. However, to the best of our knowledge, few attempts have been made to combine extended node labels to a GNN. In addition, some variants of our method create node embeddings for the center and neighboring nodes separately, whereas ECFP does not. We later show that this modification improves the empirical predictive performance for many different tasks.
3 WL Embedding
Node embedding is the first step of GNNs, which encodes a node into a continuous node feature vector . Node embedding is implemented with embedding vectors and a hash function as
Usually, we assign the embedding vector by the node label , i.e., , which we call atomic embedding.
To incorporate the neighbouring information, we use an extended label that is a tuple of a node label and its neighbouring labels 222A multiset is a generalization of a set that can contain overlapping elements. as a hash key. Namely, inspired by WL algorithm, we extend the hash function as where is an injective map from the extended label to an integer . Now we introduce WL embedding as
Fig. 1 illustrates how WL embedding works. In contrast to atomic embedding, WL embedding makes every embedded vector of carbon and oxygen atoms distinguishable because its neighborhoods are all different. This allows GNNs to treat frequent atoms that appeared in molecules in a more detailed way.
Although the naive form of WL embedding (2) increases the representability of atoms, it may cause a sparsity problem. Namely, it may produce many extended labels that are rarely used, and learning the embedding vectors involving less-frequent atoms such as sulfur becomes more challenging with limited data.
In this paper, we propose the extensions of the naive WL idea that allows more robust and memory-efficient node embedding for molecular graph analysis. Our solution is to separate the atomic and neighbouring information into two embedding vectors and . Here, represents the atomic information, and, for example, every carbon node can share their knowledge through it. In contrast, reflects the neighboring information, which can maintain the high representability. To implement this idea, we consider two approaches.
The first approach is to combine the two embedding vectors by concatenation. We define the concatenated WL (C-WL) embedding as follows:
where is a trainable weight matrix for linearly mixing and .
Another approach is to employ a weighted interpolation betweenand , where the mixing weight is computed through a gate function. We formalize the above idea as the Gated-sum WL (G-WL) embedding defined by
where denotes the Hadamard product,
is the element-wise sigmoid function, and, are trainable parameters of gate functions .
The advantages of G-WL against naive WL are essentially the same as those of C-WL. As one difference, G-WL adopts an adaptive gate function for mixing and , whereas C-WL employs a fixed weight matrix to concatenate them. Adaptive gates allow the embedding module to tune the interpolated node embedding according to the combination of and . By contrast, parameters of the gate function require more complications of the training.
3.2 Combining with GNNs
After obtaining the node embedding , we feed them into multiple GNN layers such as MPNN layers. For example, an -layered MPNN iteratively updates the node latent vectors for each layer , where
Here, UPD(ate) and AGG(regate) are some appropriate functions (Gilmer et al., 2017). In addition, is initialized using the node embedding . The final updates of the latent vectors are denoted as . To predict a discrete or continuous target variable , we aggregate with an appropriate readout function and make prediction as .333Several authors proposed readout functions that additionally use graph topology (e.g., Ying et al. (2018)). For simplicity, we do not consider such functions. We train GNN layers, the readout function, and the embedding vectors.
3.3 Iterative Label Expansion
As with the WL algorithm, we can further extend the labels by looking up more than one-hop neighbors (e.g., neighborhoods of neighborhoods). Iterating the extensions increases the representation power because expanded labels can exploit long-distant nodes. By contrast, because the possible expanded label patterns combinatorially increase, too many extensions make the embeddings extremely sparse. In Supplemental material, we empirically investigated this trade-off using real datasets. Iterating label expansion twice improves the performance of C-WL and G-WL compared to the single iteration case, when a dataset has a large sample size. On the other hand, more iterations deteriorate the performance of the naive WL for all datasets.
The process of WL embedding, generating node representations by gathering neighboring information, looks very similar to what the single iteration of GNN update rule (10) does. So how are they different? How does it make a difference in the outcome?
To answer this question, first we investigate the representability of WL embedding. Let be a finite set of graphs with node labels and
be a GNN with a linear classifierand sum readout layer where is the representation of node created either by a GNN or WL embedding. Since the dimensionality of the input (representation) space roughly determines the capacity of a linear classifier (e.g., VC dimension; see book Mohri et al. (2018)), we check the best-possible dimensionality of a vector space spanned by .
Let be the set of GNN parameters including embedding vectors. We define the maximum dimensionality of a readout output for a graph set by .
Suppose we employ the naive WL embedding vector (2) as the node representation . Since is completely determined by its label and neighbouring labels , we can enumerate their patterns. Given a graph , let be the multiplicities of neighbouring labels where counts the number of connected nodes labeled as . Let be the number of nodes labeled as with neighbourhood pattern . The readout is then written as
(we interchangeably used the multiplicities as the multiset .) We see that
is in the linear space spanned by the embedding vectors, and its degree of freedom is maximized when all the embedding vectors are linearly independent. WL embedding immediately achieves this because by definition it can assign a unique vector for each pair. When any node in connects with at most nodes of the same label (i.e., for ), the number of the combinations of the pairs is bounded above by , which determines the maximum dimensionality.
Let be the set of graphs with node labels and label-specific maximum degree . The maximu dimensionality of WL embedding (11) is bounded as . The upper bound is achieved if the embedding dimension satisfies .
Next, suppose the node representation is given by a single GNN layer defined as
is an activation function,are label-specific weight matrices, and is the atomic embedding vector of node . GNNs defined by (12) can be seen as a restricted class of multiset-broadcasting GNNs Sato et al. (2019), including GraphSAGE Hamilton et al. (2017), GCN Kipf and Welling (2017), and GIN Xu et al. (2019). Using the same notation of (11), the readout output is written as
where , , and for . Here, is a point of the -dimensional lattice (grid) spanned by the basis . To maximize the dimensionality of , the activation function needs to map every grid point of
to a linearly independent vector. Following the strategy ofYun et al. (2018), we show the construction of such mapping with the rectifier activation. The proof is deferred to Supplementary material.
The maximum dimensionality of GNN (13) is bounded as . With the rectifier activation , the upper bound is achieved if the embedding dimension and the layer width satisfy and the norm of the parameters satisfies for .
Although Theorem 3 shows that WL embedding and the single ReLU layer have the same representation power, the condition of the parameter scale implies the realization is not efficient. The scale of the parameters444The scale increases with the number of labels and the label-specific degree because of the following reason. To assign an independent vector to each grid point, we need a layer unit that activates only by a specific point. We can create such a unit if there exists a hyperplane that only contains the point. Although we can always find such hyperplanes, their gradient is inevitably increased as the number of points increases to avoid hitting the other grid points, as shown in Figure 2 (right). is significantly larger than in a normal setting555For example, is a popular choice as the initial scale for ReLU layers (e.g. He et al. (2015)).
. Attaining such a large-scale solution is challenging for stochastic gradient descent and its variants because their implicit bias favors small-norm solutionsZhang et al. (2016); Soudry et al. (2017). Indeed, we empirically verified this. Figure 2 (left) shows that the atomic embedding with a single-layer GCN could not achieve the zero training error, showing the hardness of training (see the next section for the detailed setting).
5 Experiment: Synthetic Graphs
To examine whether WL embedding behaves as we intended, we prepare two toy tasks: label counting and subgraph detection. The label counting task is to predict the number of specific node labels, which is solvable without graph structure. The subgraph detection task is to classify whether a graph has specific subgraphs, which requires neighboring information.
We prepare datasets consisting of two types of artificial graphs: positive graphs and negative graphs. For the positive graphs, we first generate a -node regular graph of degree
and remove edges independently and randomly with probability. Then we attach one of three target subgraphs, all of which have nodes, by adding an edge to each node pair of two graphs independently randomly with probability . We adopt the generated graph if and only if it is connected, the degrees of all nodes are smaller than or equal to , and it contains exactly one of the target subgraphs. For the negative graphs, we generate a -node regular graph of degree and remove edges independently randomly with probability . We adopt the generated graph if and only if it is connected and does not include any of the target subgraphs. For both procedures, we associate one of five labels with each node of the graph independently uniformly randomly.
For each task, we generate three datasets. Each dataset has positive graphs and
negative graphs. For each pair of datasets and tasks, we conduct five runs with random initialization. All hyperparameters are manually fixed and shared in all trials. We adopt-layer nonlinear GCNs with atomic and WL embeddings for .
Figure 3 clearly shows that, while both embeddings behave mostly identically at the label counting task (Left), WL embeddings significantly outperform atomic embedding at the subgraph detection task (Right). This indicates that local structural information is actually important for node embedding, even with nonlinear activation. The results also capture the “curse of depth”. At both tasks, the performance gradually declines after two layers. Nevertheless, WL embeddings always improve the performance at the detection tasks, implying that WL embeddings somehow dispel the curse for neighborhood-sensitive tasks.
Experiments with artificial graph datasets. Averages and standard deviations of 15 trials are presented. Left: MAEs (smaller is better) of the counting tasks over the number of layers. Right: ROC-AUCs (larger is better) of the detection task over the number of layers.
6 Experiment: Molecular Benchmarks
In this section, we report our main empirical results on benchmark datasets. We compare the performances of the prediction among the aforementioned embedding techniques, combined with multiple GNN architectures. Details can be found in the supplementary material.
6.1 Datasets and Tasks
We use eight datasets in MoleculeNet (Wu et al., 2018): three for regression and five for classification. In all datasets, we used the train/validation/test data splits of a “scaffold” type, which is considered to be difficult for test predictions (Ruddigkeit et al., 2012; Ramakrishnan et al., 2014). For the graph regression tasks, we use the QM9 and the QM8 datasets from the field of quantum chemistry, and the Lipophilicity (LIPO) dataset from the field of physical chemistry. The task is to predict the associated numerical value(s) from the molecular graphs. We evaluate the performance of the models using the mean absolute errors (MAEs) over properties and molecules. For the graph classification tasks, we use the Tox21, the ToxCast and the Clintox datasets from the field of physiology, and the HIV and the MUV datasets from the field of biophysics. The task is to predict the binary label(s) from the molecular graphs. We evaluate the performance of the models using the ROC-AUC values over targets and molecules.
We tested the embedding approaches on five popular GNN models: GCN, GGNN, RelGAT, GIN, and Neural FingerPrint (NFP) (Duvenaud et al., 2015), which is a GNN-based learnable molecular fingerprint. For each GNN, we implemented the readout function described in the original paper. We employed the softmax cross-entropy loss for classification tasks and the squared loss for regression tasks. For each dataset-model pair, we optimized the following hyperparameters by using Optuna (Akiba et al., 2019) based on the validation score: the number of GNN layers , the dimension of latent hidden vectors and embedding vectors , and the of the Adam optimizer (Kingma and Ba, 2015). The other architecture-specific hyperparameters such as the MLP architecture of GIN layers were fixed throughout the study. All the experiments were repeatedly conducted with 10 different random seeds.
6.3 Main Results
Tables 1 and 2 show the generalization performance (i.e., test scores) over (datasets) (GNNs) cases. Overall, at least one of the WL embedding approaches consistently improves the generalization performance in all the cases except the Tox21-NFP pair. In particular, C-WL embedding performs better than the atomic embedding in 37 out of 40 cases. G-WL embedding and the naive WL embedding also perform better than the atomic embedding in many cases but are less stable compared to the C-WL. In addition, C-WL achieves the best test scores among four embeddings in 20 cases. These results indicate the importance of incorporating neighboring node labels into the node embedding for GNNs.
In this study, we considered the design of molecular features for GNNs. Based on the history of chemical studies, we proposed the use of WL embedding, a simple embedding method leveraging local atomic patterns. We also proposed its variants, C-WL and G-WL embeddings, which alleviate the sparsity problem that might arise in the naive WL embedding. We showed that the representation power of WL embedding is equivalent to that of atomic embedding + ReLU GNN layer while reducing the parameter scale. The efficacy of the WL embeddings, especially C-WL embedding, was presented in intensive experimental validations against multiple GNN architectures and multiple benchmark molecular graph datasets with different chemical properties.
- Akiba et al. (2019) Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2019.
- Bengio et al. (2013) Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
- Bradshaw et al. (2019) John Bradshaw, Matt J. Kusner, Brooks Paige, Marwin H. S. Segler, and José Miguel Hernández-lobato. A Generative Model for Electron Paths. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
- Breiman (2001) L. Breiman. Random Forests. Machine Learning, 45(1):5–32, 2001.
- Busbridge et al. (2019) Dan Busbridge, Dane Sherburn, Pietro Cavallo, and Nils Y Hammerla. Relational graph attention networks. arXiv preprint arXiv:1904.05811, 2019.
- Coley et al. (2019) Connor W Coley, Wengong Jin, Luke Rogers, Timothy F Jamison, Tommi S Jaakkola, William H Green, Regina Barzilay, and Klavs F Jensen. A graph-convolutional neural network model for the prediction of chemical reactivity. Chemical science, 10(2):370–377, 2019.
- De Cao and Kipf (2018) Nicola De Cao and Thomas Kipf. MolGAN: An implicit generative model for small molecular graphs. In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018.
- Duvenaud et al. (2015) David Duvenaud, Dougal Maclaurin, Jorge Aguilera-Iparraguirre, Rafael Gómez-Bombarelli, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P. Adams. Convolutional Networks on Graphs for Learning Molecular Fingerprints. In Advances in Neural Information Processing Systems 28 (Proceedings of NIPS), pages 2224–2232, 2015.
- Gilmer et al. (2017) Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural Message Passing for Quantum Chemistry. In Proceedings of the 34th International Conference on Machine Learning (ICML), pages 1263–1272, 2017.
- Hamilton et al. (2017) Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems 30 (Proceedings of NIPS), 2017.
- He et al. (2015) Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. arXiv preprint arXiv:1502.01852, 2015.
- He et al. (2016) Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In
- Hu et al. (2020) Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Strategies for pre-training graph neural neworks. In Proceedings of the 2020 International Conference on Learning Representations (ICLR), to appear, 2020. URL https://openreview.net/forum?id=HJlWWJSFDH.
- Ishiguro et al. (2019) Katsuhiko Ishiguro, Shinichi Maeda, and Masanori Koyama. Graph Warp Module: an Auxiliary Module for Boosting the Power of Graph Neural Networks in Molecular Graph Analysis. arXiv, page 1902.01020 [cs.LG], 2019.
- Jin et al. (2017) Wengong Jin, Connor W. Coley, Regina Barzilay, and Tommi Jaakkola. Predicting Organic Reaction Outcomes with Weisfeiler-Lehman Network. In Advances in Neural Information Processing Systems 30 (Proceedings of NIPS), 2017.
Jin et al. (2018)
Wengong Jin, Regina Barzilay, and Tommi Jaakkola.
Junction tree variational autoencoder for molecular graph generation.In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018.
- Jin et al. (2019) Wengong Jin, Kevin Yang, Regina Barzilay, and Tommi Jaakkola. Learning multimodal graph-to-graph translation for molecular optimizatoin. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
- Kingma and Ba (2015) Diederik P. Kingma and Jimmy Lei Ba. Adam: a Method for Stochastic Optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2015.
- Kipf and Welling (2017) Thomas N. Kipf and Max Welling. Semi-supervised Classification with Graph Convolutional Networks. In Proceedings of the 5th International Conference on Learning Representations (ICLR), 2017.
- Klicpera et al. (2020) Johannes Klicpera, Janek Groß, and Stephan Günnemann. Directional Message Passing For Molecular Graphs. In Proceedings of the 2020 International Conference on Learning Representations (ICLR), to appear, 2020. URL openreview.net/forum?id=B1eWbxStPH.
- Krizhevsky et al. (2012) Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
- Lei et al. (2017) Tao Lei, Wengong Jin, Regina Barzily, and Tommi Jaakkola. Deriving neural architectures from sequence and graph kernels. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017.
- Li et al. (2019) Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem. DeepGCNs: Can GCNs go as deep as CNNs? In Proceedings of the IEEE International Conference on Computer Vision, pages 9267–9276, 2019.
Li et al. (2018)
Qimai Li, Zhichao Han, and Xiao-ming Wu.
Deeper Insights into Graph Convolutional Networks for Semi-supervised Learning.In
Proceedings of the 32nd AAAI Conference on Artificial Intelligence (AAAI-18), 2018.
- Li et al. (2016) Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated Graph Sequence Neural Networks. In Proceedings of the 4th International Conference on Learning Representations (ICLR), 2016.
- Liu et al. (2019) Shengchao Liu, Mehmet Furkan Demirel, and Yingyu Liang Liang. N-Gram Graph: Simple Unsupervised Representation for Graphs, with Applications to Molecules. In Advances in Neural Information Processing Systems 32 (Proceedings of NeurIPS), 2019.
- Mikolov et al. (2013) Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. In Advances in Nueral Information Processing Systems 26 (Proceedings of NIPS), pages 1–9, 2013.
- Mohri et al. (2018) Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2018.
- Morris et al. (2019) Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman Go Neural: Higher-Order Graph Neural Networks. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2019.
- NT and Maehara (2019) Hoang NT and Takanori Maehara. Revisiting Graph Neural Networks: All We Have is Low-Pass Filters. arXiv, page 1905.09550 [stat.ML], 2019.
- Oono and Suzuki (2020) Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In Proceedings of the 2020 International Conference on Learning Representations (ICLR), to appear, 2020. URL openreview.net/forum?id=S1ldO2EFPr.
- Pham et al. (2017) Trang Pham, Truyen Tran, Hoa Dam, and Svetha Venkatesh. Graph Classification via Deep Learning with Virtual Nodes. arXiv, page 1708.04357v1, 2017.
- Ramakrishnan et al. (2014) Raghunathan Ramakrishnan, Pavlo O. Dral, Matthias Rupp, and O. Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1:140022, 2014.
- Rogers and Hahn (2010) David Rogers and Mathew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742–754, 2010.
- Ruddigkeit et al. (2012) Lars Ruddigkeit, Ruud van Deursen, Lorenz C. Blum, and Reymond Jean-Louis. Enumeration of 166 billion organic small molecules in the chemical universe database GDB-17. Journal of chemical information and modeling, 52(11):2864–2875, 2012.
- Sato et al. (2019) Ryoma Sato, Makoto Yamada, and Hisashi Kashima. Approximation ratios of graph neural networks for combinatorial problems. In Advances in Neural Information Processing Systems, pages 4083–4092, 2019.
- Schlichtkrull et al. (2017) Michael Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling Relational Data with Graph Convolutional Networks. arXiv, page 1703.06103v4 [stat.ML], 2017.
- Shervashidze and Borgwardt (2009) Nino Shervashidze and Karsten M Borgwardt. Fast Subtree Kernels on Graphs. In Advances in Neural Information Processing Systems 22 (Proc. NIPS), pages 1660–1668, 2009.
- Shervashidze et al. (2011) Nino Shervashidze, Pascal Schweitzer, Erick Jan van Leeuwen, Kurt Mehlhorn, and Karsten M Borgwardt. Weisfeiler-Lehman Graph Kernels. Journal of Machine Learning Research, 12:2539–2561, 2011.
- Smith (2020) Michael B Smith. March’s advanced organic chemistry: reactions, mechanisms, and structure. John Wiley & Sons, 2020.
- Soudry et al. (2017) Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. arXiv preprint arXiv:1710.10345, 2017.
- Takamoto and Izumi (2019) So Takamoto and Satoshi Izumi. TeaNet: Universal Neural Network Interatomic Potential Inspired by Iterative Electronic Relaxations. arXiv, pages 1912.01398v1 [physics.comp–ph], 2019.
- Todeschini and Consonni (2009) Roberto Todeschini and Viviana Consonni. Molecular descriptors for chemoinformatics: volume I: alphabetical listing/volume II: appendices, references, volume 41. John Wiley & Sons, 2009.
- Togninalli et al. (2018) Matteo Togninalli, Elisabetta Ghisu, Felipe Llinares-López, Bastian Rieck, and Karsten Borgwardt. Wasserstein Weisfeiler-Lehman Graph Kernels. In Advances in Neural Information Processing Systems 31 (Proceedings of NeurIPS), 2018.
- Wang et al. (2018) Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local Neural Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
- Weisfeiler and Lehman (1968) b. Weisfeiler and A. A. Lehman. A Reduction of a Graph to a Canonical Form and an Algebra Arising during this Reduction. Nauchno-Technicheskaya Informatsia, Ser. 2(9):12–16, 1968.
- Wiener (1947) Harry Wiener. Structural determination of paraffin boiling points. Journal of the American Chemical Society, 69(1):17–20, 1947.
- Wu et al. (2018) Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. MoleculeNet : A Benchmark for Molecular Machine Learning. Chemical Science, 9(2):513–530, 2018.
- Xu et al. (2019) Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How Powerful are Graph Neural Networks? In Proceedings of the 7th International Conference on Learning Representations (ICLR), 2019.
- Yang et al. (2019) Kevin Yang, Kyle Swanson, Wengong Jin, Connor Coley, Philipp Eiden, Hua Gao, Angel Guzman-Perez, Timothy Hopper, Brian Kelley, Miriam Mathea, Andrew Palmer, Volker Settels, Tommi Jaakkola, Klavs Jensen, and Regina Barzilay. Are Learned Molecular Representations Ready For Prime Time? arXiv, page 1904.01561, 2019.
- Ying et al. (2018) Rex Ying, Jiaxuan You, Christopher Morris, Xiang Ren, William L. Hamilton, and Jure Leskovec. Hierarchical Graph Representation Learning with Differentiable Pooling. In Advances in Neural Information Processing Systems 31 (Proceedings of NeurIPS), 2018.
- Yun et al. (2018) Chulhee Yun, Suvrit Sra, and Ali Jadbabaie. Small relu networks are powerful memorizers: a tight analysis of memorization capacity. arXiv preprint arXiv:1810.07770, 2018.
- Zhang et al. (2016) Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
- Zhao and Akoglu (2020) Lingxiao Zhao and Leman Akoglu. PairNorm: Tackling Oversmoothing in GNNs. In Proceedings of the 2020 International Conference on Learning Representations (ICLR), to appear, 2020. URL https://openreview.net/forum?id=rkecl1rtwB.
Appendix A Additional Related Work
a.1 Improving GNNs for Multiple Datasets and Architectures
After the seminal study of GCN [Kipf and Welling, 2017], many GNN architectures have been proposed, which introduce inductive biases suit to a dataset of interest. Unfortunately, the community still is not aware of the golden-standard GNN architecture that works fine across datasets and downstream tasks [Wu et al., 2018, Ishiguro et al., 2019]. This makes a clear contrast with ResNet [He et al., 2016] in the computer vision community. Therefore users of GNNs must choose the good GNN architecture for each dataset and downstream task.
A few researchers are interested in architecture-free techniques that improve performances of existing GNNs across several datasets and types of downstream tasks. Hu et al.  proposed a strategy for pre-training GNNs with massive unsupervised and smaller supervised datasets. In the experiments, pre-trained GNNs obtained better performances over chemical and biological graph datasets. Ishiguro et al.  developed a sub-network module that can be attached to generic MPNNs. The module bypasses neighborhood-based information propagation via a virtual super-node and gate mechanisms. The module consistently improves the performances of six different GNNs for molecular graph datasets.
We share the same goal with these works. We design the embedding so as not to fine-tune to specific a GNN architecture. Our experiments demonstrate that the proposed embedding consistently improves the performances of different GNNs for multiple molecular graph datasets.
a.2 GNNs inspired by WL algorithm
proves that the bijectivity is required for layer update functions to achieve the upper bound. The authors propose a GIN architecture where the function in each layer is modeled by Multi-layer Perceptrons.Morris et al.  proposes to emulate the -dimensional WL algorithm for further capability. As explained in the main manuscript, all of these previous works propose new GNN architecture (layer formulations) but do not attend the raw node feature representations before applying GNN layers.
a.3 Rich Atom Information
If the molecular graphs of interest provide additional features (e.g., electronic charge of an atom) other than discrete node labels, we can leverage these additional features. Some GNN studies propose to combine such features with their network architectures (e.g., [Yang et al., 2019, Pham et al., 2017]). Recently, a few GNN studies are interested in inferring the (imperfect) 3D structure of molecule graphs based on distance information between atom nodes [Takamoto and Izumi, 2019, Klicpera et al., 2020]. These approaches are orthogonal to our proposal. We can augment these GNN studies by simply concatenating the node label embedding by our proposed method as an additional feature for nodes.
a.4 Other topics
Liu et al.  proposed an interesting and unique approach for molecular graph analysis, based on the Bag of Random-walks approach. This method computes the graph representation based on the Bag of Random-walk embeddings. The embedding is based on the node representation. This method first trains the NN to compute the node embedding in an unsupervised manner. The training objective is based on the loss of CBoW [Mikolov et al., 2013] in NLP tasks. Namely, a node’s embedding vector is determined to be predictable from the neighboring nodes’ embedding vectors.
Appendix B 1-Dimensional Weisfeiler–Lehman Algorithm
The -Dimensional WL algorithm [Weisfeiler and Lehman, 1968] is a heuristic used to identify a (non-)isomorphism between two graphs, and , based on -tuples in the graphs.
The most popular algorithm is the -dimensional WL algorithm. This algorithm expands a label of each node by concatenating the labels of neighboring nodes and relabels (hash) them in a new label. The algorithm consists of three steps [Shervashidze et al., 2011, Morris et al., 2019]:
Collecting neighbor labels: For each node , labels in are collected and form a multiset of labels, .
Expanding the label: is attached to to obtain the expanded label . Namely, .
Relabeling: is relabeled by hashing : , where HASH() bijectively maps to a unique value in a label set . If first appears within the computation, the HASH augments with a new symbol that is not seen in and returns that new symbol.
Performing the above steps for all nodes in two graphs, the WL algorithm tests the following termination condition: If there is a node label that only appears in one graph, then the two graphs are not isomorphic. Otherwise, the WL algorithm repeats the above steps.
Appendix C Proof of Theorem 3
Our goal is to construct a one-to-one mapping from lattice points to linearly independent vectors. We first fix in (13) to an arbitrary number so that we can focus on the single lattice , and then we generalize the result for all . Let be a matrix whose row contains of each lattice point. Our strategy is to make triangular with non-zero diagonal elements so that all the row vectors are automatically linearly independent with sufficiently large .
Suppose we employ the -dimensional standard basis scaled by as the embedding vectors, i.e., . Now in (13) and , the basis of , are directly determined by , and , and without loss of generality we consider the parameterization instead of . Let be again the -dimensional standard basis, and we simply have for . As a weight vector, we consider so that the inner product calculates the number of in base (e.g., for when , which is equivalent to the number of the binary bits ). By using this idea, we can set the weight and the bias as
We see that the number of nonzero elements of corresponds to the number of in base and becomes upper triangular, i.e.,
where is a matrix whose -th from the bottom contains the digits of in base , i.e.,
Hence such meet our goal.
Next, we measure their scale. The -norm of is given by the sum of the squares of the sequence from to . Substituting into the formula and since is constant, we conclude that . The same thing holds for .
To generalize this for all , we can extend and as block-diagonal where each block of them contain their original contents, which keep linearly independent for all lattices.
Appendix D Dataset Specification
d.1 MoleculeNet Datasets
MoleculeNet [Wu et al., 2018] is a standard collection of molecular graph datasets. It contains several molecular datasets from four different chemical fields: quantum chemistry, physical chemistry, physiology, and biophysics.
d.1.1 Dataset Details
For the graph regression tasks, we used the QM9 dataset, the QM8 dataset, and the Lipophilicity (LIPO) dataset. QM9 is a dataset containing approximately 133K molecules with 9 types of heavy atoms. The dataset consists of 12 important numerical values (target variables) of the chemical-energetic, electronic, and thermodynamic properties, such as HOMO, LUMO, and electron gaps computed through quantum chemistry techniques. QM8 is another quantum chemical dataset containing approximately 22K molecules with eight types of heavy atoms. QM8 also consists of 12 important chemical-energetic, electronic, and thermodynamic properties; however, different quantum chemistry methods are used for the computations. The LIPO dataset contains the solubility values of roughly 4K drug molecules. This dataset is taken from the physical chemistry field. Each sample in these datasets is a pair of a molecular graph and a numerical value(s): the 12 chemical properties in the QM9 and QM8 dataset, and the solubility in the LIPO dataset. For these datasets, the task is to predict the numerical value(s) from the molecular graph. We evaluated the performance of the models using mean absolute errors (MAEs). We report the averaged MAE over 12 sub-tasks (properties) for QM9 and QM8.
For the graph classification tasks, we used the Tox21, the HIV, the ToxCast, the Clintox, and the MUV datasets. The Tox21 dataset contains approximately 8K pairs of a molecular graph and a 12-dimensional binary vector that represents the experimental outcomes of the toxicity measurements on 12 different targets. The HIV dataset contains roughly 42K pairs of a molecular graph and a binary label that represent the medicinal effect of the molecule. The ToxCast dataset contains about 8K pairs of a molecular graph and a 617-dimensional binary vector that represent the different experimental results. The Clintox dataset contains 1491 pairs of a molecular graph and two binary labels that represent the clinical toxicity and the FDA approval status. The MUV (Maximum Unbiased Validation) dataset contains 93 molecular graph samples attached with 17 labels, specifically designed for virtual screening validations. For these datasets, the task is to predict the binary label(s) from the molecular graph. The Tox21, ToxCast, and the Clintox datasets are taken from the chemical physiology field. HIV and the MUV datasets belong to the biophysics collection of MoleculeNet. For these tasks, we use ROC-AUC values as a measure of performance. We report the averaged ROC-AUC over 12 sub-tasks (targets) for Tox21, 617 sub-tasks for ToxCast, 2 sub-tasks for Clintox, and 17 sub-tasks for MUV, respectively.
d.1.2 Graph Data Representation
All real-world datasets used in our experiments are provided in the SMILES format. A SMILES format is a line notation for describing the structure of chemical compounds. We decode a SMILES molecular data into a multigraph representation of the molecule. A node in the graph corresponds to an atom. Each atom node is associated with the symbolic label of the atom name (“H”, “C”, …).
An edge in the graph corresponds to a bond between atoms. Each bond edge is associated with the bond type information (single, double, ….). The edges have connectivity information between nodes (topology), as well the bond type information.
d.1.3 Data splits
MoleculeNet provides several ways of data splitting. The “random” split is the random sample shuffling that is most familiar to the machine learning community. The “scaffold” split separate samples based on the molecular two-dimensional structure. Since the scaffold split separates structurally different molecules into different subsets, “it offers a greater challenge for learning algorithms than the random split” [Wu et al., 2018]. Throughout the paper, we adopt the scaffold split to assess the full potential of the GWM-attaching GNNs.
The actual construction of the scaffold split train/validation/test subsets has freedom of algorithm choices. We adopted the algorithm provided by the deepchem666https://deepchem.io/ library, which is the standard split algorithm for many papers.
Appendix E Model Specification
e.1 Readout Layer
In many applications of GNNs users may expect a single fixed-length vector representing the characteristics of the graph . So we add the ’readout’ layer to aggregate the node latent vectors.
The main issue in the readout unit is how to aggregate nodes, whose number varies for each graph. A simple way is to take an arithmetic average (sum) of the node representations at the -th layer, but we can also use a DNN to compute (non-linear) “average” of the node representations [Li et al., 2016, Gilmer et al., 2017]. In the experiments, we implement the readout layer that is described in the original papers of each GNN architecture.
In the main experiments, we optimize three hyperparameters. (i) : the number of layers of GNNs, (ii) : the dimension of latent hidden vectors of nodes in GNN layers, and (iii) : the step size of Adam [Kingma and Ba, 2015] optimizer.
We optimize these hyperparameters using Optuna [Akiba et al., 2019] library. Target functions to be optimized is MAE (for regression) or ROC-AUC (for classification) on the validation dataset. Tables 3,4 present the chosen , , and . The maximum of RelGAT is set to 32, to avoid the memory shortage errors.
Other hyperparameters are fixed and shared among experiemnts. We trained each GNNs for 500 epochs. The minibatch size is fixed for 128 for GCN and GGNN, and 32 for RelGAT because of the GPU memory limits. All models were trained with Adam[Kingma and Ba, 2015], , and .
|LIPO||Atomic||(110, 3, 0.0017)||(16, 4, 0.0022)||(37, 3, 0.0091)||(81, 3, 0.0015)||(53, 5, 0.0062)|
|Naive WL||(124, 2, 0.0018)||(21, 3, 0.0038)||(52, 2, 0.013)||(37, 2, 0.0064)||(176, 5, 0.00095)|
|C-WL||(188, 2, 0.00016)||(23, 4, 0.0026)||(45, 5, 0.0032)||(17, 2, 0.0016)||(233, 2, 0.00017)|
|G-WL||(164, 2, 0.0015)||(21, 4, 0.0034)||(45, 4, 0.0080)||(39, 3, 0.0014)||(232, 5, 0.00041)|
|QM9||Atomic||(140, 2, 0.00031)||(41, 4, 0.0022)||(232, 5, 0.00029)||(256, 4, 0.00016)||(135, 6, 0.00049)|
|Naive WL||(234, 2, 0.00047)||(205, 3, 0.00069)||(254, 6, 0.00018)||(214, 2, 0.00032)||(73, 5, 0.00081)|
|C-WL||(253, 2, 0.00020)||(56, 3, 0.0021)||(248, 6, 0.00014)||(255, 2, 0.00014)||(162, 5, 0.00035)|
|G-WL||(229, 3, 0.00011)||N.A.||(237, 6, 0.00035)||(167, 2, 0.00055)||(256, 6, 0.00034)|
|QM8||Atomic||(148, 5, 0.00096)||(32, 4, 0.0014)||(122, 5, 0.00097)||(253, 2, 0.00023)||(253, 5, 0.00033)|
|Naive WL||(93, 4, 0.0021)||(88, 6, 0.00056)||(174, 4, 0.0013)||(137, 2, 0.00028)||(139, 5, 0.00015)|
|C-WL||(137, 5, 0.00011)||(58, 5, 0.00097)||(150, 3, 0.0010)||(300, 2, 0..00023)||(162, 6, 0.00024)|
|G-WL||(254, 5, 0.00023)||(16, 3, 0.0018)||(277, 2, 0.0013)||(86, 3, 0.00018)||(255, 5, 0.000049)|
|Tox21||Atomic||(22, 4, 0.00024)||(15, 3, 0.0027)||(32, 3, 0.0018)||(126, 4, 0.0012)||(66, 2, 0.0011)|
|Naive WL||(112, 2, 0.000088)||(22, 4, 0.00042)||(52, 2, 0.0029)||(29, 2, 0.012)||(119, 2, 0.0057)|
|C-WL||(235, 3, 0.0023)||(14, 2, 0.000054)||(27, 3, 0.0055)||(49, 5, 0.0027)||(80, 3, 0.0039)|
|G-WL||(51, 4, 0.0020)||(7, 2, 0.0084)||(75, 4, 0.0090)||(55, 4, 0.00036)||(78, 4, 0.0091)|
|HIV||Atomic||(105, 4, 0.00022)||(6, 2, 0.0097)||(23, 2, 0.0025)||(74, 2, 0.00021)||(56, 4, 0.0031)|
|Naive WL||(50, 5, 0.0030)||(16, 4, 0.0020)||(27, 4, 0.000042)||(28, 2, 0.00041)||(230, 3, 0.000016)|
|C-WL||(86, 6, 0.0011)||(20, 3, 0.000065)||(45, 2, 0.0017)||(19, 2, 0.0031)||(57, 3, 0.0020|
|G-WL||(43, 4, 0.0016)||(5, 3, 0.000053)||(110, 3, 0.0027)||(42, 2, 0.0018)||(39, 2, 0.00020)|
|ToxCast||Atomic||(177, 3, 0.000017)||(20, 3, 0.0068)||(30, 4, 0.0021)||(80, 3, 0.0024)||(121, 2, 0.0020)|
|Naive WL||(73, 2, 0.00020)||(17, 3, 0.00079)||(71, 5, 0.0028)||(25, 3, 0.019)||(25, 2, 0.0022)|
|C-WL||(103, 5, 0.00039)||(20, 3, 0.0050)||(128, 4, 0.0046)||(64, 3, 0.0052)||(79, 2, 0.00035)|
|G-WL||(80, 2, 0.0037)||(15, 3, 0.0110)||47, 2, 0.0153)||(81, 4, 0.00016)||(185, 2, 0.0020)|
|clintox||Atomic||(135, 5, 0.0034)||(4, 3, 0.014)||(92, 5, 0.0040)||(34, 3, 0.0046)||(17, 4, 0.0094)|
|Naive WL||(99, 4, 0.00049)||(11, 3, 0.078)||(19, 6, 0.0031)||(38, 5, 0.0029)||(49, 3, 0.032)|
|C-WL||(74, 3, 0.00063)||(5, 3, 0.036)||(24, 4, 0.0060)||(124, 3, 0.0015)||(131, 2, 0.0021)|
|G-WL||(71, 4, 0.021)||(6, 2, 0.020)||(75, 5, 0.00076)||(102, 6, 0.010)||(135, 5, 0.021)|
|muv||Atomic||(36, 3, 0.00021)||(8, 4, 0.0012)||(50, 5, 0.00041)||(214, 4, 0.000021)||(28, 5, 0.0017)|
|Naive WL||(55, 3, 0.00064)||(11, 3, 0.0018)||(148, 2, 0.00013)||(104, 2, 0.000086)||(178, 3, 0.000065)|
|C-WL||(102, 3, 0.00011)||(22, 4, 0.00053)||(154, 5, 0.000016)||(101, 3, 0.000018)||(55, 5, 0.00034)|
|G-WL||(143, 3, 0.000076)||(22, 3, 0.0012)||(24, 3, 0.0012)||(20, 4, 0.000015)||(169 5, 0,00019)|
Appendix F Full Results on Molecular Graph Experiments
Appendix G Additional Experiment Result
g.1 Empirical assessment of difficulty of recoverng WLE with atomic embedding + GNN layer
In order to support our theoretical analysis in Sec.4, we empirically study whether one non-linear GNN layer (with a large unit size) plus the atomic embedding can extract the information similar to the WLE.
In this experiment, the atomic embedding is followed by a single layer of nonlinear GNN (more specifically, GCN [Kipf and Welling, 2017]) and the readout layer. In contrast, we apply no GNN layers after the three WLEs (naive, C-WL, and G-WL): we directly apply the readout to the WL embedding vectors.
The ROC-AUC evolution over the dimension of the GCN hidden vectors (for atomic embedding) is presented in Fig. 4. As the figure shows, the GCN with atomic embedding never achieves the AUCs comparable to the WLEs, regardless of the hidden vectors’ dimension. The evolution of the training losses are presented in Fig. 2 of the main manuscript. It is notable that the atomic embedding network cannot decrease the training loss as small as those of WLEs, regardless of the model complexity (hidden dimensions). These results indicate that it is very difficult to emulate WLE-like features by typical MPNNs plus atomic embeddings.
g.2 Analysis of Learned WL Embedding
In this section, we investigate how WL embedding affects to the representation learning in GNNs. As a particular example, we pick up the combination of C-WL embedding and GCN.
g.2.1 Visualization of Learned Weight
We examine the contributions of the atomic embedding vectors and the neighboring embedding vectors in Eq. 3 based on the weight matrix , which we expect to indicate the importance of the embedding vectors by its scale. The left half of corresponds to and the right half of corresponds to . To eliminate the scale invariance between the embedding vectors and the weight, we normalize and and rescale .
Fig. 5 visualizes the absolute values of trained with the QM9 and Tox21 datasets, with which WL embedding made large improvements. The visualization clearly depicts that the weight element for is more active than that for .
Fig. 6 shows the weight matrix of the QM8 dataset and the HIV dataset, where we observe smaller performance improvements by C-WL embedding. We note that the C-WL embedding never zero-suppress weights for , even if we do not achieve large improvements in downstream task performance. The embedding tries to find a good balance between original atom labels and neighboring labels, and this contributes slightly to the downstream tasks.
g.2.2 Importance of Neighboring Labels
Next, we quantitatively analyze the importance of neighboring labels. We employ node label shuffling inspired by the permutation (feature) importance [Breiman, 2001]. First, we train GNNs with the C-WL embedding in a usual manner. After training, we randomly choose a node for each sample in a test dataset and change its node label or neighboring label to a different label. Therefore, if some specific labels are critically important, the shuffling of them will seriously degrade the prediction performance.
We manipulate the label in two ways: Atom shuffle and Neighboring Label (NL) shuffle. The Atom shuffle replaces the node label by the pseudo one , while the NL shuffle replaces the neighbor label with . Formally, we overwrite embeddings as follows:
We compute pseudo labels and so that they are different from and , respectively.
From the results (Table 7), we observe that the NL Shuffle has a larger impact on performances than the Atom shuffle in all datasets. It implies that the neighboring labels are considered as informative cues for molecule property predictions in WL embedding-based GNNs.
|Dataset||No Shuffle||Atom Shuffle||NL Shuffle|
g.3 Iterative Label Expansion
We empirically evaluate how the iterative label expansion discussed in Section 3.3 affects the model performance. Table 8 shows the performance of models with the number of label expansion iterations varying from to . We use a GCN as a base GNN. All experiment settings are the same as described in Section 6.2, except that we conduct a hyperparameter optimization for every run. We present the result for the QM9, QM8, and the Tox21 dataset.
The results for the QM9 dataset (Table 8) indicate a trade-off of the representation power and model complexity. For the naive WL embedding, we observe that a performance steadily degrades while increasing the number of iterations . Notably, the case is significantly worse than that of . The increased number of expanded labels makes the input feature vectors significantly sparse when (for the QM9 dataset, for while for ).
For C-WL and G-WL embedding, works better than . As described in Section 3.1, naive WL embedding maps different expanded labels at completely different points even if their original labels are the same. This does not hold for the C-WL and the G-WL embedding thanks to the separated and . Therefore, we hypothesize that C-WL and G-WL are more robust to the explosion of extended label patterns than naive WL. In addition, we can infer that the large sample size and the complexity of the QM9 dataset may prevent C-WL and G-WL embedding with from overfitting. In fact, we observe that achieves better results for C-WL and G-WL for the QM8 dataset (Table 9), which has a smaller sample size.
Table 10 shows the model performances, including correct G-WL, using the Tox21 dataset for various of number of iterations.