Adaptive Edge Offloading for Image Classification Under Rate Limit

Jiaming Qiu, Ruiqi Wang, Ayan Chakrabarti, Roch Guérin, Chenyang Lu

TL;DR

This paper introduces a lightweight Deep Q-Network (DQN) policy to manage image classification offloading from resource-constrained embedded devices to edge servers. By accounting for network rate limits (via a token bucket mechanism) and complex, correlated data patterns, the proposed system significantly improves classification accuracy with negligible computational overhead.

What Problem Does This Paper Address?

In the "Artificial Intelligence of Things" (AIoT), embedded devices like smart cameras often lack the power to run high-accuracy deep learning models. While they can offload tasks to more powerful edge servers, they are limited by network bandwidth.

To prevent network congestion, systems use a token bucket mechanism—a standard way to enforce a long-term average transmission rate while allowing for short-term bursts. The challenge is deciding which images are worth "spending" a token on to send to the edge. Previous solutions often assumed that image arrivals and classification difficulty were random and independent (i.i.d.). In reality, data is often correlated: a motion sensor might trigger a burst of images, or poor lighting might make a whole sequence of images difficult for a local "weak" model to classify.

Methods

The authors propose an adaptive offloading policy based on a Deep Q-Network (DQN).

  1. Model Hierarchy: The system uses a "weak" local model (fast, low accuracy) and a "strong" edge model (slow, high accuracy).
  2. Offloading Metric: The device calculates the entropy of the local model's output. High entropy suggests the local model is uncertain, indicating a higher potential "reward" (accuracy gain) if offloaded.
  3. DQN Policy: The DQN takes the current state—including the history of image arrivals, local confidence scores, and the current number of tokens in the bucket—and decides whether to offload the current image.
  4. Lightweight Design: To ensure it can run on embedded hardware, the DQN is a simple Multi-Layer Perceptron (MLP) with 5 layers. It processes scalar metrics rather than raw images, keeping its footprint tiny.
  5. Training: The policy is trained using experience replay and a target network to handle the non-stationary nature of real-world data arrivals.

Datasets

The study uses the ImageNet (ILSVRC) dataset as the foundation for its classification tasks. Because standard datasets don't capture temporal correlations, the authors generated synthetic traces to simulate real-world conditions:

  • Markov-Modulated Process: Used to simulate alternating periods of high and low image arrival rates.
  • Rank-Ordered Sampling: Used to simulate "bursts" of difficult or easy images by sampling from specific regions of the ImageNet distribution based on classification difficulty.

Key Insights and Ideas

  • Temporal Awareness is Key: The DQN's "aha moment" is its ability to recognize patterns. If it senses a high-intensity arrival period is starting, it becomes more conservative with tokens. Conversely, if it detects a lull, it can afford to be more aggressive in offloading lower-priority images to avoid "wasting" tokens as the bucket fills up.
  • Independence from the Strong Model: The offloading decision is made entirely locally. The device doesn't need to communicate with the server to decide whether to offload, which saves bandwidth and reduces latency.
  • Handling Correlation: Unlike traditional Markov Decision Process (MDP) models that assume independence, the DQN successfully learns the underlying structure of data bursts, leading to better long-term token management.

Key Results

  • Superior Accuracy: The DQN policy consistently outperformed both a fixed-threshold "Baseline" and an "MDP" policy, especially in scenarios with high data correlation.
  • Minimal Overhead: On a Raspberry Pi 4 testbed, the DQN inference took only 0.25ms on average. This represents only ~1.2% of the time taken by the local weak classifier (~20ms) and is a tiny fraction of the total end-to-end offloading time (~73ms).
  • Robustness: The system showed limited sensitivity to hyper-parameters like the history window length ($T$), suggesting it is easy to tune for different hardware.

Limitations and Future Work

  • Training Data Dependency: The policy requires representative training data to learn the specific arrival and accuracy patterns of a deployment environment.
  • Single Device Focus: The paper focuses on a single device's relationship with the bucket. In a real network, multiple devices might compete for the same shared bandwidth, which could require a multi-agent RL approach.
  • Model Architecture: While the MLP worked well, the authors suggest that Recurrent Neural Networks (RNNs) or LSTMs might capture even more complex temporal dependencies in future iterations.

Summary updated

BibTeX
@article{qiu2022adaptive,
  author = {Jiaming Qiu and Ruiqi Wang and Ayan Chakrabarti and Roch Guérin and Chenyang Lu},
  title = {{Adaptive Edge Offloading for Image Classification Under Rate Limit}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2022},
  url = {https://openreview.net/forum?id=P-50EyJH8n},
}
Figure