Gradients
A subgradient is a vector that supplies a lower-supporting linear slope at a point.
When Gradients Are Unavailable
Gradient descent is normally described using the gradient of a function. That requirement becomes restrictive when the function is not differentiable at some points. Subgradients extend the descent idea by allowing the method to use a vector that satisfies a supporting inequality at the current point instead of requiring an ordinary gradient.
The Supporting Slope
For a convex function, a subgradient at w is a vector that supplies a lower-supporting linear slope at that point. Geometrically, the associated linear expression touches the function at the reference point and remains below the function elsewhere in its domain. This lower-supporting behavior is the central idea behind a subgradient.
A subgradient of a convex function f at a point w is a vector v for which the linear expression f(w) + vᵀ(u − w) remains no greater than f(u) for every u in the domain.
Testing a Candidate Vector
The supporting-slope picture becomes precise through the subgradient inequality. Begin with the reference point w and a candidate vector v. Form the linear expression f(w) + vᵀ(u − w). Then compare it with f(u) for every u in the function's domain. If the expression is no greater than f(u) everywhere, v has the required subgradient property at w.
f(w) + vᵀ(u − w) ≤ f(u) for every u in the domain
Checking one candidate
Determine how to test whether a proposed vector v can be a subgradient of f at w.
Set the reference point: Use the point w at which the subgradient is being considered.
Build the supporting expression: Form f(w) + vᵀ(u − w) using the proposed vector v.
Check every domain point: Compare the expression with f(u) for every u in the domain, rather than checking only one selected point.
Decide: If the expression never exceeds f(u), the candidate has the subgradient property at w. If it exceeds f(u) at any domain point, the candidate fails the required test.
The inequality provides a precise validity test for the candidate vector.
Gradient and Subdifferential
A gradient is tied to differentiability. A subgradient is selected through the supporting inequality, so it can be used in the broader setting that includes nondifferentiable functions. For a convex function, the subdifferential set ∂f(w) contains all subgradients of f at w.
| Object | How it is identified | Role |
|---|---|---|
| Gradient ∇f(w) | Tied to differentiability at w | Provides the single subgradient when differentiability is known |
| Subgradient v | Satisfies the supporting inequality at w | Allows the descent discussion to include nondifferentiable functions |
| Subdifferential ∂f(w) | Contains all subgradients at w | Provides the set from which a usable subgradient can be selected |
The gradient is a special case within the subgradient framework described by the source material.
Choosing One Useful Member
The subdifferential set may contain all valid subgradients, but many practical uses do not require calculating every member. The practical goal is often to construct one element of ∂f(w). If f is differentiable at w, that construction is immediate: use the gradient ∇f(w).
Pointwise maximum functions are another situation for which the source material introduces a construction method. The important practical role of that method is to produce a subgradient of the maximum function. The objective is not necessarily to list the entire subdifferential set; obtaining one member can be enough for many uses.
Use a disciplined workflow: identify w, determine whether the function is differentiable there, use ∇f(w) when it is available, and otherwise seek a vector that satisfies the subgradient inequality. Treat the full set ∂f(w) as the collection of valid choices, not as a requirement to calculate every choice.
Mistakes in Subgradient Reasoning
Treating a subgradient as automatically identical to a gradient.
A gradient is tied to differentiability, while a subgradient is identified through the supporting inequality and can extend the discussion to nondifferentiable functions.
Fix:
Check the subgradient condition. If f is differentiable at w, the subdifferential is the singleton containing ∇f(w); otherwise, use the supporting inequality to identify a valid vector.Checking the inequality at only one point u.
The subgradient inequality must hold for every u in the domain.
Fix:
Treat the comparison as a domain-wide test.Assuming that finding every subgradient is always necessary.
For many practical uses, constructing one member of the subdifferential set is sufficient.
Fix:
Focus first on obtaining one valid subgradient.Ignoring the reference point.
The subgradient property is defined at a particular point w through f(w) and the displacement u − w.
Fix:
Identify w before forming and checking the supporting expression.
Practice Check
Suppose you are given a convex function f, a point w, and a candidate vector v. Describe the complete procedure you would use to decide whether v belongs to ∂f(w).
Hints
- Start by writing the supporting expression involving f(w), v, u, and w.
- Remember that the comparison must cover every u in the domain.
- State what conclusion follows if the inequality holds everywhere.
What do you think happens?
If f is differentiable at w, what does the subdifferential set contain?
Reveal answer
Answer: Only the gradient ∇f(w)
Differentiability makes the subdifferential set a singleton containing the gradient at w.
Key Takeaways
- A subgradient is a vector that supplies a lower-supporting linear slope at a point.
- The subgradient inequality tests whether a candidate vector remains below the function everywhere in the required sense.
- The subdifferential set ∂f(w) contains all subgradients at w.
- When f is differentiable at w, ∂f(w) is the singleton containing ∇f(w).
- For many practical uses, constructing one subgradient is sufficient, including through a suitable construction method for pointwise maximum functions.
Key Takeaways
- Subgradients extend gradient-descent reasoning to nondifferentiable functions.
- A valid subgradient supplies a lower-supporting linear expression at the reference point w.
- The inequality f(w) + vᵀ(u − w) ≤ f(u) for every u is the precise validity test.
- The subdifferential ∂f(w) contains all valid subgradients and becomes {∇f(w)} when f is differentiable at w.
- Many practical applications need only one constructed member of the subdifferential set.