Abstract
Well-trained deep neural networks (DNNs) treat all test samples equally during prediction. Adaptive DNN inference with early exiting leverages the observation that some test examples can be easier to predict than others. This paper presents EENet, a novel early-exiting scheduling framework for multi-exit DNN models. Instead of having every sample go through all DNN layers during prediction, EENet learns an early exit scheduler, which can intelligently terminate the inference earlier for certain predictions, which the model has high confidence of early exit. As opposed to previous early-exiting solutions with heuristics-based methods, our EENet framework optimizes an early-exiting policy to maximize model accuracy while satisfying the given per-sample average inference budget. Extensive experiments are conducted on four computer vision datasets (CIFAR-10, CIFAR-100, ImageNet, Cityscapes) and two NLP datasets (SST-2, AgNews). The results demonstrate that the adaptive inference by EENet can outperform the representative existing early exit techniques. We also perform a detailed visualization analysis of the comparison results to interpret the benefits of EENet.
Introduction
Modern Deep Neural Networks (DNNs) are computationally intensive, presenting significant challenges for deployment on resource-constrained "edge" devices like smartphones or IoT sensors. Traditionally, a DNN processes every input through its entire architecture, regardless of complexity—treating a simple image of a clear sky with the same computational weight as a cluttered urban scene.
Early exiting addresses this inefficiency by placing intermediate "exit branches" (small classifiers) throughout the network. If a model achieves sufficient confidence at an early stage, it terminates processing to save time and energy. However, existing methods typically rely on hand-tuned heuristics, such as entropy thresholds, which are difficult to calibrate and fail to account for specific hardware latency budgets. EENet replaces these "gut-feeling" rules with a mathematically optimized scheduling policy.
The EENet Framework
The EENet framework decouples the training of the backbone model from the optimization of the exit policy, operating in two distinct phases:
- Multi-exit Model Training: Standard DNNs are augmented with early exit classifiers. To enhance the performance of these "shallow" layers, EENet employs self-distillation, encouraging earlier exits to mimic the probability distributions of the final, most accurate exit.
- Learned Scheduling Optimization: This core innovation involves learning two lightweight functions: Exit Scoring ($g_k$), which aggregates multiple confidence measures and class-wise scores, and Exit Assignment ($h_k$), a lightweight Multi-Layer Perceptron (MLP) that estimates the optimal exit to satisfy a predefined inference budget.
This decoupled approach allows for rapid re-optimization for different hardware constraints without the need to retrain the massive backbone model.
Discussion and Analysis
EENet's superiority over traditional methods stems from several key design choices:
- Optimization over Heuristics: By treating exit selection as a constrained optimization problem rather than a simple thresholding task, EENet achieves a superior trade-off between speed and accuracy.
- Class-Awareness: Standard methods ignore class labels. EENet incorporates class-wise scores, allowing it to be more "cautious" with classes that are historically difficult for the model. This prevents premature, incorrect exits for complex samples.
- Minimal Overhead: The schedulers are designed to be extremely lightweight, adding less than 0.5% to total inference latency.
Performance Evaluation
The authors evaluated EENet across diverse benchmarks, including computer vision (CIFAR, ImageNet, Cityscapes) and NLP (SST-2, AgNews). EENet consistently outperformed representative baselines such as BranchyNet, MSDNet, and PABEE.
- Accuracy Gains: On CIFAR-100 with a strict 6ms budget, EENet achieved 69.57% accuracy, outperforming MSDNet (68.70%).
- NLP Efficiency: On the AgNews dataset with a 100ms budget, EENet reached 91.58% accuracy, significantly higher than BranchyNet’s 87.66% at the same latency.
- Qualitative Success: Visualizations confirm that EENet successfully identifies "easy" samples and exits them early, preserving the computational budget for difficult cases.
Conclusion
While EENet offers a robust solution for adaptive inference, some challenges remain. The scheduler is optimized on a validation set, meaning significant distribution shifts in real-world data could lead to sub-optimal thresholds. Additionally, while EENet optimizes how to exit, the placement of exit branches within the architecture remains a manual design choice. Future work may extend EENet to dense prediction tasks like object detection and video tracking.
Summary updated