AI engineering glossary · Calculus optimisation

What is subgradient?

Subgradient: A generalisation of the gradient for convex functions that are not differentiable everywhere: the slope of any line that touches the graph at the point and stays beneath it. At a kink there are many valid choices.

Level: advancedTopic: Calculus optimisation

Subgradient: an example

For f(x) = |x| at x = 0, any value between -1 and 1 is a subgradient; frameworks typically use 0 for ReLU at 0.

Related terms

More Calculus optimisation terms

Where you learn it

Subgradient is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.