Skip to main content
QUICK REVIEW

[Paper Review] SparseTrain:Leveraging Dynamic Sparsity in Training DNNs on General-Purpose SIMD Processors

Zhangxiaowen Gong, Houxiang Ji|arXiv (Cornell University)|Nov 22, 2019
Advanced Neural Network ApplicationsComputer Science35 references5 citations
TL;DR

SparseTrain is a software-only framework that exploits dynamic sparsity from ReLU activations during DNN training on general-purpose SIMD CPUs. By detecting zeros at runtime and skipping computations via optimized loop ordering and vectorized zero-checking, it achieves 1.31x to 2.19x speedup over dense convolutions in VGG16, ResNet-34, ResNet-50, and Fixup ResNet-50 without hardware modifications.

ABSTRACT

Our community has greatly improved the efficiency of deep learning applications, including by exploiting sparsity in inputs. Most of that work, though, is for inference, where weight sparsity is known statically, and/or for specialized hardware. We propose a scheme to leverage dynamic sparsity during training. In particular, we exploit zeros introduced by the ReLU activation function to both feature maps and their gradients. This is challenging because the sparsity degree is moderate and the locations of zeros change over time. We also rely purely on software. We identify zeros in a dense data representation without transforming the data and performs conventional vectorized computation. Variations of the scheme are applicable to all major components of training: forward propagation, backward propagation by inputs, and backward propagation by weights. Our method significantly outperforms a highly-optimized dense direct convolution on several popular deep neural networks. At realistic sparsity, we speed up the training of the non-initial convolutional layers in VGG16, ResNet-34, ResNet-50, and Fixup ResNet-50 by 2.19x, 1.37x, 1.31x, and 1.51x respectively on an Intel Skylake-X CPU.

Motivation & Objective

  • Address the lack of efficient software techniques to exploit dynamic sparsity during DNN training on general-purpose CPUs.
  • Overcome the challenges of moderate, time-varying sparsity patterns in activations and gradients introduced by ReLU.
  • Enable significant performance gains without hardware modifications or static sparsity assumptions.
  • Maintain compatibility with standard dense data layouts and vectorized instruction sets (SIMD).
  • Achieve high performance across diverse CNN architectures including VGG16, ResNet, and Fixup ResNet-50.

Proposed method

  • Detect zero values in feature maps and gradients at runtime without data layout transformation or sparse representations.
  • Reorder computation loops to amortize the cost of zero-detection and branching over large reuse of ReLU outputs.
  • Vectorize zero-checking operations along the SIMD vector width (V) to improve instruction-level parallelism and reduce branch misprediction.
  • Apply loop transformations and software pipelining to minimize overhead and improve data locality and parallelism.
  • Optimize all three phases of training—forward propagation, backpropagation by inputs, and backpropagation by weights—using the same sparsity-aware kernel design.
  • Use a hybrid approach combining static loop tiling and runtime branch prediction to reduce misprediction penalties in short loops.

Experimental results

Research questions

  • RQ1Can dynamic sparsity from ReLU activations be effectively exploited in DNN training using only software on general-purpose CPUs?
  • RQ2How can zero-detection and computation skipping be efficiently integrated into dense, vectorized kernels without changing data layout?
  • RQ3What loop ordering and vectorization strategies minimize overhead while maximizing performance gains under moderate, dynamic sparsity?
  • RQ4To what extent can sparsity exploitation outperform highly optimized dense convolutions in real-world DNNs on commodity hardware?
  • RQ5How does the method scale across different network architectures with varying sparsity and computation patterns?

Key findings

  • SparseTrain achieves a 2.19x speedup over dense convolution in non-initial layers of VGG16 on an Intel Skylake-X CPU.
  • It delivers a 1.51x speedup for Fixup ResNet-50, 1.37x for ResNet-34, and 1.31x for ResNet-50 under realistic sparsity levels.
  • At 0% sparsity, the method performs within 10% of a highly optimized dense baseline, demonstrating low overhead.
  • The performance gain is consistent across multiple architectures, indicating broad applicability to modern CNNs.
  • The method effectively reduces computation time by skipping operations on zero-valued inputs and gradients without altering data representation.
  • Vectorized zero-checking and loop optimizations significantly reduce branch misprediction penalties, even with low trip counts in transformed loops.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.