Skip to main content
QUICK REVIEW

[Paper Review] Smallify: Learning Network Size while Training

Guillaume Leclerc, Manasi Vartak|arXiv (Cornell University)|Jun 10, 2018
Machine Learning and Data ClassificationComputer Science19 references9 citations
TL;DR

Smallify proposes a novel training-time technique that jointly optimizes neural network size, inference speed, and accuracy by dynamically pruning unimportant neurons using a learnable SwitchLayer. The method achieves up to 35× smaller models and 6× faster inference with minimal accuracy loss compared to standard training.

ABSTRACT

As neural networks become widely deployed in different applications and on different hardware, it has become increasingly important to optimize inference time and model size along with model accuracy. Most current techniques optimize model size, model accuracy and inference time in different stages, resulting in suboptimal results and computational inefficiency. In this work, we propose a new technique called Smallify that optimizes all three of these metrics at the same time. Specifically we present a new method to simultaneously optimize network size and model performance by neuron-level pruning during training. Neuron-level pruning not only produces much smaller networks but also produces dense weight matrices that are amenable to efficient inference. By applying our technique to convolutional as well as fully connected models, we show that Smallify can reduce network size by 35X with a 6X improvement in inference time with similar accuracy as models found by traditional training techniques.

Motivation & Objective

  • To address the suboptimal trade-offs in model size, inference speed, and accuracy caused by independent optimization of these metrics.
  • To overcome the limitations of post-training compression techniques that degrade inference speed due to sparse matrix operations.
  • To enable end-to-end optimization of network architecture, accuracy, and efficiency in a single training process.
  • To explore smaller, high-performing architectures from the start, rather than compressing large models after training.

Proposed method

  • Introduces a SwitchLayer that learns to turn neurons on or off during training, enabling dynamic network size adjustment.
  • Uses a differentiable gating mechanism to co-optimize neuron importance and model performance.
  • Applies neuron-level pruning by learning binary masks (on/off) for neurons, resulting in dense weight matrices post-pruning.
  • Employs a relaxation of group LASSO regularization to encourage sparse neuron activation patterns.
  • Removes SwitchLayers before inference, ensuring no runtime overhead.
  • Treats network size as a single hyperparameter, simplifying architecture search.

Experimental results

Research questions

  • RQ1Can network size be optimized jointly with model accuracy and inference efficiency during training, rather than in post-processing?
  • RQ2Does dynamic neuron pruning during training lead to smaller, faster, and accurate models compared to standard training and post-compression?
  • RQ3Can the resulting models maintain dense weight matrices to ensure efficient inference on GPUs?
  • RQ4How does the proposed method compare to existing compression techniques in terms of model size, speed, and accuracy?
  • RQ5What is the theoretical relationship between the proposed method and group LASSO regularization?

Key findings

  • Smallify reduces model size by up to 35× and improves inference speed by up to 6× compared to standard training, with only a 1% accuracy drop on CIFAR-10.
  • On CIFAR-10, Smallify achieves the same accuracy as a standard-trained model while reducing network size by 2.2×.
  • The method produces dense weight matrices after pruning, enabling efficient inference on GPUs, unlike sparse models from traditional pruning.
  • The proposed approach is theoretically equivalent to a relaxed group LASSO formulation, with multiple global minima due to sign symmetry in parameters.
  • SwitchLayers can be safely removed before inference, adding no runtime cost.
  • The method enables exploration of small, high-performing architectures from the start, avoiding the limitations of post-hoc compression.

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.