Run-time Deep Model Multiplexing

Amir Erfan Eshratifar, Massoud Pedram

Abstract

Deep learning deployment often faces a trade-off between the high accuracy of large, resource-intensive models and the efficiency of smaller, mobile-friendly ones. We present a runtime deep model multiplexing framework that dynamically routes inputs to the most appropriate model based on input complexity. By utilizing a lightweight neural multiplexer trained with expertise-aware contrastive loss, the system achieves superior accuracy compared to single-model baselines while significantly reducing computational costs. In mobile-cloud hybrid scenarios, our approach improves accuracy by over 8% and reduces cloud compute requirements by 2.85×.

Introduction

Deep learning models face a "Goldilocks" problem in deployment. Large, state-of-the-art models (e.g., ResNext) provide high accuracy but are too slow and power-hungry for mobile devices. Conversely, small, mobile-friendly models (e.g., MobileNet) are fast but sacrifice accuracy. Currently, developers typically choose one of two extremes: running a small model locally, which risks errors, or offloading all inputs to the cloud, which incurs high latency, cost, and privacy risks.

This "one-size-fits-all" approach is fundamentally inefficient because not every input is equally difficult. A clear photo of a common object may not require a massive 100-layer network, whereas a blurry or occluded image might. This paper addresses the challenge of runtime model selection: dynamically deciding which model is "just right" for a specific input.

Methodology: The Neural Multiplexer

The core contribution is a two-step learning framework designed to create a lightweight "neural multiplexer" that acts as an intelligent gatekeeper.

Expertise-Aware Training

Rather than simply training models for classification, the authors employ a novel "expertise-aware" contrastive loss. This forces models to create an embedding space where inputs are grouped based on which models can successfully solve them. This allows the system to learn the specific "expertise domain" of each available architecture.

Multiplexer Architecture and Cost-Awareness

The multiplexer itself is a tiny, 4-layer CNN. It analyzes the raw input and predicts a set of weights representing the likelihood of success for each model in the pool. Crucially, the selection process incorporates the computational cost (FLOPs) of each model. The multiplexer is trained to minimize a loss function that balances prediction accuracy against resource consumption.

Deployment scenarios for deep model multiplexing: (a) Cloud-only, (b) Mobile-only, (c) Mobile-Cloud collaboration, and (d) Cloud-side multiplexing.

As shown in the figure above, this framework enables several deployment strategies:

  • Mobile-Cloud Collaboration: The multiplexer determines if an image can be handled locally or must be offloaded to a powerful cloud model.
  • Cloud Multiplexing: Cloud providers can route "easy" inputs to smaller, cheaper models on the server, reserving expensive resources for difficult cases.

Evaluation and Results

The system was evaluated using the ImageNet ILSVRC 2012 validation set and a pool of six architectures ranging from AlexNet to ResNext101. Hardware testing utilized an NVIDIA Jetson TX2 for mobile simulation and a GTX 1080Ti for the server side.

Performance Gains

In a mobile-cloud hybrid setup, the system achieved 80.4% accuracy, surpassing the best single model (ResNext at 79.39%) and the mobile-only baseline (71.88%). Furthermore, the multiplexer successfully processed 68% of inputs locally, significantly reducing cloud dependency. For cloud-only deployments, multiplexing reduced total FLOPs by 2.85× while improving accuracy by 4.55% compared to a static high-accuracy model.

The "AlexNet Surprise"

A key insight from the study is that even "weak" models possess unique expertise. As illustrated in the heatmap below, AlexNet can correctly classify approximately 2.8% of inputs that the much larger ResNext model fails on. This suggests that multiplexing does more than save energy; it can achieve higher aggregate accuracy by leveraging the complementary strengths of diverse architectures.

Heatmap showing the percentage of images that one model can solve while another cannot, highlighting the complementary expertise of different architectures.

Discussion and Future Work

The data-driven definition of "input complexity"—defined by how many models in an ensemble can solve an input—allows for more precise routing than simple heuristics. Additionally, by keeping "easy" inputs on-device, the system provides a natural privacy benefit.

However, limitations remain. Real-world mobile networks are volatile, and future iterations could integrate real-time bandwidth as a decision factor. Additionally, the current system assumes a static model pool; adapting to dynamic environments where models are updated frequently is an open challenge. Finally, combining this "whole model" multiplexing with "early exit" strategies within individual models could further enhance efficiency.

Summary updated

BibTeX
@misc{eshratifar2020run,
  author = {Amir Erfan Eshratifar and Massoud Pedram},
  title = {{Run-time Deep Model Multiplexing}},
  year = {2020},
  eprint = {2001.05870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.05870},
}
Figure