Back to Blogs

What Gradient Descent Taught Me About Life

August 7, 2026•8 min read
Gradient descent as a metaphor for learning from mistakes

I remember learning gradient descent and thinking it was just another machine learning algorithm I had to understand.

There was a model.

There were parameters.

There was a loss function.

And then there was a formula that looked unnecessarily complicated:

θnew = θold - η ∇J(θ)

At the time, I was mostly concerned with understanding what each symbol meant.

Today, I think about that formula a little differently.

Because hidden inside those few symbols is an idea that has very little to do with machines.

And a lot to do with us.

Maybe learning is simply the process of becoming slightly better after every mistake.

A model doesn't get it right the first time

Imagine you're training a machine learning model.

You give it some data and ask it to make a prediction.

It makes one.

Maybe it's completely wrong.

The model doesn't panic.

It doesn't decide that it's incapable of learning.

It simply calculates how far its prediction was from the expected answer.

That difference is called the loss.

Then comes the important part.

The model changes its parameters slightly in a direction that should reduce that error.

Mathematically, that's what gradient descent does:

θnew = θold - η ∇J(θ)

Where:

  • θ represents the model's parameters.
  • J(θ) represents the error or loss.
  • ∇J(θ) tells the model which direction the error increases.
  • η is the learning rate — how big a step the model should take.

Then it tries again.

And again.

And again.

Not one giant leap.

Millions of small corrections.

Eventually, the model can get surprisingly good.

And that's where I started seeing the connection with life.


We learn in almost exactly the same way

Think about the first time you learned something difficult.

Maybe it was programming.

Maybe mathematics.

Maybe speaking in front of people.

Maybe your first internship.

Maybe your first real project.

You probably weren't good at it initially.

You made mistakes.

You misunderstood things.

You did things inefficiently.

You probably looked at people who were already good at it and wondered how they made it look so easy.

But then something happened.

You tried again.

You understood one thing you didn't understand before.

You made a different mistake.

You fixed that one.

You tried again.

And slowly, something changed.

The thing that once seemed difficult became normal.

That's learning.

Not one huge moment where everything suddenly makes sense.

Just small corrections repeated over time.


The interesting part is the gradient

The most beautiful part of gradient descent, for me, isn't even the formula.

It's the idea of the gradient.

The gradient tells the model which direction it should move to reduce its error.

Notice what it doesn't tell the model.

It doesn't give it the entire path.

It doesn't say:

"Here is exactly where you will end up five years from now."

It only says:

From where you are right now, this direction is slightly better.

Maybe that's all we need sometimes.

We spend so much time trying to figure out our entire future.

What job will I get?

Where will I be in five years?

What should I learn next?

What if I make the wrong choice?

What if I choose the wrong career?

What if I fail?

We want the entire map before taking the first step.

But life rarely works like that.

Sometimes you don't need the entire map.

You just need to know what the next better step is.


Your learning rate matters too

There is another part of the formula that I find surprisingly relatable.

The learning rate, η.

It controls how big a step the model takes.

If the learning rate is too small, learning can be painfully slow.

If it's too large, the model can overshoot the solution and keep jumping around without settling down.

And I think people can do the same thing.

Sometimes we move too slowly because we're afraid of making mistakes.

We wait until we're completely ready.

We keep preparing.

We keep planning.

We tell ourselves we'll start when we know enough.

But we never take the step.

Other times, we want everything immediately.

We want to become excellent in a month.

We want the perfect job immediately.

We want the perfect product immediately.

We want years of experience without going through the years.

We take huge jumps, get overwhelmed, and then wonder why things don't work.

Maybe the answer isn't always to move faster.

Maybe it's to find the right step size.

Small enough that you don't lose control.

Big enough that you actually move forward.


The same mistake isn't learning

There's one more thing I find important.

Repeating something doesn't automatically mean you're learning.

Imagine a model that keeps making the exact same mistake without changing anything.

