Efficient adaptive inference for deep convolutional neural networks using hierarchical early exits

Abstract Early exits are capable of providing deep learning models with adaptive computational graphs that can readily adapt on-the-fly to the available resources. Despite their advantages, existing early exit methods suffer from many limitations which limit their performance, e.g., they ignore the information extracted from previous exit layers, they are unable to efficiently handle feature maps with large sizes, etc. To overcome these limitations we propose a Bag-of-Features (BoF)-based method that is capable of constructing efficient hierarchical early exit layers with minimal computational overhead, while also providing an adaptive inference method that allows for early stopping the inference process when the network is confident enough for its output, leading to significant performance benefits. To this end, the BoF model is extended and adapted to the needs of early exits by constructing additive shared histogram spaces that gradually refine the information extracted from the various layers of a network, in a hierarchical manner, while also employing a classification layer reuse strategy to further reduce the number of parameters needed per exit layer. Note that the proposed method is generic and can be readily combined with any neural network architecture. The effectiveness of the proposed method is demonstrated using five different image datasets, proving that early exits can be readily transformed into a practical tool, which can be effectively used in various real-world embedded applications.

[1]  Geoffrey E. Hinton,et al.  Distilling the Knowledge in a Neural Network , 2015, ArXiv.

[2]  Xinbo Gao,et al.  Deep Convolutional Neural Networks for mental load classification based on EEG data , 2018, Pattern Recognit..

[3]  Dumitru Erhan,et al.  Going deeper with convolutions , 2014, 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[4]  Linda G. Shapiro,et al.  Detection and classification of cancer in whole slide breast histopathology images using deep convolutional networks , 2018, Pattern Recognit..

[5]  Anastasios Tefas,et al.  Learning Deep Representations with Probabilistic Knowledge Transfer , 2018, ECCV.

[6]  Mark Sandler,et al.  MobileNetV2: Inverted Residuals and Linear Bottlenecks , 2018, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[7]  Cheng-Lin Liu,et al.  LightweightNet: Toward fast and lightweight convolutional neural networks via architecture distillation , 2019, Pattern Recognit..

[8]  Alexandros Iosifidis,et al.  Discriminant Bag of Words based representation for human action recognition , 2014, Pattern Recognit. Lett..

[9]  Cor J. Veenman,et al.  Kernel Codebooks for Scene Categorization , 2008, ECCV.

[10]  Jianxin Wu,et al.  ThiNet: A Filter Level Pruning Method for Deep Neural Network Compression , 2017, 2017 IEEE International Conference on Computer Vision (ICCV).

[11]  David G. Lowe,et al.  Object recognition from local scale-invariant features , 1999, Proceedings of the Seventh IEEE International Conference on Computer Vision.

[12]  Anastasios Tefas,et al.  Learning Bag-of-Features Pooling for Deep Convolutional Neural Networks , 2017, 2017 IEEE International Conference on Computer Vision (ICCV).

[13]  Yi Zhou,et al.  Elastic Neural Networks for Classification , 2018, 2019 IEEE International Conference on Artificial Intelligence Circuits and Systems (AICAS).

[14]  Angshul Majumdar,et al.  RODEO: Robust DE-aliasing autoencOder for real-time medical image reconstruction , 2017, Pattern Recognit..

[15]  Natalia Gimelshein,et al.  PyTorch: An Imperative Style, High-Performance Deep Learning Library , 2019, NeurIPS.

[16]  Murat Akbacak,et al.  Bag-of-Audio-Words Approach for Multimedia Event Classification , 2012, INTERSPEECH.

[17]  Shuvra S. Bhattacharyya,et al.  Elastic Neural Networks: A Scalable Framework for Embedded Computer Vision , 2018, 2018 26th European Signal Processing Conference (EUSIPCO).

[18]  Kilian Q. Weinberger,et al.  Multi-Scale Dense Networks for Resource Efficient Image Classification , 2017, ICLR.

[19]  Alexandros Iosifidis,et al.  Time-series classification using neural Bag-of-Features , 2017, 2017 25th European Signal Processing Conference (EUSIPCO).

[20]  Yoshua Bengio,et al.  Gradient-based learning applied to document recognition , 1998, Proc. IEEE.

[21]  Andrew Zisserman,et al.  Video Google: a text retrieval approach to object matching in videos , 2003, Proceedings Ninth IEEE International Conference on Computer Vision.

[22]  Angelo Cangelosi,et al.  Head pose estimation in the wild using Convolutional Neural Networks and adaptive gradient methods , 2017, Pattern Recognit..

[23]  H. T. Kung,et al.  BranchyNet: Fast inference via early exiting from deep neural networks , 2016, 2016 23rd International Conference on Pattern Recognition (ICPR).

[24]  Anastasios Tefas,et al.  Neural Bag-of-Features learning , 2017, Pattern Recognit..

[25]  Peng Li,et al.  Deep Convolutional Computation Model for Feature Learning on Big Data in Internet of Things , 2018, IEEE Transactions on Industrial Informatics.

[26]  Kilian Q. Weinberger,et al.  Densely Connected Convolutional Networks , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[27]  Anastasios Tefas,et al.  Adaptive Inference Using Hierarchical Convolutional Bag-of-Features for Low-Power Embedded Platforms , 2019, 2019 IEEE International Conference on Image Processing (ICIP).

[28]  Song Han,et al.  Deep Compression: Compressing Deep Neural Network with Pruning, Trained Quantization and Huffman Coding , 2015, ICLR.

[29]  Geoffrey E. Hinton,et al.  Deep Learning , 2015, Nature.

[30]  Zhaoxiang Zhang,et al.  Spatiotemporal distilled dense-connectivity network for video action recognition , 2019, Pattern Recognit..

[31]  Anastasios Tefas,et al.  Learning bag-of-embedded-words representations for textual information retrieval , 2018, Pattern Recognit..

[32]  Jian Sun,et al.  Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition , 2014, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[33]  Serge J. Belongie,et al.  Convolutional Networks with Adaptive Inference Graphs , 2017, International Journal of Computer Vision.

[34]  Mubarak Shah,et al.  A probabilistic representation for efficient large scale visual recognition tasks , 2011, CVPR 2011.