Adaptive Deep Neural Network Inference Optimization with EENet

Fatih Ilhan, Ka-Ho Chow, Sihao Hu, Tiansheng Huang, Selim F. Tekin, Wenqi Wei, Yanzhao Wu, Myungjin Lee, Ramana Kompella, Hugo Latapie, Gaowen Liu, Ling Liu

Introduction

Standard Deep Neural Networks (DNNs) typically follow a "one-size-fits-all" approach, expending the same computational effort regardless of sample complexity. For instance, a clear, centered image of a common object receives the same processing as a blurry, occluded image of a rare class. This static execution is highly inefficient for resource-constrained edge devices like smartphones or IoT sensors.

"Early exiting" offers a solution by injecting classifiers into intermediate layers, allowing the model to stop early if it is sufficiently confident. However, traditional strategies rely on hand-tuned heuristics (e.g., simple entropy thresholds) that often fail to capture class-specific nuances or adapt to dynamic hardware budgets without costly retraining.

Methods: The EENet Framework

EENet addresses these limitations by decoupling model training from the scheduling policy. The framework operates in two distinct phases:

  1. Multi-exit Model Training with Self-Distillation: The base DNN is augmented with multiple exit branches. To maximize early-exit accuracy, self-distillation is employed, where the final, most accurate layer serves as a "teacher" for earlier layers by minimizing KL-divergence between their outputs.
  2. Scheduling Policy Optimization: Instead of fixed thresholds, EENet trains a lightweight multi-layer perceptron (MLP) scheduler on a validation set. This scheduler generates "exit scores" by aggregating multiple confidence measures—maximum prediction score, entropy, and "voting" agreement between exits—alongside class-wise prediction scores.
EENet architecture overview showing the two-phase process: multi-exit DNN training with self-distillation and scheduling policy optimization.

The framework further optimizes budget-aware thresholds to ensure that the average inference cost per sample adheres to user-defined constraints, such as specific latency or energy limits.

Key Insights: Beyond Simple Confidence

A core innovation of EENet is its ability to move beyond simple confidence metrics. Standard methods often struggle with "low-success" classes where the model rarely achieves high raw probability scores. EENet’s scheduler learns to recognize these patterns, assigning higher exit scores to correct predictions even when traditional metrics like maximum prediction score remain low.

Comparison between standard maximum prediction scores and EENet exit scores. EENet successfully assigns higher scores to correct predictions for low-success classes.

By decoupling the scheduler, EENet can adapt to new resource budgets (e.g., switching to a "Low Power Mode") in minutes. Furthermore, the multi-metric "voting" mechanism allows the scheduler to make more informed decisions by checking for agreement across multiple exits.

Experimental Results

EENet was evaluated across diverse domains, including Computer Vision (CIFAR, ImageNet, Cityscapes) and Natural Language Processing (SST-2, AgNews). It consistently outperformed representative baselines such as BranchyNet, MSDNet, and PABEE.

  • Efficiency Gains: On the Cityscapes semantic segmentation task, EENet achieved an 8.77x speedup while maintaining high performance.
  • Performance under Constraints: In the AgNews NLP task with a strict 100ms budget, EENet reached 93.45% accuracy, significantly higher than BranchyNet's 85.58% at the same latency.
  • Low Overhead: The computational cost of the EENet scheduler is negligible, accounting for less than 0.5% of total inference latency.

Conclusion and Future Work

While EENet provides a robust, model-agnostic framework for adaptive inference, its performance remains linked to the underlying multi-exit architecture. Future research may explore online adaptation, enabling the scheduler to adjust to real-world data distributions dynamically. Additionally, extending EENet to regression-based tasks like object detection and tracking presents a promising avenue for further optimization in edge computing environments.

Summary updated

BibTeX
@inproceedings{ilhan2024adaptive,
  author = {Fatih Ilhan and Ka-Ho Chow and Sihao Hu and Tiansheng Huang and Selim F. Tekin and Wenqi Wei and Yanzhao Wu and Myungjin Lee and Ramana Kompella and Hugo Latapie and Gaowen Liu and Ling Liu},
  title = {{Adaptive Deep Neural Network Inference Optimization with EENet}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00140},
}
Figure