Towards Invariance to Node Identifiers in Graph Neural Networks
Organizations: Blavatnik School of Computer Science, Tel-Aviv University · Meta · Department of Applied Mathematics and Theoretical Physics, University of Cambridge · Department of Bio-Medical Engineering , Tel-Aviv University ·
Abstract
Message-Passing Graph Neural Networks (GNNs) are known to have limited expressive power, due to their message passing structure. One mechanism for circumventing this limitation is to add unique node identifiers (IDs), which break the symmetries that underlie the expressivity limitation. In this work, we highlight a key limitation of the ID framework, and propose an approach for addressing it. We begin by observing that the final output of the GNN should clearly not depend on the specific IDs used. We then show that in practice this does not hold, and thus the learned network does not possess this desired structural property. Such invariance to node IDs may be enforced in several ways, and we discuss their theoretical properties. We then propose a novel regularization method that effectively enforces ID invariance to the network. Extensive evaluations on both real-world and synthetic tasks demonstrate that our approach significantly improves ID invariance and, in turn, often boosts generalization performance.
Figures & tables
| GraphConv | GIN | GAT | TransformerConv | GraphGPS | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DATASET | SPLIT | RNI | ICON | RNI | ICON | RNI | ICON | RNI | ICON | RNI | ICON |
| arxiv | Train | 0.69 ±0.02 | 0.79 ±0.05 | 0.68 ±0.03 | 1.00 ±0.00 | 0.76 ±0.05 | 0.90 ±0.01 | 0.73 ±0.04 | 0.94 ±0.01 | 0.78 ±0.03 | 0.98 ±0.00 |
| Test | 0.67 ±0.05 | 0.85 ±0.11 | 0.63 ±0.02 | 1.00 ±0.00 | 0.66 ±0.03 | 0.85 ±0.01 | 0.70 ±0.03 | 0.91 ±0.02 | 0.75 ±0.03 | 0.97 ±0.01 | |
| molhiv | Train | 0.64 ±0.10 | 0.95 ±0.00 | 0.95 ±0.00 | 1.00 ±0.00 | 0.88 ±0.04 | 0.94 ±0.00 | 0.79 ±0.02 | 0.97 ±0.00 | 0.82 ±0.02 | 0.99 ±0.00 |
| Test | 0.62 ±0.09 | 0.98 ±0.00 | 0.97 ±0.00 | 1.00 ±0.00 | 0.86 ±0.03 | 0.96 ±0.00 | 0.76 ±0.03 | 0.98 ±0.00 | 0.80 ±0.02 | 1.00 ±0.00 | |
| molbace | Train | 0.76 ±0.02 | 0.82 ±0.01 | 0.78 ±0.00 | 0.85 ±0.11 | 0.74 ±0.02 | 0.80 ±0.01 | 0.70 ±0.03 | 0.83 ±0.02 | 0.74 ±0.02 | 0.88 ±0.02 |
| MODEL | arxiv | molhiv | molbace | molbbbp | collab | squirrel |
|---|---|---|---|---|---|---|
| GraphConv | 72.05 ±1.13 | 70.27 ±2.51 | 62.58 ±1.98 | 63.39 ±0.17 | 46.15 ±1.01 | 32.4 ±1.7 |
| GraphConv+RNI | 71.34 ±1.50 | 56.44 ±2.29 | 52.29 ±2.01 | 59.08 ±2.03 | 40.09 ±3.49 | 28.9 ±2.2 |
| GraphConv+ ICON | 73.66 ±1.19 | 68.59 ±1.96 | 65.72 ±1.10 | 67.02 ±0.97 | 48.15 ±1.71 | 34.8 ±1.3 |
| GIN | 76.30 ±1.58 | 72.09 ±1.01 | 73.02 ±1.27 | 60.86 ±1.05 | 43.87 ±0.94 | 30.2 ±1.5 |
| GIN+RNI | 71.25 ±1.91 | 71.06 ±1.95 | 61.94 ±2.51 | 53.35 ±1.73 | 39.42 ±2.31 | 26.7 ±1.9 |
| GIN+ ICON | 79.16 ±0.82 | 72.01 ±1.30 | 76.78 ±0.99 | 59.96 ±2.00 | 45.76 ±1.12 | 33.1 ±1.1 |
| METHOD | Train | Test |
|---|---|---|
| GraphConv+RNI | 0.95 ±0.01 | 0.93 ±0.08 |
| GraphConv+ ICON | 1.00 ±0.00 | 1.00 ±0.00 |
| GIN+RNI | 0.95 ±0.02 | 0.94 ±0.02 |
| GIN+ ICON | 1.00 ±0.00 | 0.99 ±0.00 |
| GAT+RNI | 0.88 ±0.09 | 0.88 ±0.13 |
| GAT+ ICON | 1.00 ±0.00 | 1.00 ±0.00 |
| Method | Interp. | Extrap. |
|---|---|---|
| GraphConv+Const. | 75.35 ±2.09 | 53.70 ±1.67 |
| GraphConv+RNI | 74.87 ±3.06 | 57.02 ±3.39 |
| GraphConv+ ICON | 88.45 ±2.04 | 78.20 ±2.53 |
| GIN+Const. | 76.10 ±1.83 | 56.29 ±1.55 |
| GIN+RNI | 72.15 ±2.01 | 55.01 ±1.30 |
| GIN+ ICON | 90.95 ±1.27 | 71.20 ±1.94 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | ogbn-arxiv | ogbg-molhiv | ogbg-molbace | ogbg-molbbbp | ogbl-collab | squirrel |
|---|---|---|---|---|---|---|
| GraphConv | 72.05 ±1.13 | 70.27 ±2.51 | 62.58 ±1.98 | 63.39 ±0.17 | 46.15 ±1.01 | 32.4 ±1.7 |
| GraphConv + RNI | 70.89 ±1.42 | 55.87 ±2.33 | 51.78 ±2.14 | 58.92 ±1.91 | 40.02 ±3.42 | 28.8 ±2.0 |
| GraphConv + ICON | 73.41 ±1.14 | 70.19 ±2.01 | 65.19 ±1.13 | 66.78 ±1.02 | 47.92 ±1.68 | 34.7 ±1.4 |
| GIN | 76.30 ±1.58 | 72.09 ±1.01 | 73.02 ±1.27 | 60.86 ±1.05 | 43.87 ±0.94 | 30.2 ±1.5 |
| GIN + RNI | 71.46 ±1.88 | 70.83 ±1.92 | 62.19 ±2.39 | 53.12 ±1.78 | 39.12 ±2.25 | 26.9 ±1.8 |
| GIN + ICON | 79.03 ±0.87 | 71.79 ±1.33 | 76.52 ±1.04 | 60.21 ±2.08 | 45.61 ±1.09 | 33.0 ±1.1 |
| Dataset | # Graphs | Avg # Nodes | Avg # Edges | # Node Features | # Classes |
|---|---|---|---|---|---|
| ogbn-arxiv | 1 | 169,343 | 1,166,243 | 128 | 40 |
| ogbg-molhiv | 41,127 | 25.5 | 27.5 | 9 | 2 |
| ogbg-molbace | 1,513 | 34.1 | 36.9 | 9 | 2 |
| ogbg-molbbbp | 2,039 | 24.1 | 26.0 | 9 | 2 |
| ogbl-collab | 1 | 235,868 | 1,285,465 | 128 | 2 † |
| squirrel | 1 | 5,201 | 217,073 | 2,089 | 5 |
Graph Neural Networks
Graph Neural Networks learn from graph-structured data by combining information across connected nodes, edges, and larger structures.
See all 752 papers