Differentiability and one-sided derivatives

Level FundamentalDifficulty ★★★★★Concept⌖ Open in the map

What is it?

A function is differentiable at aa when both one-sided derivatives exist and agree. Differentiable implies continuous, but not conversely: ∣x∣|x| and ReLU⁡\operatorname{ReLU} are continuous with a kink at 0.

Formulas

f−′(a)=lim⁡h→0−f(a+h)−f(a)h,f+′(a)=lim⁡h→0+f(a+h)−f(a)hf'_-(a) = \lim_{h\to 0^-}\frac{f(a+h) - f(a)}{h}, \qquad f'_+(a) = \lim_{h\to 0^+}\frac{f(a+h) - f(a)}{h}
∂∣x∣ ∣x=0=[−1,1]\partial |x|\,\big|_{x=0} = [-1, 1]
subdifferential: the set of slopes at a kink

Where it shows up in AI

  • Activation functions★★★★★fundamentalAI and machine learning

    ReLU has f−′(0)=0≠1=f+′(0)f'_-(0) = 0 \ne 1 = f'_+(0); frameworks simply pick a value (usually 0) at the kink.

  • Loss function★★★★★frequentAI and machine learning

    L1 and hinge losses are non-differentiable at a point and are optimized with subgradients.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc