Introduction
Graph Neural Networks (GNNs) have revolutionized tasks involving relational data, yet their scalability remains a significant hurdle. Training on massive real-world graphs with millions of nodes and billions of edges is computationally prohibitive. Graph condensation, or distillation, has emerged as a solution by creating small, synthetic "exemplar" graphs that retain the performance of the original dataset. However, existing methods often suffer from a "training paradox"—requiring expensive pre-training on the full graph—and are heavily dependent on specific GNN architectures.
Bonsai addresses these challenges by introducing a gradient-free approach that shrinks massive datasets into tiny, representative graphs. By focusing on the geometry of computation trees rather than expensive gradient matching, it achieves state-of-the-art accuracy while being significantly faster and more energy-efficient than existing baselines.
The Bonsai Framework
Bonsai moves away from gradients and instead focuses on the computation tree—the fundamental unit of information a GNN processes when examining a node's neighborhood. This structural focus allows the method to capture the essence of a node's role within the graph without needing to simulate the learning process of a specific model.
The condensation process involves several key steps:
- WL-Kernel Embedding: Every node's computation tree is mapped into a feature space using the Weisfeiler-Lehman (WL) kernel, capturing both attributes and local topology.
- Exemplar Selection via Reverse k-NN: Bonsai identifies "representative" nodes whose computation trees appear most frequently in the k-nearest neighbor lists of other nodes.
- Diversity through Coverage Maximization: To ensure the condensed graph isn't just a collection of identical nodes, a greedy algorithm selects a diverse set of exemplars that "cover" the original graph's structural variety.
- Sparsification and Enrichment: Finally, Personalized PageRank (PPR) is used to prune redundant edges and enrich the graph with more exemplars in the saved space, ensuring the final graph is lean but information-dense.
Key Insights: Topological Invariance
A core discovery of the Bonsai research is topological invariance. The authors demonstrate that nodes with similar computation trees (as measured in the WL-space) generate similar embeddings regardless of the specific GNN architecture used (e.g., GCN, GIN, or GAT). This property is what makes Bonsai truly model-agnostic; a graph condensed for one architecture remains highly effective for others.
Performance and Efficiency
Bonsai's gradient-free nature makes it exceptionally efficient. Because it avoids backpropagation during condensation, the process is entirely CPU-bound and significantly faster than GPU-heavy alternatives. Experimental results across seven benchmarks, including the massive MAG240M dataset, highlight its advantages:
- Speed: Bonsai is 22x faster on average than the next best method. On the Reddit dataset, it finished in ~19 minutes, while competitors took over 5 hours or crashed.
- Energy Efficiency: It is 17x more energy-efficient than state-of-the-art baselines, making it a "green" choice for large-scale AI research.
- Scalability: With linear complexity $O(V+E)$, it is the first condensation algorithm truly viable for massive-scale graphs like MAG240M (1.3M nodes), where most baselines failed to finish.
- Accuracy: Bonsai outperformed baselines in 12 out of 18 tested scenarios, proving that structural representation can match or exceed the performance of gradient-based methods.
Conclusion
Bonsai represents a paradigm shift in graph condensation, moving from expensive gradient matching to efficient structural analysis. By leveraging computation trees and topological invariance, it provides a scalable, model-agnostic, and environmentally friendly solution for training GNNs. While currently optimized for node classification, future work may extend this framework to task-agnostic condensation for link prediction and graph-level classification.
Summary updated