When would you use online learning instead of batch (offline) learning, and what is the main trade-off?

Foundations, Learning setup
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you understand how streaming updates differ from training on a stored dataset and what risks streaming brings.

Key idea

Online learning updates model parameters incrementally after each arriving example (or tiny mini-batch) and discards it, trading the stability of global batch optimisation for low memory cost and fast adaptation to changing data.

Steps

  1. Define both setups: batch learning fits parameters on the full collected dataset at once, whereas online learning receives examples (xt,yt) sequentially at step t=1,2,…, predicts y^t, observes the loss, and updates the weights immediately.
  2. Give the three situations where online learning is preferred: data arrive as a continuous stream (such as ad clicks), the dataset is too large to fit in memory or retrain from scratch, or the underlying data distribution shifts over time (concept drift).
  3. State the main trade-off: online updates adapt quickly and use O(1) data storage, but they are sensitive to noisy individual examples or outliers, sensitive to the step-size schedule, and prone to forgetting older patterns if the stream changes abruptly.

Common mistakes

How long your answer should be

3–4 sentences.

Last checked on 4 December 2026.

Read this

Previous in Foundations: What is the difference between semi-supervised learning and self-supervised learning?
Next in Foundations: What is inductive bias in machine learning, and why is it necessary for generalisation?