Abstract
Graph Neural Networks (GNNs) typically excel at interpolation but struggle with extrapolation to larger or structurally distinct graphs. This limitation often stems from the fixed inductive biases of standard pooling functions like sum, mean, or max. We introduce Generalized Norm-based Pooling (GNP), a learnable pooling layer based on the $L^p$ norm with an adaptive normalization factor. GNP allows models to discover the optimal aggregation strategy for a given task, facilitating robust extrapolation. We demonstrate GNP's effectiveness on synthetic and real-world datasets, showing significant improvements over traditional pooling methods.
Introduction
Standard GNN architectures are notoriously poor at extrapolation—generalizing to data significantly different from the training distribution, such as graphs with much larger node counts. A primary reason for this failure is the rigid inductive bias imposed by fixed pooling functions. For instance, a model using "max" pooling to count nodes will fail on larger graphs, whereas "sum" pooling might succeed. Currently, selecting the "right" pooling function is a manual trial-and-error process. This paper addresses this by making the pooling operation learnable and flexible enough to handle out-of-distribution (OOD) scenarios.
Methods: Generalized Norm-based Pooling (GNP)
The proposed GNP layer is inspired by the $L^p$ norm, incorporating a learnable normalization factor $q$:
$$GNP_j(V) = \frac{1}{n^q} \left( \sum_{i=1}^n |v_{i,j}|^p \right)^{1/p}$$
By adjusting the learnable parameters $p$ (the power) and $q$ (the normalization), GNP can emulate various standard functions: $(p=1, q=0)$ corresponds to sum, $(p=1, q=1)$ to mean, and $p \to \infty$ approaches max.
Handling Diverse Operations
To represent operations like min, the authors split the function into $GNP^+$ (for positive $p$) and $GNP^-$ (for negative $p$) components, which are subsequently combined via a linear layer. To ensure numerical stability during training, the implementation utilizes a "log-sum-exp" trick and epsilon-tolerance for near-zero inputs.
Experimental Evaluation
The researchers evaluated GNP across synthetic graph-level tasks (invsize, harmonic, maxdegree), node-level tasks (bfs, shortest path), and real-world benchmarks (TUDataset).
Extrapolation Performance
GNP demonstrates remarkable robustness to scale. In tasks like invsize and harmonic, where standard pooling methods fail as graph size increases, GNP maintains near-perfect performance.
On the harmonic task, GNP achieved a Test MAPE of 1.1%, significantly outperforming the best baseline, SAGPool, which recorded 26.9%. Furthermore, replacing fixed pooling with GNP in established architectures like ASAPool led to consistent accuracy gains on real-world datasets like D&D and NCI1.
Key Insights
- Algorithmic Alignment: Extrapolation is possible when the network's architecture can mimic the underlying logic of the task. GNP provides the necessary flexibility to achieve this alignment automatically.
- Task-Specific Bias: No single pooling function is universal. GNP’s ability to "morph" into the required operation during training is its core strength.
- Automatic Discovery: Empirical results show that $p$ and $q$ values converge to theoretically optimal points, proving the model learns the task's logic rather than memorizing training noise.
Conclusion
Generalized Norm-based Pooling (GNP) offers a robust, learnable alternative to fixed pooling strategies in GNNs. By enabling algorithmic alignment through adaptive $L^p$ norms, GNP significantly improves the extrapolation capabilities of GNNs across diverse graph-based tasks. Future work may extend GNP to other domains requiring permutation invariance, such as point cloud processing and set-based reinforcement learning.
Summary updated