pith. sign in

arxiv: 2512.12642 · v2 · submitted 2025-12-14 · 💻 cs.LG

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

Pith reviewed 2026-05-16 22:45 UTC · model grok-4.3

classification 💻 cs.LG
keywords graph poolinggraph neural networksPyTorch Geometricsoftware librarySRCL decompositionhierarchical poolingGNN models
0
0 comments X

The pith

Torch Geometric Pool unifies graph pooling methods through an SRCL interface in PyTorch Geometric.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper presents Torch Geometric Pool as a library built on PyTorch Geometric to handle graph pooling in neural networks. Pooling approaches differ widely in how they group nodes into supernodes, process batches, produce outputs, and incorporate extra losses. These inconsistencies complicate comparing methods or reusing model code. tgp introduces a shared interface by breaking pooling down into Select-Reduce-Connect-Lift steps. The library supplies twenty hierarchical poolers, uniform output structures, readout modules, dense pooling support, and tools for caching and pre-coarsening.

Core claim

Torch Geometric Pool supplies a common software interface for graph pooling by decomposing operations into the Select-Reduce-Connect-Lift (SRCL) sequence, which accommodates twenty distinct hierarchical poolers along with standardized outputs and utilities for batch handling, readout, and pre-coarsening.

What carries the argument

The SRCL decomposition, which factors pooling into node selection, feature reduction, edge reconnection, and output lifting stages to create a uniform software contract.

If this is right

  • Model code can switch between different pooling methods by changing only the pooler object.
  • Direct comparisons of pooling techniques become possible because all methods return objects with the same structure.
  • Batched and dense graphs can be pooled in both unbatched and batched modes using the same interface.
  • Caching and pre-coarsening workflows can be applied uniformly across all supported poolers.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • A similar decomposition pattern could standardize other variable GNN operations such as message passing or readout.
  • Future pooling methods could be designed from the start to map cleanly onto SRCL steps for immediate compatibility.
  • Benchmarking suites might adopt the library's output format to reduce reimplementation effort across papers.

Load-bearing premise

The SRCL decomposition can represent the core differences among existing pooling methods without forcing awkward adaptations or loss of behavior for any of them.

What would settle it

A well-known pooling method whose node assignment, batch behavior, or output structure cannot be expressed through SRCL steps without changing its original functionality or results.

Figures

Figures reproduced from arXiv: 2512.12642 by Carlo Abate, Filippo Maria Bianchi, Ivan Marisca.

