Abstract
We propose a new framework for image classification with deep neural networks. The framework introduces intermediate outputs to the computational graph of a network. This enables flexible control of the computational load and balances the tradeoff between accuracy and execution time. Moreover, we present an interesting finding that the intermediate outputs can act as a regularizer at training time, improving the prediction accuracy. In the experimental section we demonstrate the performance of our proposed framework with various commonly used pretrained deep networks in the use case of apparent age estimation.
Introduction
Deep learning has significantly advanced computer vision, yet the high computational demands of state-of-the-art models remain a significant hurdle for deployment on embedded devices. Traditional approaches often involve choosing between a high-accuracy, resource-intensive model or a lightweight, less accurate alternative. However, real-world scenarios are dynamic; for instance, an age-estimation system in a public space may encounter varying workloads, requiring a flexible approach to resource management. We address this by introducing a monolithic, "elastic" network framework capable of adjusting its complexity on the fly.
Methodology
Our approach "elastifies" existing successful network topologies, such as ResNet, MobileNet, and Inception, by integrating intermediate classifier layers, or "early exits," at various block outputs throughout the architecture.
The training process utilizes a composite loss function that sums the losses from all exits. To ensure the network focuses on layers with sufficient predictive capacity, we assign weights ($\alpha_p$) to each exit. In our experiments, we typically assign zero weight to the first half of the network's exits and a weight of one to the latter half. This "anytime prediction" capability allows the system to terminate inference early when computational budgets are constrained, providing a reliable prediction with significantly reduced latency.
Experimental Evaluation
The framework was evaluated on the task of apparent age estimation. We employed a three-stage training pipeline:
- General Pre-training: Initial weights from ImageNet.
- Domain-Specific Pre-training: Training on the IMDB-WIKI dataset (approx. 500,000 images) to learn facial features.
- Fine-tuning: Final optimization on the ChaLearn LAP 2016 dataset, which contains high-quality human-annotated apparent ages.
Results and Discussion
The elastic framework consistently outperformed standard non-elastic counterparts across all tested architectures. A key finding is the regularization effect: by requiring intermediate layers to produce valid predictions, the network learns more robust features earlier in the pipeline, which ultimately enhances the accuracy of the final output layer.
Quantitatively, the Elastic InceptionV3 achieved a Mean Absolute Error (MAE) of 4.007, competitive with top-tier ensemble methods from the ChaLearn competition while maintaining a much simpler single-network structure. Furthermore, the framework allows for massive computational savings, with FLOP reductions ranging from 81% to 99% compared to standard VGG16 benchmarks when early exits are utilized.
Conclusion
Elastic Neural Networks provide a versatile solution for deploying deep learning on resource-constrained hardware. By enabling dynamic trade-offs between speed and accuracy and providing a beneficial regularization effect, this framework bridges the gap between high-performance research models and practical embedded applications. Future work will investigate automated exit placement and the generalizability of the regularization effect across other vision tasks such as object detection.
Summary updated