Table of Contents
Fetching ...

An Efficient Training Algorithm for Models with Block-wise Sparsity

Ding Zhu, Zhiqun Zuo, Mohammad Mahdi Khalili

TL;DR

The paper addresses the inefficiency of training block-wise sparse models by introducing a Kronecker product decomposition-based factorization, enabling training with significantly fewer parameters and FLOPs. It formalizes a decomposed weight representation $W^{[l]}_r = \sum_{i=1}^{r_l} (S^{[l]} \odot A^{[l]}_i) \otimes B^{[l]}_i$ to train block-wise sparse matrices and demonstrates that this representation can express any block-wise sparse matrix while reducing training cost. The authors provide theoretical arguments and empirical results showing substantial reductions in training parameters and FLOPs (up to 97% in certain settings) with minimal accuracy loss, and they introduce a pattern-selection framework to efficiently identify optimal sparsity patterns in one training round. The practical impact is improved scalability of block-wise sparse models on resource-constrained devices and accelerators, with automated pattern selection and applicability to vision transformers and CNNs alike.

Abstract

Large-scale machine learning (ML) models are increasingly being used in critical domains like education, lending, recruitment, healthcare, criminal justice, etc. However, the training, deployment, and utilization of these models demand substantial computational resources. To decrease computation and memory costs, machine learning models with sparse weight matrices are widely used in the literature. Among sparse models, those with special sparse structures (e.g., models with block-wise sparse weight matrices) fit better with the hardware accelerators and can decrease the memory and computation costs during the inference. Unfortunately, while there are several efficient training methods, none of them are designed to train a block-wise sparse model efficiently. As a result, the current methods for training block-wise sparse models start with full and dense models leading to inefficient training. In this work, we focus on training models with \textit{block-wise sparse matrices} and propose an efficient training algorithm to decrease both computation and memory costs during training and inference. In addition, we will show that our proposed method enables us to efficiently find the right block size for the sparsity pattern during the training process. Our extensive empirical and theoretical analyses show that our algorithms can decrease the computation and memory costs significantly without a performance drop compared to baselines.

An Efficient Training Algorithm for Models with Block-wise Sparsity

TL;DR

The paper addresses the inefficiency of training block-wise sparse models by introducing a Kronecker product decomposition-based factorization, enabling training with significantly fewer parameters and FLOPs. It formalizes a decomposed weight representation to train block-wise sparse matrices and demonstrates that this representation can express any block-wise sparse matrix while reducing training cost. The authors provide theoretical arguments and empirical results showing substantial reductions in training parameters and FLOPs (up to 97% in certain settings) with minimal accuracy loss, and they introduce a pattern-selection framework to efficiently identify optimal sparsity patterns in one training round. The practical impact is improved scalability of block-wise sparse models on resource-constrained devices and accelerators, with automated pattern selection and applicability to vision transformers and CNNs alike.

Abstract

Large-scale machine learning (ML) models are increasingly being used in critical domains like education, lending, recruitment, healthcare, criminal justice, etc. However, the training, deployment, and utilization of these models demand substantial computational resources. To decrease computation and memory costs, machine learning models with sparse weight matrices are widely used in the literature. Among sparse models, those with special sparse structures (e.g., models with block-wise sparse weight matrices) fit better with the hardware accelerators and can decrease the memory and computation costs during the inference. Unfortunately, while there are several efficient training methods, none of them are designed to train a block-wise sparse model efficiently. As a result, the current methods for training block-wise sparse models start with full and dense models leading to inefficient training. In this work, we focus on training models with \textit{block-wise sparse matrices} and propose an efficient training algorithm to decrease both computation and memory costs during training and inference. In addition, we will show that our proposed method enables us to efficiently find the right block size for the sparsity pattern during the training process. Our extensive empirical and theoretical analyses show that our algorithms can decrease the computation and memory costs significantly without a performance drop compared to baselines.

Paper Structure

This paper contains 29 sections, 3 theorems, 58 equations, 3 figures, 4 tables.

Key Result

Proposition 1

Let $\hat{W}^{[l]}$ be a block-wise sparse matrix trained by group LASSO or iterative pruning. If the blocks have the same size, then there exists $\hat{r}_l$ and $\hat{S}^{[l]}$ and $(\hat{A}_i^{[l]},\hat{B}_i^{[l]})_{i=1}^{r_l}$ such that $\hat{W}^{[l]} = \sum_{i=1}^{\hat{r}_l} (\hat{S}^{[l]}\odot

Figures (3)

  • Figure 1: Examples for fine-grained and coarse-grained sparse matrices. White entries represent zero value.
  • Figure 2: Illustration of why equation \ref{['eq:blockwise']} leads to block-wise sparsity when $S^{[l]}$ is sparse. White entries represent zero value.
  • Figure 3: a) Pattern selection for a linear model. b) Pattern selection for LeNet-5 network. c) Pattern selection for ViT tiny network.

Theorems & Definitions (14)

  • Example 1
  • Proposition 1
  • proof
  • Proposition 2
  • Proposition 3
  • Example 2
  • proof
  • proof
  • proof
  • proof
  • ...and 4 more