[Paper Review] Latency-Aware Differentiable Neural Architecture Search
This paper proposes a latency-aware differentiable neural architecture search (LA-DARTS) that integrates a learnable latency prediction module (LPM) into the DARTS framework to jointly optimize accuracy and inference latency. By training a multi-layer regressor on 100K sampled architectures, the LPM predicts latency with under 10% relative error, enabling the search to reduce latency by 20% while preserving accuracy on CIFAR-10 and ImageNet across GPU and CPU platforms.
Differentiable neural architecture search methods became popular in recent years, mainly due to their low search costs and flexibility in designing the search space. However, these methods suffer the difficulty in optimizing network, so that the searched network is often unfriendly to hardware. This paper deals with this problem by adding a differentiable latency loss term into optimization, so that the search process can tradeoff between accuracy and latency with a balancing coefficient. The core of latency prediction is to encode each network architecture and feed it into a multi-layer regressor, with the training data which can be easily collected from randomly sampling a number of architectures and evaluating them on the hardware. We evaluate our approach on NVIDIA Tesla-P100 GPUs. With 100K sampled architectures (requiring a few hours), the latency prediction module arrives at a relative error of lower than 10%. Equipped with this module, the search method can reduce the latency by 20% meanwhile preserving the accuracy. Our approach also enjoys the ability of being transplanted to a wide range of hardware platforms with very few efforts, or being used to optimizing other non-differentiable factors such as power consumption.
Motivation & Objective
- To address the limitation of differentiable NAS methods in producing hardware-inefficient models that are slow at inference.
- To enable end-to-end differentiable optimization of both accuracy and latency in complex search spaces like DARTS.
- To develop a hardware-adaptive latency prediction module (LPM) that can be easily transferred across different devices with minimal retraining.
- To demonstrate that the method can achieve significant latency reduction without sacrificing accuracy on standard benchmarks.
Proposed method
- A differentiable latency prediction module (LPM) is trained as a multi-layer neural network to predict the inference latency of a given architecture.
- The LPM is trained on a dataset of 100K randomly sampled architectures from the DARTS search space, with ground-truth latency measured on target hardware (e.g., NVIDIA Tesla-P100).
- Architecture representations are encoded as fixed-length vectors of architectural parameters, which serve as input to the LPM.
- The LPM is integrated into the DARTS loss function via a balancing coefficient λ, enabling joint optimization of accuracy and latency.
- The search process uses a differentiable architecture search framework with gradient-based updates, where the loss includes both accuracy and predicted latency terms.
- The method is transplanted to CPU by retraining the LPM on CPU latency data, enabling device-specific architecture search.
Experimental results
Research questions
- RQ1Can a differentiable latency prediction module be effectively trained to predict inference latency in complex, non-chain-like search spaces?
- RQ2Can joint optimization of accuracy and latency via a differentiable loss improve hardware efficiency without degrading accuracy?
- RQ3How transferable is the LPM across different hardware platforms such as GPU and CPU?
- RQ4To what extent can the method reduce latency while maintaining competitive accuracy on standard benchmarks?
Key findings
- The LPM achieves a relative error of less than 5% on both GPU and CPU, with absolute errors of 8.27ms on CPU and 5.32% relative error.
- On CIFAR-10, LA-DARTS reduces latency by 19% compared to the original DARTS while maintaining comparable accuracy (2.57% test error).
- On ImageNet, LA-DARTS achieves a 25.1% top-1 error rate with 30% lower latency than the baseline on CPU (114.1ms vs. 164.1ms).
- The architecture found on GPU is suboptimal on CPU, with only 69% consistent ranking between GPU and CPU latency, highlighting the need for hardware-specific search.
- LA-PC-DARTS-B reduces CPU latency by 30% on ImageNet with no accuracy drop, demonstrating strong hardware-aware optimization.
- The Kendall-τ correlation between predicted and actual latency is 0.83 on GPU and 0.75 on CPU, indicating high predictive reliability for architecture search.
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.