Abstract
Deep Neural Networks (DNNs) enable sophisticated features on mobile devices, yet their computational demands create a conflict between inference accuracy and latency. MDInference is a holistic framework designed to resolve this "tug-of-war" by combining network-aware probabilistic cloud model selection with simultaneous on-device execution. This approach ensures that applications meet strict response-time guarantees while maximizing accuracy, achieving over 40% higher aggregate accuracy compared to traditional static methods.
Introduction
Mobile developers currently navigate a difficult landscape when deploying DNNs. On-device inference offers predictable latency but is restricted to low-accuracy models due to hardware constraints. Conversely, cloud-based inference provides access to state-of-the-art models but suffers from unpredictable network jitter, often leading to missed Service Level Agreements (SLAs). Hybrid approaches, which split models between the device and the cloud, frequently inherit the drawbacks of both. MDInference addresses these challenges by treating model selection as a dynamic, network-responsive problem rather than a static one.
Methodology: The MDInference Framework
MDInference optimizes the inference process through two primary mechanisms: probabilistic model selection and request duplication.
Probabilistic Model Selection
Rather than relying on a single cloud model, MDInference dynamically selects the optimal model based on real-time network conditions. The selection process involves three stages:
- Baseline Selection: Identifying the most accurate model likely to complete within the remaining time budget ($T_{budget} = T_{sla} - T_{network}$).
- Exploration: Defining an "eligible set" of models with similar performance profiles to account for network variance.
- Opportunistic Selection: Utilizing a utility function to choose a model that maximizes accuracy while managing the risk of SLA violations.
Request Duplication
To guarantee SLA compliance despite sudden network degradation, MDInference employs request duplication. It sends the inference request to the cloud while simultaneously running a high-speed, lower-accuracy model locally. If the cloud result is delayed beyond the SLA threshold, the system falls back to the local result, ensuring a timely response for the user.
Experimental Evaluation
The framework was evaluated using 21 pretrained CNNs (e.g., MobileNet, Inception, ResNet) on the ILSVRC 2012 (ImageNet) dataset. Testing involved an AWS p2.xlarge GPU instance for cloud tasks and three mobile devices: the Nexus 5, Moto X4, and Pixel 2.
Key Results
- Accuracy Improvements: MDInference increased aggregate accuracy by over 40% compared to static "greedy" selection methods.
- SLA Reliability: The system met a 250ms latency target in 99.74% of cases on university WiFi and 96.84% on residential networks.
- Latency Reduction: Average end-to-end latency was reduced by up to 43% compared to static approaches, without sacrificing accuracy.
Discussion and Future Work
MDInference demonstrates that network variability can be leveraged as an opportunity for "upgrading" requests to higher-accuracy models when conditions allow. The "safety net" provided by local execution ensures 100% responsiveness with minimal overhead, as local models often complete in under 50ms.
Future research will focus on optimizing energy consumption by determining when request duplication is strictly necessary. Additionally, the authors aim to explore dynamic selection of the on-device fallback model to better suit specific mobile hardware and to automate the identification of optimal model subsets for diverse tasks.
Summary updated