Learning sparse neural networks via sensitivity-driven regularization

Enzo Tartaglione, Skjalg Lepsøy, Attilio Fiandrotti, Gianluca Francini

Deep neural networks are notoriously over-parameterized. Models like VGGNet or SENet contain hundreds of millions of parameters, making them too bulky for mobile phones, IoT devices, or embedded systems with limited memory and battery. This NeurIPS 2018 paper by Tartaglione et al. introduces a clever way to shrink deep neural networks without sacrificing their "brainpower." By mathematically defining how much the network's output depends on each individual weight, the authors create a regularization strategy that naturally pushes unimportant connections toward zero, enabling massive compression for deployment on resource-constrained devices.

The Challenge of Network Pruning

While "pruning" (deleting unimportant weights) is a common solution to over-parameterization, the challenge lies in identifying which weights are truly "unimportant." Standard methods often rely on simple heuristics, like removing weights with the smallest absolute values (magnitude pruning). However, a small weight might still be vital for a specific edge case. The gap addressed here is how to systematically identify and suppress weights that have a negligible impact on the network's actual performance during the training process itself.

Sensitivity-Driven Regularization

The authors propose a "sensitivity-driven" regularization term that penalizes neural network weights based on how little they contribute to the final output. The core innovation is the definition of Sensitivity ($S$).

  1. Quantifying Importance: Sensitivity measures how much the network's output changes when a specific weight $w$ is tweaked. If the output barely moves, the weight has low sensitivity.
  2. The Insensitivity Penalty: The authors define "insensitivity" ($\bar{S}$) as the inverse of sensitivity. They then modify the standard Stochastic Gradient Descent (SGD) update rule. In addition to the usual gradient, they add a penalty term: $-\lambda w \bar{S}$.
  3. Selective Weight Decay: This functions similarly to standard $L_2$ regularization (weight decay), but with a twist: the penalty is scaled by insensitivity. If a weight is very important (high sensitivity), the penalty is zero. If it is unimportant (low sensitivity), the penalty pushes it toward zero.
  4. Two Flavors of Sensitivity: The method can be applied as Unspecific (considering sensitivity across all possible output classes) or Specific (only considering sensitivity relative to the "correct" target class). The authors found the specific variant to be even more effective for complex tasks.

In practice, the model is first trained to reach a target performance. Then, the sensitivity-driven regularization is "turned on" alongside a simple thresholding mechanism to prune weights that drop below a certain value.

Key Insights and Generalization Bonus

Instead of just "cutting" weights after training, this method uses regularization to "nudge" the network toward a sparse structure during training. Furthermore, because sensitivity is calculated using values already produced during standard backpropagation, the computational overhead is minimal.

Surprisingly, the method doesn't just compress the model; it often improves it. By suppressing "noisy" or unimportant parameters, the model generalizes better to unseen data, effectively acting as a superior alternative to standard $L_2$ or $L_1$ regularization.

Test loss comparison showing SGD+Sensitivity outperforming L1 and L2 regularization.

Experimental Results

The authors evaluated their method on benchmark datasets (MNIST and ImageNet) and outperformed several established baselines, including the famous "Deep Compression" work by Han et al.

  • LeNet-300 (MNIST): Achieved a 103x compression ratio (reducing parameters from ~266k to ~2.5k) while maintaining a 1.95% error rate. For comparison, previous state-of-the-art methods achieved about 68x compression at similar error rates.
  • LeNet-5 (MNIST): Reached a 51x compression ratio at 0.78% error, significantly higher than the 12x ratio of earlier magnitude-based pruning.
  • VGG-16 (ImageNet): On this massive model, they achieved 14x compression and actually reduced the Top-1 error by over 1% compared to the uncompressed baseline. This highlights the method's ability to act as a powerful regularizer.

Limitations and Future Directions

The current sensitivity definition treats every weight individually. In convolutional layers, weights are shared across the image. The authors acknowledge that their method is currently surpassed by some specialized "Sparse Variational Dropout" techniques in purely convolutional architectures because it doesn't yet account for this parameter sharing. Additionally, the method introduces a new regularization factor ($\lambda$) and a pruning threshold ($T$), which may require tuning depending on the specific architecture.

Future work will likely focus on extending the sensitivity term to specifically handle shared parameters in CNNs and exploring the trade-offs between "specific" and "unspecific" sensitivity in different types of machine learning tasks beyond classification.

Summary updated

BibTeX
@inproceedings{tartaglione2018learning,
  author = {Enzo Tartaglione and Skjalg Lepsøy and Attilio Fiandrotti and Gianluca Francini},
  title = {{Learning sparse neural networks via sensitivity-driven regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=r1WWAubu-r},
}
Figure