Torch Geometric Pool: the Pytorch library for pooling in Graph Neural Networks

Filippo Maria Bianchi, Carlo Abate, Ivan Marisca

Main figure for Torch Geometric Pool: the Pytorch library for pooling in Graph Neural Networks

Abstract

Torch Geometric Pool (tgp) is a pooling library built on top of PyTorch Geometric. Graph pooling methods differ in how they assign nodes to supernodes, how they handle batches, what they return after pooling, and whether they expose auxiliary losses. These differences make it hard to compare methods or reuse the same model code across them. tgp addresses this problem with a common software interface based on the Select-Reduce-Connect-Lift (SRCL) decomposition. The library provides 20 hierarchical poolers, standardized output objects, standalone readout modules, support for dense poolers in batched and unbatched mode, and workflows for caching and pre-coarsening. It is released under the MIT license on GitHub and PyPI, with comprehensive documentation, tutorials, and examples.

Benchmark Results

Tested on 7 datasets

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

TU Dortmund

#ModelAccuracy ↑Paper
1
WL-MLP
0.9954
2
GIN
0.9934
3
GCN
0.9727
131
GraphSAGE
0.8200 ±0.0100
170
Graclus
actual #170 vs paper #391 221 places worse
0.8120 ±0.0340
best reported
actual #170 vs paper #391 221 places worse
paper 0.7600 ±0.0300

Difference within reported uncertainty; not counted as underperformance.

paper 0.7600 ±0.0300 Δ at pub 0.0520
221
MinCut
actual #221 vs paper #318 97 places worse
0.8010 ±0.0260
best reported
actual #221 vs paper #318 97 places worse
paper 0.7800 ±0.0200

Difference within reported uncertainty; not counted as underperformance.

paper 0.7800 ±0.0200 Δ at pub 0.0210
231
ecpool
actual #231 vs paper #318 87 places worse
0.7980 ±0.0330
best reported
actual #231 vs paper #318 87 places worse
paper 0.7800 ±0.0200

Difference within reported uncertainty; not counted as underperformance.

paper 0.7800 ±0.0200 Δ at pub 0.0180
254
SEP
actual #254 vs paper #355 101 places worse
0.7935 ±0.0033
best reported
actual #254 vs paper #355 101 places worse
paper 0.7700 ±0.0200

Difference within reported uncertainty; not counted as underperformance.

paper 0.7700 ±0.0200 Δ at pub 0.0235
294
DMoN
actual #294 vs paper #355 61 places worse
0.7850 ±0.0140
best reported
actual #294 vs paper #355 61 places worse
paper 0.7700 ±0.0200

Difference within reported uncertainty; not counted as underperformance.

paper 0.7700 ±0.0200 Δ at pub 0.0150
309
ASAP
actual #309 vs paper #391 82 places worse
0.7821 ±0.0175
best reported
actual #309 vs paper #391 82 places worse
paper 0.7600 ±0.0200

Difference within reported uncertainty; not counted as underperformance.

paper 0.7600 ±0.0200 Δ at pub 0.0221
321
bnpool
0.7800 ±0.0200
This paper
322
hosc
0.7800 ±0.0200
This paper
323
jbgnn
0.7800 ±0.0200
This paper
360
acc
0.7700 ±0.0200
This paper
361
Diff
0.7700 ±0.0300
This paper
362
kmis
0.7700 ±0.0200
This paper
363
lapool
0.7700 ±0.0200
This paper
364
maxcut
0.7700 ±0.0200
This paper
359
sag
actual #359 vs paper #359
0.7700 ±0.0300
actual #359 vs paper #359
paper 0.7700 ±0.0300
paper 0.7700 ±0.0300 Δ at pub 0.0660
395
ndp
0.7600 ±0.0200
This paper
414
topk
actual #414 vs paper #414
0.7500 ±0.0200
actual #414 vs paper #414
paper 0.7500 ±0.0200
paper 0.7500 ±0.0200 Δ at pub 0.0563
473
pan
0.7100 ±0.0300
This paper
499
eigen
0.6900 ±0.0200
This paper
#ModelAccuracy ↑Paper
1
GIN-0
0.9240 ±0.0250
2
GIN-ε
0.9220 ±0.0230
4
bnpool
0.9100 ±0.0200
This paper
3
DMoN
actual #3 vs paper #3
0.9100 ±0.0100
actual #3 vs paper #3
paper 0.9100 ±0.0100
prev best: Graph Pooling via Ricci Flow (TMLR 2024)
paper 0.9100 ±0.0100 Δ at pub 0.0600
5
hosc
0.9100 ±0.0100
This paper
6
jbgnn
0.9100 ±0.0200
This paper
7
kmis
0.9100 ±0.0300
This paper
10
acc
0.9000 ±0.0300
This paper
8
Diff
actual #8 vs paper #8
0.9000 ±0.0200
actual #8 vs paper #8
paper 0.9000 ±0.0200
prev best: Graph Pooling via Ricci Flow (TMLR 2024)
paper 0.9000 ±0.0200 Δ at pub 0.0400
11
ecpool
0.9000 ±0.0200
This paper
12
eigen
0.9000 ±0.0300
This paper
13
Graclus
0.9000 ±0.0200
This paper
14
lapool
0.9000 ±0.0100
This paper
9
MinCut
actual #9 vs paper #9
0.9000 ±0.0200
actual #9 vs paper #9
paper 0.9000 ±0.0200
prev best: Graph Pooling via Ricci Flow (TMLR 2024)
paper 0.9000 ±0.0200 Δ at pub 0.0500
16
SEP
0.8900 ±0.0300
This paper
21
ASAP
0.8800 ±0.0300
This paper
23
maxcut
0.8700 ±0.0300
This paper
24
ndp
0.8700 ±0.0200
This paper
25
pan
0.8700 ±0.0500
This paper
26
sag
0.8700 ±0.0300
This paper
29
topk
0.8600 ±0.0300
This paper
49
GCN
0.5653 ±0.0260

