NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Universally Slimmable Networks and Improved Training Techniques

Jiahui Yu, Thomas Huang

TL;DR

This paper introduces Universally Slimmable Networks (US-Nets), a novel framework that allows a single neural network to execute at any arbitrary width at runtime to dynamically optimize accuracy-efficiency trade-offs. By introducing two innovative training techniques—the "sandwich rule" and "inplace distillation"—along with a post-training batch normalization calibration method, the authors achieve performance that matches or exceeds individually trained networks across classification, super-resolution, and reinforcement learning tasks.

What Problem Does This Paper Address?

Deploying deep learning models to diverse hardware (from high-end servers to budget smartphones) typically requires training multiple distinct models to satisfy varying latency and computational budgets. "Slimmable networks" previously addressed this by allowing a single network to switch between a few predefined discrete widths (e.g., 0.25×, 0.5×, 0.75×, 1.0×).

However, these discrete networks cannot adapt to arbitrary, fine-grained resource constraints at runtime. Furthermore, scaling networks to infinite possible intermediate widths introduces a major technical hurdle: Batch Normalization (BN). BN relies on tracking feature statistics (mean and variance) during training. Since feature statistics change drastically depending on the network's active width, tracking independent BN statistics for an infinite number of sub-networks during training is computationally impossible.

Methods

The authors tackle the challenge of arbitrary-width execution through three core innovations:

  1. Post-Statistics of Batch Normalization: Instead of tracking BN statistics during training, US-Nets freeze the model weights after training completes. The BN statistics for any requested width are then computed post-hoc by running a small subset of training data through the network.
  2. The Sandwich Rule: To efficiently train a network with infinite possible widths, the authors leverage a bounded inequality principle. During each training iteration, they train the model at its smallest width (lower bound), its largest width (upper bound), and $n-2$ randomly sampled intermediate widths. Optimizing the bounds implicitly optimizes all widths in between.
  3. Inplace Distillation: To boost the performance of smaller sub-networks, the authors use the full-width network as a "teacher" within the same training step. The predicted outputs of the largest width serve as soft targets for the smaller widths inplace, eliminating the need to train a separate teacher model beforehand.
Figure 2. Illustration of a network executing at different widths. We specifically consider an output neuron y1 in a layer (right, zoomed).

Datasets

The authors evaluated US-Nets across three distinct domains:

  • ImageNet: The standard 1000-class image classification dataset, using MobileNet v1 and MobileNet v2 architectures.
  • DIV2K: A high-resolution image dataset used for evaluating a bicubic ×2 image super-resolution task with the WDSR architecture.
  • Atari Breakout (Gym): Used to evaluate the framework's viability in deep reinforcement learning using a standard Actor-Critic Proximal Policy Optimization (PPO) setup.

Key Insights and Ideas

  • Deep networks are not naturally slimmable: A surprising finding was that naively trained models, or even standard 4-switch slimmable models, completely fail (achieving near 0% accuracy) when executed at unencountered intermediate widths, even if their BN statistics are perfectly calibrated post-training. Dedicated training via the sandwich rule is mandatory.
  • The power of the bounds: Training just the smallest and largest widths provides a strong regularization effect that stabilizes the entire intermediate spectrum.
  • BN calibration is incredibly cheap: The authors discovered that you don't need the entire dataset to compute accurate post-training BN statistics; a randomly sampled subset of just 1,000 images is sufficient to achieve optimal accuracy, making runtime width adjustments highly practical.

Key Results

US-Nets consistently match or outperform individually trained models (I-Nets) and discrete slimmable networks (S-Nets) across the entire FLOPs spectrum.

Figure 1. FLOPs-Accuracy spectrum of single US-MobileNet v1 model, compared with four individual MobileNet v1 models.
  • ImageNet Classification: On MobileNet v1, the US-Net at 0.25× width achieved a 44.3% top-1 error, significantly outperforming an individually trained 0.25× MobileNet v1, which scored 50.2%. On average across all tested widths, US-Net outperformed individual models by 2.2% on MobileNet v1 and 0.3% on MobileNet v2.
  • Image Super-Resolution: US-WDSR achieved a smooth FLOPs-PSNR trade-off curve, performing within 0.01 dB of individually trained counterparts while offering infinite runtime flexibility.
  • Deep Reinforcement Learning: In Atari Breakout, the US-Net consistently outperformed individual networks at every single width setting, demonstrating that joint training with inplace distillation acts as a powerful regularizer in RL.
Figure 5. Mean Episode Reward with US-Net and I-Net based on actor-critic style PPO [19]. Curves are not smoothed.

Limitations and Future Work

While US-Nets show remarkable empirical success, the authors note a few areas for improvement:

  • Hyperparameter Tuning: All US-Nets were trained using default hyperparameters optimized for standard, individual models. Custom learning rate schedules or weight decay parameters tailored for slimmable training could unlock even higher performance.
  • Theoretical Foundations: The mathematical motivation behind feature aggregation bounding is currently analyzed based on a single hidden layer. Extending this theoretical analysis to deep, non-linear networks remains an open challenge for future research.

Summary updated

BibTeX
@inproceedings{yu2019universally,
  author = {Jiahui Yu and Thomas Huang},
  title = {{Universally Slimmable Networks and Improved Training Techniques}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00189},
}
Figure