What is Stochastic Gradient Descent (SGD)?

Stochastic Gradient Descent is like training a robot to find the best path through a maze by trying different ways and learning from each try.

Imagine you're helping your friend learn how to ride a bike. Every time they wobble, you give them a little push in the right direction. Over time, they get better because they're learning from each small mistake. That’s what Stochastic Gradient Descent does, it helps machines like robots or computers improve their performance by learning from each small attempt.

How It Works

Think of a big puzzle with many pieces. You want to put them all together correctly. Instead of looking at the whole puzzle at once, you take one piece at a time and try different spots for it. Each time you make a guess, you get some feedback, like whether that piece fits or not. Stochastic Gradient Descent uses this feedback to adjust its guesses little by little until everything clicks into place.

It's fast and flexible because it doesn’t wait for the whole puzzle to be solved before moving on to the next piece, it learns as it goes!

Take the quiz →

Examples

  1. A teacher gives a student one problem at a time to learn faster.
  2. A runner adjusts their pace after each lap instead of the whole race.
  3. A chef tastes the soup every few minutes to adjust the flavor.

Ask a question

See also

Discussion

Recent activity