[Paper Review] HELP: Hardware-Adaptive Efficient Latency Prediction for NAS via Meta-Learning
This paper proposes HELP, a meta-learning-based latency predictor that enables fast, accurate latency estimation for neural architecture search (NAS) on unseen hardware devices using only 10–20 measurements per device. By learning device-specific initial parameters via novel hardware embeddings and inner-loop adaptation, HELP achieves superior generalization over baselines with 90× fewer samples.
For deployment, neural architecture search should be hardware-aware, in order to satisfy the device-specific constraints (e.g., memory usage, latency and energy consumption) and enhance the model efficiency. Existing methods on hardware-aware NAS collect a large number of samples (e.g., accuracy and latency) from a target device, either builds a lookup table or a latency estimator. However, such approach is impractical in real-world scenarios as there exist numerous devices with different hardware specifications, and collecting samples from such a large number of devices will require prohibitive computational and monetary cost. To overcome such limitations, we propose Hardware-adaptive Efficient Latency Predictor (HELP), which formulates the device-specific latency estimation problem as a meta-learning problem, such that we can estimate the latency of a model's performance for a given task on an unseen device with a few samples. To this end, we introduce novel hardware embeddings to embed any devices considering them as black-box functions that output latencies, and meta-learn the hardware-adaptive latency predictor in a device-dependent manner, using the hardware embeddings. We validate the proposed HELP for its latency estimation performance on unseen platforms, on which it achieves high estimation performance with as few as 10 measurement samples, outperforming all relevant baselines. We also validate end-to-end NAS frameworks using HELP against ones without it, and show that it largely reduces the total time cost of the base NAS method, in latency-constrained settings. Code is available at https://github.com/HayeonLee/HELP.
Motivation & Objective
- Address the high computational and monetary cost of collecting large-scale latency measurements for every new hardware device in hardware-aware NAS.
- Overcome the limitation of existing methods that require training latency predictors from scratch for each device and task.
- Enable sample-efficient latency estimation for unseen devices by leveraging meta-knowledge from a diverse device pool.
- Integrate seamlessly with existing rapid NAS frameworks to drastically reduce total search time in latency-constrained settings.
Proposed method
- Formulate latency prediction as a few-shot regression problem, where the model adapts to a new device using only a few latency measurements.
- Introduce a novel hardware embedding mechanism that encodes any device as a latent vector based on its latency responses to a set of reference architectures.
- Design a meta-learning framework combining amortized meta-learning and gradient-based meta-learning to learn device-adaptive initial parameters.
- Use the hardware embedding as input to a meta-learner that predicts initial model weights, followed by inner-loop gradient updates for fast adaptation to unseen devices.
- Train the meta-learner on a diverse pool of devices (e.g., GPUs and CPUs) to generalize across hardware heterogeneity.
- Enable end-to-end integration with NAS frameworks by replacing conventional latency predictors with the meta-learned HELP predictor.
Experimental results
Research questions
- RQ1Can a single latency predictor generalize across diverse, unseen hardware platforms with minimal measurement overhead?
- RQ2How effective is meta-learning with hardware embeddings in reducing the number of required latency measurements for accurate prediction?
- RQ3To what extent can HELP reduce the total time cost of latency-constrained NAS when integrated with existing NAS methods?
- RQ4Does the proposed hardware embedding effectively capture device-specific characteristics for accurate meta-adaptation?
Key findings
- HELP achieves state-of-the-art latency estimation performance on unseen devices using only 10–20 measurements per device, outperforming baselines by a large margin.
- On NAS-Bench-201 with the HW-NAS-Bench dataset, HELP reduces the required number of samples by at least 90× compared to baseline methods.
- When combined with HAT, HELP reduces the number of samples needed to train the latency predictor from 2000 to just 10, while maintaining competitive BLEU scores on WMT’14 En-De.
- For a 90ms latency constraint, HAT+HELP achieves a BLEU score of 27.19 with only 10 samples, compared to 27.08 using 2000 samples in the baseline.
- On a CPU platform (Intel Xeon Gold6240), HAT+HELP achieves a BLEU score of 27.52 with 10 samples, outperforming the baseline (27.09) trained on 2000 samples.
- The integration of HELP with rapid NAS methods like OFA and MetaD2A enables near-instant latency-constrained NAS on new devices, reducing the overall search cost significantly.
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.