Abstract
This paper presents a novel deterministic algorithm for sparse matrix multiplication (SMM) within the Congested Clique model. By leveraging dynamic 3D partitioning and sparsity-aware restructuring, the proposed method achieves state-of-the-art round complexity for sparse inputs. These techniques are further applied to fundamental graph problems, yielding a cubic improvement in deterministic triangle listing and efficient 4-cycle counting, matching the performance of previous randomized approaches.
Introduction
In distributed computing, the Congested Clique model serves as a benchmark for understanding communication-efficient algorithms. In this model, $n$ nodes form a fully connected network where each node can send $O(\log n)$ bits to every other node in a single synchronous round. While dense matrix multiplication is well-understood, real-world datasets—such as social networks or web graphs—are predominantly sparse. The primary challenge in processing sparse data is the inherent imbalance: a small number of rows or columns often contain a disproportionate amount of information, creating communication bottlenecks. This paper introduces a deterministic framework to leverage the sparsity of both input matrices simultaneously.
Problem Statement
Previous attempts to handle sparse matrix multiplication in distributed settings often relied on randomization (e.g., random permutations) to distribute the load or only exploited sparsity in one of the input matrices. Deterministic algorithms frequently suffered from poor worst-case performance when faced with highly skewed data distributions. The core challenge is to find a way to distribute the "work" (element-wise multiplications) evenly across nodes without relying on probabilistic luck.
Methodology
The authors propose a three-fold deterministic strategy to manage sparsity and balance the communication load across the network.
- Sparsity-Aware Restructuring: The algorithm begins by analyzing the distribution of non-zero elements in the input matrices $S$ and $T$. By permuting rows and columns based on density, the algorithm ensures that the subsequent element-wise multiplications are distributed evenly among the nodes. This step transforms an irregular problem into a more uniform one using a sorting-based partition.
- Dynamic 3D Partitioning: The multiplication task is conceptualized as a 3D cube of size $n \times n \times n$, where each point $(i, j, k)$ represents the product $S_{ik} \cdot T_{kj}$. The algorithm dynamically adjusts the dimensions of sub-cubes based on the actual number of non-zero elements ($nz(S)$ and $nz(T)$). This optimization minimizes the total number of communication rounds required to aggregate the partial products.
- Non-Consecutive Page Assignment: To prevent any single node from becoming a bottleneck due to local density clusters, the algorithm assigns "pages" (slices of the 3D multiplication cube) to nodes in a non-consecutive, interleaved fashion. This ensures that even if a specific region of the matrix is dense, its processing is spread across multiple nodes.
Communication is facilitated by Lenzen’s routing scheme, which guarantees efficient all-to-all communication provided that no node is required to send or receive more than $n-1$ messages per round.
Key Results
The proposed algorithm establishes new benchmarks for several key problems in the Congested Clique model:
- General Sparse Matrix Multiplication: The product of matrices $S$ and $T$ is computed in $O\left(\frac{nz(S)^{1/3}nz(T)^{1/3}}{n} + 1\right)$ rounds.
- Triangle Listing: The algorithm lists all triangles in a graph with $m$ edges in $O(m/n^{5/3} + 1)$ rounds. This represents a cubic improvement over the previous best deterministic bound of $O(m^2/n^3)$ and matches the best-known randomized complexity.
- 4-Cycle Counting: The complexity is reduced to $O(m^{2/3}/n + 1)$ rounds, allowing for constant-round counting in graphs where $m = O(n^{3/2})$.
- All-Pairs Shortest Paths (APSP): For unweighted undirected graphs with diameter $D$, the algorithm completes in $O(D((m/n)^{1/3} + 1))$ rounds, outperforming previous state-of-the-art bounds for a wide range of graph densities.
Conclusion and Future Work
By treating sparsity as a resource rather than a hindrance, this work demonstrates that deterministic load balancing can achieve efficiencies previously reserved for randomized methods. The dynamic 3D partitioning approach provides a robust framework for handling skewed data in distributed environments.
Future research may focus on addressing the "fill-in" problem in iterative matrix squaring, where sparse matrices often become dense over successive operations. Additionally, the authors suggest that these balancing techniques could be adapted to the $k$-machine model, where the number of machines is significantly smaller than the number of nodes, extending the impact to broader distributed architectures.
Summary updated