Bandwidth-Aware Adaptive Codec for DNN Inference Offloading in IoT

Xiufeng Xie, Ning Zhou, Wentao Zhu, Ji LiuECCV 2022

Abstract

Modern IoT applications often offload compute-intensive Deep Neural Network (DNN) tasks to edge servers. However, fluctuating network bandwidth and the "human-perception" bias of traditional codecs like JPEG hinder inference accuracy. This paper presents AutoJPEG, a framework that treats image compression as a constrained optimization problem. By jointly optimizing JPEG quantization tables and DNN weights using the Alternating Direction Method of Multipliers (ADMM), AutoJPEG maximizes accuracy while strictly adhering to real-time bandwidth limits.

Introduction

Resource-constrained IoT devices, such as augmented reality (AR) glasses, lack the power to run sophisticated DNNs locally. Inference offloading—streaming data to a server—is the standard solution. Yet, this approach faces two primary challenges: bandwidth volatility and the fact that standard codecs like JPEG are optimized for human vision, often discarding high-frequency information critical for machine tasks. Existing "DNN-friendly" codecs typically use soft penalties (heuristics) that fail to guarantee compliance with strict, varying bandwidth budgets.

Methodology: The AutoJPEG Framework

AutoJPEG addresses these issues by formulating compression as a formal constrained optimization problem.

The AutoJPEG system architecture illustrates the joint optimization of encoding parameters on the IoT side and DNN weights on the server side using an ADMM optimizer.

Differentiable Pipeline

To enable gradient-based optimization, the non-differentiable components of the JPEG pipeline (quantization and rounding) are modeled using Straight-Through Estimators (STE) and smoothed tanh functions. This allows gradients to flow from the DNN loss back to the quantization tables.

Constrained Optimization via ADMM

Unlike prior works that use a weighted sum of accuracy and size, AutoJPEG employs the Alternating Direction Method of Multipliers (ADMM). This allows the system to treat the bandwidth limit as a "hard" constraint. The framework jointly updates the DNN weights, quantization tables, and even the RGB-to-YUV color conversion parameters to ensure the entire pipeline is optimized for the specific task.

Key Insights and Results

The core advantage of AutoJPEG lies in its ability to navigate the rate-accuracy trade-off more effectively than heuristic methods.

AutoJPEG explores a specific search space to find the optimal rate-accuracy tradeoff that satisfies a hard bandwidth constraint.

Performance Benchmarks

The framework was evaluated on semantic segmentation (Cityscapes) and image classification (CIFAR-10):

  • Semantic Segmentation: On the Cityscapes dataset, AutoJPEG achieved 71.24% mIoU at 408KB, outperforming the state-of-the-art GRACE codec, which achieved lower accuracy (71.0%) at a larger size (418KB).
  • Image Classification: For CIFAR-10, AutoJPEG improved Top-1 accuracy by 4.73% while reducing image size by 13% compared to standard JPEG.

AI-Centric Compression

AutoJPEG prioritizes frequency bands and color channels essential for machine inference rather than human aesthetics. This "AI-centric" approach allows for higher accuracy at lower bitrates. Furthermore, because optimization is performed offline, devices can switch between pre-calculated quantization tables in real-time as network conditions change.

Conclusion

AutoJPEG demonstrates that treating bandwidth as a hard constraint through ADMM optimization significantly improves the efficiency of IoT inference offloading. By moving away from human-centric compression and soft-penalty heuristics, the framework provides a robust solution for real-time AI tasks in volatile network environments. Future work may explore end-to-end quantization of both the image and the DNN weights to further reduce latency.

Summary updated

BibTeX
@inproceedings{xie2022bandwidth,
  author = {Xiufeng Xie and Ning Zhou and Wentao Zhu and Ji Liu},
  title = {{Bandwidth-Aware Adaptive Codec for DNN Inference Offloading in IoT}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19839-7\_6},
}
Figure