Optimal Sketching for Trace Estimation

Shuli Jiang, Hai Pham, David P. Woodruff, Qiuyi, Zhang
11/1/2021
cs.DSmath.NA

Official code: 11hifish/OptSketchTraceEst (2 stars, Python, last commit 2021-10-26).

Abstract

Matrix trace estimation is ubiquitous in machine learning applications and has traditionally relied on Hutchinson's method, which requires $O(\log(1/δ)/ε^2)$ matrix-vector product queries to achieve a $(1 \pm ε)$-multiplicative approximation to $\text{tr}(A)$ with failure probability $δ$ on positive-semidefinite input matrices $A$. Recently, the Hutch++ algorithm was proposed, which reduces the number of matrix-vector queries from $O(1/ε^2)$ to the optimal $O(1/ε)$, and the algorithm succeeds with constant probability.

Show full abstract

However, in the high probability setting, the non-adaptive Hutch++ algorithm suffers an extra $O(\sqrt{\log(1/δ)})$ multiplicative factor in its query complexity. Non-adaptive methods are important, as they correspond to sketching algorithms, which are mergeable, highly parallelizable, and provide low-memory streaming algorithms as well as low-communication distributed protocols. In this work, we close the gap between non-adaptive and adaptive algorithms, showing that even non-adaptive algorithms can achieve $O(\sqrt{\log(1/δ)}/ε+ \log(1/δ))$ matrix-vector products. In addition, we prove matching lower bounds demonstrating that, up to a $\log \log(1/δ)$ factor, no further improvement in the dependence on $δ$ or $ε$ is possible by any non-adaptive algorithm. Finally, our experiments demonstrate the superior performance of our sketch over the adaptive Hutch++ algorithm, which is less parallelizable, as well as over the non-adaptive Hutchinson's method.

View on arXivView PDF

Code Implementations(1)

Optimal Sketching for Trace Estimation

20Python, Jupyter NotebookOct 26, 20215 years ago

Similar Papers

Cite this paper

@article{jiang2021optimal,
  title  = {Optimal Sketching for Trace Estimation},
  author = {Shuli Jiang and Hai Pham and David P. Woodruff and Qiuyi and Zhang},
  year   = {2021},
  eprint = {2111.00664},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.00664}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.00664.svg)](https://codeofpaper.com/paper/2111.00664)

Discussion