Introduction
Graph partitioning—the task of dividing a graph’s nodes into equal-sized groups while minimizing the number of edges cut between them—is a fundamental problem in computer science. It is critical for applications ranging from VLSI circuit design to distributed computing and social network analysis. However, the problem is NP-complete, making exact solutions for large graphs computationally prohibitive.
Traditional heuristics, such as hMETIS, are "transductive," meaning they must re-optimize from scratch for every new graph instance. The Generalizable Approximate Partitioning (GAP) framework addresses these limitations by introducing a deep learning approach that learns to partition unseen graphs efficiently.
The GAP Framework
GAP is an unsupervised, differentiable framework designed to learn generalizable partitioning rules. It consists of two primary components:
- Graph Embedding Module: This module utilizes Graph Neural Networks (GNNs), such as Graph Convolutional Networks (GCN) or GraphSAGE, to transform raw graph data into high-dimensional node embeddings. These embeddings capture both the local and global structural context of each node.
- Graph Partitioning Module: A fully connected layer followed by a Softmax function processes the node embeddings to output the probability of each node belonging to a specific partition.
To train the model without labeled data, the authors developed a differentiable loss function that acts as a continuous relaxation of the Normalized Cut objective. This loss function balances two competing goals: minimizing the expected number of edges between different partitions (Cut Term) and ensuring the partitions are of equal size (Balance Term).
Datasets and Experimental Setup
The researchers evaluated GAP on a diverse set of graph structures, including real-world computation graphs and synthetic models. Real-world data included TensorFlow internal structures for models like ResNet-50, VGG, and AlexNet, ranging from 400 to 27,000 nodes. Synthetic data included dense Erdős–Rényi random graphs and scale-free graphs that mimic real-world network power-law distributions.
Key Results and Generalization
GAP demonstrates significant advantages over traditional solvers in terms of speed and generalization:
- Zero-Shot Generalization: GAP can be trained on one type of graph (e.g., VGG) and immediately partition a different model (e.g., ResNet) with high efficiency. This suggests the GNN learns fundamental structural rules rather than memorizing specific graph shapes.
- Inductive Scaling: Models trained on small graphs (1,000 nodes) successfully partition much larger graphs (20,000 nodes), demonstrating size-invariance.
- Inference Speed: At inference time, GAP is 10x to 100x faster than hMETIS. While hMETIS requires iterative optimization for every new graph, GAP provides solutions via a single forward pass.
- Quality: GAP achieves edge-cut results competitive with hMETIS, maintaining over 99% balancedness across most test cases.
Discussion and Future Work
While GAP offers a scalable and fast alternative to traditional heuristics, it faces challenges common to GNNs, such as memory intensity on extremely large graphs (millions of nodes) due to neighborhood explosion. Furthermore, generalization is strongest when meaningful node features (like operation types in computation graphs) are available. Future research may explore hardware-aware partitioning, where different partitions incur varying communication costs in distributed systems.
Summary updated