Abstract
Graph Neural Networks (GNN) have been shown to work effectively for modeling graph structured data to solve tasks such as node classification, link prediction and graph classification. There has been some recent progress in defining the notion of pooling in graphs whereby the model tries to generate a graph level representation by downsampling and summarizing the information present in the nodes. Existing pooling methods either fail to effectively capture the graph substructure or do not easily scale to large graphs. In this work, we propose ASAP (Adaptive Structure Aware Pooling), a sparse and differentiable pooling method that addresses the limitations of previous graph pooling architectures. ASAP utilizes a novel self-attention network along with a modified GNN formulation to capture the importance of each node in a given graph. It also learns a sparse soft cluster assignment for nodes at each layer to effectively pool the subgraphs to form the pooled graph. Our experimental results show that combining existing GNN architectures with ASAP leads to state-of-the-art results on multiple graph classification benchmarks, with an average improvement of 4% compared to current sparse hierarchical state-of-the-art methods.
The Pooling Challenge in GNNs
While Graph Neural Networks (GNNs) excel at node-level tasks, "pooling"—the process of downsampling a graph into a single representative vector for classification—remains a significant challenge. Existing methods generally fall into two categories, both with inherent flaws:
- Dense Pooling (e.g., DiffPool): These methods learn a soft assignment for every node to every potential cluster. While they capture structure well, they create dense matrices that do not scale to large graphs due to massive memory overhead.
- Sparse/Top-K Pooling (e.g., TopK, SAGPool): These methods drop "unimportant" nodes based on a score. While computationally efficient, they often destroy the graph's connectivity and ignore rich local substructures, such as functional groups in a molecule, which are critical for accurate classification.
The ASAP Architecture
ASAP (Adaptive Structure Aware Pooling) bridges this gap by providing a method that is both sparse and structure-aware. The architecture integrates three key components into the pooling pipeline:
Master2Token (M2T) Attention
To form clusters, ASAP treats each node's neighborhood as a potential cluster. It utilizes a "master" query—a summary of the neighborhood—to attend to all nodes within that local area. This allows the model to learn a soft, local membership for nodes, capturing how much each node contributes to a specific local substructure without requiring global dense assignments.
Local Extrema Convolution (LEConv)
Standard GCNs often act as low-pass filters, smoothing out features and making it difficult to identify distinct, important clusters. ASAP introduces LEConv, a new operator designed to emphasize the differences between a node and its neighbors (local extrema). This helps the model more accurately score and select which clusters to retain during the downsampling process.
Connectivity Preservation
After selecting the top-scoring clusters, ASAP recomputes the edges between them. By considering a larger receptive field (up to 3 hops in the original graph), the pooled graph remains well-connected, avoiding the "isolated island" problem common in Top-K methods. This ensures that subsequent layers can continue to pass messages effectively across the hierarchical representation.
Key Insights and Theoretical Contributions
- The Smoothing Trap: The authors demonstrate that standard GCNs are suboptimal for scoring clusters because they give similar scores to entire neighborhoods. LEConv explicitly addresses this by looking at the variance between a node and its neighbors.
- Efficiency through Localness: Unlike global methods, ASAP focuses on local $h$-hop neighborhoods. This naturally leads to sparsity, maintaining a space complexity of $O(|E|)$, which allows it to scale to much larger graphs than dense alternatives.
- Connectivity Guarantees: The paper proves that ASAP maintains better connectivity than Top-K methods even when sampling fewer nodes, which is vital for the integrity of hierarchical message passing.
Experimental Results
ASAP was evaluated on five standard graph classification benchmarks across bioinformatics (D&D, PROTEINS) and chemoinformatics (NCI1, NCI109, FRANKENSTEIN).
Key findings include:
- State-of-the-Art Performance: ASAP consistently outperformed both global and hierarchical baselines across all datasets.
- Significant Gains: The model showed an average improvement of 4% over previous sparse hierarchical methods like SAGPool.
- Stability: ASAP exhibited lower variance across different random seeds, suggesting that its structure-aware approach leads to more stable and reliable training compared to simple node-dropping heuristics.
Conclusion
ASAP provides a robust, scalable solution for hierarchical graph representation. By combining local attention with a convolution operator that highlights local extrema, it preserves the essential connectivity and substructures of a graph while maintaining the efficiency required for large-scale applications.
Summary updated