arXiv:2611.05120cs.LGNov 2026

Manuscript Offprint

arXiv:2611.05120

Towards an Optimal Control Foundation of Early Exits - Turnpikes and ResNets

Jens Püttschneider, Simon Heilig, Asja Fischer, Timm Faulwasser

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Jens Püttschneider*

Institute of Control Systems

Hamburg University of Technology

Hamburg, Germany

jens.puettschneider@tuhh.de

Simon Heilig*

Faculty of Computer Science

Ruhr University Bochum

Bochum, Germany

simon.heilig@rub.de

Asja Fischer

Faculty of Computer Science

Ruhr University Bochum

Bochum, Germany

Timm Faulwasser

Institute of Control Systems

Hamburg University of Technology

Hamburg, Germany

Abstract

The feed-forward propagation through neural networks is crucial for training and inference. To trade off efficiency and accuracy, it has been proposed to consider intermediate outputs of hidden states as data-dependent regularization during training and, ultimately, as early-exits during inference. In this work, we analyze the joint optimization of loss functions computed for the output layer and intermediate layers using optimal control theory. We prove that ResNets trained in this joint fashion exhibit the so-called turnpike phenomenon, this implies that the number of layers required to reach a prescribed loss level is bounded from above independently of the overall network depth. This induces a similarity property across the internal representations of early-exiting networks of varying depths. We connect the turnpike to the overthinking phenomenon, and provide theoretical insights into the success of early-exit criteria derived from softmax probabilities, specifically entropy and max-probability. In a range of experiments, we demonstrate the existence and effect of turnpikes and the resulting similarity in the early-exit performance for ResNets of varying depths.

1 Introduction

Training deep neural networks is arguably the tipping point of today's success of deep learning models. Key techniques are residual connections and intermediate output heads informing the network's hidden layers about their current performance [Szegedy et al., 2015, He et al., 2016b]. What was initially used only as training scheme [Lee et al., 2015], quickly evolved as inference method to save computation on instances handled equally well by shallower parts of the network [Teerapittayanon et al., 2016] and has since been applied to early-exiting language models and vision transformers [Scardapane et al., 2020, Zhou et al., 2020, Schuster et al., 2022, Chen et al., 2023]. Without early-exiting, a key failure mode of deep neural networks is overthinking [Kaya et al., 2019]: samples correctly classified by earlier layers are propagated further, incurring unnecessary computation and potentially degrading predictions at later stages. At the core of training these early-exit networks lies an optimization problem considering a combined loss of all auxiliary and final output heads, as illustrated in Figure 1a. As we show in this work, it is precisely this joint training formulation that gives rise to the turnpike phenomenon from optimal control, offering a principled explanation

*Equal contribution.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

(a) ResNet with early-exits and joint training.

Figure

(b) Loss trajectories.

Figure 1: Illustration of a ResNet with early-exits (EE), the joint training formulation induces the turnpike phenomenon from optimal control, which implies that early-exiting ResNets of different depths have similar trajectories of the early-exit losses along the network depth.

for why early-exit classifiers perform well and why overthinking can be avoided. With the turnpike phenomenon at hand, we are able to show that the early-exit depth required to reach a prescribed loss level is independent of the overall backbone depth. Consequently, the early-exit losses of networks of different depths are similar, as illustrated in Figure 1b.

Prior theoretical work has analyzed early-exit training either under restrictive assumptions such as strong convexity [Lee et al., 2015] or focused on layer-wise supervision regimes that lack the upstream gradient signal of joint optimization [Sakamoto and Sato, 2024]. Consequently, a fundamental understanding of how joint early-exit training behaves and why one can expect intermediate classifiers to perform well has remained elusive; a gap this work addresses through the lens of optimal control theory.

Motivated by residual connection-based neural networks (ResNets) and their connection to neural ODEs [He et al., 2016b,a, Chen et al., 2018], research started using tools from optimal control to investigate these deep learning models, where trainable parameters act as control inputs that steer hidden states towards a target representation determined by the loss function [Esteve et al., 2020, Esteve-Yagüe and Geshkovski, 2023, Ruiz-Balet and Zuazua, 2023]. A central technique is to use a stage cost over the full forward trajectory accumulating (loss-) penalties along the trajectory the data takes through the network. This can be understood as shaping the transient loss behavior, which enables stronger convergence guarantees and explicit depth bounds [Esteve et al., 2020, Faulwasser et al., 2024]. A commonality of these works is the turnpike phenomenon: hidden representations tend to cluster around the loss minimizer for the majority of layers, independent of network depth. However, while existing analyses focus on continuous space-time networks [Esteve et al., 2020], the application of this framework to standard ResNets architectures remains an open problem. In addition, our novel optimal control perspective on early-exiting enables new avenues towards formal analysis of training formulations.

In this work, we exploit the close relation between stage cost terms in discrete-time optimal control problems and the joint optimization formulation of early-exit neural networks. This allows us to show under which conditions this approach leads to the turnpike phenomenon. In turn this helps to uncover the fundamental mechanisms of joint training of early-exit neural networks. In short, our paper makes the following contributions:

  • A turnpike-based foundation of early-exit-based ResNet training and inference.

  • Novel asymptotic upper bounds on the cross-entropy loss during forward propagation revealing the loss turnpike phenomenon.

  • Theoretical bounds on guaranteeing correct classification and bounded early-exiting depths, derived for entropy and maximum softmax probability criteria.

  • Empirical support of the turnpike analysis and a principled approach to obtain the intermediate outputs in standard ResNets.

References (43)