It can run a million iterations.

It will still be wrong.

Humans are not very different.

You can study for hours without learning.

You can write hundreds of lines of code without becoming a better engineer.

You can attend dozens of interviews without improving if you never reflect on why they went wrong.

The important part isn't simply repetition.

It's feedback.

You do something.

You see what went wrong.

You understand why.

You change your approach.

Then you try again.

That's what turns experience into learning.


Maybe failure is just feedback

This changed the way I think about failure.

We often attach our identity to our mistakes.

We fail an exam and think:

"I'm not smart enough."

We don't get an internship and think:

"I'm not good enough."

We build something that nobody uses and think:

"Maybe I can't build products."

But a machine learning model doesn't think this way.

It doesn't look at a high loss and conclude:

"I am a bad model."

The loss is simply information.

It tells the model:

Something about the current approach needs to change.

Maybe we should treat our failures the same way.

A bad result doesn't necessarily mean you are bad.

It might simply mean that your current approach needs adjustment.

That's a very different way of looking at failure.


Looking back at my own journey

When I think about my engineering journey, I can see these iterations everywhere.

My first internship.

My first paycheck.

My first project.

The things I built that didn't work.

The things I thought I was good at but wasn't.

The opportunities I got.

The opportunities I didn't.

Every experience changed something.

Some changed my technical skills.

Some changed how I communicate.

Some changed how I approach problems.

Some simply taught me what I don't want to do.

None of those moments completely transformed my life overnight.

But together, they changed the direction I was moving in.

That's probably the part we don't notice while we're living it.

Our lives are being updated quietly.

One experience at a time.


We don't need to minimize every mistake

There's also an important detail in the formula.

Gradient descent doesn't require the model to become perfect after one iteration.

The objective is simply to reduce the error.

Maybe that's a better standard for ourselves too.

Instead of asking:

"Am I successful yet?"

Maybe ask:

"Am I better than I was before?"

Did I understand something today that I didn't understand yesterday?

Did I handle a situation better than I would have six months ago?

Did I learn from the last mistake?

Did I become a little more patient?

A little more capable?

A little more confident?

A little more aware?

Those changes can look insignificant individually.

But compounded over years, they're not insignificant at all.


There is no perfect optimization

Of course, life isn't literally a machine learning problem.

There is no single loss function that tells us whether we're living correctly.

There is no universal definition of the perfect destination.

And unlike a model, we don't always know what we're optimizing for.

That's probably what makes life harder.

But maybe that's also what makes it meaningful.

We have to decide what matters.

We have to decide which mistakes are worth making.

We have to decide which direction is worth pursuing.

And sometimes, we have to change the objective itself.

That's something an algorithm can't decide for us.

The machine can optimize. We have to decide what is worth optimizing.

Maybe that's what growing up really is

I used to think growth meant reaching some point where everything would finally make sense.

Now I don't think that point exists.

Maybe growth is simply becoming better at navigating uncertainty.

You make a decision.

You see what happens.

You learn.

You adjust.

You try again.

Sometimes you move forward.

Sometimes you move backward.

Sometimes you realise you were optimizing for the wrong thing altogether.

And that's okay.

Because the goal isn't to perfectly predict the future.

It's to keep learning from the present.


One step at a time

A machine learning model doesn't become intelligent because it makes one perfect prediction.

It becomes better because it is willing to learn from imperfect predictions over and over again.

Maybe we can learn something from that.

We don't have to know exactly where our lives are going.

We don't have to get every decision right.

We don't have to become the best version of ourselves overnight.

We just need to remain willing to learn.

To look at our mistakes honestly.

To change direction when necessary.

To take the next step.

And then another.

Because perhaps life isn't about finding the perfect path.

Perhaps it's about continuously adjusting your direction until you find one worth following.

And maybe, in its own strange way, that's what gradient descent was trying to teach me all along.