A Scene-aware Models Adaptation Scheme for Cross-scene Online Inference on Mobile Devices

Yunzhe Li, Hongzi Zhu, Zhuohong Deng, Yunlong Cheng, Zimu Zheng, Liang Zhang, Shan Chang, Minyi Guo · DOI

This paper introduces Anole, a lightweight scheme designed to solve the "Online Mobile Inference" (OMI) problem. As mobile devices like drones or dash cams move through the world, they encounter a constant stream of changing environments—shifting light, weather, and perspectives. Traditional deep neural networks (DNNs) struggle here: a single large model is too slow and power-hungry for mobile hardware, while a small "generalist" model often fails to maintain accuracy when the data distribution shifts (out-of-distribution samples).

Anole’s clever workaround? Instead of one big model, it uses an "army" of specialized, compact models and a smart controller to pick the right tool for the job in real-time.

TL;DR

Anole replaces a single, heavy DNN with a colony of specialized, compressed models that adaptively switch based on the current scene. This approach achieves 4.5% higher accuracy than a large-scale model while being 33% faster and consuming 45% less power on mobile hardware.

What Problem Does This Paper Address?

The authors target the Online Mobile Inference (OMI) problem, which is plagued by three main challenges:

  1. Dynamic Scenes: Mobile devices constantly experience "scene changes." A model trained on sunny highway data might fail miserably in a rainy urban tunnel.
  2. Resource Constraints: Mobile GPUs and CPUs have limited memory and battery. They can't easily run state-of-the-art "heavy" models.
  3. Unstable Connectivity: While the cloud has infinite compute, relying on it for real-time tasks (like a drone avoiding an obstacle) is dangerous due to network latency and dropouts.

The core question is: How can we achieve high-accuracy, real-time inference locally on a device that has very little memory and power?

Methods

Anole's architecture is split into an offline profiling phase (on the cloud) and an online inference phase (on the device).

1. Offline: Building the "Army"

  • Scene Partitioning: The authors argue that simple semantic labels (e.g., "daytime," "city") aren't enough to define a scene for a model. They use a weakly-supervised algorithm that combines human heuristics with feature similarity. They train a scene encoder ($M_{scene}$) and use clustering in the embedding space to find "model-friendly" scenes.
  • Specialized Training: For each identified scene, they train a highly compressed, specialized model (e.g., a YOLOv3-tiny variant).
  • The Decision Maker: They train a separate, lightweight classifier ($M_{decision}$) to look at an incoming frame and predict which specialized model will perform best.

2. Online: Adaptive Inference

  • Model Selection: The device runs the tiny $M_{decision}$ on every frame to rank the available specialized models.
  • LFU Caching: Since the device can't hold 20+ models in GPU memory at once, Anole uses a Least Frequently Used (LFU) cache. If the best model for a scene isn't in memory, it loads it from flash storage, replacing the least useful one.

Datasets

The researchers evaluated Anole across three distinct domains:

  • Vehicle Detection (VD): Used 64 video clips from KITTI, BDD100k, and a new dataset called SHD (Shanghai driving clips). These cover diverse lighting, weather, and road types.
  • Handwritten Digit Recognition (HDR): Used MNIST, plus custom-made rotated and noisy versions to simulate distribution shifts.
  • Industrial Decision Making: The Coke Production Dataset (CPD), used to predict quality grades in industrial manufacturing.
Fig. 2. The dataset of 64 randomly selected driving video clips demonstrates a large diversity in terms of image light conditions and foreground object distributions.

Key Insights and Ideas

  • The Failure of Generalists: The authors show that a general compressed model ($M_0$) is rarely the best choice for any specific scene. However, there almost always exists some compressed model that can match a giant model's accuracy for a specific slice of data.
  • Semantic vs. Feature Similarity: Figure 3(b) and 3(c) in the paper demonstrate that models trained on semantic attributes (like "weather") don't always perform best on those attributes. Clustering by feature embeddings is far more effective for model selection.
  • Power-Law Utility: They discovered that model usage follows a long-tail distribution. A few "supreme" models handle the vast majority of scenes, which makes the LFU caching strategy highly effective (see Figure 6b).
Figure 1: Conceptual illustration of how different models ($\Psi$) cover different parts of the data universe ($U$).

Key Results

Anole was tested on hardware including the Nvidia Jetson Nano and TX2 NX.

  • Accuracy: In cross-scene settings, Anole achieved an F1 score of 56.4%, outperforming a general large DNN (50.7%) and a general compact model (45.9%).
  • Efficiency: Compared to a large YOLOv3 model, Anole was 33.1% faster in response time and 45.1% lower in power consumption.
  • Agility: On a Jetson TX2 NX, switching models takes only 13.9 ms, allowing for seamless transitions as a vehicle moves from a bright street into a dark tunnel.

Limitations and Future Work

  • The "Unseen Scene" Problem: Anole relies on a repository of pre-trained models. If a device enters a completely novel environment (e.g., a Martian landscape), it might not have a suitable specialized model. The authors suggest a fallback to cloud-based "golden models" in these cases to label new data for future training.
  • Training Overhead: While inference is cheap, training 20 specialized models is computationally expensive. Future work could look into more efficient ways to "spawn" these specialized experts.
  • Foundation Models: The authors briefly discuss if large Mobile Foundation Models could replace Anole, but conclude that Anole's memory footprint (<2GB) and power efficiency are still superior for low-end, battery-powered IoT devices.

Summary updated

BibTeX
@article{li2025scene,
  author = {Yunzhe Li and Hongzi Zhu and Zhuohong Deng and Yunlong Cheng and Zimu Zheng and Liang Zhang and Shan Chang and Minyi Guo},
  title = {{A Scene-aware Models Adaptation Scheme for Cross-scene Online Inference on Mobile Devices}},
  journal = {IEEE Trans. Mobile Computing},
  year = {2025},
  doi = {10.1109/tmc.2025.3574766},
}
Figure