Abstract
Graph pooling is a crucial operation for encoding hierarchical structures within graphs. Most existing graph pooling approaches formulate the problem as a node clustering task which effectively captures the graph topology. Conventional methods ask users to specify an appropriate number of clusters as a hyperparameter, then assume that all input graphs share the same number of clusters. In inductive settings where the number of clusters can vary, however, the model should be able to represent this variation in its pooling layers in order to learn suitable clusters. Thus we propose GMPool, a novel differentiable graph pooling architecture that automatically determines the appropriate number of clusters based on the input data. The main intuition involves a grouping matrix defined as a quadratic form of the pooling operator, which induces use of binary classification probabilities of pairwise combinations of nodes. GMPool obtains the pooling operator by first computing the grouping matrix, then decomposing it. Extensive evaluations on molecular property prediction tasks demonstrate that our method outperforms conventional methods.
Introduction
In Graph Neural Networks (GNNs), pooling operations are essential for learning hierarchical representations by grouping nodes into clusters. This process allows models to capture global structural information beyond local node-to-node convolutions. However, a significant limitation of existing methods like DiffPool or MinCutPool is the requirement to pre-define the number of clusters ($K$) as a fixed hyperparameter.
This "one-size-fits-all" approach is particularly problematic in inductive settings such as chemistry. For instance, a small molecule like ethanol may only contain two functional groups, whereas a complex protein-inhibitor might contain dozens. Forcing these diverse structures into a fixed number of clusters leads to either over-segmentation or loss of critical structural detail. To address this, we introduce GMPool, an architecture that adaptively determines the number of clusters for each unique graph.
Methodology: The Grouping Matrix Approach
The core of GMPool is the Grouping Matrix ($M$), which shifts the focus from mapping nodes to cluster IDs to predicting pairwise node similarities.
Pairwise Classification and Decomposition
The model first computes an $N \times N$ grouping matrix $M$, where each entry $M_{ij}$ represents the probability that nodes $i$ and $j$ belong to the same cluster. This is achieved using a commutative function (e.g., Euclidean distance) and a classification layer.
The pooling operator $S$ is then derived by observing that $M$ can be viewed as the product of a pooling matrix $S$ and its transpose ($M = SS^T$). By applying Singular Value Decomposition (SVD) or Eigen-decomposition, the model extracts $S$. Crucially, the rank of $M$ naturally corresponds to the number of clusters, allowing the model to "shut off" unnecessary clusters by assigning them near-zero eigenvalues.
Computational Efficiency
For smaller graphs, the researchers propose NGMPool, a variant that avoids the $O(n^3)$ complexity of SVD. Instead, it utilizes the grouping matrix directly to transform node and edge features with $O(n^2)$ complexity, maintaining efficiency without sacrificing the adaptive benefits.
Experimental Results and Analysis
The researchers evaluated GMPool and NGMPool on five molecular property prediction tasks, including fluorescence properties (PLQY, $\lambda_{max}$) and binding affinity (pIC50).
Performance Metrics
GMPool consistently outperformed established baselines. On the PLQY task, GMPool achieved an RMSE of 0.2091, a significant improvement over the DMPNN backbone (0.2414). In classification tasks like Tox21, NGMPool reached a state-of-the-art ROC-AUC of 0.7617.
Adaptive Clustering Visualization
Analysis of the learned grouping matrices confirms that the model successfully identifies an "effective" number of clusters tailored to the input graph's complexity. As shown in the heatmaps below, the model transitions from an unorganized initial state to structured clusters representing distinct groups.
Discussion and Conclusion
GMPool represents a significant advancement in graph pooling by enabling data-driven structural discovery. By leveraging the grouping matrix, the model respects permutation invariance and supports soft clustering, which is vital for atoms acting as bridges between functional groups.
While the $O(n^3)$ complexity of SVD presents a scaling challenge for massive graphs, the adaptive nature of GMPool provides a more "chemical-aware" framework for molecular GNNs. Future work will explore randomized SVD for scalability and higher-order grouping tensors to capture interactions beyond node pairs.
Summary updated