OODIn: An Optimised On-Device Inference Framework for Heterogeneous Mobile Devices

Stylianos I. Venieris, Ioannis Panopoulos, Iakovos S. Venieris

Abstract

Deploying Deep Learning (DL) models on mobile devices is complicated by hardware heterogeneity, diverse model architectures, and dynamic runtime environments. OODIn is a novel framework that co-optimizes model-level parameters and system-level settings to maximize performance. By combining offline multi-objective optimization with an online runtime manager, OODIn achieves significant speedups and maintains performance stability under dynamic conditions like thermal throttling.

Introduction

Deploying high-performance AI on mobile platforms is a significant challenge for developers. The "mobile" ecosystem is characterized by extreme hardware heterogeneity, with devices featuring vastly different CPUs, GPUs, and specialized Neural Processing Units (NPUs). Furthermore, different tasks—such as image classification versus semantic segmentation—require diverse model architectures with unique resource footprints. Finally, mobile environments are dynamic; background tasks and thermal throttling can cause performance to fluctuate wildly. While tools like TensorFlow Lite provide execution frameworks, they do not guide developers through the complex trade-offs between accuracy, latency, and battery life across thousands of device models.

Methodology

OODIn addresses these challenges through a two-stage approach that separates static optimization from dynamic adaptation.

1. Offline Optimization

In the offline stage, the framework performs Design Space Exploration by generating model variants using different transformations, such as FP32, FP16, and INT8 quantization. These variants are then profiled on target hardware across all available compute engines and system settings (e.g., thread counts) to build a performance look-up table. Finally, Multi-Objective Optimization (MOO) is used to identify the mathematically optimal configuration ($\sigma$) that meets specific user-defined goals, such as maximizing throughput without sacrificing accuracy.

2. Online Adaptation

OODIn introduces a Convergence Layer (CL) into the software architecture to abstract hardware details and monitor system health in real-time. If the Runtime Manager detects performance degradation—for instance, due to thermal throttling or resource contention from other apps—it can hot-swap the execution to a different engine (e.g., moving from NPU to CPU) to maintain a consistent user experience.

Overview of the OODIn framework showing the offline optimization and online adaptation components.

Evaluation

The framework was evaluated using industry-standard benchmarks, including ImageNet ILSVRC 2012 for classification and PASCAL VOC 2012 for semantic segmentation. A diverse set of models was tested, ranging from resource-constrained architectures like MobileNetV2 and EfficientNet-Lite to high-accuracy models like ResNetV2 101 and DeepLabV3. Testing was conducted on three distinct tiers of smartphones: the low-end Sony Xperia C5 Ultra, the mid-tier Samsung A71, and the flagship Samsung S20 FE.

Key Insights and Results

Co-optimization and Dynamic Engines

A central finding is that model and system parameters must be tuned together. The optimal compute engine is a moving target that depends on both the model architecture and the device's current thermal state. By decoupling application logic from hardware-specific tuning via the Convergence Layer, OODIn enables portable AI applications that scale automatically across different devices.

Performance Gains

OODIn demonstrated substantial improvements over standard deployment methods:

  • Significant Speedups: The framework outperformed "status-quo" designs by up to 4.14× on CPUs and achieved a 93.46× improvement over naive NNAPI implementations.
  • Competitive Advantage: OODIn delivered up to 4.3× better performance than platform-aware designs and 3.5× better than model-aware designs.
  • Dynamic Resilience: During thermal throttling tests, the Runtime Manager detected lag and switched engines within ~800-1150ms, reducing latency by up to 2.7× compared to static designs.
Average speedup of OODIn compared to various baseline configurations across different mobile devices and models.

Limitations and Future Work

While OODIn provides a robust solution for mobile DL inference, there are areas for further development. The current implementation focuses on post-training quantization; incorporating pruning or dynamic channel skipping could further expand the optimization space. Additionally, the offline profiling stage requires physical access to target devices, which presents a scaling challenge. Future iterations could also integrate more granular energy-efficiency constraints into the multi-objective formulation to better address battery-drain concerns.

Summary updated

Abstract

Radical progress in the field of deep learning (DL) has led to unprecedented accuracy in diverse inference tasks. As such, deploying DL models across mobile platforms is vital to enable the development and broad availability of the next-generation intelligent apps. Nevertheless, the wide and optimised deployment of DL models is currently hindered by the vast system heterogeneity of mobile devices, the varying computational cost of different DL models and the variability of performance needs across DL applications. This paper proposes OODIn, a framework for the optimised deployment of DL apps across heterogeneous mobile devices. OODIn comprises a novel DL-specific software architecture together with an analytical framework for modelling DL applications that: (1) counteract the variability in device resources and DL models by means of a highly parametrised multi-layer design; and (2) perform a principled optimisation of both model- and system-level parameters through a multi-objective formulation, designed for DL inference apps, in order to adapt the deployment to the user-specified performance requirements and device capabilities. Quantitative evaluation shows that the proposed framework consistently outperforms status-quo designs across heterogeneous devices and delivers up to 4.3× and 3.5× performance gain over highly optimised platform- and model-aware designs respectively, while effectively adapting execution to dynamic changes in resource availability.
BibTeX
@inproceedings{venieris2021oodin,
  author = {Stylianos I. Venieris and Ioannis Panopoulos and Iakovos S. Venieris},
  title = {{OODIn: An Optimised On-Device Inference Framework for Heterogeneous Mobile Devices}},
  booktitle = {SMARTCOMP},
  year = {2021},
  url = {https://openreview.net/forum?id=mRak3AtRYC},
}
Figure