GG-GAN: A GEOMETRIC GRAPH GENERATIVE ADVERSARIAL NETWORK

Abstract

We study the fundamental problem of graph generation. Specifically, we treat graph generation from a geometric perspective by associating each node with a position in space and then connecting edges in-between based on a similarity function. We then provide new solutions to the key challenges that prevent the widespread application of this classical geometric interpretation: (1) modeling complex relations, (2) modeling isomorphic graphs consistently, and (3) fully exploiting the latent distribution. Our main contribution is dubbed as the geometric graph (GG) generative adversarial network (GAN), which is a Wasserstein GAN that addresses the above challenges. GG-GAN is permutation equivariant and easily scales to generate graphs of tens of thousands of nodes. GG-GAN also strikes a good trade-off between novelty and modeling the distribution statistics, being competitive or surpassing the state-of-the-art methods that are either slower or that are non-equivariant, or that exploit problem-specific knowledge.

1. INTRODUCTION

Learning distributions from empirical observations is a fundamental problem in machine learning and statistics (Goodfellow et al., 2014; 2016; Salakhutdinov, 2015; Foster, 2019) . A challenging variant entails modeling distributions over graphs-discrete objects with possibly complex relational structure (Simonovsky & Komodakis, 2018; You et al., 2018; De Cao & Kipf, 2018; Liao et al., 2019; Niu et al., 2020; Yang et al., 2019) . When successfully trained, deep graph generative models carry the potential to transform a wide range of application domains, for instance by finding novel chemical compounds for drug discovery (De Cao & Kipf, 2018) , designing proteins that do not exist in nature (Huang et al., 2016) , and automatically synthesizing circuits (Guo et al., 2019) . By and large, there are four properties that a graph generator g should possess: (1) Isomorphism consistency: g should assign isomorphic graphs the same probability-a property also referred to as permutation equivariance (Niu et al., 2020; Yang et al., 2019) . ( 2) Expressive power: g should be able to model local and global dependencies between nodes and graph edges, e.g., going beyond simple degree statistics and learning structural features and motifs. (3) Scalability: g should be able to synthesize graphs with tens of thousands of vertices. (4) Novelty: g should produce non-isomorphic graphs that are similar to (but not necessarily in) the training set. Property (1) is important since there exist exponentially many ways to represent the same graph as a vector, inconsistent methods effectively waste a large portion of their capacity in describing different ways to construct the same object. Properties (2) and (3) are critical in large-scale contemporary applications that require going beyond simple degree statistics as well as learning structural features and motifs towards simultaneously modeling local and global dependencies between nodes and graph edges (You et al., 2018) . Property (4) is natural since common failure modes for graph generators include memorizing the training set and repeatedly generating the same graphs.

1.1. GEOMETRIC GRAPH GENERATION

Aiming to satisfy these properties, we propose a geometric generator that represents graphs spatially by embedding each node in a high-dimensional metric space and then by connecting two nodes if their positions are sufficiently similar. There is precedence to our approach, as spatial representations of graphs have been heavily used to construct simple models of random graphs, such as random geometric graphs, unit-disc graphs, unit-distance graphs, and graphons (Huson & Sen, 1995; Penrose et al., 2003; Bollobás et al., 2007; Lovász, 2012; Alon & Kupavskii, 2014; Glasscock, 2015) . Surprisingly, these classical geometric approaches have so far found limited adoption in the context of deep generative graph models. In fact, it is easy to verify empirically that a direct, naive application of these methods yields poor performance, requiring additional conditioning and other stabilizing procedures to train effectively (Yang et al., 2019; Serviansky et al., 2020) . Our work precisely bridges this gap, showing how deep geometric graph generation approaches can perform well. Our contributions are two-fold: I. We shed light into the fundamental limits and challenges of geometric graph generators (Section 2). We derive sufficient conditions for representing graphs spatially and demonstrate that for sparse graphs the embedding dimension can depend only logarithmically on n. We then identify challenges that arise when building powerful and isomorphism-consistent generators. Interestingly, we find that straightforward generators must solve a non-trivial collision avoidance problem for every graph. We present evidence that such generators cannot be easily trained even in simplified supervised settings. II. We avoid collisions at generation time, while retaining scalability and consistency (Section 3). We propose geometric graph generative adversarial networks (GG-GAN) with new twists. Our numerical evidence demonstrate that our proposed changes can have considerable impact on graph generation quality, and can capture complex relationships. Furthermore, GG-GAN is significantly faster that SotA (autoregressive) models, while also being competitive in terms of captured statistics and novelty. A case in point, our method can generate graphs of 10k nodes in ∼ 0.2 seconds, which is 2 orders of magnitude faster than the fastest autoregressive method within the state of the art.

1.2. RELATION TO EXISTING WORK

We argue that despite the impressive progress so far, no current approach satisfactorily meets the four aforementioned properties. Isomorphism inconsistent methods (Kipf & Welling, 2016; You et al., 2018; Bojchevski et al., 2018; De Cao & Kipf, 2018; Liao et al., 2019) tend to memorize the training set in the absence of problem-specific rewards (De Cao & Kipf, 2018) . Autoregressive variants, in particular, possess large expressive power, but are limited in scalability as they construct the graph one node or block at a time (Bojchevski et al., 2018; Li et al., 2018; You et al., 2018; Yang et al., 2019; Liao et al., 2019) . Clever optimization and exploitation of sparsity can help (Dai et al., 2020) , but only to a degree, as can be seen in our experiments. The closest methods to ours are ScoreMatch (Niu et al., 2020 ), Set2Graph (Serviansky et al., 2020) and CondGen (Yang et al., 2019) , all of which are consistent and non-autoregressive. ScoreMatch samples graphs from a learned score function via annealed Langevin dynamics, an approach that we find works well only for small graphs. CondGen combines a variational autoencoder (VAE) with a conditional GAN for improved training stability. NetGAN (Bojchevski et al., 2018) , while being a pure GAN does not operate on distributions of graphs. Instead, it learns to generate random walks on a single large graph using an autoregressive generator and then assembles the graph from these random walks. TagGen (Zhou et al., 2020 ) uses a similar model on temporal interaction graphs, but instead of learning a generator, it trains a transformer critic to score random temporal walks and then samples from them in parallel via rejection sampling and assembling the final graph. Neither model directly captures a graph distribution, but only addresses the distributions of the random walks. Our work alleviates the need for such modifications or indirect modeling, demonstrating that a pure GAN approach suffices when the generator has been set-up appropriately. Set2Graph also adopts a geometric perspective to solve partitioning, Delaunay triangulation, and convex hull problems and not to generate graphs. By identifying and solving the collision avoidance problem, our work improves the efficacy of Set2Graph-type approaches, such as ours, in implicit deep generative modeling. Notation. In the sequel, upper-case letters refer to sets, and bold-face letters denote vectors and matrices. We represent any set X = {x 1 , . . . , x n } of n points as a matrix X with each row corresponding to some point x i in arbitrary order. Functions, such as neural networks, are denoted by lower case letters, such as f, g. Every undirected weighted graph G = (V, E, w) can be defined in terms of a set of n = |V | nodes, a set of edges E with (v i , v j ) ∈ E if there exists an edge joining the i-th and j-th nodes, and a weight function w : E → R + indicating the strength of each connection. A simple graph G = (V, E) is an undirected graph without weights. Finally, the symbol S n refers to the group of permutations on [n] = (1, . . . , n). All proofs are presented in the appendix.

