Paper commentary
Learning Structured Sparsity in Deep Neural Networks
Structured sparsity learning removes whole filters, channels and layers from DNNs
- Problem Removing individual weights leaves irregular zeros that do not speed up convolutions. Even with more than 95% of weights zero, the speedup is small or negative because memory access stays scattered.
- Method SSL adds group penalties on filters, channels, shapes and layer depth during training. It then removes the groups whose weights are all zero and fine-tunes the smaller network.
- Results SSL reaches 5.1× average layer-wise speedup of AlexNet convolutional layers on CPU and 3.1× on GPU. It uses off-the-shelf libraries.
Why scattered sparsity does not speed up convolution
Sparsity regularization and connection pruning remove weights one at a time, which leaves an irregular pattern of zeros in each weight tensor. That irregular pattern forces scattered memory access, and the speedup of the convolution is then either small or negative even when more than 95% of the weights are zero. The figure of AlexNet speedups on GPU shows the same effect in practice: for the l1-norm model, conv1 to conv5 reach 0.25, 0.52, 1.38, 1.04 and 1.36 layer-wise speedup.
Low rank approximation avoids this locality problem because it keeps dense matrices, but its structure is fixed once the decomposition is made, so finding a good rank for accuracy and speed takes repeated decomposition and fine-tuning. The authors position SSL between these two families: it works on the training objective directly so that the structure itself is learned, not imposed after training.
How group Lasso turns groups into removable structure
The objective adds to the data loss a non-structured term applied to every weight and a structured term applied to each convolutional layer, weighted by a coefficient on the structured part. \[ E(W) = E_D(W) + \lambda \cdot R(W) + \lambda_g \cdot \sum_{l=1}^{L} R_g\left(W^{(l)}\right) \] Here \(E_D(W)\) is the loss on data, \(R(\cdot)\) is a non-structured penalty such as the \(\ell_2\)-norm, and \(R_g(\cdot)\) is the structured penalty on each layer \(W^{(l)}\).
The structured term is a sum of group norms, where each group is a set of weights and the groups may overlap. \[ \|w^{(g)}\|_g = \sqrt{\sum_{i=1}^{|w^{(g)}|} \left(w^{(g)}_i\right)^2} \] Because the penalty acts on a whole group through its norm, the optimizer can drive every weight in a group to zero together, which is the mechanism the authors rely on.
The structure that results depends only on how the weights are split into groups, so the same penalty yields filter-wise, channel-wise, shape-wise or depth-wise sparsity. For filters and channels, the penalty sums group norms over every filter \(W^{(l)}_{n_l,:,:,:}\) and every channel \(W^{(l)}_{:,c_l,:,:}\), weighted by \(\lambda_n\) and \(\lambda_c\).
The two terms are combined because a zeroed filter leaves the matching channel in the next layer with no input, so the channel can be removed too.
For shapes, each fiber \(W^{(l)}_{:,c_l,m_l,k_l}\) collects the weights at one spatial position across one channel, and zeroing some fibers gives a non-cubic filter shape. Depth is handled by a group norm over each whole layer, and zeroing every filter of a layer would cut the signal path, so shortcut connections carry the feature maps past a removed layer.
Some variants are chosen for speed rather than for structure alone: the 2D-filter-wise version applies the penalty to each 2D filter, which gives smaller groups and a higher fraction of zero groups in large networks. For GEMM, each 3D filter becomes a row of the weight matrix and each shape fiber becomes a column, so removing zero rows and columns shrinks the matrix directly.
From training to a smaller network
SSL trains the network with the structured penalty until it converges, and then removes the groups whose weights are all zero to obtain a network with a new structure. The pruned network is fine-tuned without SSL to recover accuracy, and for the ImageNet experiments the fine-tuning is part of the reported pipeline.
For timing, the nonzero rows and columns of each weight matrix are concatenated into consecutive memory and multiplied with ordinary GEMM subroutines, and the authors state that this concatenation overhead can be ignored. The non-structured baseline instead stores its sparse weights in CSR format and runs sparse-dense multiplication, which is why its speedup depends on how sparse the layer is.
Filter, channel and shape sparsity on MNIST
On LeNet, the filter- and channel-wise penalties shrink conv1 and conv2 across three runs, and the 1.0% error of LeNet 3 is the highest error among them. LeNet 2 keeps between 5 and 19 filters and between 1 and 4 channels, with error at 0.8% against 0.9% for the baseline, and its FLOP falls to 25% and 7.6% of the baseline in conv1 and conv2.
LeNet 3 keeps 3 to 12 filters and reaches 1.99× to 7.44× speedup, and its error is 0.2% higher than LeNet 2.
The learned conv1 filters of the baseline are random and blurry, while those of LeNet 2 and LeNet 3 are smoother, and the authors attribute the same-level accuracy with far fewer filters to this regularity. The authors note that three independent training runs produced filters that resemble each other and the baseline's filters, which they take as support for the smoothness explanation.
With shape-wise sparsity, the baseline conv1 filter is a 5×5 square of size 25, and LeNet 5 reduces it to a 2×4 rectangle of size 7. The conv2 filters of LeNet 5 keep only one channel, which the authors read as showing that a single conv1 filter is enough, and the speedup range is 5.19× to 10.82× at 1.0% error.
For the MLP with 500 and 300 hidden neurons, the baseline test error is 1.43%, and each neuron is penalized through all its input and output connections. MLP 2 keeps 469, 294 and 166 neurons in its layers and reaches 1.34% error, while MLP 3 keeps 434, 174 and 78 neurons with 1.53% error. In MLP 2, 40.18% of input neurons have zero connections, and these cluster at the image boundary, which the authors read as consistent with pixels near the edge carrying little information.
ConvNet and ResNet on CIFAR-10
ConvNet is the Krizhevsky network trained with Caffe on CIFAR-10 with a dropout layer of ratio 0.5 added to the fully-connected layer and no data augmentation. The baseline ConvNet 1 has 17.9% error and 12.5%, 0%, 0% row sparsity, and ConvNet 2 raises row sparsity to 50.0%, 28.1% and 1.6% at the same 17.9% error. In ConvNet 2, half of the conv1 filters are zeroed without accuracy drop, while four conv1 filters of the baseline are already all zeros.
SSL reduces the weight matrix size of ConvNet 2 by 50%, 70.7% and 36.1% across its three convolutional layers. ConvNet 3 has 16.9% error, which is 1.0% lower than the baseline in the authors' reported result, and it is smaller than the baseline model.
For ResNet, the baseline is ResNet-20 with 19 convolutional layers and one fully-connected layer, and its error is 8.82%. Group Lasso is applied only to the convolutional layers between shortcut endpoints, and the network is fine-tuned at learning rate 0.01, against 0.1 in the baseline. The SSL-regularized network with 14 layers has a lower error than the 20-layer baseline, and SSL-ResNet-18 reaches 7.40% while ResNet-32 reaches 7.51%.
The abstract gives the ResNet accuracy as rising from 91.25% to 92.60% with depth regularization, which differs from the 8.82% error of the body's ResNet-20 baseline. The authors read the rise in error from SSL-ResNet-18 to SSL-ResNet-20 as a suboptimal depth choice within the 32×32 group, and they conclude that SSL can serve as depth regularization.
AlexNet results on ImageNet
For 2D-filter-wise sparsity, the authors report that FLOP can drop by 30%–40% without accuracy loss, and that the top-1 error can be reduced by about 1% to 41.69% while the original number of parameters is kept. Deeper layers have higher 2D-filter sparsity, which the authors attribute to their smaller group size and larger number of 2D filters.
Table 4 compares SSL with the l1-norm method at about the same top-1 error: the l1-norm model reaches 44.67% with conv1 to conv5 sparsity of 67.6%, 92.4%, 97.2%, 96.6% and 94.3%. The SSL model reaches 44.66% with column sparsity of 0.0%, 63.2%, 76.9%, 84.7% and 80.7%, and with row sparsity of 9.4%, 12.9%, 40.6%, 46.9% and 0.0%. Its CPU speedups for conv1 to conv5 are 1.05×, 3.37×, 6.27×, 9.73× and 4.93×, and its GPU speedups are 1.00×, 2.37×, 4.94×, 4.03× and 3.05×.
Averaged over the layers, SSL reaches 5.1× on CPU and 3.1× on GPU, while the l1-norm model reaches 3.0× on CPU and 0.9× on GPU. Across the GPU platforms, non-structured sparsity gives no speedup, while SSL gives about 3× on average, and on CPU platforms SSL gives about 2× over non-structured sparsity. The authors compare their average speedup at the same accuracy with the sparse convolutional work of Liu et al., which relies on heavy hardware customization.
Limits of the evidence
The speedups were measured on a single-thread Intel Xeon E5-2630 CPU in the MNIST and CIFAR-10 setups, and on the Intel Xeon and GeForce GTX TITAN Black platforms for AlexNet with Intel MKL, cuBLAS and cuSPARSE. The authors state that hardware and program optimizations are not covered and could raise performance further on top of SSL.
The depth results on ResNet show that fewer layers can be kept without accuracy loss, but the authors note that depth still matters, since test error generally declines as more layers are preserved. The LeNet, MLP and ConvNet experiments were trained without data augmentation, so the reported accuracy values hold only under that setting.
Paper info
- Authors
- Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, Hai Li
- Venue
- arXiv · Preprint
- First published
- 2016-8-12
- Added
- 2026-11-12
- Updated
- 2016-10-18
- Version
- v4
- arXiv
- 1608.03665
- Category
- cs.NE · cs.LG · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, Hai Li (2016). Learning Structured Sparsity in Deep Neural Networks. arXiv:1608.03665v4. https://arxiv.org/abs/1608.03665v4
BibTeX
@misc{wen2016learning,
title = {{Learning Structured Sparsity in Deep Neural Networks}},
author = {Wei Wen and Chunpeng Wu and Yandan Wang and Yiran Chen and Hai Li},
year = {2016},
eprint = {1608.03665},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1608.03665v4}
}