TL;DR
This paper introduces a novel distributed algorithm for balanced graph partitioning, crucial for handling massive graphs that don't fit into a single machine's memory. Their approach embeds graph nodes onto a line and then iteratively refines this ordering to minimize the "cut size" (edges between partitions), achieving state-of-the-art results on various benchmarks and significantly improving query performance for Google Maps driving directions.
What Problem Does This Paper Address?
Large-scale graph processing is fundamental to many modern applications, from social network analysis to mapping services. A common bottleneck is the sheer size of these graphs, often exceeding the memory capacity of a single machine. To overcome this, graphs are typically partitioned into smaller pieces, each handled by a separate machine. However, achieving a balanced partition (where each piece is roughly the same size) while simultaneously minimizing the number of edges connecting different partitions (the "cut size") is a computationally challenging problem. A small cut size is vital for efficient distributed computation, as it reduces communication overhead between machines. Existing methods often struggle with scalability, distributed implementation, or achieving optimal balance-to-cut ratios. This paper tackles the problem of creating a distributed, scalable, and effective balanced graph partitioning algorithm.
Methods
The core of the proposed algorithm is a multi-stage process:
- Linear Embedding (Initialization): The first step is to map all graph vertices onto a single line. This creates an ordering that ideally places neighboring vertices close to each other. The paper explores several methods for this:
- Random Ordering: A simple baseline.
- Hilbert Curve Embedding: Leverages geometric information for map-like graphs.
- Affinity Clustering (Hierarchical Clustering): A novel approach that uses the number of common neighbors between vertices as a similarity metric. This method proved surprisingly effective, even for geographic data.
- Semilocal Improvement (Postprocessing): Once an initial ordering is established, the algorithm refines it to improve the cut size. This involves iterative steps:
- Metric Optimization: Aims to optimize a linear arrangement objective.
- Rank Swap: Swaps nodes between partitions to reduce the cut size, with different methods for handling swaps and updates.
- Imbalance-Inducing Techniques: Allows for slight imbalances in partition sizes to achieve better cut quality. This includes dynamic programming on contracted subgraphs and "window-based" optimization.
The final algorithm, termed "Combination," iteratively applies the best initialization and postprocessing techniques until convergence. The entire process is designed to be implemented efficiently in distributed frameworks like MapReduce.
Datasets
The paper evaluates its algorithms on several large-scale datasets:
- World-roads: A geographic dataset representing the world road network, with millions of vertices and over a billion edges. It's notable for its near-planarity and vertex longitude/latitude information.
- Twitter: A public graph of tweets, featuring approximately 41 million vertices and 2.4 billion directed edges (followers). The experiments use the undirected underlying graph.
- LiveJournal: An undirected version of a public social graph from 2006, with 4.8 million vertices and 42.9 million edges.
- Friendster: Another undirected public social graph from 2006, containing 65.6 million vertices and 1.8 billion edges.
The paper also mentions using private map graphs for Google Maps driving directions.
Key Insights and Ideas
- Affinity Clustering Outperforms Geometry: Surprisingly, the hierarchical clustering approach based on common neighbors (AffCommNeigh) as a similarity metric yielded better initial orderings than geometric methods like Hilbert curves, even for geographic datasets. This highlights the importance of actual graph connectivity over spatial proximity.
- Iterative Refinement is Key: No single postprocessing technique is universally best. Combining multiple methods (like swaps and min-cut optimization) in an iterative "Combination" algorithm leads to superior results.
- Imbalance Can Improve Cuts: Allowing a small degree of imbalance (e.g., 3-10%) in partition sizes can significantly reduce the cut size, a counter-intuitive but effective strategy.
- Scalability Across Partition Counts: The algorithm's running time is largely independent of the number of partitions ($k$), making it suitable for scenarios requiring tens of thousands of partitions.
- Real-World Impact: The algorithm's effectiveness is demonstrated by its application to Google Maps driving directions, where it significantly reduced multi-shard queries, leading to improved efficiency.
Key Results
- Superior Cut Quality: The "Combination" algorithm consistently outperforms previous state-of-the-art distributed graph partitioning algorithms, including label propagation methods ([UB13]) and FENNEL ([TGRV14]), by significant margins (e.g., 15-25% improvement on LiveJournal compared to [UB13]).
- Google Maps Improvement: Live experiments for Google Maps driving directions showed a ~40% reduction in multi-shard queries when using their optimized partitioning compared to a standard geography-based method.
- Scalability: The algorithm scales well with graph size and can handle a large number of partitions ($k$) without substantial performance degradation.
- Convergence: Semilocal improvement methods converge relatively quickly, often within a few rounds.
Limitations and Future Work
- Approximation Guarantees: The paper focuses on heuristic methods and does not provide theoretical approximation guarantees for the cut size, acknowledging that the problem is NP-hard.
- Memory for DP: The dynamic programming approach for optimizing cuts requires the subgraph to fit into memory, necessitating contraction for very large graphs.
- Future Research: The authors suggest exploring spectral embedding methods or standard embedding techniques into $l_1$ for initialization, provided scalable distributed implementations can be developed. They also leave the exploration of more advanced similarity metrics for affinity clustering as future work.
Summary updated