DL0197 Continuous Incremental Online Learning

What is continuous learning after model deployment, and how do incremental learning and online learning differ in their handling of new data streams and catastrophic forgetting?

Answer

Continuous learning is the practice of keeping a deployed model current as the serving distribution drifts, by updating its parameters from the live stream instead of freezing the artifact that passed offline evaluation. The umbrella covers three regimes that differ in how much data one update sees and how often it ships: periodic batch retraining on the accumulated corpus, incremental learning that resumes from the current weights on a new chunk or task, and online learning that takes one low-learning-rate step per example or micro-batch and never revisits it. Incremental learning still controls the update: it can mix a replay sample of old data into every batch, run a few epochs over the chunk, and gate the result behind a shadow evaluation, so forgetting is a tunable quantity. Online learning gives up that control by construction, because each example is seen once, in arrival order, with no shuffling and no held-out replay, which makes the gradient sequence strongly non-i.i.d. and makes catastrophic forgetting the default rather than the exception. The core tension in both is the stability-plasticity dilemma: enough plasticity to absorb today’s traffic, enough stability to keep yesterday’s competence.

(1) Why Forgetting Happens: gradients computed only on new data are free to move weights that encoded the old distribution, since nothing in the loss references it. Breaking the i.i.d. sampling assumption of SGD is the mechanism, not model capacity.
(2) Incremental Learning Batches The Stream: updates operate on a chunk, task, or day of data, so replay ratios, epoch counts, and evaluation gates are all design knobs.
(3) Online Learning Streams One Pass: a single step per example, bounded memory, and no revisits, which buys seconds-level freshness and pays with instability and high variance.
(4) Three Families Of Mitigation: rehearsal (replay buffers, generative replay), regularization (EWC, distillation from the previous checkpoint), and parameter isolation (adapters, LoRA branches, masks).
(5) Forgetting Is Measurable: report per-task retention and average accuracy from the accuracy matrix, never a single aggregate on fresh traffic, which hides collapse on older slices.
(6) The Dual Failure Is Loss Of Plasticity: a model updated too conservatively for months stops learning at all, so stability alone is not the objective.

Diagram with a live traffic box on the left feeding three horizontal lanes: batch retraining on weeks of shuffled logged data with full offline evaluation and weekly deploys, incremental learning on a new chunk plus a replay sample with a few epochs from current weights and hourly to daily shadow-gated deploys, and online learning taking a single low-learning-rate step per example with learning-rate clipping, canary and rollback guardrails shipping in seconds

Figure 1: The gradient step is identical in all three lanes. What changes is how much data one update sees, how often it ships, and what protects the old distribution: shuffling over the full corpus, an explicit replay sample plus a shadow gate, or nothing but a small learning rate and a rollback button.

In production the choice is usually driven by label latency rather than by an appetite for novelty. Recommendation and ad ranking get feedback in seconds and genuinely benefit from near-online updates, so they run streaming updates on the embedding tables and the last layers while the backbone is refreshed on a slower incremental schedule. Fraud, credit, and medical models often wait days or weeks for a trustworthy label, so a per-example update would be trained on noise; incremental daily or weekly chunks with a replay mix are the safer default. The practical recipe that survives contact with traffic is rarely exotic: keep a stratified replay buffer covering old slices, mix roughly 5 to 20 percent of every batch from it, use a small re-warmed learning rate, and gate every candidate on a fixed regression suite of historical slices before promotion. Parameter isolation is attractive when tasks are known and separable, because a per-task adapter cannot be overwritten, but it grows parameters linearly in the number of tasks and needs task identity at inference unless the routing is learned.

Mathematical Formulation:
\theta_t = \theta_{t-1} - \eta_t \nabla \ell(\theta_{t-1}; z_t)
B_t = \alpha B^{new}_t + (1-\alpha) B^{replay}_t
\mathcal{L}(\theta) = \mathcal{L}_{new}(\theta) + \lambda \Omega(\theta)
\Omega(\theta) = \tfrac{1}{2}\sum_i F_i (\theta_i - \theta^{*}_i)^2
A_K = \frac{1}{K}\sum_{j=1}^{K} a_{K,j}
f_j = \max_{k} a_{k,j} - a_{K,j}

Where:

  • \theta_t are the parameters after the t-th update, \eta_t the step size, and z_t = (x_t, y_t) the arriving example; the pure online case uses each z_t exactly once.
  • B_t is the batch actually used at step t, built from fresh data B^{new}_t and a buffer sample B^{replay}_t, with replay ratio 1-\alpha typically in the 0.05 to 0.20 range.
  • \mathcal{L}_{new} is the loss on the incoming chunk and \Omega a stability penalty anchored at the previous checkpoint \theta^{*}, with \lambda trading plasticity for retention.
  • F_i is the diagonal Fisher information for parameter i under the old task, so weights the old task depended on move less; setting F_i = 1 reduces the penalty to plain L2-to-previous.
  • a_{k,j} is accuracy on task j measured after training through task k, with j and k indexing the K chunks seen so far.
  • A_K is average accuracy over everything seen and f_j the forgetting on task j, the drop from its best-ever value to its current one.
Two line charts over ten sequential tasks. The left panel plots accuracy on task one, where naive sequential fine-tuning falls from 94 percent to 25 percent, elastic-weight-style regularization holds 65 percent, a five percent replay buffer holds 81 percent, and joint retraining stays near 91 percent. The right panel plots average accuracy over all tasks seen, with the same ordering and a narrower gap between replay and joint retraining

Figure 2: Sequential updates without rehearsal do not degrade gracefully, they collapse: task 1 loses 69 accuracy points by task 10. A 5 percent replay buffer recovers most of the gap to joint retraining at a fraction of the compute, while a stability penalty alone lands in between because it also suppresses learning on the new chunk.

PropertyBatch retrainingIncremental learningOnline learning
Data per updateThe full accumulated corpus, shuffledOne chunk, day, or task plus a replay sampleOne example or micro-batch, in arrival order
Passes over dataMany epochs, i.i.d. sampling holdsA few epochs inside the chunk, old data only via bufferExactly one, no revisits
FreshnessDays to weeks behind trafficHours to a day behindSeconds to minutes behind
Forgetting exposureNone by construction, old data is in every epochBounded and tunable through replay ratio and penalty weightHigh, the update sees only the current regime
Main safeguardFull offline evaluation before promotionReplay buffer, EWC or distillation, shadow eval on old slicesSmall clipped learning rate, canary traffic, instant rollback
Dominant failureStaleness under drift, and rising retraining costBuffer becomes unrepresentative, or the penalty freezes learningLabel noise and feedback loops steer the model within hours
Good fitSlow drift, regulated or audited modelsNew domains, languages, or product surfaces arriving over timeFast implicit feedback such as clicks, prices, or trending content

Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *