Sparse matrix multiplication and triangle listing in the Congested Clique model

Keren Censor-Hillel, Dean Leitersdorf, Elia TurnerTheoretical Computer Science 2020

TL;DR

This paper presents a novel deterministic algorithm for multiplying sparse matrices in the CONGESTED CLIQUE model, achieving a communication complexity that depends on the sparsity of the input matrices. This advancement leads to significant speedups for graph problems like triangle listing and all-pairs shortest paths, outperforming previous randomized and deterministic approaches.

What Problem Does This Paper Address?

The CONGESTED CLIQUE model is a distributed computing setting where $n$ nodes are fully connected but have limited message bandwidth. Matrix multiplication is a fundamental operation with broad applications, but performing it efficiently in this model, especially for sparse matrices, has been a challenge. Existing algorithms often struggle with the unbalanced distribution of non-zero elements in sparse matrices, leading to high communication costs. This paper aims to develop a deterministic algorithm that leverages sparsity to reduce communication rounds for matrix multiplication and, consequently, for related graph problems.

Methods

The core of the paper's contribution lies in a new deterministic method for restructuring input matrices in a sparsity-aware manner. This involves:

  • Sparsity-Aware Restructuring: The algorithm first permutes the rows and columns of the input matrices ($S$ and $T$) to create "sparsity-balanced" matrices ($S'$ and $T'$). This permutation is designed to distribute the non-zero elements more evenly, mitigating the issue of unbalanced sparsity.
  • Non-Consecutive Page Assignment: A key innovation is how the computation of sub-matrices (pages) is assigned to nodes. Instead of assigning consecutive pages, the algorithm uses a non-consecutive assignment strategy. This, combined with the sparsity-balanced matrices, ensures that nodes receive a roughly equal number of non-zero entries, balancing the communication load.
  • Leveraging Lenzen's Routing Scheme: The algorithm relies on Lenzen's routing scheme, a powerful tool for efficient message routing in the CONGESTED CLIQUE model, to handle the communication challenges.

These techniques are combined into an algorithm called SMM (Sparse Matrix Multiplication), which then calls a subroutine SBMM (Sparse Balanced Matrix Multiplication) for the actual computation on the restructured matrices.

Datasets

Not discussed in the paper. The paper focuses on theoretical algorithms and their complexity analysis, rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Sparsity is Key: The paper demonstrates that explicitly leveraging matrix sparsity can lead to significant improvements in distributed algorithms, even in communication-bound models like the CONGESTED CLIQUE.
  • Beyond Randomness: The development of a deterministic sparse matrix multiplication algorithm is a notable achievement, offering guaranteed performance bounds unlike randomized approaches.
  • Restructuring for Balance: The core idea of permuting matrices to achieve "sparsity balance" is crucial. This preprocessing step allows subsequent computations to be more evenly distributed.
  • Non-Consecutive Assignment: The non-consecutive assignment of computation tasks (pages) to nodes is a clever way to further balance the workload and minimize communication, especially when dealing with the restructured, balanced matrices.
  • Unified Approach for Graph Problems: The paper shows how a single algorithmic technique for sparse matrix multiplication can be applied to solve multiple graph problems (triangle listing, APSP, 4-cycle counting) more efficiently.

Key Results

  • Sparse Matrix Multiplication: The main result is a deterministic algorithm for multiplying two $n \times n$ sparse matrices $S$ and $T$ in the CONGESTED CLIQUE model with a round complexity of $O(\text{nz}(S)^{1/3}\text{nz}(T)^{1/3}/n + 1)$, where $\text{nz}(\cdot)$ denotes the number of non-zero elements. This is a significant improvement over general matrix multiplication algorithms when matrices are sparse.
  • Triangle Listing: A deterministic algorithm for triangle listing in an $n$-node, $m$-edge graph is achieved in $O(m/n^{5/3} + 1)$ rounds. This matches the complexity of a previously known randomized algorithm and improves upon older deterministic methods by more than a cubic factor.
  • 4-Cycle Counting: The algorithm provides a deterministic solution for counting 4-cycles in $O(m^{2/3}/n + 1)$ rounds.
  • All-Pairs Shortest Paths (APSP): For unweighted undirected graphs, an APSP algorithm is presented with a complexity of $O(D((m/n)^{1/3} + 1))$ rounds, where $D$ is the graph's diameter. This offers an improvement for sparse graphs where $m$ is significantly smaller than $n^2$.

Limitations and Future Work

  • Generalization to k-Machine Model: The authors discuss how their approach might be adapted to the more general $k$-machine model, but the resulting complexity is not as favorable as in the CONGESTED CLIQUE. They pose the question of whether further improvements are possible in this broader setting.
  • Further Sparsity Improvements: A central open question is whether the round complexity of sparse matrix multiplication in the CONGESTED CLIQUE model can be further reduced.
  • Practical Performance: While the theoretical complexity is improved, the practical performance of these algorithms in real-world distributed systems is not discussed. Future work could explore implementations and empirical evaluations.

Summary updated

BibTeX
@article{censorhillel2020sparse,
  author = {Keren Censor-Hillel and Dean Leitersdorf and Elia Turner},
  title = {{Sparse matrix multiplication and triangle listing in the Congested Clique model}},
  journal = {Theoretical Computer Science},
  year = {2020},
  doi = {10.1016/j.tcs.2019.11.006},
}
Figure