[Paper Review] Once-for-All: Train One Network and Specialize it for Efficient Deployment on Diverse Hardware Platforms
This paper proposes Once-for-All (OFA), a single neural network architecture that can be efficiently specialized for diverse hardware platforms without retraining. By decoupling training from search and using progressive shrinking, OFA generates over 10^19 subnetworks with identical accuracy to independently trained models, achieving SOTA 80.0% ImageNet top-1 accuracy under 600M MACs and reducing training costs by orders of magnitude in GPU hours and CO₂ emissions.
We address the challenging problem of efficient inference across many devices and resource constraints, especially on edge devices. Conventional approaches either manually design or use neural architecture search (NAS) to find a specialized neural network and train it from scratch for each case, which is computationally prohibitive (causing $CO_2$ emission as much as 5 cars' lifetime) thus unscalable. In this work, we propose to train a once-for-all (OFA) network that supports diverse architectural settings by decoupling training and search, to reduce the cost. We can quickly get a specialized sub-network by selecting from the OFA network without additional training. To efficiently train OFA networks, we also propose a novel progressive shrinking algorithm, a generalized pruning method that reduces the model size across many more dimensions than pruning (depth, width, kernel size, and resolution). It can obtain a surprisingly large number of sub-networks ($> 10^{19}$) that can fit different hardware platforms and latency constraints while maintaining the same level of accuracy as training independently. On diverse edge devices, OFA consistently outperforms state-of-the-art (SOTA) NAS methods (up to 4.0% ImageNet top1 accuracy improvement over MobileNetV3, or same accuracy but 1.5x faster than MobileNetV3, 2.6x faster than EfficientNet w.r.t measured latency) while reducing many orders of magnitude GPU hours and $CO_2$ emission. In particular, OFA achieves a new SOTA 80.0% ImageNet top-1 accuracy under the mobile setting ($<$600M MACs). OFA is the winning solution for the 3rd Low Power Computer Vision Challenge (LPCVC), DSP classification track and the 4th LPCVC, both classification track and detection track. Code and 50 pre-trained models (for many devices & many latency constraints) are released at this https URL.
Motivation & Objective
- Address the high computational and environmental cost of training separate neural networks for each edge device and latency constraint.
- Overcome the scalability limitations of existing NAS and manual architecture design by enabling efficient deployment across diverse hardware platforms.
- Develop a method that maintains high accuracy while drastically reducing training time and carbon footprint compared to conventional approaches.
- Enable rapid inference specialization through a single pre-trained network without retraining for each hardware configuration.
Proposed method
- Propose a once-for-all (OFA) neural network that supports diverse architectural configurations (depth, width, kernel size, resolution) through a single joint training process.
- Introduce a progressive shrinking algorithm—a generalized pruning method that reduces model size across multiple dimensions simultaneously, enabling efficient training of the OFA network.
- Decouple the training phase from the architecture search phase, allowing subnetworks to be selected directly from the pre-trained OFA network without additional training.
- Train the OFA network using a progressive shrinking schedule that gradually reduces the network's capacity across depth, width, kernel size, and input resolution.
- Ensure all subnetworks derived from the OFA architecture maintain the same accuracy as models trained from scratch, despite no fine-tuning.
- Leverage a single, large-scale training process to implicitly learn a wide range of subnetworks, enabling fast deployment across various hardware constraints.
Experimental results
Research questions
- RQ1Can a single neural network be trained once and then efficiently specialized for diverse hardware platforms without retraining?
- RQ2Can a generalized pruning method like progressive shrinking maintain high accuracy across a vast number of subnetwork configurations while reducing training cost?
- RQ3Can the OFA approach achieve state-of-the-art performance under strict mobile inference constraints (e.g., <600M MACs) while drastically reducing CO₂ emissions?
- RQ4How does the performance of OFA compare to existing NAS and hand-designed models in terms of accuracy, latency, and efficiency on edge devices?
- RQ5To what extent can the OFA framework scale to support a wide range of hardware and latency constraints without compromising model accuracy?
Key findings
- OFA achieves a new state-of-the-art 80.0% ImageNet top-1 accuracy under the mobile setting with fewer than 600 million MACs.
- OFA outperforms MobileNetV3 by up to 4.0% in top-1 accuracy on ImageNet while maintaining or improving latency efficiency.
- OFA achieves 1.5x faster inference than MobileNetV3 and 2.6x faster than EfficientNet under measured latency constraints.
- The OFA framework generates over 10^19 distinct subnetworks that maintain the same accuracy as independently trained models, enabling broad hardware compatibility.
- OFA reduces GPU training hours and CO₂ emissions by many orders of magnitude compared to conventional NAS or manual architecture search.
- OFA was the winning solution in both the 3rd and 4th Low Power Computer Vision Challenges (LPCVC), in both classification and detection tracks, demonstrating real-world deployment effectiveness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.