How does online learning with SGD handle non-stationary data streams?

Quick Overview

Explain how online learning with stochastic gradient descent adapts to non-stationary data streams. Tests why a constant step size acts as exponential forgetting, why decaying schedules freeze a model under drift, how optimizers differ, and what drift detection and replay add.

How does online learning with SGD handle non-stationary data streams?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does online learning with SGD handle non-stationary data streams? Assume a model is updated continuously from a stream whose distribution shifts over time, such as a click-through model whose users and inventory change from week to week. ```hint Expand the update Track a single number with SGD on squared loss and unroll the update a few steps back. How much weight does an example from k steps ago carry? ``` ```hint After a sudden shift Compare a learning rate that decays like 1/t with a constant one, right after the stream's mean jumps to a new value. ``` ### What a Strong Answer Covers - Why sequential SGD updates discount old data, and at what rate - The role of the learning rate schedule, including why schedules designed for convergence fail under drift - The trade-off between adapting quickly and staying stable - How adaptive optimizers differ in whether they forget old statistics - Complementary techniques such as drift detection, windows or reweighting, and protection against forgetting ### Follow-up Questions - With a constant learning rate of 0.01 on a mean-tracking problem, what is the model's effective memory? - How would you evaluate a model that is trained online on a drifting stream? - Labels arrive several days after the prediction. How does that change the design? - When would you prefer periodic retraining from scratch over continuous online updates?

Overview: Explain how online learning with stochastic gradient descent adapts to non-stationary data streams. Tests why a constant step size acts as exponential forgetting, why decaying schedules freeze a model under drift, how optimizers differ, and what drift detection and replay add.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How does online learning with SGD handle non-stationary data streams?

Assume a model is updated continuously from a stream whose distribution shifts over time, such as a click-through model whose users and inventory change from week to week.

What a Strong Answer Covers Guidance

  • Why sequential SGD updates discount old data, and at what rate
  • The role of the learning rate schedule, including why schedules designed for convergence fail under drift
  • The trade-off between adapting quickly and staying stable
  • How adaptive optimizers differ in whether they forget old statistics
  • Complementary techniques such as drift detection, windows or reweighting, and protection against forgetting

Follow-up Questions Guidance

  • With a constant learning rate of 0.01 on a mean-tracking problem, what is the model's effective memory?
  • How would you evaluate a model that is trained online on a drifting stream?
  • Labels arrive several days after the prediction. How does that change the design?
  • When would you prefer periodic retraining from scratch over continuous online updates?