Spartan: Differentiable Sparsity via Regularized Transportation

Kai Sheng Tai, Taipeng Tian, Ser-Nam Lim
5/27/2022
cs.LG

Official code: facebookresearch/spartan (26 stars, Python, last commit 2022-10-31).

Abstract

We present Spartan, a method for training sparse neural network models with a predetermined level of sparsity. Spartan is based on a combination of two techniques: (1) soft top-k masking of low-magnitude parameters via a regularized optimal transportation problem and (2) dual averaging-based parameter updates with hard sparsification in the forward pass.

Show full abstract

This scheme realizes an exploration-exploitation tradeoff: early in training, the learner is able to explore various sparsity patterns, and as the soft top-k approximation is gradually sharpened over the course of training, the balance shifts towards parameter optimization with respect to a fixed sparsity mask. Spartan is sufficiently flexible to accommodate a variety of sparsity allocation policies, including both unstructured and block structured sparsity, as well as general cost-sensitive sparsity allocation mediated by linear models of per-parameter costs. On ImageNet-1K classification, Spartan yields 95% sparse ResNet-50 models and 90% block sparse ViT-B/16 models while incurring absolute top-1 accuracy losses of less than 1% compared to fully dense training.

View on arXivView PDF

Code Implementations(1)

Spartan is an algorithm for training sparse neural network models. This repository accompanies the paper "Spartan Differentiable Sparsity via Regularized Transportation" (NeurIPS 2022).

261Python, ShellOct 14, 20224 years agoNOASSERTION

Similar Papers

Cite this paper

@article{tai2022spartan,
  title  = {Spartan: Differentiable Sparsity via Regularized Transportation},
  author = {Kai Sheng Tai and Taipeng Tian and Ser-Nam Lim},
  year   = {2022},
  eprint = {2205.14107},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.14107}
}

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

Discussion