Skip to main content
QUICK REVIEW

[Paper Review] Learning Sparse Neural Networks through $L_0$ Regularization

Christos Louizos, Max Welling|arXiv (Cornell University)|Dec 4, 2017
Gaussian Processes and Bayesian InferenceComputer Science29 references149 citations
TL;DR

The paper introduces a practical framework for $L_{0}$ norm regularization in neural networks by learning stochastic gates that prune weights during training, enabling exact zeros and conditional computation with differentiable optimization.

ABSTRACT

We propose a practical method for $L_0$ norm regularization for neural networks: pruning the network during training by encouraging weights to become exactly zero. Such regularization is interesting since (1) it can greatly speed up training and inference, and (2) it can improve generalization. AIC and BIC, well-known model selection criteria, are special cases of $L_0$ regularization. However, since the $L_0$ norm of weights is non-differentiable, we cannot incorporate it directly as a regularization term in the objective function. We propose a solution through the inclusion of a collection of non-negative stochastic gates, which collectively determine which weights to set to zero. We show that, somewhat surprisingly, for certain distributions over the gates, the expected $L_0$ norm of the resulting gated weights is differentiable with respect to the distribution parameters. We further propose the \emph{hard concrete} distribution for the gates, which is obtained by "stretching" a binary concrete distribution and then transforming its samples with a hard-sigmoid. The parameters of the distribution over the gates can then be jointly optimized with the original network parameters. As a result our method allows for straightforward and efficient learning of model structures with stochastic gradient descent and allows for conditional computation in a principled way. We perform various experiments to demonstrate the effectiveness of the resulting approach and regularizer.

Motivation & Objective

  • Motivate sparsity and model compression to reduce computation and improve generalization in deep networks.
  • Develop a differentiable surrogate for the non-differentiable $L_{0}$ norm that preserves exact zeros in parameters.
  • Enable joint optimization of network parameters and gate distribution parameters using gradient-based methods.
  • Show that sparsity can be induced during training, allowing conditional computation and speedups.
  • Demonstrate competitive sparsity-accuracy trade-offs on standard benchmarks.

Proposed method

  • Re-parametrize weights as theta_j = tilde_theta_j * z_j with z_j in {0,1}, turning $L_{0}$ into a gated count of active parameters.
  • Relax the discrete gates by introducing stochastic gates z_j ~ Bernoulli(pi_j) via a continuous surrogate for efficient gradient optimization.
  • Define a smooth objective using an auxiliary continuous variable s with a hard-sigmoid gate z = clamp(s) to allow exact zeros while enabling reparameterization.
  • Use a concrete (hard-concrete) distribution to model the gates by stretching a binary concrete distribution and applying a hard-sigmoid, enabling differentiable learning of gate parameters phi.
  • Express the $L_{0}$ penalty as the expected number of active gates and optimize via Monte Carlo estimates with reparameterization.
  • Optionally combine $L_{0}$ with $L_{2}$ regularization and extend to group sparsity by sharing gates among parameter groups.

Experimental results

Research questions

  • RQ1Can $L_{0}$ regularization be optimized efficiently for neural networks while preserving exact zeros in weights?
  • RQ2Does the hard-concrete gate provide a suitable gradient-friendly surrogate to enable effective pruning during training?
  • RQ3Can joint learning of gate and weight parameters yield sparsified models with competitive accuracy and potential computation speedups?
  • RQ4How does the proposed approach compare to existing sparsity priors and dropout-based regularizers on standard benchmarks?

Key findings

  • the method yields sparsified architectures with competitive test accuracy on MNIST and CIFAR benchmarks compared to existing pruning methods.
  • neural networks trained with the $L_{0}$ regularization tend to prune more aggressively in layers where pruning affects the cost more, such as input or first fully connected layers in certain networks.
  • the approach enables gradual reduction of floating point operations during training, indicating potential training speedups similar to conditional computation.
  • on CIFAR datasets, the $L_{0}$ regularized wide residual networks improve upon dropout baselines under certain regularization strengths, while allowing for additional speedups due to sparsity.

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.