Skip to main content
QUICK REVIEW

[Paper Review] Universally Slimmable Networks and Improved Training Techniques

Jiahui Yu, Thomas S. Huang|arXiv (Cornell University)|Mar 12, 2019
Advanced Neural Network ApplicationsComputer Science23 references16 citations
TL;DR

This paper proposes universally slimmable networks (US-Nets), a method to train a single neural network that can efficiently infer at any width within a continuous range, not just predefined discrete widths. By introducing the sandwich rule and inplace distillation, US-Nets achieve superior accuracy across all widths compared to individually trained models or discrete slimmable networks, with minimal computational cost during inference and training.

ABSTRACT

Slimmable networks are a family of neural networks that can instantly adjust the runtime width. The width can be chosen from a predefined widths set to adaptively optimize accuracy-efficiency trade-offs at runtime. In this work, we propose a systematic approach to train universally slimmable networks (US-Nets), extending slimmable networks to execute at arbitrary width, and generalizing to networks both with and without batch normalization layers. We further propose two improved training techniques for US-Nets, named the sandwich rule and inplace distillation, to enhance training process and boost testing accuracy. We show improved performance of universally slimmable MobileNet v1 and MobileNet v2 on ImageNet classification task, compared with individually trained ones and 4-switch slimmable network baselines. We also evaluate the proposed US-Nets and improved training techniques on tasks of image super-resolution and deep reinforcement learning. Extensive ablation experiments on these representative tasks demonstrate the effectiveness of our proposed methods. Our discovery opens up the possibility to directly evaluate FLOPs-Accuracy spectrum of network architectures. Code and models are available at: https://github.com/JiahuiYu/slimmable_networks

Motivation & Objective

  • To enable neural networks to run at any arbitrary width, not just discrete widths, by extending slimmable networks to a continuous width spectrum.
  • To address the challenge of training universally slimmable networks with batch normalization, which traditionally fails due to training-inference statistics inconsistency.
  • To improve training efficiency and test accuracy of universally slimmable networks through novel training techniques.
  • To enable direct evaluation of the FLOPs-Accuracy trade-off spectrum for a single model, eliminating the need for multiple individually trained models.

Proposed method

  • Proposes a post-training batch normalization statistics computation method: compute moving averages or exact averages of batch statistics over a small subset (e.g., 1,024 images) after model weights are fixed, enabling accurate and fast inference.
  • Introduces the sandwich rule: during training, sample multiple widths per iteration (e.g., 4 widths), compute losses for each, and combine them via a weighted average to stabilize training and improve generalization.
  • Develops inplace distillation: a technique that enhances performance by distilling knowledge from wider sub-networks into slimmer ones during training, improving accuracy at all widths without extra inference cost.
  • Adapts batch normalization by avoiding per-width statistics accumulation during training; instead, computes all BN statistics post-training using a small, representative data subset.
  • Uses a bounded residual error formulation to theoretically justify that wider networks should not underperform slimmer ones, supporting the feasibility of universal slimmability.
  • Employs a width divisor (d=8) to align channel counts with hardware alignment (e.g., GPU warp size), improving inference speed and ensuring fair FLOPs comparison with MobileNet.

Experimental results

Research questions

  • RQ1Can a single neural network be trained to perform accurately at any width within a continuous range, rather than only at discrete widths?
  • RQ2How can batch normalization be effectively handled in universally slimmable networks to maintain accuracy across all widths?
  • RQ3What training strategies can improve the performance of universally slimmable networks compared to individually trained models or discrete slimmable baselines?
  • RQ4Can the FLOPs-Accuracy spectrum of a network be directly evaluated using a single model, and what are the implications for model deployment?
  • RQ5How do hyperparameters such as width lower bound, width divisor, and number of sampled widths per iteration affect the performance of US-Nets?

Key findings

  • US-Nets trained with the sandwich rule and inplace distillation achieve a 28.2% top-1 error on ImageNet using a single model, outperforming individually trained MobileNet v1 models and 4-switch slimmable baselines across all widths.
  • Post-training batch normalization statistics computed from just 1,024 images produce nearly identical performance to full-batch statistics, enabling fast and accurate inference.
  • The performance of a US-Net is fundamentally bounded by its minimum width (k₀), with models trained from 0.25× to 1.0× achieving better accuracy than those with higher k₀ (e.g., 0.35× or 0.05×).
  • Using a width divisor of d=8 improves performance slightly and ensures hardware-friendly channel counts, with no significant drop in accuracy compared to d=1.
  • Training with 4 sampled widths per iteration yields the best accuracy-efficiency trade-off, with 5 widths offering marginal gains and 3 widths underperforming.
  • Inplace distillation significantly improves test accuracy across all widths with no additional inference cost, suggesting it is a key component for training robust slimmable networks.

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.