liveBook · Manning

Stale gradient

As explained in Distributed Machine Learning Patterns

A gradient computed using a model version older than the latest version available for updating the model.

A stale gradient is calculated from a model version that is no longer current when a worker sends it to a parameter server. Concurrent workers can therefore propose updates based on different model states. section 3.3.2

The impact depends on how far model versions have diverged and how parameters are partitioned. A stale gradient affecting a large or unevenly stored partition can substantially change training performance. section 3.3.2

Handle stale gradients by weighing statistical damage against recomputation cost:

  • Drop the gradient when its outdated model version could strongly distort the update, then let another worker provide a current gradient. section 3.3.2
  • Retain the gradient when recomputing it would waste substantial work, such as when it represents a large portion of the training data. section 3.3.2
Figure 3.14 The second worker is trying to push gradients calculated from half of the training data.
03-14

Shows a worker pushing gradients calculated from half of the training data, making the recomputation-versus-retention trade-off concrete. section 3.3.2

How Distributed Machine Learning Patterns covers it

How deep it goes
Explains causes, statistical consequences, and retention-versus-discard reconciliation, but does not specify a universal resolution.
Examples
Uses concurrent parameter-server access, imbalanced partitions, and gradients calculated from half the training data.
What it assumes
Assumes workers, parameter servers, model parameters, and calculated gradients are understood.
What you can do after
Diagnose stale updates and evaluate whether discarding or retaining them better balances model quality against recomputation cost.
How it connects
Connects distributed training with workers, parameter servers, model partitions, model versions, and gradients.

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.