Zero time waste in pre-trained early exit neural networks.

Journal: Neural networks : the official journal of the International Neural Network Society
Published Date:

Abstract

The problem of reducing processing time of large deep learning models is a fundamental challenge in many real-world applications. Early exit methods strive towards this goal by attaching additional Internal Classifiers (ICs) to intermediate layers of a neural network. ICs can quickly return predictions for easy examples and, as a result, reduce the average inference time of the whole model. However, if a particular IC does not decide to return an answer early, its predictions are discarded, with its computations effectively being wasted. To solve this issue, we introduce Zero Time Waste (ZTW), a novel approach in which each IC reuses predictions returned by its predecessors by (1) adding direct connections between ICs and (2) combining previous outputs in an ensemble-like manner. We conduct extensive experiments across various multiple modes, datasets, and architectures to demonstrate that ZTW achieves a significantly better accuracy vs. inference time trade-off than other early exit methods. On the ImageNet dataset, it obtains superior results over the best baseline method in 11 out of 16 cases, reaching up to 5 percentage points of improvement on low computational budgets.

Authors

  • Bartosz Wójcik
    Faculty of Mathematics and Computer Science, Jagiellonian University, Poland; Doctoral School of Exact and Natural Sciences, Jagiellonian University, Poland; IDEAS NCBR, Poland. Electronic address: b.wojcik@doctoral.uj.edu.pl.
  • Marcin Przewiȩźlikowski
    Faculty of Mathematics and Computer Science, Jagiellonian University, Poland; Doctoral School of Exact and Natural Sciences, Jagiellonian University, Poland; IDEAS NCBR, Poland.
  • Filip Szatkowski
    Warsaw University of Technology, Poland; IDEAS NCBR, Poland.
  • Maciej Wołczyk
    Faculty of Mathematics and Computer Science, Jagiellonian University, Poland; Doctoral School of Exact and Natural Sciences, Jagiellonian University, Poland.
  • Klaudia Bałazy
    Faculty of Mathematics and Computer Science, Jagiellonian University, Poland; Doctoral School of Exact and Natural Sciences, Jagiellonian University, Poland.
  • Bartłomiej Krzepkowski
    University of Warsaw, Poland; IDEAS NCBR, Poland.
  • Igor Podolak
    Faculty of Mathematics and Computer Science, Jagiellonian University, Poland.
  • Jacek Tabor
    Faculty of Mathematics and Computer Science , Jagiellonian University , 6 Łojasiewicza Street , 30-348 Kraków , Poland.
  • Marek Śmieja
    Faculty of Mathematics and Computer Science, Jagiellonian University, 6 Lojasiewicza Street, 30-348, Kraków, Poland.
  • Tomasz Trzciński
    Faculty of Electronics and Information Technology, Warsaw University of Technology, Poland.