CrackML by @ml.with.umang
Interview questions / ML Fundamentals
ML Fundamentals interview question

When would you choose SGD instead of Adam?

When would you choose SGD instead of Adam? Structure your response as you would in a top-tier ML/AI engineering interview.

mediumconceptEvidence 75/1001 source reportTikTok

The 60-second answer

Gradient descent follows the negative loss gradient; SGD/mini-batch methods trade exact gradients for scalable noisy estimates. Adam adds adaptive first/second moments; SGD can generalize strongly with appropriate momentum and schedules.

Build the answer in this order

1
Give the core idea

Gradient descent follows the negative loss gradient; SGD/mini-batch methods trade exact gradients for scalable noisy estimates.

2
Explain how it works

Adam adds adaptive first/second moments; SGD can generalize strongly with appropriate momentum and schedules.

3
Compare alternatives

Learning rate is central: use warmup/decay or plateau schedules and diagnose divergence, noisy updates, exploding gradients, and plateaus.

4
State failure modes + validation

Compare convergence, optimizer-state memory, batch size, and distributed-training cost.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Definition
02Mechanism
03Trade-offs
04Failure modes
05When to use

Senior-level signal

  • Relate optimizer and schedule to effective batch/token budget and gradient-noise scale.
  • For large models, optimizer-state memory and communication can dominate the theoretical convergence discussion.

What the interviewer is really testing

Mechanistic understanding, assumptions, trade-offs, and whether you can turn a definition into a model decision.

Likely follow-up questions

What assumption makes this approach work?
When would you choose the strongest alternative instead?
What production or data failure mode changes your answer?

Common weak-answer patterns

  • Reciting a definition without mechanism or assumptions.
  • Claiming one technique is always better without a data regime.
  • Stopping before failure modes, validation, or deployment implications.