Heterophily Benchmark

#ModelAccuracy ↑Paper
1
Dir-Poly
0.9451 ±0.0022
2
D-CDE
0.9387 ±0.0041
3
LargeScaleNet
0.9358 ±0.0024
26
GraphSAGE
0.9106 ±0.0027
135
MLP
0.6665 ±0.0047
206
maxcut
0.3600 ±0.0200
This paper
212
kmis
0.3200 ±0.0100
This paper
216
ASAP
0.2700 ±0.0100
This paper
218
ndp
0.2300 ±0.0100
This paper
224
topk
0.2100 ±0.0200
This paper
#ModelAccuracy ↑Paper
1
UniGAP
0.6375 ±0.0110
2
H2GCN + HalfHop
0.5961 ±0.0100
3
GraphSAGE + HalfHop
0.5897 ±0.0150
12
SAGE
0.5569 ±0.0023
84
MLP
0.5058
159
kmis
0.4400 ±0.0100
This paper
166
ndp
0.4300 ±0.0100
This paper
181
maxcut
0.4200 ±0.0100
This paper
188
ASAP
0.4000 ±0.0200
This paper
192
topk
0.3800 ±0.0100
This paper
#ModelROC-AUC ↑Paper
1
BuNN
0.9899 ±0.0016
2
DC-GNN
0.9850 ±0.0021
3
Tango -GPS
0.9839 ±0.0054
42
GraphSAGE
0.9358 ±0.0005
122
ASAP
0.7800 ±0.0500
This paper
139
kmis
0.7100 ±0.0100
This paper
145
topk
0.6600 ±0.0200
This paper
147
maxcut
0.6300 ±0.0400
This paper
149
ndp
0.6200 ±0.0100
This paper
156
MLP
0.5099 ±0.0147
#ModelROC-AUC ↑Paper
1
Polynormer-r
0.8591 ±0.0074
2
DC-GNN
0.8588 ±0.0081
3
TANGO-GPS
0.8566 ±0.0101
50
GCN
0.8364 ±0.0067
95
maxcut
0.8000 ±0.0100
This paper
101
ASAP
0.7900 ±0.0100
This paper
128
kmis
0.7700 ±0.0500
This paper
139
MLP
0.7362 ±0.0020
148
ndp
0.7100 ±0.0600
This paper
151
topk
0.7000 ±0.0300
This paper
#ModelROC-AUC ↑Paper
1
NID_GAT
0.9703 ±0.0002
2
NID_GCN
0.9685 ±0.0010
3
UniGAP
0.8421 ±0.0080
16
GCN
0.7902 ±0.0060
96
MLP
0.7082 ±0.0010
123
kmis
0.6600 ±0.0100
This paper
127
maxcut
0.6500 ±0.0200
This paper
133
ASAP
0.6200 ±0.0600
This paper
134
topk
0.6200 ±0.0300
This paper
139
ndp
0.5900 ±0.0600
This paper
SOTA performance (not significantly different from the best) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported value improved over the best known when published