Figure 1
Figure 1. Figure 1: Overview of SRC(L). The SRC stages coarsen the graph by mapping nodes to supernodes. Lifting is the [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: Pooling examples with different operators. [PITH_FULL_IMAGE:figures/full_fig_p003_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Node clustering architecture. The model is trained for up to 2000 epochs using the Adam optimizer [26] with a learning rate of 5 · 10−4 and the ReduceLROnPlateau scheduler2 , with early stopping (patience of 500 epochs). After training, we extract hard cluster assignments via an argmax operation on the matrix S and evaluate quality using the Normalized Mutual Information (NMI). D.2 Node Classification We a… view at source ↗
Figure 4
Figure 4. Figure 4: Node classification architecture. sum pooling followed by a 3-layer MLP with a dropout of 0.5. In the deeper GNN architecture with multiple pooling layers presented in Section 4.5, the same [Pool - MP] block has been replicated multiple times. A schematic depiction of the architecture is reported in [PITH_FULL_IMAGE:figures/full_fig_p016_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: Architecture for graph-level tasks (graph classification and regression). [PITH_FULL_IMAGE:figures/full_fig_p016_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: Architecture for graph-level tasks with pre-coarsening. [PITH_FULL_IMAGE:figures/full_fig_p016_6.png] view at source ↗
read the original 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.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

0 major / 2 minor

Summary. The manuscript introduces Torch Geometric Pool (tgp), a PyTorch Geometric library that standardizes graph pooling for GNNs via the Select-Reduce-Connect-Lift (SRCL) decomposition. It supplies a common interface for node assignment, batch handling, return values, and auxiliary losses; implements 20 hierarchical poolers; provides standardized output objects, standalone readout modules, dense/batched support, and caching/pre-coarsening workflows; and releases the code under MIT with documentation and examples.

Significance. If the implementation matches the described interface, the library would reduce fragmentation across pooling methods, enabling direct reuse of model code and fairer comparisons. The explicit SRCL decomposition, 20 concrete implementations, and engineering features (batched/dense modes, standardized outputs) constitute a useful contribution to the GNN tooling ecosystem, with the open release and tutorials further supporting reproducibility.

minor comments (2)
  1. [Abstract] Abstract: the phrase '20 hierarchical poolers' would be more informative if accompanied by a short enumerated list or reference to a table in the main text.
  2. [Introduction] The description of SRCL would benefit from a single running example that shows the four steps on a small graph, to make the decomposition immediately concrete for readers unfamiliar with the prior literature.

Simulated Author's Rebuttal

0 responses · 0 unresolved

We thank the referee for the positive review and the recommendation to accept the manuscript. The assessment accurately captures the library's goals of standardizing hierarchical pooling via the SRCL interface and the practical engineering features that support reproducibility and reuse.

Circularity Check

0 steps flagged

No significant circularity; engineering interface release

full rationale

The manuscript introduces a PyTorch Geometric library that standardizes graph pooling via the SRCL decomposition. No equations, derivations, fitted parameters, or predictions appear in the provided text. The SRCL interface is offered as an engineering abstraction that unifies existing methods' node assignment, batch handling, and return values; it is not derived from or reduced to any internal result by construction. No self-citations function as load-bearing uniqueness theorems or ansatzes. The contribution is self-contained as a software implementation with 20 poolers, standardized outputs, and documentation.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The library adds no new mathematical free parameters, axioms, or invented entities; it re-expresses existing pooling algorithms through a common software interface built on PyTorch Geometric.

axioms (1)
  • domain assumption PyTorch Geometric supplies correct base graph data structures and operations
    The library is explicitly built on top of PyTorch Geometric.

pith-pipeline@v0.9.0 · 5431 in / 1122 out tokens · 42959 ms · 2026-05-16T22:45:08.604954+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

42 extracted references · 42 canonical work pages · 4 internal anchors

  1. [1]

    Abate and F

    C. Abate and F. M. Bianchi. Maxcutpool: differentiable feature-aware maxcut for pooling in graph neural networks. InThe Thirteenth International Conference on Learning Representations, 2025. URL https://openreview. net/forum?id=xlbXRJ2XCP

  2. [2]

    Bacciu and L

    D. Bacciu and L. Di Sotto. A non-negative factorization approach to node pooling in graph convolutional neural networks. InAI* IA 2019–Advances in Artificial Intelligence: XVIIIth International Conference of the Italian Association for Artificial Intelligence, Rende, Italy, November 19–22, 2019, Proceedings 18, pages 294–306. Springer, 2019

  3. [3]

    Bacciu, A

    D. Bacciu, A. Conte, and F. Landolfi. Graph pooling with maximum-weight k-independent sets. InThirty-Seventh AAAI Conference on Artificial Intelligence, 2023

  4. [4]

    F. M. Bianchi. Simplifying clustering with graph neural networks.arXiv preprint arXiv:2207.08779, 2022

  5. [5]

    F. M. Bianchi and V . Lachi. The expressive power of pooling in graph neural networks. InAdvances in Neural Information Processing Systems, volume 36, pages 71603–71618, 2023

  6. [6]

    F. M. Bianchi, D. Grattarola, and C. Alippi. Spectral clustering with graph neural networks for graph pooling. In International conference on machine learning, pages 874–883. PMLR, 2020

  7. [7]

    F. M. Bianchi, D. Grattarola, L. Livi, and C. Alippi. Hierarchical representation learning in graph neural networks with node decimation pooling.IEEE Transactions on Neural Networks and Learning Systems, 33(5):2195–2207, 2020

  8. [8]

    F. M. Bianchi, D. Grattarola, L. Livi, and C. Alippi. Graph neural networks with convolutional arma filters.IEEE transactions on pattern analysis and machine intelligence, 44(7):3496–3507, 2021

  9. [9]

    F. M. Bianchi, C. Gallicchio, and A. Micheli. Pyramidal reservoir graph neural network.Neurocomputing, 470: 389–404, 2022. ISSN 0925-2312. doi: https://doi.org/10.1016/j.neucom.2021.04.131. 10

  10. [10]

    M. M. Bronstein, J. Bruna, T. Cohen, and P. Veliˇckovi´c. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges.arXiv preprint arXiv:2104.13478, 2021

  11. [11]

    Castellana and F

    D. Castellana and F. M. Bianchi. Bn-pool: a bayesian nonparametric approach to graph pooling, 2025. URL https://arxiv.org/abs/2501.09821

  12. [12]

    Defferrard, L

    M. Defferrard, L. Martin, R. Pena, and N. Perraudin. Pygsp: Graph signal processing in python, Oct. 2017. URL https://doi.org/10.5281/zenodo.1003158

  13. [13]

    I. S. Dhillon, Y . Guan, and B. Kulis. Weighted graph cuts without eigenvectors a multilevel approach.IEEE transactions on pattern analysis and machine intelligence, 29(11):1944–1957, 2007

  14. [14]

    F. Diehl. Edge contraction pooling for graph neural networks.arXiv preprint arXiv:1905.10990, 2019

  15. [15]

    Duval and F

    A. Duval and F. Malliaros. Higher-order clustering and pooling for graph neural networks. InProceedings of the 31st ACM international conference on information & knowledge management, pages 426–435, 2022

  16. [16]

    V . P. Dwivedi, L. Rampášek, M. Galkin, A. Parviz, G. Wolf, A. T. Luu, and D. Beaini. Long range graph benchmark.Advances in Neural Information Processing Systems, 35:22326–22340, 2022

  17. [17]

    Fey and J

    M. Fey and J. E. Lenssen. Fast graph representation learning with PyTorch Geometric. InICLR Workshop on Representation Learning on Graphs and Manifolds, 2019

  18. [18]

    X. Fu, J. Zhang, Z. Meng, and I. King. Magnn: Metapath aggregated graph neural network for heterogeneous graph embedding. InProceedings of the web conference 2020, pages 2331–2341, 2020

  19. [19]

    E. Gal, M. Eliasof, C.-B. Schönlieb, I. I. Kyrchei, E. Haber, and E. Treister. Towards efficient training of graph neural networks: A multiscale approach.arXiv preprint arXiv:2503.19666, 2025

  20. [20]

    Gao and S

    H. Gao and S. Ji. Graph u-nets. Ininternational conference on machine learning, pages 2083–2092. PMLR, 2019

  21. [21]

    M. Gori, G. Monfardini, and F. Scarselli. A new model for learning in graph domains. InProceedings. 2005 IEEE international joint conference on neural networks, 2005., volume 2, pages 729–734. IEEE, 2005. doi: 10.1109/IJCNN.2005.1555942

  22. [22]

    Grattarola and C

    D. Grattarola and C. Alippi. Graph neural networks in tensorflow and keras with spektral [application notes]. IEEE Computational Intelligence Magazine, 16(1):99–106, 2021

  23. [23]

    Grattarola, D

    D. Grattarola, D. Zambon, F. M. Bianchi, and C. Alippi. Understanding pooling in graph neural networks.IEEE Transactions on Neural Networks and Learning Systems, 2022

  24. [24]

    J. B. Hansen and F. M. Bianchi. Total variation graph neural networks. InInternational Conference on Machine Learning, pages 12445–12468. PMLR, 2023

  25. [25]

    W. Hu, M. Fey, M. Zitnik, Y . Dong, H. Ren, B. Liu, M. Catasta, and J. Leskovec. Open graph benchmark: Datasets for machine learning on graphs.Advances in neural information processing systems, 33:22118–22133, 2020

  26. [26]

    D. P. Kingma and J. Ba. Adam: A method for stochastic optimization.arXiv preprint arXiv:1412.6980, 2014

  27. [27]

    Knyazev, G

    B. Knyazev, G. W. Taylor, and M. Amer. Understanding attention and generalization in graph neural networks. Advances in neural information processing systems, 32, 2019

  28. [28]

    Landolfi

    F. Landolfi. Revisiting edge pooling in graph neural networks. InESANN, 2022

  29. [29]

    J. Lee, I. Lee, and J. Kang. Self-attention graph pooling. InInternational conference on machine learning, pages 3734–3743. PMLR, 2019

  30. [30]

    D. Lim, F. Hohne, X. Li, S. L. Huang, V . Gupta, O. Bhalerao, and S. N. Lim. Large scale learning on non- homophilous graphs: New benchmarks and strong simple methods.Advances in Neural Information Processing Systems, 34:20887–20902, 2021

  31. [31]

    Z. Ma, J. Xuan, Y . G. Wang, M. Li, and P. Liò. Path integral based convolution and pooling for graph neural networks.Advances in Neural Information Processing Systems, 33:16421–16433, 2020

  32. [32]

    Morris, N

    C. Morris, N. M. Kriege, F. Bause, K. Kersting, P. Mutzel, and M. Neumann. Tudataset: A collection of benchmark datasets for learning with graphs. InICML 2020 Workshop on Graph Representation Learning and Beyond (GRL+ 2020), 2020

  33. [33]

    Noutahi, D

    E. Noutahi, D. Beaini, J. Horwood, S. Giguère, and P. Tossou. Towards interpretable sparse graph representation learning with laplacian pooling.arXiv preprint arXiv:1905.11577, 2019

  34. [34]

    Platonov, D

    O. Platonov, D. Kuznedelev, M. Diskin, A. Babenko, and L. Prokhorenkova. A critical look at the evaluation of GNNs under heterophily: Are we really making progress? InThe Eleventh International Conference on Learning Representations, 2023. 11

  35. [35]

    Ranjan, S

    E. Ranjan, S. Sanyal, and P. Talukdar. Asap: Adaptive structure aware pooling for learning hierarchical graph representations. InProceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 5470–5477, 2020

  36. [36]

    Scarselli, M

    F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The graph neural network model.IEEE transactions on neural networks, 20(1):61–80, 2008

  37. [37]

    Tsitsulin, J

    A. Tsitsulin, J. Palowitch, B. Perozzi, and E. Müller. Graph clustering with graph neural networks.J. Mach. Learn. Res., 24:127:1–127:21, 2023

  38. [38]

    M. Wang, D. Zheng, Z. Ye, Q. Gan, M. Li, X. Song, J. Zhou, C. Ma, L. Yu, Y . Gai, et al. Deep graph library: A graph-centric, highly-performant package for graph neural networks.arXiv preprint arXiv:1909.01315, 2019

  39. [39]

    Y . Wang, W. Hou, N. Sheng, Z. Zhao, J. Liu, L. Huang, and J. Wang. Graph pooling in graph neural networks: methods and their applications in omics studies.Artificial Intelligence Review, 57(11):294, Sep 2024. ISSN 1573-7462. doi: 10.1007/s10462-024-10918-9. URLhttps://doi.org/10.1007/s10462-024-10918-9

  40. [40]

    K. Xu, W. Hu, J. Leskovec, and S. Jegelka. How powerful are graph neural networks? InInternational Conference on Learning Representations, 2019

  41. [41]

    Z. Yang, W. Cohen, and R. Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pages 40–48. PMLR, 2016

  42. [42]

    Z. Ying, J. You, C. Morris, X. Ren, W. Hamilton, and J. Leskovec. Hierarchical graph representation learning with differentiable pooling.Advances in neural information processing systems, 31, 2018. 12 Appendix A Implemented Pooling Layers Torch Geometric Pool provides a wide array of pooling operators from the literature, covering all branches of the hier...