Notes

Early Exit

Not every input deserves the full cost of a neural network. A clear photo of a cat, or a familiar wake word spoken loudly, can be recognized long before the model reaches its deepest layers. Early exit uses that fact to save time and energy.

How it works

An early-exit model places small prediction heads, called exit branches, at intermediate points in a network as well as at its final output. During inference, the device evaluates the first section of the model, asks an exit branch for a prediction, and checks its confidence. If that prediction clears a chosen threshold, inference stops there. Inputs that remain uncertain continue through more layers, gaining the extra computation needed for a stronger decision.

  • An easy image may exit after a few layers.
  • A blurry or unusual image travels to the final, more accurate classifier.
  • The result is input-adaptive computation: work scales with difficulty rather than being fixed for every input.
Why confidence needs care

A high reported confidence is useful only when it reflects real reliability. Exit branches are trained alongside the main model and then evaluated independently; their scores are frequently calibrated so that a 95% confidence threshold means something trustworthy. Thresholds are selected against accuracy, latency, and energy targets. A low threshold saves more battery but sends harder examples out too soon, causing mistakes. A high threshold preserves accuracy but reduces the savings.

Why it matters on devices

Early exit is valuable when a device must respond continuously within a fixed power or thermal budget. A battery-powered smart camera can classify obvious frames cheaply while reserving full processing for ambiguous scenes. A wake-word system can rapidly dismiss ordinary speech without running every layer on every audio window. Unlike simple model compression, early exit does not make every inference equally smaller; it makes many routine inferences shorter. The trade-off is variable latency: real-time systems still need to budget for difficult inputs that reach the final exit. Architectures such as BranchyNet helped establish this pattern, while deployment runtimes must support the model’s branching and confidence logic efficiently.

Early exit is an inference design in which a neural network includes intermediate prediction heads and stops processing when an earlier head reaches a confidence threshold; harder inputs continue through deeper layers. It reduces average latency, energy use, and compute while retaining full-model capacity for uncertain cases. On edge devices, early exit enables responsive inference within fixed power and thermal budgets, especially when many inputs are easy to classify.

Think of a teacher grading easy quiz answers quickly, but spending more time on the tricky ones. Early exit lets an AI on a phone, camera, or sensor do something similar.

For a simple task—such as a clear photo of a cat—the AI can decide it is confident enough and stop early. It gives an answer without using all of its usual processing steps. For a blurry or unusual photo, it keeps going for a more careful answer.

This saves battery power, time, and heat on the device, while still giving harder cases the extra attention they need.