HackerPapers

arXiv:2106.10860cs.LG

Multiplying Matrices Without Multiplying

Davis Blalock, John Guttag

Abstract

Multiplying matrices is among the most fundamental and compute-intensive operations in machine learning. Consequently, there has been significant work on efficiently approximating matrix multiplies. We introduce a learning-based algorithm for this task that greatly outperforms existing methods. Experiments using hundreds of matrices from diverse domains show that it often runs $100\times$ faster than exact matrix products and $10\times$ faster than current approximate methods. In the common case that one matrix is known ahead of time, our method also has the interesting property that it requires zero multiply-adds. These results suggest that a mixture of hashing, averaging, and byte shuffling$-$the core operations of our method$-$could be a more promising building block for machine learning than the sparsified, factorized, and/or scalar quantized matrix products that have recently been the focus of substantial research and hardware investment.

arXiv comments
To appear at ICML 2021
Journal reference
PMLR 139:992-1004, 2021
DOI
Subjects
cs.LGMachine Learning cs.ARHardware Architecture cs.PFPerformance stat.MLMachine Learning (Statistics)

On Hacker News

Linked by 4 identifiable commenters in 5 comments across 3 threads, from Jun 2022 to May 2024. Found in 2 HN submissions from Jun 2021 to Sep 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

  1. Reproducing GPT-2 in llm.c 1 comment
    • There's work on replacing multiplication. Here's four examples: https://openaccess.thecvf.com/content_CVPR_2020/papers/Chen_... https://arxiv.org/abs/2012.03458 https://openaccess.thecvf.com/content/CVPR2021W/MAI/papers/E... https://arxiv.org/pdf/2106.10860

      nickpsecurityView on HNParent context

    • Author here: Thank you for the feedback :-) A lot of the work regarding the comparison with „simple“ approximate matrix multiplication has been done in the preceding paper: https://arxiv.org/abs/2106.10860 While I share your enthusiasm regarding the potential, we have to be…

      joennlaeView on HNParent context

    • Maddness is their more recent work and yields 100x speedups: https://arxiv.org/pdf/2106.10860.pdf The code for Maddness is in the same github repo if you search for "Mithral". SIMD instructions can work wonders in the right context.

      cgreerrunView on HNParent context

    • There's definitely a tradeoff between speed and accuracy. We characterize this for various problems in the paper (https://arxiv.org/pdf/2106.10860.pdf), but tl;dr is that it speeds things up more at a given level of error when there's more redundancy in your matrices.…

      ffast-mathView on HNParent context

    • We found sparse, truncated PCA to be the most competitive baseline. We beat it by a lot (see the paper [1]), but the other big drawback is that trading off the rank vs sparsity was an ugly hyperparameter tuning problem. By ugly, I mean that the results were really sensitive to…

      ffast-mathView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.