Responsive DNN Adaptation for Video Analytics against Environment Shift via Hierarchical Mobile-Cloud Collaborations

Maozhe Zhao, Shengzhong Liu, Fan Wu, Guihai Chen

Introduction

Mobile video analytics systems, integral to autonomous driving, drone navigation, and smart surveillance, increasingly rely on lightweight "expert" Deep Neural Networks (DNNs) to process high-frequency visual data in real-time. While these specialized models offer high efficiency, their narrow focus makes them fragile. When the operating environment shifts—such as a vehicle transitioning from a sunlit highway into a dark tunnel or encountering sudden rainfall—the accuracy of these models often plummets. This phenomenon, known as environment shift, necessitates rapid model adaptation to maintain system safety and reliability.

The Challenge of Cloud-Centric Adaptation

Current state-of-the-art frameworks typically address environment shifts through cloud-centric adaptation. In these setups, the mobile device streams data to a powerful cloud server, which detects the shift, identifies a suitable historical model, or retrains the current model before sending the updated weights back to the edge. However, this approach introduces significant bottlenecks:

  1. Communication Latency: Uploading high-resolution video frames and downloading model weights consumes precious time and bandwidth.
  2. Cloud Queuing: In large-scale deployments, cloud servers face heavy task loads, leading to processing delays.
  3. The Accuracy Gap: During the time it takes for the cloud to respond, the mobile device continues to operate using an outdated, inaccurate model, creating a dangerous window of degraded performance.

MOCHA: A Hierarchical Collaborative Framework

To overcome these limitations, we present MOCHA, a mobile-cloud collaborative framework designed for near-instantaneous model adaptation. MOCHA treats model management as a hierarchical memory problem, splitting the workload between the resource-constrained mobile device and the high-capacity cloud.

On-Device Adaptation: The First Line of Defense

MOCHA empowers the mobile device to handle common shifts locally, minimizing the need for cloud intervention.

  • Shift Detection and Model Caching: The device runs a lightweight out-of-distribution (OOD) detector. It also maintains a "Mobile Model Cache," storing weights for expert models previously used in frequent environments. If a shift is detected and a matching model exists in the cache, the system swaps it in approximately 0.47 seconds.
  • On-Device LoRA Fine-Tuning: When a cached model is unavailable or insufficient, MOCHA performs Low-Rank Adaptation (LoRA) fine-tuning on a single layer of the DNN. This local optimization allows the device to bridge minor domain gaps independently, recovering accuracy without waiting for cloud retraining.

Cloud-Side Intelligence: Semantic Retrieval and Retraining

The cloud serves as the "main memory" and heavy-processing unit in the MOCHA hierarchy.

  • Semantic-Indexed Model Retrieval: Rather than using computationally expensive "gate networks" to select models, MOCHA leverages multi-modal Foundation Models (such as LLaVA). The cloud generates semantic metadata (e.g., "night, rainy, urban") for uploaded frames. Models are organized in a taxonomy tree, allowing the system to retrieve the most relevant historical model based on semantic distance—a zero-shot approach that significantly outperforms brute-force selection.
  • Background Retraining: For entirely novel environments, the cloud performs full end-to-end retraining. MOCHA utilizes a multi-level queue to manage these tasks efficiently across multiple connected devices, ensuring that heavy retraining does not bottleneck the entire system.

Experimental Evaluation

The performance of MOCHA was evaluated across three core tasks: object detection (YOLOv5), image classification (ResNet), and semantic segmentation (DeepLabv3+). Testing utilized the BDD100K driving dataset and real-world footage from YouTube and dashcams.

Key Results

  • Improved Recovery Accuracy: MOCHA achieved up to a 6.8% improvement in recovery accuracy for object detection and 4.2% for image classification compared to existing baselines like RECL and ODIN.
  • Drastic Latency Reduction: By prioritizing local caching and fine-tuning, MOCHA reduced response delays by up to 35.5x compared to cloud-only frameworks.
  • Enhanced Scalability: In multi-device scenarios, MOCHA's hierarchical approach reduced cloud retraining time by 3.0x, as the majority of adaptations were handled at the edge.

Conclusion and Future Directions

MOCHA demonstrates that a hierarchical approach to model adaptation—mimicking traditional computer memory structures—is essential for responsive mobile video analytics. By combining local caching and LoRA fine-tuning with cloud-based semantic retrieval, the system maintains high accuracy across diverse environments with minimal delay.

Future work will focus on optimizing cache replacement heuristics to better predict environment shifts and managing the cloud-side memory overhead associated with storing vast libraries of specialized models for large-scale deployments.

Summary updated

BibTeX
@inproceedings{zhao2025responsive,
  author = {Maozhe Zhao and Shengzhong Liu and Fan Wu and Guihai Chen},
  title = {{Responsive DNN Adaptation for Video Analytics against Environment Shift via Hierarchical Mobile-Cloud Collaborations}},
  booktitle = {SenSys},
  year = {2025},
  url = {https://openreview.net/forum?id=bXon9upbwc},
}
Figure