Papers
Topics
Authors
Recent
Search
2000 character limit reached

Recursive Early-Exit Framework

Updated 8 June 2026
  • Recursive Early-Exit is a neural network inference framework that enables dynamic, goal-oriented decision-making via recursive multi-exit architectures.
  • It integrates reinforcement learning-based policies to adaptively decide early exits, offloading, or continuation to optimize accuracy, latency, and wireless resource usage.
  • Empirical results on CIFAR-10 with ResNet20 show 30% FLOP reduction or 1–2% accuracy gains, demonstrating its effectiveness for edge inference under time constraints.

Recursive early-exit is a framework for neural network inference designed to enable dynamic, goal-oriented decision-making in edge-device and server-collaborative scenarios. The approach combines a novel recursive mechanism for multi-exit neural architectures with reinforcement learning-based policies to adaptively determine when to halt computation, where to partition workloads, and whether to offload embeddings for remote inference. This framework jointly optimizes inference accuracy, computational latency, and wireless resource consumption, and is particularly suited to edge inference settings with fluctuating resource availability and strict real-time constraints (Pomponi et al., 2024).

1. Recursive Multi-Exit Neural Network Structure

The foundational component is a base model consisting of bb sequential blocks (convolutional or residual), noted as 1,,b\ell_1, \ldots, \ell_b, followed by a terminal classifier cbc_b. In conventional form, inference is computed as:

fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)

To enable early inference, a selected subset of indices I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\} is chosen for auxiliary "early-exit" branches. Each branch at index iIi \in \mathcal{I} attaches an exit-specific classifier cic_i, itself decomposed into a feature-processing head ei(x)e_i(x) (e.g., convolution + pooling) and a linear projection pi()p_i(\cdot) to output class scores.

Recursive prediction is implemented as follows. Let fi(x)[0,1]Cf_i(x) \in [0,1]^{|\mathcal{C}|} denote the class probability vector at exit 1,,b\ell_1, \ldots, \ell_b0. The combination mechanism is:

  • For 1,,b\ell_1, \ldots, \ell_b1,

1,,b\ell_1, \ldots, \ell_b2

  • For 1,,b\ell_1, \ldots, \ell_b3,

1,,b\ell_1, \ldots, \ell_b4

  • For 1,,b\ell_1, \ldots, \ell_b5,

1,,b\ell_1, \ldots, \ell_b6

Here, 1,,b\ell_1, \ldots, \ell_b7 is the "moving mass" term that reallocates class probabilities:

1,,b\ell_1, \ldots, \ell_b8

with 1,,b\ell_1, \ldots, \ell_b9 defined as linear plus sigmoid heads per exit. This recursive update allows intermediate exits to refine and compensate for class assignments based on new representations, yielding a path-dependent and efficiently updatable probability vector at each exit.

2. Confidence Evolution and Early-Exit Criterion

At each exit cbc_b0, the model outputs class probabilities cbc_b1. The instantaneous confidence is defined as

cbc_b2

The halting criterion employs a margin-based rule: denoting cbc_b3 and cbc_b4 as indices of the largest and second-largest entries of cbc_b5, the system halts at cbc_b6 if

cbc_b7

where cbc_b8 is a user-specified safety margin. This ensures halting only when the model is sufficiently more confident in the top prediction compared to subsequent candidates.

Alternative schemes used in classical early-exit models include simple thresholds cbc_b9 and difference-based strategies fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)0 in combination with fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)1. The margin-based halting rule, however, generalizes to the multiclass scenario and directly encodes the desired separation between leading predictions.

3. Reinforcement Learning-Based Online Exit Policy

The joint optimization of exit decisions, computation partitioning, and offloading is formulated as a Markov Decision Process (MDP), with each inference request constituting an episode of up to fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)2 decision steps (number of exits). The state at step fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)3 is

fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)4

where fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)5 indexes the current exit, and fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)6 is the instantaneous wireless Modulation & Coding Scheme selected per the observed channel SNR.

At each state, agent actions fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)7:

  • fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)8 (exit now): output prediction at exit fb(x)=cbbb11(x)f_b(x) = c_b \circ \ell_b \circ \ell_{b-1} \circ \cdots \circ \ell_1(x)9 locally,
  • I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}0 (continue): compute I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}1 and evaluate next exit,
  • I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}2 (offload): transmit current embedding to server and terminate.

