English

Robustifying Sparse Matrix Multiplication

Data Structures and Algorithms 2026-07-01 v1

Abstract

In the seminal sparse matrix multiplication problem the goal is to compute the product of two n×nn \times n matrices when the matrices are sparse, i.e., when the number of nonzeros in the input matrices minm_{in} and/or the number of nonzeros in the output matrix moutm_{out} are much smaller than n2n^2. In this paper, we explore the generalized problem of (approximately) computing the kk largest output entries, with an approximation error dependent solely on the smaller entries -- from the viewpoint of sparse recovery, this can be seen as a robust variant of sparse matrix multiplication. Despite the substantial research dedicated to sparse matrix multiplication, almost no existing algorithms are robust in this sense. The one exception is Pagh's algorithm in time O~(min+nk)\widetilde O(m_{in} + nk) [ITCS'12], and it remained open whether other algorithms can be similarly made robust. Our principal contribution is a black-box reduction from robust sparse matrix multiplication to conventional sparse matrix multiplication with only polylogarithmic overhead. Specifically, we show that any sparse matrix multiplication algorithm with running time T(n,min,mout)T(n, m_{in}, m_{out}) can be transformed into a robust algorithm running in time O~(T(n,min,k))\widetilde O(T(n, m_{in}, k)). This reduction leverages an extensive toolkit from sparse recovery, and intriguingly, also involves solving a knapsack-type problem. By plugging in the state-of-the-art algorithm for sparse matrix multiplication by Abboud, Bringmann, Fischer, and K\"unnemann [SODA'24], we achieve significantly improved bounds such as O((min+k)1.346)O((m_{in} + k)^{1.346}). Notably, in the regime where kmin1.762k \geq m_{in}^{1.762}, our reduction culminates in an almost-optimal k1+o(1)k^{1+o(1)}-time algorithm.

Cite

@article{arxiv.2607.01427,
  title  = {Robustifying Sparse Matrix Multiplication},
  author = {Karl Bringmann and Nick Fischer and Vasileios Nakos},
  journal= {arXiv preprint arXiv:2607.01427},
  year   = {2026}
}

Comments

accepted at ESA'26, 31 pages