Real-Time Edge Classification: Optimal Offloading under Token Bucket Constraints

Ayan Chakrabarti, Roch Guérin, Chenyang Lu, Jiangnan Liu · OpenReview

Introduction

In real-time AI applications such as autonomous vehicles or industrial robotics, latency is a critical constraint. A common strategy to manage this is "split inference," where a fast, "weak" model runs locally on a device (e.g., a Raspberry Pi), while a more accurate, "strong" model resides on a powerful edge server. When the local model's confidence is low, the device offloads the task to the edge.

However, real-world network resources are finite. To ensure predictable latency, networks often employ token buckets to regulate traffic, limiting both the average data rate ($r$) and the maximum burst size ($b$). Traditional offloading schemes frequently overlook these hard constraints. This paper introduces an MDP-based framework that optimizes offloading decisions by balancing local model uncertainty against a limited, refilling "budget" of network transmissions.

Methodology

The researchers model the offloading decision as a Markov Decision Process (MDP) to determine the optimal policy for utilizing network credits.

System architecture for real-time edge classification with token bucket constraints.

The Offloading Framework

  1. Reward Mapping: Instead of relying solely on entropy, the system maps local model uncertainty to an "expected reward"—the predicted accuracy gain from edge processing. This mapping is learned using a Radial Basis Function (RBF) kernel.
  2. State-Space Policy: The system state is defined by the difficulty of the current input and the remaining tokens in the bucket. The goal is to find a threshold-based policy that decides whether to offload based on these variables.
  3. Optimization: Optimal thresholds are computed offline via Value Iteration. At runtime, the device performs a simple table lookup, ensuring minimal computational overhead.

Multi-Device Scaling

The framework extends to multi-device environments where multiple units share an access switch. The authors compare three strategies:

  • Isolated: Each device operates with its own independent token bucket.
  • Hierarchical: Devices have loose local constraints, but a shared switch enforces a global rate.
  • Smart Switch: A centralized switch evaluates "difficulty tags" from all devices and allocates tokens from a global pool to the most challenging images.

Experimental Setup

The framework was evaluated using the ImageNet (ILSVRC) benchmark.

  • Models: Pre-trained models from the "Once-for-All" (OFA) collection were used. The "weak" model was optimized for mobile latency (8ms on an LG G8), while the "strong" model prioritized accuracy (595 MFlops).
  • Evaluation: The system underwent 3-fold cross-validation on the 50,000-image validation set to ensure robustness.

Results and Key Insights

The MDP-based approach demonstrated several advantages over naive, fixed-threshold baselines:

  • Dynamic Token Awareness: Unlike static policies, the MDP policy adapts to the bucket state. It becomes "aggressive" when tokens are plentiful and "conservative" when the budget is low, saving credits for the most difficult inputs.
  • The "U-Shaped" Benefit: Analysis revealed that offloading benefit is not strictly linear. For extremely ambiguous images where even the strong model might fail, the MDP learns to conserve tokens, focusing instead on "medium-hard" cases where the edge model provides the most significant boost.
  • Impact of Bursting: Increasing the bucket size ($b$) significantly improves accuracy, even if the average rate ($r$) remains constant. This allows the system to handle temporal clusters of difficult images.
  • Statistical Multiplexing: In multi-device scenarios, the "Smart Switch" approach proved superior. Sharing a token pool allows devices to "borrow" capacity, effectively handling localized bursts of complex data.

Conclusion and Future Work

This research provides a robust framework for real-time edge classification under strict network constraints. By integrating token bucket dynamics into the decision-making process, the system achieves higher accuracy and better rate efficiency than traditional methods.

Future work aims to address the i.i.d. assumption, as real-world video streams exhibit high temporal correlation. Additionally, integrating computation queues at the edge server and exploring feature compression (sending intermediate representations instead of full images) could further optimize bandwidth and latency.

Summary updated

BibTeX
@misc{chakrabarti2020real,
  author = {Ayan Chakrabarti and Roch Guérin and Chenyang Lu and Jiangnan Liu},
  title = {{Real-Time Edge Classification: Optimal Offloading under Token Bucket Constraints}},
  year = {2020},
  eprint = {2010.13737},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.13737},
}
Figure