liveBook · Manning

Ensemble

As explained in Inside Deep Learning: Math, Algorithms, Models

A collection of multiple models whose predictions are combined, typically to improve accuracy or robustness.

An ensemble combines predictions from multiple models to improve accuracy. Instead of training many neural networks independently, cosine annealing can produce several model snapshots from one training run. section 5.2.3

Cosine-annealing snapshots provide a practical ensemble workflow:

  • Train one model with a learning rate that repeatedly decreases to a small value and rises again. section 5.2.3
  • Copy the weights whenever the learning rate reaches the bottom of a dip; each copy becomes one ensemble member. section 5.2.3
  • For 20 snapshots over T epochs, set Tmax = T/(20·2−1) to obtain 20 dips. section 5.2.3
  • Use stochastic weight averaging to average parameters into one model with ensemble-like accuracy and the storage cost of one model. section 5.2.3

Snapshot ensemble

A 20-network ensemble would normally require training and storing 20 networks. Cosine annealing instead stores weights at 20 learning-rate minima during one run, then averages their predictions. section 5.2.3

How Inside Deep Learning: Math, Algorithms, Models covers it

How deep it goes
Explains snapshot timing, the Tmax formula, and parameter averaging, but does not provide ensemble-prediction code.
Examples
Uses 20 snapshots across T epochs and contrasts them with independently training 20 neural networks.
What you can do after
Apply it via cosine annealing or stochastic weight averaging to obtain ensemble-like accuracy with lower training or storage costs.
How it connects
Ties ensembles to cosine annealing, learning-rate schedules, and stochastic weight averaging.

Also explained in

Compare how 11 books explain ensemble →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Inside Deep Learning: Math, Algorithms, Models. The section links point to the parts of the book it draws on.