Learning Paradigms

online learning

/ ON-line LER-ning /

Picture a shopkeeper who adjusts prices a little after every single sale, learning from each customer as they walk in, rather than closing the store for a month to study a giant ledger. Online learning is that style for machines: the model updates itself one example (or a small batch) at a time as data arrives, instead of training once on a fixed dataset and then sitting frozen.

Contrast it with the usual "batch" approach, where you gather a complete dataset, train on all of it, and deploy the finished model. In online learning the data is a never-ending stream, and the model keeps nudging its parameters with each new piece. This suits problems where data arrives continuously (sensor feeds, stock prices, news, user clicks) or where the world keeps changing, so a model trained last year would already be stale. It is also light on memory, since you don't have to hold the whole dataset at once.

Its strength is staying current; its danger is instability. Because it reacts to recent data, it can be thrown off by a burst of noise or a deliberate attack, and it can suffer "catastrophic forgetting" — overwriting old, still-useful knowledge while chasing the latest trend. Good online systems therefore control how fast they change and guard against bad or adversarial inputs. Online learning is about when and how often you update, which is a different question from how few examples you need.

A news site ranks headlines by predicted clicks. Tastes shift hourly, so instead of retraining nightly on everything, it updates its ranking model after each batch of clicks. When a story suddenly trends, the model catches on within minutes — but the engineers cap how fast it can swing so a single viral fluke doesn't wreck the rankings.

Update continuously from the stream — but cap how fast you swing.

Online learning trades stability for freshness: it can be steered astray by noisy or adversarial inputs and can forget old knowledge. "Online" here means updating as data streams in — it has nothing to do with the internet.

Also called
incremental learningstreaming learning在线学习線上學習增量学习