RECURSIVE NEIGHBORHOOD POOLING FOR GRAPH REPRESENTATION LEARNING

Abstract

While massage passing based Graph Neural Networks (GNNs) have become increasingly popular architectures for learning with graphs, recent works have revealed important shortcomings in their expressive power. In response, several higher-order GNNs have been proposed, which substantially increase the expressive power, but at a large computational cost. Motivated by this gap, we introduce and analyze a new recursive pooling technique of local neighborhoods that allows different tradeoffs of computational cost and expressive power. First, we show that this model can count subgraphs of size k, and thereby overcomes a known limitation of low-order GNNs. Second, we prove that, in several cases, RNP-GNNs can greatly reduce computational complexity compared to the existing higher-order k-GNN and Local Relational Pooling (LRP) networks.

1. INTRODUCTION

Graph Neural Networks (GNNs) are powerful tools for graph representation learning (Scarselli et al., 2008; Kipf & Welling, 2017; Hamilton et al., 2017) , and have been successfully used in applications such as encoding molecules, simulating physics, social network analysis, knowledge graphs, and many others (Duvenaud et al., 2015; Defferrard et al., 2016; Battaglia et al., 2016; Jin et al., 2018) . An important class of GNNs is the set of Message Passing Graph Neural Networks (MPNNs) (Gilmer et al., 2017; Kipf & Welling, 2017; Hamilton et al., 2017; Xu et al., 2019; Scarselli et al., 2008) , which follow an iterative message passing scheme to compute a graph representation. Despite the empirical success of MPNNs, their expressive power has been shown to be limited. For example, their discriminative power, at best, corresponds to the one-dimensional Weisfeiler-Leman (1-WL) graph isomorphism test (Xu et al., 2019; Morris et al., 2019) , so they cannot, e.g., distinguish regular graphs. Moreover, they also cannot count any induced subgraph with at least three vertices (Chen et al., 2020) , or learn graph parameters such as clique information, diameter, or shortest cycle (Garg et al., 2020) . Still, in several applications, e.g. in computational chemistry, materials design or pharmacy (Elton et al., 2019; Sun et al., 2020; Jin et al., 2018) , we aim to learn functions that depend on the presence or count of specific substructures. To strengthen the expressive power of GNNs, higher-order representations such as k-GNNs (Morris et al., 2019) and k-Invariant Graph Networks (k-IGNs) (Maron et al., 2019) have been proposed. k-GNNs are inspired by the k-dimensional WL (k-WL) graph isomorphism test, a message passing algorithm on k-tuples of vertices, and k-IGNs are based on equivariant linear layers of a feed-forward neural network applied to the input graph as a matrix, and are at least as powerful as k-GNN. These models are provably more powerful than MPNNs and can, e.g., count any induced substructure with at most k vertices. But, this power comes at the computational cost of at least Ω(n k ) operations for n vertices. The necessary tradeoffs between expressive power and computational complexity are still an open question. The expressive power of a GNN is often measured in terms of a hierarchy of graph isomorphism tests, i.e., by comparing it to a k-WL test. Yet, there is limited knowledge about how the expressive power of higher-order graph isomorphism tests relates to various functions of interest (Arvind et al., 2020) . A different approach is to take the perspective of specific functions that are of practical interest, and quantify a GNN's expressive power via those. Here, we focus on counting induced substructures to measure the power of a GNN, as proposed in (Chen et al., 2020) . In particular, we

annex

study whether it is possible to count given substructures with a GNN whose complexity is between that of MPNNs and the existing higher-order GNNs.To this end, we study the scheme of many higher-order GNNs (Morris et al., 2019; Chen et al., 2020) : select a collection of subgraphs of the input graph, encode these, and (possibly iteratively) compute a learned function on this collection. First, we propose a new such class of GNNs, Recursive Neighborhood Pooling Graph Neural Networks (RNP-GNNs). Specifically, RNP-GNNs represent each vertex by a representation of its neighborhood of a specific radius. Importantly, this neighborhood representation is computed recursively from its subgraphs. As we show, RNP-GNNs can count any induced substructure with at most k vertices. Moreover, for any set of substructures with at most k vertices, there is a specifiable RNP-GNN that can count them. This flexibility allows to design a GNN that is adapted to the power needed for the task of interest, in terms of counting (induced) substructures.The Local Relational Pooling (LRP) architecture too has been introduced with the goal of counting substructures (Chen et al., 2020) . While it can do so, it is polynomial-time only if the encoded neighborhoods are of size o(log(n)). In contrast, RNP-GNNs use almost linear operations, i.e., n 1+o(1) , if the size of each encoded neighborhood is n o(1) . This is an exponential theoretical improvement in the tolerable size of neighborhoods, and a significant improvement over the complexity of O(n k ) in k-GNN and k-IGN.Finally, we take a broader perspective and provide an information-theoretic lower bound on the complexity of a general class of GNNs that can provably count substructures with at most k vertices. This class includes GNNs that represent a given graph by aggregating a number of encoded graphs, where the encoded graphs are related to the given graph with an arbitrary function.In short, in this paper, we make the following contributions:• We introduce Recursive Neighborhood Pooling Graph Neural Networks (RNP-GNNs), a flexible class of higher-order graph neural networks, that provably allow to design graph representation networks with any expressive power of interest, in terms of counting (induced) substructures. • We show that RNP-GNNs offer computational gains over existing models that count substructures: an exponential improvement in terms of the "tolerable" size of the encoded neighborhoods compared to LRP networks, and much less complexity in sparse graphs compared to k-GNN and k-IGN. • We provide an information-theoretic lower bound on the complexity of a general class of GNN that can count (induced) substructures with at most k vertices.

2. BACKGROUND

Message Passing Graph Neural Networks. Let G = (V, E, X) be a labeled graph with |V| = n vertices. Here, X v ∈ X denotes the initial label of v ∈ V, where X ⊆ N is a (countable) domain. for any v ∈ V, for k iterations, and with hThe AGGREGATE/COMBINE functions are parametrized, learnable functions, and { {.} } denotes a multi-set, i.e., a set with (possibly) repeating elements. A graph-level representation can be computed aswhere READOUT is a learnable function. For representational power, it is important that the learnable functions above are injective, which can be achieved, e.g., if the AGGREGATE function is a summation and COMBINE is a weighted sum concatenated with an MLP (Xu et al. ( 2019)).

