top of page
  • Brendan Stec

Avoiding the Local Maximum

At some point in life we get stuck: on a tough problem, at a boring job, in an unhealthy relationship. It happens – we get comfortable with a certain way of doing things or a set routine. Suddenly we're in a rut, feeling a bit restless, unsatisfied, or frustrated – anxious to progress forward but unsure of the exact steps needed to get there.

In situations like these, we are stuck at what computer scientists call a local maximum. Here's what this looks like:

You can see that when you're stuck at a local maximum, in order to break out, you have to temporarily worsen your solution and then re-climb the higher hill. You have to let go of what is merely good enough. You also have to take some degree of risk, because when you're at a local maximum, you're never quite sure if it is truly the best you can do or not.

This is intuitive advice. But how do we actually get unstuck? In life, if we can't actually see whether we're at a local maximum or not, how do we know what steps to take to get out and reach the so-called global maximum?

You actually don't need to know. One effective strategy can involve just rolling the dice.

I'll explain.

When solving one of computer science's many optimization problems, such as determining the route that minimizes driving distance between two cities or the exact position, color and size of an online ad that maximizes expected clicks, there can be millions of potential solutions, and the best ones may be unintuitive or surprising – a combination of variables you wouldn't expect to work together.

In the iterative process of solving the problem, you can ensure a higher likelihood of finding these global solutions, while crucially avoiding the local maxima (or minima), by occasionally rolling the dice and seeing if there are better, random solutions out there you otherwise wouldn't have considered.

Simulated annealing is a well-known optimization technique that employ this kind of randomization, this rolling of the dice, so that a wider landscape of potential solutions can be explored. The randomization dislodges the algorithm from any sub-optimal nook where it is stuck, a process that may require temporarily sticking with a worse solution, but that ultimately offers a better chance of finding the optimal one. (1)

There is a key insight we can take away from this technique of computer science in our lives. If we believe we're stuck at a local maximum – in a rut and unsure of how to get out – then this is when we must be the most open to change and the random forces that life throws our way. We should be willing to roll the dice and try a new opportunity or engage with a new circle of friends. Or if life rolls the dice for us, we should still be open to taking one step backward to move two steps ahead.

This second point is worth analyzing further.

An improvement from where you are could require a complete re-arrangement of your life. A move across country. A change of careers. A serious revaluation of your habits. It can be impossible to inflict this sort of change on yourself by sheer force of will. But what about when randomness necessitates it? When someone walks out of your life unless you change? Or when a sudden layoff puts your career in jeopardy unless you step up to the plate and try something new?

The random forces completely out of our control, sometimes propelling us forward, sometimes inching us backward, can be the leverage that drives us clean out of a rut – a stagnant local maximum – and into a fresh new opportunity.

Peter Thiel, the billionaire tech investor and co-founder of PayPal, was initially dead-set on a tracked, "partner in 7 years" career in law until he was rejected from his dream clerkship. Something similar happened to Susan Cain, who, after failing to make partner at her own prestigious law firm, realized she hated the corporate world and immediately embarked on writing her book Quiet, which became a bestseller.

An example beyond law includes the eminent psychiatrist Milton Erickson, who suddenly contracted polio at the age of 17. The unfortunate disease paralyzed him and rendered him bedridden for a year. But he exploited the time of isolation to observe his mind's influence on his muscles and to begin formulating his theories on hypnosis that would later earn him so much notoriety and respect.

Sometimes randomization provides opportunities that are immediately beneficial, as long as we're willing to keep an eye out for them. Consider the words of Alexander Fleming, who discovered penicillin in a petri dish after accidentally leaving it out while he went on vacation:

"One sometimes finds, what one is not looking for. When I woke up just after dawn on September 28, 1928, I certainly didn't plan to revolutionize all medicine by discovering the world's first antibiotic, or bacteria killer. But I suppose that was exactly what I did."

One sometimes finds, what one is not looking for.

To benefit from randomization, the world's unpredictable and uncontrollable forces, we have to accept that this often is the case. We might not always know where the next optimal steps are. But if we're stuck, trapped in a local maximum, randomization could be exactly what we need. It could lead us to where we didn't even realize we wanted to go.

*

“When a misfortunate strikes us, we can overcome it either by removing its cause or else by changing the effect it has on our feelings, that is, by reinterpreting the misfortunate as a good, whose benefit may only later become clear."

– Friedrich Nietzsche

*

References

(1) Algorithms to Live By (pp. 196-199) by Brian Christian and Tom Griffiths

bottom of page