Clique pooling for graph classification

Enxhell Luzhnica, Ben Day, Pietro LiòarXiv 2019

Abstract

Researchers from the University of Cambridge have introduced Clique Pooling, a new way to downsample graphs by grouping nodes into "maximal cliques"—subgraphs where every node is connected to every other node. Unlike popular state-of-the-art methods that "learn" how to cluster nodes, this approach is purely topological and nonparametric, making it faster to train, more interpretable, and surprisingly effective on both irregular graphs and standard images.

Introduction

In the world of Deep Learning, Convolutional Neural Networks (CNNs) rule images because of two operations: convolution (extracting features) and pooling (reducing resolution). While we’ve successfully adapted convolutions to graphs (Graph Convolutional Networks or GCNs), pooling on graphs remains a significant challenge.

Most current graph pooling methods fall into two camps:

  1. Global Pooling: Smashing the entire graph into a single vector, which loses all structural hierarchy.
  2. Parametric Hierarchical Pooling: Using neural network layers to "decide" which nodes to group together (e.g., DiffPool). These are powerful but act as "black boxes"—they require many hyperparameters, add significant computational overhead, and can be unstable during training.

To address this, the authors propose a purely topological pooling method that relies on the graph's shape rather than node features, acting as a true analogue to image downsampling.

Methodology

The core idea is to use maximal cliques as the unit for pooling. In graph theory, a clique is a subset of nodes where every node is adjacent to every other node. A maximal clique is one that cannot be extended by adding another adjacent node.

Hierarchical pooling process using maximal cliques across multiple layers.

The process works as follows:

  1. Find Cliques: Use the Bron-Kerbosch algorithm to identify all maximal cliques in the graph.
  2. Greedy Assignment: Nodes are assigned to pools based on clique size. To prevent a single node from being scattered across too many pools, the algorithm greedily assigns a node to the largest clique it belongs to.
  3. Inherit Edges: If two nodes in different cliques share an edge in the original graph, their respective "pooled" nodes will share an edge in the coarsened graph.
  4. Readout: Features within a clique are aggregated (usually via mean or max pooling) to form the features of the new, "coarsened" node.

Crucially, this operation is nonparametric. There are no weights to learn; the pooling structure is determined entirely by the graph's starting topology and can be precomputed before training begins.

Experimental Setup

The authors evaluated Clique Pooling on two distinct fronts:

  • Bio-informatics & Social Graphs: ENZYMES, DD, PROTEINS, and COLLAB. These are standard benchmarks for graph classification.
  • Image Classification: CIFAR-10. By treating an image as a regular grid graph (where each pixel connects to its 8 neighbors), they tested if Clique Pooling could replace standard 2x2 max-pooling in a VGG-style CNN.

Key Insights

  • Topological Purity: Because the method doesn't look at node features to decide how to pool, it is "feature-agnostic." This makes it highly interpretable—you know exactly why two nodes were grouped: they formed a tight-knit structural circle.
  • The "Dendritic" Bias: The algorithm naturally tends to produce a hierarchy that looks like a tree (dendritic). This structural simplification helps the network focus on broader patterns as it goes deeper.
  • Backwards Compatibility: Clique Pooling naturally reduces to a form of grid-coarsening on regular images. This proves that the "clique" is a mathematically sound generalization of the "2x2 window" used in standard computer vision.
  • Efficiency: By removing the need to learn pooling assignments, the authors eliminated thousands of parameters. For the DD dataset, their method used 0 pooling parameters, whereas the competing DiffPool method required over 27,000.

Results

Clique Pooling demonstrated competitive accuracy on graph datasets like ENZYMES and PROTEINS, outperforming the GraphSAGE baseline and matching complex parametric models like DiffPool. Because the pooling is static and precomputable, the models were faster to train and more stable than models that try to learn clustering and classification simultaneously.

Performance comparison of Clique Pooling against baseline and state-of-the-art models on benchmark datasets.

On CIFAR-10, replacing standard pooling with Clique Pooling resulted in 92.0% accuracy, nearly matching the 92.4% of the highly optimized 2x2 max-pool baseline. This demonstrates that the method is a robust, general-purpose operator.

Conclusion and Future Work

The primary limitation is computational complexity, as finding all maximal cliques is an NP-hard problem. While optimized versions of the Bron-Kerbosch algorithm perform well on sparse real-world data, extremely dense graphs might require approximation techniques. Future work could explore using Clique Pooling for graph generation or applying it to massive-scale networks where precomputing the topology could save significant GPU memory during training.

Summary updated

BibTeX
@misc{luzhnica2019clique,
  author = {Enxhell Luzhnica and Ben Day and Pietro Liò},
  title = {{Clique pooling for graph classification}},
  year = {2019},
  eprint = {1904.00374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.00374},
}
Figure