Make $\ell_1$ Regularization Effective in Training Sparse CNN

Juncai He, Xiaodong Jia, Jinchao Xu, Lian Zhang, Liang ZhaoarXiv 2018 · DOI

TL;DR

While $\ell_1$ regularization is the gold standard for sparsity in convex optimization, it has historically failed to produce sparse Convolutional Neural Networks (CNNs) when paired with standard SGD. This paper rescues the technique by adapting the Regularized Dual Averaging (RDA) algorithm, proving that with proper initialization and adaptive retraining, one can achieve up to 95% sparsity in models like ResNet-18 without losing accuracy.

What Problem Does This Paper Address?

Deep learning models are notoriously over-parameterized, often containing far more weights than necessary. Reducing this redundancy (pruning) is essential for deploying models on edge devices with limited memory and power.

In classical statistics, $\ell_1$ regularization (or Lasso) is the go-to method for creating sparse models. However, in the world of deep learning, simply adding an $\ell_1$ penalty to the loss function and training with Stochastic Gradient Descent (SGD) yields disappointing results. The sparsity is often low, or the accuracy drops significantly. The authors identify a fundamental mismatch: SGD's proximal updates cause the "threshold" for zeroing out weights to decay over time, effectively losing its ability to enforce sparsity as training progresses.

Methods

The authors pivot away from SGD and look toward Regularized Dual Averaging (RDA), an algorithm originally designed by Lin Xiao in 2010 for convex problems.

The paper introduces three key innovations to make RDA work for non-convex CNNs:

  1. Theoretical Bridge: They prove that Simple Dual Averaging (SDA) can be viewed as a "perturbed" version of SGD. This theoretical insight justifies why an algorithm built for convex problems can actually succeed in the highly non-convex landscape of neural networks.
  2. Non-Zero Initialization: Standard RDA starts with all weights at zero. The authors show that for CNNs using ReLU activations, a zero start leads to zero gradients—the network never "wakes up." They propose a specific random initialization strategy (scaling the variance by a factor $s$) to kickstart the learning process.
  3. Adaptive Sparse Retraining (ASR): They implement a two-step pipeline. First, they train using RDA to identify the sparse structure. Second, they fix the zero weights and retrain the remaining weights to recover any lost accuracy.

Datasets

The authors evaluated their approach on several standard computer vision benchmarks:

  • MNIST: The classic handwritten digit dataset.
  • CIFAR-10 & CIFAR-100: Mid-sized datasets for object recognition.
  • ImageNet (ILSVRC2012): The large-scale industry standard for image classification.

Key Insights and Ideas

  • Constant Pressure for Sparsity: Unlike Proximal-SGD, where the threshold for zeroing weights shrinks as the learning rate decays, RDA maintains a constant threshold ($\lambda$) against the average of all past gradients. This keeps the "pressure" on weights to stay at zero throughout the entire training process.
  • The Initialization Paradox: In convex optimization, starting at zero is optimal for $\ell_1$. In deep learning, it's fatal. The paper highlights that the success of sparse training depends entirely on finding the "sweet spot" for initial weight scales to avoid vanishing or exploding gradients.
  • RDA as a Unified Pruner: Instead of the complex multi-stage pipelines (train $\rightarrow$ prune $\rightarrow$ fine-tune) common in literature, RDA acts as a more direct optimization-based pruner that integrates sparsity into the training loop itself.

Key Results

The results demonstrate that RDA is highly competitive with state-of-the-art pruning methods:

  • ResNet-18 on CIFAR-10: Achieved 95% sparsity with 93.47% accuracy.
  • VGG-16bn on CIFAR-10: Achieved 94% sparsity with 93.24% accuracy.
  • ImageNet: On the much tougher ImageNet dataset, they achieved 36% sparsity on ResNet-18. While lower than the CIFAR results, the authors note that ResNet-18 is already quite compact for ImageNet, leaving less "fat" to trim compared to larger models.
  • Comparison: The authors show that RDA performs comparably to or better than the famous three-step pruning pipeline by Han et al. (2015), but with a more theoretically grounded optimization approach.

Limitations and Future Work

  • Hyperparameter Sensitivity: The effectiveness of the method relies on tuning the initialization scale ($s$) and the regularization parameter ($\lambda$). The "suitable" values vary significantly between datasets (e.g., $s=10$ for CIFAR-10 vs $s=2$ for ImageNet).
  • Manual Tuning: Currently, the adaptive parameters for $\alpha$ and $\lambda$ are adjusted manually or by trial and error. The authors suggest that future work should focus on developing automated strategies to find these parameters.
  • Structural Sparsity: This paper focuses on "unstructured" pruning (individual weights). While this reduces the number of parameters, it doesn't always lead to immediate speedups on standard hardware without specialized libraries. Extending this to "structured" pruning (removing entire filters) is a logical next step.

Summary updated

BibTeX
@misc{he2018make,
  author = {Juncai He and Xiaodong Jia and Jinchao Xu and Lian Zhang and Liang Zhao},
  title = {{Make $\textbackslash\{\}ell\_1$ Regularization Effective in Training Sparse CNN}},
  year = {2018},
  eprint = {1807.04222},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.04222},
}
Figure