Transitions for I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}3 yield a new state with incremented I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}4 and a fresh channel sample; I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}5 are terminal.

Terminal rewards aggregate three key performance indicators:

  • Computation saving: I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}6
  • Communication saving: I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}7 (embedding size in bits at I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}8; set to 1 if I{1,,b1}\mathcal{I} \subset \{1, \ldots, b-1\}9)
  • Goal-effectiveness: If total delay iIi \in \mathcal{I}0 and margin iIi \in \mathcal{I}1, then indicator iIi \in \mathcal{I}2.

iIi \in \mathcal{I}3

Tabular iIi \in \mathcal{I}4-learning is used to optimize policy iIi \in \mathcal{I}5, enabling adaptive selection of exit, continuation, or offloading actions under varying device, channel, and task constraints.

4. Computation Partitioning and Offloading Strategy

Computation splitting is operationalized by model partitioning: after evaluating up to exit iIi \in \mathcal{I}6, the device has performed iIi \in \mathcal{I}7 FLOPs and holds the corresponding iIi \in \mathcal{I}8-bit embedding. At this point, it can either:

  • Exit locally, transmitting zero data and finalizing inference, or
  • Offload the iIi \in \mathcal{I}9-bit embedding to the server, which then computes the remaining cic_i0 FLOPs.

The detailed delay components are:

  • Local compute delay: cic_i1
  • Transmission delay: cic_i2, with cic_i3, cic_i4 MHz, cic_i5 as instantaneous rate
  • Remote compute delay: cic_i6
  • Total delay: cic_i7

The wireless environment is modeled with path-loss plus Rayleigh fading. At each step, a fresh SNR determines the maximum achievable MCS and data rate, directly affecting cic_i8 and thus cic_i9.

5. Empirical Evaluation and Resource-Utility Trade-offs

The recursive early-exit method was benchmarked using CIFAR-10 and a ResNet20 backbone with nine early exits. Performance was compared against two canonical baselines:

  • Highest-probability halting (softmax threshold ei(x)e_i(x)0 on top-class probability)
  • Patience-based halting (exit after ei(x)e_i(x)1 consecutive exits agree on predicted class)

Results indicate that the recursive-mass approach dominated both baselines, delivering the same accuracy with roughly 30% fewer FLOPs, or yielding 1–2% higher accuracy for a fixed FLOPs budget.

In an edge inference scenario with randomized device locations (10–100m from access point), 20 MHz @3.5 GHz, ei(x)e_i(x)2 W, device/server compute times of 50/10 ms, and delay constraint ei(x)e_i(x)3 ms, margin thresholds ei(x)e_i(x)4 and communication weight ei(x)e_i(x)5 were varied. Trade-off curves illustrate that as ei(x)e_i(x)6 (the emphasis on communication savings) increases, the RL policy shifts from early offloading (maximal goal-effectiveness, low resource savings) to deeper local exits (higher computation saving, lower communication saving), eventually trading off goal-effectiveness if pushed to extremes.

Exit index distributions as a function of resource requirements showed that under strict communication-saving targets, the agent favored deep local exits; under abundant resources, early offloading was preferred for optimal accuracy. The learned policy effectively adapts exit, split, and offload behavior in real time, balancing accuracy, latency, and resource consumption.

6. Key Components and Hyperparameter Considerations

The recursive early-exit framework encompasses:

  • A recursive, multi-exit network structure updating class probabilities per layer via moving mass
  • A margin-based early-exit rule generalizing conventional confidence-based halting
  • Integration of early-exit, computation partitioning, and offloading as a joint MDP with RL optimization
  • Practical wireless channel and latency models for realistic deployment settings
  • Tabular Q-learning policy for real-time adaptive exit, split, and offload decision-making

Hyperparameters including safety margins (ei(x)e_i(x)7), reward coefficients (ei(x)e_i(x)8), maximum delay (ei(x)e_i(x)9), margin threshold (pi()p_i(\cdot)0), available MCS values, and device/server processing rates are all explicitly defined and tunable. These enable reproducibility and facilitate adaptation to alternative architectures, datasets, and wireless environments (Pomponi et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Recursive Early-Exit.