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
- Define both setups: batch learning fits parameters on the full collected dataset at once, whereas online learning receives examples sequentially at step , predicts , observes the loss, and updates the weights immediately.
- 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).
- State the main trade-off: online updates adapt quickly and use 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
- Confusing mini-batch stochastic gradient descent (multiple passes over a fixed dataset) with true online learning (a single pass over a live stream where past data are not stored).
- Forgetting that an online model still needs monitoring and safeguards against poisoned or corrupted incoming points.
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?