Skip to content

Subgradient

A generalization of the derivative for functions that have no derivative at some points — for example \(\lvert x\rvert\) at zero.

Definition

For a convex function \(f\), a number \(g\) is called a subgradient at the point \(x_0\) if for every \(x\):

\[ f(x)\geq f(x_0)+g(x-x_0) \]

In other words, the subgradient defines a line that lies below the graph of the function or touches it.

Example

For \(\lvert x\rvert\) the slope is \(-1\) on the left and \(+1\) on the right, while at zero there is no derivative. But every number from \(-1\) to \(+1\) is a subgradient at zero:

\[ \partial f(0)=[-1;1] \]

Why It Is Needed

Many problems contain \(\lvert w\rvert\) — for example L1 regularization. The ordinary gradient is not defined there, but the subgradient makes it possible to continue optimization.

See Also

← All Terms