NeurIPS 2023

Distance-Restricted Folklore Weisfeiler-Leman GNNs with Provable Cycle Counting Power

Junru Zhou, Jiarui Feng, Xiyuan Wang, Muhan Zhang

Main figure for Distance-Restricted Folklore Weisfeiler-Leman GNNs with Provable Cycle Counting Power

Abstract

The ability of graph neural networks (GNNs) to count certain graph substructures, especially cycles, is important for the success of GNNs on a wide range of tasks. It has been recently used as a popular metric for evaluating the expressive power of GNNs. Many of the proposed GNN models with provable cycle counting power are based on subgraph GNNs, i.e., extracting a bag of subgraphs from the input graph, generating representations for each subgraph, and using them to augment the representation of the input graph. However, those methods require heavy preprocessing, and suffer from high time and memory costs. In this paper, we overcome the aforementioned limitations of subgraph GNNs by proposing a novel class of GNNs -- $d$-Distance-Restricted FWL(2) GNNs, or $d$-DRFWL(2) GNNs. $d$-DRFWL(2) GNNs use node pairs whose mutual distances are at most $d$ as the units for message passing to balance the expressive power and complexity. By performing message passing among distance-restricted node pairs in the original graph, $d$-DRFWL(2) GNNs avoid the expensive subgraph extraction operations in subgraph GNNs, making both the time and space complexity lower. We theoretically show that the discriminative power of $d$-DRFWL(2) GNNs strictly increases as $d$ increases. More importantly, $d$-DRFWL(2) GNNs have provably strong cycle counting power even with $d=2$: they can count all 3, 4, 5, 6-cycles. Since 6-cycles (e.g., benzene rings) are ubiquitous in organic molecules, being able to detect and count them is crucial for achieving robust and generalizable performance on molecular tasks. Experiments on both synthetic datasets and molecular datasets verify our theory. To the best of our knowledge, our model is the most efficient GNN model to date (both theoretically and empirically) that can count up to 6-cycles.

Benchmark Results

Tested on 1 dataset

Tables show presented results in global context (best 3 papers + GCN + MLP).

Classic

#ModelMAE ↓Paper
1
TIGT
0.0140 ±0.0010
2
FloydNet
0.0160
3
GSSC
0.0190 ±0.0010
7
CIN
actual #7 vs paper #8 1 place worse
0.0210 ±0.0010
best reported
actual #7 vs paper #8 1 place worse
paper 0.0220 ±0.0020

Difference within reported uncertainty; not counted as underperformance.

paper 0.0220 ±0.0020 Δ at pub 0.0010
12
I^2-GNN
0.0230 ±0.0010
This paper
26
d-DRFWL(2) GNN
0.0250 ±0.0030
This paper
34
Nested GIN
0.0290 ±0.0010
This paper
43
HIMP
0.0360 ±0.0020
This paper
50
CIN-Small
0.0440 ±0.0030
This paper
69
GIN
0.0880 ±0.0020
This paper
79
GCN
0.1130 ±0.0020
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers)