SpaPool: Soft Partition Assignment Pooling for Graph Neural Networks

Rodrigue Govan, Romane Scherrer, Philippe Fournier-Viger, Nazha Selmaoui-Folcher

TL;DR

SpaPool is a hybrid graph pooling method that combines the structural preservation of dense pooling with the flexibility of sparse pooling. By using an adaptive number of "supernodes" based on node importance scores and assigning all nodes to these clusters via soft assignment, it achieves state-of-the-art results, particularly on small-scale graph datasets.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are excellent for data with complex relationships, but large graphs are computationally expensive. To manage this, researchers use pooling to downsample graphs.

Existing methods generally fall into two camps:

  1. Dense Pooling: Groups nodes into a fixed number of clusters (supernodes). This preserves the global structure well but is rigid; if a dataset has graphs of wildly different sizes, a fixed cluster count is inefficient.
  2. Sparse Pooling: Selects the top $k$ most "important" nodes and discards the rest. While adaptive to graph size, this often throws away useful structural information and local context from the deleted nodes.

The authors of SpaPool aim to bridge this gap: How can we have a pooling layer that is adaptive to graph size (like sparse methods) but doesn't throw away information (like dense methods)?

Methods

SpaPool introduces a "dense but adaptive" approach. The process follows four main steps:

  1. Embedding: The graph passes through a standard GCN layer to generate node embeddings ($H_{emb}$).
  2. Selection (The Sparse Part): It uses a TopKPool mechanism to identify a subset of representative nodes and their importance scores. Unlike standard sparse pooling, these nodes aren't the only ones kept; they serve as the "seeds" for clusters.
  3. Soft Assignment (The Dense Part): The method calculates "centroids" by combining the representative nodes with their importance scores. It then computes an assignment matrix ($S$) using the cosine similarity between every node in the original graph and these centroids.
  4. Reduction & Connection: The graph is compressed using this assignment matrix. Crucially, because it's a "soft" assignment, every original node contributes to the new supernodes, ensuring no information is simply deleted.

To stabilize training, the authors adopt auxiliary loss functions from previous dense methods (like DiffPool), focusing on link prediction and entropy to ensure clusters are distinct and structurally meaningful.

Datasets

The authors evaluated SpaPool on 10 diverse benchmarks from the TUDataset collection for graph classification:

  • Bioinformatics: PROTEINS, ENZYMES, DD, Mutagenicity.
  • Social/Web Networks: github_stargazers, reddit_threads, twitch_egos, COLLAB, IMDB-BINARY.
  • Medical: OHSU.

These datasets vary significantly in average node count (from ~20 to ~284) and attribute density, providing a robust testing ground for adaptive pooling.

Key Insights and Ideas

  • Supernodes as Centroids: The "aha moment" is treating the most important nodes not just as survivors, but as cluster centers. This allows the model to "summarize" the neighborhood around important nodes rather than just "sampling" them.
  • Small Graphs Matter: The paper highlights that in very small graphs (e.g., ~30 nodes), every node is essential. Sparse methods that delete 50% of nodes often destroy the graph's meaning. SpaPool’s ability to group rather than delete makes it significantly more effective here.
  • Cosine Similarity Wins: Through ablation studies, the authors found that using cosine similarity for node assignment outperformed standard scalar products or complex attention mechanisms, likely because it is more robust to varying embedding scales.

Key Results

  • Competitive Performance: SpaPool achieved the highest accuracy on the ENZYMES (68.29%) and Mutagenicity (76.58%) datasets.
  • Consistency: While it didn't win every single benchmark, it remained highly competitive across the board, often outperforming the popular TopKPool and SAGPool methods.
  • Small-Scale Excellence: The results confirmed that SpaPool is particularly potent for small-scale graphs where preserving local and global structure simultaneously is critical.

Limitations and Future Work

  • Large Graph Scaling: While SpaPool is adaptive, its "dense" assignment matrix ($S$) can still be computationally heavy for extremely large graphs compared to purely sparse methods.
  • Attribute Complexity: The current version was tested primarily on graphs with few attributes. The authors note that future work is needed to see how it handles high-dimensional attribute spaces.
  • Explainability: As with many GNN components, understanding why certain nodes are chosen as centroids remains a "black box." The authors suggest adding explainability components in future iterations to help researchers understand which features drive the pooling decisions.

Summary updated

BibTeX
@inproceedings{govan2025spapool,
  author = {Rodrigue Govan and Romane Scherrer and Philippe Fournier-Viger and Nazha Selmaoui-Folcher},
  title = {{SpaPool: Soft Partition Assignment Pooling for Graph Neural Networks}},
  booktitle = {Dawak},
  year = {2025},
  doi = {10.1007/978-3-032-02215-8\_27},
}
Figure