Second-Order Pooling for Graph Neural Networks

Zhengyang Wang, Shuiwang Ji · DOI

Abstract

Graph neural networks have achieved great success in learning node representations for graph tasks such as node classification and link prediction. Graph representation learning requires graph pooling to obtain graph representations from node representations. It is challenging to develop graph pooling methods due to the variable sizes and isomorphic structures of graphs. In this work, we propose to use second-order pooling as graph pooling, which naturally solves the above challenges. In addition, compared to existing graph pooling methods, second-order pooling is able to use information from all nodes and collect second-order statistics, making it more powerful. We show that direct use of second-order pooling with graph neural networks leads to practical problems. To overcome these problems, we propose two novel global graph pooling methods based on second-order pooling; namely, bilinear mapping and attentional second-order pooling. In addition, we extend attentional second-order pooling to hierarchical graph pooling for more flexible use in GNNs. We perform thorough experiments on graph classification tasks to demonstrate the effectiveness and superiority of our proposed methods. Experimental results show that our methods improve the performance significantly and consistently.

Introduction

Graph Neural Networks (GNNs) excel at learning local node-level features. However, many applications—such as molecular toxicity prediction or social network classification—require a global representation of the entire graph. This transition from node-level to graph-level data is achieved through graph pooling (or readout).

Effective pooling must address two primary challenges:

  1. Variable Graph Size: Graphs vary in node count, yet the output must be a fixed-size vector.
  2. Permutation Invariance: The output must be invariant to the arbitrary ordering of nodes (isomorphism).
Challenges in graph pooling: distinguishing between different structures (a) and node counts/features (b).

Traditional "first-order" methods, like global sum or mean pooling, often fail to capture complex feature correlations, effectively losing structural information during aggregation.

Proposed Methods: Second-Order Pooling (SOPOOL)

The authors propose second-order pooling (SOPOOL) to capture feature correlations across all nodes. Given a node feature matrix $H \in \mathbb{R}^{n \times f}$, the basic second-order pool is computed as $H^T H$. This operation is naturally permutation-invariant and accommodates variable node counts. However, a direct $H^T H$ operation results in $f^2$ parameters, which can lead to a "parameter explosion" for high-dimensional features.

To mitigate this, two variants are introduced:

  1. Bilinear Mapping ($SOPOOL_{bimap}$): A trainable linear transformation reduces the feature dimension $f$ to a smaller bottleneck $f'$ before pooling, ensuring computational efficiency.
  2. Attentional Second-Order Pooling ($SOPOOL_{attn}$): Instead of flattening the $f \times f$ correlation matrix, it is summarized into a vector of size $f$ by multiplying it with a trainable attention vector $\mu$.
Overview of Second-Order Pooling variants: Bilinear Mapping and Attentional Pooling.

Additionally, the authors developed a hierarchical extension ($SOPOOL_{m\_attn}$) using multi-head attention to group nodes into smaller sub-graphs, allowing the network to learn multi-scale representations.

Experimental Evaluation

The methods were evaluated across ten benchmarks in bioinformatics (e.g., MUTAG, NCI1, DD) and social networks (e.g., COLLAB, IMDB, REDDIT).

Key Results

  • Performance: The SOPOOL variants achieved state-of-the-art results on 8 out of 9 benchmark datasets.
  • Robustness: Unlike complex methods like DiffPool, SOPOOL showed consistent gains across diverse domains.
  • Ablation Study: Replacing standard sum/mean pooling with $SOPOOL_{bimap}$ or $SOPOOL_{attn}$ in a fixed GIN-0 architecture yielded accuracy improvements of up to 5-10% on datasets like PTC.

Discussion and Conclusion

Second-order pooling captures the "texture" of the graph's feature space by modeling feature co-occurrences. The authors highlight that standard normalization (like mean subtraction in covariance pooling) can be detrimental in graph contexts, as it may obscure differences in node counts—a critical feature in molecular data. Furthermore, because node features in GNNs are influenced by neighbors, second-order statistics implicitly encode graph topology.

While powerful, hierarchical models may face overfitting on small datasets. Future work includes exploring scalability for massive graphs and integrating techniques like "Jumping Knowledge" to stabilize deeper architectures.

Summary updated

BibTeX
@article{wang2020second,
  author = {Zhengyang Wang and Shuiwang Ji},
  title = {{Second-Order Pooling for Graph Neural Networks}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2020},
  doi = {10.1109/tpami.2020.2999032},
}
Figure