Deep Learning and Spectral Embedding for Graph Partitioning

Alice Gatti, Zhixiong Hu, Tess E. Smidt, Esmond G. Ng, Pieter Ghysels

TL;DR

This paper introduces a novel deep learning framework for graph partitioning that works on graphs without any pre-existing node features. By combining a spectral-inspired embedding module with a multilevel partitioning network, the authors achieve partition quality comparable to industry standards like METIS and Scotch while offering significantly faster runtimes and better GPU acceleration.

What Problem Does This Paper Address?

Graph partitioning—the process of dividing a graph into smaller, balanced pieces while minimizing the number of edges cut between them—is a cornerstone of scientific computing. It is essential for load balancing in parallel simulations and sparse matrix operations.

However, graph partitioning is NP-hard. While heuristic tools like METIS have been the gold standard for decades, they are primarily sequential and struggle to leverage modern parallel hardware like GPUs. Recent deep learning attempts (such as the GAP framework) showed promise but had a major "Achilles' heel": they required distinct node features to work. In scientific computing, graphs (like meshes or sparse matrix structures) often have no features other than their connectivity. This paper fills that gap by teaching a neural network to "engineer" its own features through spectral embedding.

Methods

The authors propose a two-phase Graph Neural Network (GNN) architecture:

  1. The Embedding Module: Since the input graphs lack features, this module learns to produce an approximate spectral embedding. It is trained using a loss function based on the graph Laplacian eigenvector residual. Essentially, the network learns to approximate the Fiedler vector (the eigenvector associated with the smallest non-zero eigenvalue), which is known in spectral theory to provide high-quality partitions.
  2. The Partitioning Module: This module takes the learned embedding as input and outputs the probability of each node belonging to a specific partition. It is trained to minimize the Expected Normalized Cut, a loss function that balances the size of the partitions while minimizing the edge cut.

Key Architectural Features: * Multilevel Structure: Both modules use a "V-cycle" approach inspired by multigrid algorithms. The graph is repeatedly coarsened (using the Graclus algorithm), processed at the coarsest level, and then interpolated back to the original resolution with "smoothing" layers (SAGE convolutional layers) at each step. * Generalization: By using weight-sharing across different levels of the graph hierarchy, the number of trainable parameters remains independent of the graph size.

Datasets

The model was trained and evaluated on a variety of synthetic and real-world datasets:

  • Synthetic: 1,500 random Delaunay meshes on a square and 750 on a rectangle.
  • Finite Element Method (FEM) Triangulations: Specifically the GradedL, Hole3, and Hole6 geometries, which include complex shapes and holes.
  • SuiteSparse Matrix Collection: Real-world graphs from scientific computing applications, ranging from 100 nodes to over 1.5 million nodes and 110 million edges.

Key Insights and Ideas

  • Learning Spectral Theory: The most significant "aha moment" is that a GNN can be trained to approximate spectral embeddings. This allows the model to capture global graph structure that standard message-passing GNNs usually miss.
  • Multilevel is Mandatory: The authors observe that standard GNNs don't generalize well to large graphs for partitioning tasks. The multilevel (coarsening/unpooling) structure is critical for the network to "see" the big picture of the graph.
  • Feature Engineering via Loss: Instead of needing manual feature engineering, the authors use a mathematically grounded loss function (eigenvector residual) to force the network to discover the most useful features for partitioning.

Key Results

  • Competitive Quality: The "GAP" framework produced partitions with Normalized Cut ($Ncut$) values very close to METIS and Scotch. In some SuiteSparse test cases, it even outperformed the classical heuristics.
  • Superior Speed: The proposed method consistently outperformed METIS and exact spectral partitioning in terms of runtime. While Scotch remained the fastest in many cases, the GAP framework's ability to run on GPUs offers a path toward massive parallelization that classical tools lack.
  • Impressive Generalization: Despite being trained on relatively small graphs (up to 5,000 nodes), the model successfully partitioned graphs with millions of nodes, proving that it learned the underlying logic of graph topology rather than just memorizing specific shapes.

Limitations and Future Work

  • Bisection Focus: The current study focuses on bisection (splitting a graph into two). While this can be applied recursively for $K$-way partitioning, a direct $K$-way partitioning module would be more efficient.
  • Higher-Order Embeddings: The authors suggest that passing multiple eigenvectors (instead of just the approximate Fiedler vector) to the partitioning module could further improve quality, especially for complex graphs.
  • Network Optimization: The authors believe the partitioning module could be made "leaner" (fewer layers) because the embedding module already does the heavy lifting of providing a global view of the graph.

Summary updated

BibTeX
@inproceedings{gatti2022deep,
  author = {Alice Gatti and Zhixiong Hu and Tess E. Smidt and Esmond G. Ng and Pieter Ghysels},
  title = {{Deep Learning and Spectral Embedding for Graph Partitioning}},
  booktitle = {PP},
  year = {2022},
  doi = {10.1137/1.9781611977141.3},
}
Figure