Optimizing Deep Learning Inference on Embedded Systems Through Adaptive Model Selection

Vicent Sanz Marco, Ben Taylor, Zheng Wang, Yehia Elkhatib

Introduction

Deep Neural Networks (DNNs) have revolutionized fields like computer vision and natural language processing, but their high computational demands pose significant challenges for deployment on resource-constrained embedded systems. Devices such as drones, IoT sensors, and mobile platforms often lack the power and memory to run state-of-the-art models efficiently. Traditional solutions typically involve cloud offloading, which introduces latency and privacy concerns, or model compression, which often sacrifices accuracy.

This paper proposes a novel adaptive approach that avoids the "one-size-fits-all" inefficiency of static model deployment. By recognizing that input complexity varies—where a clear image of a rabbit requires less processing power than a cluttered, low-light scene—the researchers developed a system that dynamically selects the most appropriate model for each specific input at runtime.

Methodology: The Adaptive Pipeline

The proposed system utilizes a two-stage inference pipeline designed to balance accuracy and latency with minimal overhead.

1. Feature Extraction and Premodel Selection

Upon receiving an input, the system first extracts low-cost features (e.g., image brightness, word counts). A lightweight "premodel"—such as a K-Nearest Neighbors (KNN) or Naive Bayes classifier—then predicts which DNN from a pre-defined pool will provide the optimal balance of performance for that specific input.

2. Model Selection and Adaptive Strategies

The pool of available DNNs is curated using an iterative algorithm that evaluates candidate models based on their "marginal utility"—the incremental accuracy gain relative to the added latency. The system can be configured with different optimization goals, such as prioritizing maximum accuracy or minimizing latency for a correct result.

Experimental Evaluation

The researchers evaluated their adaptive framework across two primary domains using an NVIDIA Jetson TX2 embedded platform:

  • Image Classification: Tested on the ImageNet ILSVRC 2012 validation set using 14 different CNN architectures, including MobileNet, ResNet, and Inception.
  • Machine Translation: Evaluated using the WMT15/16 English-German datasets with 15 different RNN-based models.

Key Insights: Input-Dependent Optimality

A central finding is that the "best" model is not a static property of the architecture but depends heavily on the input data. Simple inputs can be handled by lightweight models, preserving resources for more complex cases that require deeper architectures.

Figure 4: Examples of varying input complexity and the corresponding inference times across different models. The stars and crosses indicate optimal models for different scoring criteria.

Interestingly, this adaptive selection can lead to an "ensemble boost," where the aggregate accuracy of the system exceeds that of even the most powerful single model in the pool. This occurs because the system can leverage the specific strengths of different architectures for different types of data.

Results and Performance

The adaptive approach demonstrated significant improvements over static model deployment:

  • Image Classification: Achieved a 1.8x reduction in inference time while simultaneously improving accuracy by 7.52% compared to a standalone ResNet-152 model.
  • Machine Translation: Delivered a 1.34x speedup with negligible impact on translation quality (BLEU score).
  • Energy Efficiency: Reduced energy consumption by over 2x by frequently utilizing faster models for "easy" inputs.
Figure 6: Inference runtime for different machine translation models across various sentence lengths.

The overhead of the premodel was kept remarkably low—under 1ms for translation and approximately 28% of total time for image classification, primarily due to the feature extraction stage.

Conclusion and Future Work

This research demonstrates that adaptive model selection is a powerful tool for optimizing DNN inference on embedded systems. It complements existing compression techniques by providing a more efficient Pareto frontier. Future work will focus on optimizing the feature extraction process using lower-level languages or hardware acceleration and exploring heterogeneous execution environments where the premodel also determines whether to run tasks on the CPU, GPU, or DSP.

Summary updated

BibTeX
@article{marco2020optimizing,
  author = {Vicent Sanz Marco and Ben Taylor and Zheng Wang and Yehia Elkhatib},
  title = {{Optimizing Deep Learning Inference on Embedded Systems Through Adaptive Model Selection}},
  journal = {ACM Trans. Embed. Comput. Syst.},
  year = {2020},
  doi = {10.1145/3371154},
}
Figure