Reading evolution, learning, and mind through a single gradient
In Episode 1 we honestly ruled that the blind ball, seeing only the slope beneath its feet, gets stuck in a shallow valley and can't climb out. Even if a deeper valley sits right next door, it can't tell ── that was the fate of gradient descent. Today we get a tool that loosens this weakness head-on. The watchword is "blur." Smooth away the fine bumps of the terrain, as if squinting, and the shallow valleys vanish, leaving only the truly deep basin. In the language of math, this is convolving the loss \(L\) with a Gaussian kernel. And this very operation is exactly what the evolution strategy ES from last time (Episode 6) was computing, without knowing it: \(\nabla L_\sigma\). The blur strength \(\sigma\) is the dial that sets the resolution at which the learner sees the terrain ── a single knob that brokers a deal between exploration and exploitation.
Let's review. Learning means lowering the loss \(L(\theta)\); the update rule is \(\theta\leftarrow\theta-\eta\nabla L(\theta)\). But points where \(\nabla L=0\) are not only the global minimum. Local minima ── dips where the ground beneath you is flat and so you stop, even though a deeper valley lies right next to you ── are everywhere. The blind ball cannot judge on its own whether the valley it's standing in is shallow or deep.
So what do we do? The naive idea is "if only it could see farther." But there's no god who takes in the whole landscape at a glance. So we flip the thinking around ── we remake the terrain itself into something easier to see. Smooth away the fine bumps, and the shallow dips fill in, leaving only the broad-stroke undulations. Doing this "smoothing" rigorously is what blurring = smoothing is.
To "blur" is to replace the value at each point \(\theta\) with a weighted average of the values in its neighborhood. Nearer points count more, farther points less. Using the Gaussian distribution \(p_\sigma(\varepsilon)=\dfrac{1}{(2\pi\sigma^2)^{n/2}}\exp\!\left(-\dfrac{\|\varepsilon\|^2}{2\sigma^2}\right)\) for these weights gives Gaussian smoothing. We write the smoothed loss as \(L_\sigma\).
The three faces are the same thing. On the left is convolution \(*\) (the language of signal processing), in the middle is an integral (the weighted average itself), and on the right is an expectation ("jitter randomly around \(\theta\) with \(\mathcal N(0,\sigma^2 I)\) and average \(L\)"). The larger \(\sigma\) is, the wider the jitter, so the average draws in points from farther away and the terrain blurs more strongly. That expectation on the right ── you should recognize it. What ES was estimating with samples last time was precisely the gradient of this \(L_\sigma\), namely \(\nabla L_\sigma\).
The convolution \(L_\sigma=L*p_\sigma\) has three properties that are the key to escaping local minima.
(1) It becomes arbitrarily smooth. Even if \(L\) is jagged (has points where it can't be differentiated), the Gaussian kernel \(p_\sigma\) can be differentiated infinitely many times. In a convolution you can shift the differentiation onto the smooth side ── \(\nabla^k L_\sigma = L * \nabla^k p_\sigma\) ── so \(L_\sigma\) becomes infinitely differentiable (\(C^\infty\)). Blurring rounds off every corner of the terrain.
(2) Shallow local minima disappear. Averaging over the neighborhood makes thin ridges and shallow dips cancel out and level off. The larger \(\sigma\) is, the wider the range of the average, so the shallowest valleys go first, and in the end only the broad-stroke basin remains. The shallow valley that trapped the ball in Episode 1 gets filled in by blurring.
(3) As \(\sigma\to0\), it returns to the original. When \(\sigma\to0\) the Gaussian kernel collapses into a delta function (\(p_\sigma\to\delta\)), and the averaging range shrinks to a single point, so \(L_\sigma\to L\). Turn the blur to zero and the terrain returns to the raw \(L\). This "can-return" property later becomes the foundation of annealing.
Smoothing the simplest terrain L(θ)=θ² (1D)
$$L_\sigma(\theta)=\mathbb{E}\!\left[(\theta+\varepsilon)^2\right]=\mathbb{E}\!\left[\theta^2+2\theta\varepsilon+\varepsilon^2\right]=\theta^2+2\theta\underbrace{\mathbb{E}[\varepsilon]}_{0}+\underbrace{\mathbb{E}[\varepsilon^2]}_{\sigma^2}=\theta^2+\sigma^2$$Blurring adds only the constant σ². The gradient doesn't move
$$\nabla L_\sigma(\theta)=2\theta=\nabla L(\theta)$$Blur a quadratic and the whole terrain simply lifts by \(\sigma^2\); the shape doesn't change. The gradient \(2\theta\) is unchanged regardless of \(\sigma\) ── which is why, for a quadratic, ES's gradient estimate (Stein's identity) becomes a special case that matches the raw gradient \(\nabla L\) exactly. But this is a miracle only because it's a quadratic. On a terrain with several valleys, blurring changes the shape itself ── it melts the shallow valleys. Let's see that in the next figure.
\(\sigma\) is not merely a technical parameter. It is the "resolution" at which the learner (or evolution) sees the terrain. Squint and you see the broad-stroke undulations; peer closely and you see the details ── \(\sigma\) is the dial for that focus adjustment.
Large \(\sigma\) (exploration). The terrain blurs strongly, the shallow local minima vanish, and the global basin floats up. So the ball escapes shallow valleys and can grasp, in broad strokes, "which region is low." The price is that the true optimum blurs ── the bottom of \(L_\sigma\) generally shifts away from the bottom of the raw \(L\).
Small \(\sigma\) (exploitation). The terrain approaches the raw \(L\), so the optimum is accurate. The price is that all the fine valleys become visible ── you get caught in the nearest local minimum right away.
Look broadly and you won't lose your way but your aim is loose; look closely and your aim is accurate but you fall into traps. This tug-of-war is the exploration–exploitation trade-off. So then ── start large, gradually shrink, right? That's annealing, coming up next.
The terrain \(L(\theta)\) below has three valleys. The center is a deep valley (the global minimum), and the left and right are shallow valleys (local minima). The thin curve is the raw \(L\), the thick curve is the blurred \(L_\sigma\). Drag the \(\sigma\) slider to the right and \(L_\sigma\) is recomputed by a numerical convolution that takes the Gaussian-weighted sum over the neighborhood at each grid point, melting the valleys away shallowest-first. With "Roll the ball," you can also watch which basin a ball descending on \(L_\sigma\) settles into.
As you raise \(\sigma\), the shallow left and right valleys vanish first, and eventually the terrain becomes a single gentle basin (the number of minima goes \(3\to1\)). In this state, roll the ball from the right edge and it slides into the global basin undisturbed by the valleys along the way ── the shallow valley it couldn't escape in Episode 1 has been filled in by blurring. Note, though, that with too large a \(\sigma\) the bottom of \(L_\sigma\) shifts from center and no longer matches the raw optimum.
The standard move for getting the best of both exploration and exploitation is annealing. First grasp the global basin with a large \(\sigma\), then gradually lower \(\sigma\) to refine. By property (3), \(L_\sigma\to L\) as \(\sigma\to0\), so in the end you can converge to the bottom of the raw terrain ── the true optimum. Early on you pick the correct basin in broad strokes; late on you settle in and hit the bottom. It's exactly the same idea as annealing metal, cooling it gradually from a high temperature to reduce crystal defects.
Blurring (smoothing) is a powerful practical technique for escaping local minima, but it's no free lunch. Let's rule honestly.
| Question | Gaussian smoothing's answer | Verdict |
|---|---|---|
| Can it escape shallow local minima? | Yes. Raise \(\sigma\) and the shallow valleys melt, and the global basin floats up | Yes |
| Is what it finds the optimum of the raw terrain \(L\)? | No. At finite \(\sigma\), \(L_\sigma\neq L\) and the position of the bottom shifts (smoothing bias) | shifts at finite σ |
| Even so, can it reach the true optimum? | Yes. Anneal toward \(\sigma\to0\) and \(L_\sigma\to L\). But the sample (cost) increases | yes if annealed |
Blurring is a practical technique for escaping local minima, but there's a price. At large \(\sigma\), the true optimum shifts (\(L_\sigma\neq L\)). This can be recovered by annealing to \(\sigma\to0\) ── but a large \(\sigma\) increases the variance of the samples, and so the number of samples needed for a gradient estimate of the same accuracy, that is, the computational cost, goes up. The "freedom to escape shallow valleys" can only be bought in exchange for cost. There is no free lunch.
Even so, this "\(\sigma\) = resolution" viewpoint connects directly to the spine of the series ── life sees, learns, and evolves on the terrain with finite energy (= finite samples). Infinite resolution can't be bought. So then, what is the entity actually running this computation at planetary scale? Next time, we'll name that protagonist.
The weakness of local minima (Ep. 1) is loosened by "blurring" the terrain (STEP 01). Blurring is convolution with a Gaussian kernel, \(L_\sigma=L*p_\sigma=\mathbb{E}_\varepsilon[L(\theta+\varepsilon)]\), and this is the very terrain of the \(\nabla L_\sigma\) that ES was computing last time (STEP 02). Blurring has three properties ── (1) it becomes infinitely differentiable, (2) shallow local minima vanish, (3) it returns to \(L\) as \(\sigma\to0\) (STEP 03). For a quadratic, smoothing doesn't change the gradient (only a constant \(\sigma^2\) is added), a special case where Stein's estimate matches the raw gradient (calc). \(\sigma\) is the resolution = the exploration–exploitation dial: large is the big picture, small is precise (STEP 04). In the figure, raising \(\sigma\) takes the minima from \(3\to1\) (STEP 05). With annealing (\(\sigma\) large→small) you can grasp the global basin and then refine, and \(\sigma\) resonates with cosmology as temperature and grain size (STEP 06). But a finite \(\sigma\) shifts the bottom, and a large \(\sigma\) eats variance = cost ── no free lunch (STEP 07).
Blurring gave the blind ball the freedom to "squint." But that resolution can only be bought with finite energy. This viewpoint of "seeing and learning on the terrain with finite resources" expands at last to planetary scale next time ── to the vast learning computer that life runs.
Print / PDF: ⌘+P (Ctrl+P on Windows). On screen, move "Blur strength σ" to melt the shallow valleys, and use "Roll the ball" to watch a ball descend on Lσ. "See the answer" opens the solutions.