Learning Best Combination for Efficient N:M Sparsity

Yuxin Zhang, Mingbao Lin, Zhihang Lin, Yiting Luo, Ke Li +3 more
6/14/2022
cs.LGcs.CV

Official code: zyxxmu/LBC (22 stars, Python, last commit 2023-01-13).

Abstract

By forcing at most N out of M consecutive weights to be non-zero, the recent N:M network sparsity has received increasing attention for its two attractive advantages: 1) Promising performance at a high sparsity. 2) Significant speedups on NVIDIA A100 GPUs.

Show full abstract

Recent studies require an expensive pre-training phase or a heavy dense-gradient computation. In this paper, we show that the N:M learning can be naturally characterized as a combinatorial problem which searches for the best combination candidate within a finite collection. Motivated by this characteristic, we solve N:M sparsity in an efficient divide-and-conquer manner. First, we divide the weight vector into $C_{\text{M}}^{\text{N}}$ combination subsets of a fixed size N. Then, we conquer the combinatorial problem by assigning each combination a learnable score that is jointly optimized with its associate weights. We prove that the introduced scoring mechanism can well model the relative importance between combination subsets. And by gradually removing low-scored subsets, N:M fine-grained sparsity can be efficiently optimized during the normal training phase. Comprehensive experiments demonstrate that our learning best combination (LBC) performs consistently better than off-the-shelf N:M sparsity methods across various networks. Our project is released at \url{https://github.com/zyxxmu/LBC}.

View on arXivView PDF

Code Implementations(1)

zyxxmu/LBCOfficial100%

Pytorch implementation of our paper accepted by NeurIPS 2022 -- Learning Best Combination for Efficient N:M Sparsity

222Python, ShellJun 14, 20223 years ago

Similar Papers

Cite this paper

@article{zhang2022learning,
  title  = {Learning Best Combination for Efficient N:M Sparsity},
  author = {Yuxin Zhang and Mingbao Lin and Zhihang Lin and Yiting Luo and Ke Li and Fei Chao and Yongjian Wu and Rongrong Ji},
  year   = {2022},
  eprint = {2206.06662},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.06662}
}

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/2206.06662.svg)](https://codeofpaper.com/paper/2206.06662)

Discussion