Automatic Differentiation Can Produce Wrong Gradients

Supplement to the full slide deck. Based on Bolte & Pauwels, NeurIPS 2020, §1.1.

The problem: the sum rule fails for nonsmooth functions

For smooth functions, the sum rule holds as an equality: $(f+g)'(x) = f'(x) + g'(x)$. AD relies on this: it differentiates each subexpression independently and adds the results. For nonsmooth functions, the sum rule for the Clarke subdifferential is only an inclusion:

$$\partial_C(f+g)(x) \;\subseteq\; \partial_C f(x) + \partial_C g(x).$$

The right-hand side can be strictly larger than the left. AD effectively picks one element from $\partial_C f(x)$ and one from $\partial_C g(x)$ and adds them, producing an element of the right-hand side. But this element may not belong to $\partial_C(f+g)(x)$ on the left. The following example makes this concrete.

(For the limiting subdifferential $\partial f$, the sum rule $\partial(f+g)(x) \subseteq \partial f(x) + \partial g(x)$ can even fail entirely without qualification conditions for nonconvex functions.)

Example: AD output outside the Clarke subdifferential

Setup. Consider two programs that both compute $\mathrm{relu}(t) = \max(0,t)$:

As functions, $\mathrm{relu} = \mathrm{relu}_2$ on all of $\mathbb{R}$. But AD gives different outputs at $t=0$:

$$\mathrm{relu}'_{\mathrm{AD}}(0) = \nabla f_1(0) = 0, \qquad (\mathrm{relu}_2)'_{\mathrm{AD}}(0) = \mathrm{relu}'(0)\cdot(-1)+1 = 0\cdot(-1)+1 = 1.$$

Both $0$ and $1$ lie in $\partial_C\mathrm{relu}(0) = [0,1]$, so individually there is no problem.

Now subtract. Define $g(t) = \mathrm{relu}_2(t) - \mathrm{relu}(t)$. As a function: $g \equiv 0$ on all of $\mathbb{R}$, so $\partial_C g(0) = \{0\}$.

AD applies the sum rule as an equality and differentiates each piece independently:

$$g'_{\mathrm{AD}}(0) \;=\; (\mathrm{relu}_2)'_{\mathrm{AD}}(0) \;-\; \mathrm{relu}'_{\mathrm{AD}}(0) \;=\; 1 - 0 \;=\; 1.$$
$1 \notin \partial_C g(0) = \{0\}$. The AD output lies outside the Clarke subdifferential. This is not a bug. It is an inherent consequence of the sum rule failing as an equality for nonsmooth functions.

What went wrong, precisely. AD computed an element of $\partial_C\mathrm{relu}_2(0) - \partial_C\mathrm{relu}(0) = [0,1] - [0,1] = [-1,1]$. The actual Clarke subdifferential is $\partial_C g(0) = \partial_C(\mathrm{relu}_2 - \mathrm{relu})(0) = \{0\}$. The inclusion is strict:

$$\underbrace{\partial_C g(0)}_{\{0\}} \;\subsetneq\; \underbrace{\partial_C\mathrm{relu}_2(0) - \partial_C\mathrm{relu}(0)}_{[-1,1]}.$$

AD picked $1 \in [0,1]$ and $0 \in [0,1]$, giving $1 - 0 = 1 \in [-1,1]$, but $1 \notin \{0\}$. The sum rule inclusion allowed AD to land in the gap $[-1,1] \setminus \{0\}$.

How this arises in practice

The $\mathrm{relu}_2 - \mathrm{relu}$ construction is not artificial. In modern deep learning architectures:

In all these cases, at the measure-zero set of inputs where a neuron sits exactly at a ReLU kink, the AD gradient depends on the program representation.

Consequence: no subdifferential operator captures AD

One might try to define a "universal" operator $\partial_A$ that contains all possible AD outputs for all programs computing a given function. Bolte & Pauwels (NeurIPS 2020, Theorem 1) prove this is impossible:

Theorem 1. There is no nontrivial operator $\partial_A$ on locally Lipschitz functions satisfying both:

  1. $\partial_A$ encompasses AD: for every program $P$ computing $f$, the AD output at $x$ lies in $\partial_A f(x)$;
  2. $0 \in \partial_A \mathrm{relu}(0)$ (the operator detects the minimum of ReLU at $0$).

Proof sketch. By (a), $\partial_A$ must contain all possible AD outputs. The example above shows AD can output $1$ for $g \equiv 0$, so $1 \in \partial_A g(0)$. If $\partial_A$ respects the sum rule, then $\partial_A g(0) \supseteq \partial_A \mathrm{relu}_2(0) - \partial_A \mathrm{relu}(0)$. Since $\mathrm{relu}_2 = \mathrm{relu}$ as functions, $\partial_A$ (which acts on functions, not programs) must assign the same set to both: $\partial_A \mathrm{relu}_2(0) = \partial_A \mathrm{relu}(0)$. So $1 \in \partial_A \mathrm{relu}(0) - \partial_A \mathrm{relu}(0)$, which forces $\partial_A \mathrm{relu}(0)$ to contain elements differing by $1$ (e.g., both $0$ and $1$). Repeating with other programs ($\mathrm{relu}_3$, etc.) forces $\partial_A \mathrm{relu}(0)$ to grow without bound, making $\partial_A$ trivially large and useless as a criticality certificate.

The solution: conservative fields

Since no subdifferential operator captures AD, Bolte & Pauwels introduce conservative fields: set-valued maps satisfying a pathwise chain rule rather than pointwise subdifferential inclusions.

Setup. Let $f:\mathbb{R}^n\to\mathbb{R}$ be the cost function to be minimized (e.g., training loss of a neural network). Suppose $f$ is implemented as a program that selects among smooth branches $f_1, \ldots, f_m$ (elementary functions such as affine maps, $\exp$, $\log$, etc.) via an index function $s(x) \in \{1,\ldots,m\}$, so that $f(x) = f_{s(x)}(x)$ for all $x$. At any input $x$, several branches may agree with $f$: define the active index set $I(x) = \{i : f_i(x) = f(x)\}$.

Conservative field for $f$. The representation-minimal operator is the set-valued map

$$D_f(x) \;=\; \mathrm{conv}\bigl\{\nabla f_i(x) : i \in I(x)\bigr\},$$

the convex hull of the gradients of all active branches at $x$. This set contains every possible AD output at $x$ (since AD returns $\nabla f_{s(x)}(x)$ for whichever branch $s(x)$ the program selects, and $s(x) \in I(x)$). Bolte & Pauwels prove that $D_f$ is a conservative field for $f$: it satisfies a chain rule along absolutely continuous curves (NeurIPS 2020, Theorem 3).

Hierarchy of generalized derivatives. For $f \in \mathcal{S}$ (elementary selection, e.g., ReLU networks with smooth losses), the four notions are nested:

$$\hat{\partial}f(x) \;\subseteq\; \partial f(x) \;\subseteq\; \partial_C f(x) \;\subseteq\; D_f(x).$$

The last inclusion $\partial_C f(x) \subseteq D_f(x)$ can be strict (NeurIPS 2020, Theorem 3; NeurIPS 2021, Theorem 1). The gap $D_f(x) \setminus \partial_C f(x)$ contains the “spurious” AD outputs demonstrated in the example above (e.g., $1 \in D_g(0)$ but $1 \notin \partial_C g(0) = \{0\}$).

Examples at $x = 0$ (scalar functions). $D_f$ depends on the program representation; the column below lists the natural representation.

$f(x)$ (representation) $\hat{\partial}f(0)$ $\partial f(0)$ $\partial_C f(0)$ $D_f(0)$ Note
$x^2$ (single branch) $\{0\}$ $\{0\}$ $\{0\}$ $\{0\}$ smooth: all four $=\{\nabla f(0)\}$
$|x|$ as $\max(x,-x)$ $[-1,1]$ $[-1,1]$ $[-1,1]$ $\mathrm{conv}\{1,-1\}=[-1,1]$ convex: all four agree
$\max(0,x)$ (ReLU) $[0,1]$ $[0,1]$ $[0,1]$ $\mathrm{conv}\{0,1\}=[0,1]$ convex: all four agree
$-|x|$ as $\min(x,-x)$ $\emptyset$ $\{-1,1\}$ $[-1,1]$ $\mathrm{conv}\{1,-1\}=[-1,1]$ nonconvex: Fréchet/limiting/Clarke differ, $D_f=\partial_C f$
$g(t)=\mathrm{relu}_2(t)-\mathrm{relu}(t)$ $\{0\}$ $\{0\}$ $\{0\}$ $[-1,1]$ $D_f \supsetneq \partial_C f$: program redundancy

Verification of the last row. As a function, $g(t)\equiv 0$, so the first three subdifferentials at $0$ equal $\{0\}$. The program $g = \mathrm{relu}_2 - \mathrm{relu}$ has four effective branches at $t=0$ (two branch choices per $\mathrm{relu}$, minus the shared sign): $t\mapsto t$ (derivative $1$), $t\mapsto 0$ (derivative $0$ in two ways), and $t\mapsto -t$ (derivative $-1$). All four branches satisfy $f_j(0)=0=g(0)$, so $I(0)=\{1,2,3,4\}$ and $D_g(0) = \mathrm{conv}\{1,0,0,-1\} = [-1,1]$. This is strictly larger than $\partial_C g(0)=\{0\}$: the gap $[-1,1]\setminus\{0\}$ contains every spurious AD output.

Key results (NeurIPS 2020, Theorems 3–4):

Concrete example: ReLU CNN for classification

Consider training a ReLU convolutional neural network for classification with cross-entropy loss:

$$f(w) \;=\; \frac{1}{N}\sum_{i=1}^N \mathrm{cross\text{-}entropy}\!\bigl(\mathrm{CNN}_{\mathrm{relu}}(x_i;\,w),\;y_i\bigr).$$

Branch structure. Each ReLU node selects between $t\mapsto 0$ (off) and $t\mapsto t$ (on) based on the sign of its pre-activation. A network with $R$ ReLU nodes has up to $2^R$ activation patterns. Each pattern gives a smooth branch $f_j(w)$: a composition of affine maps and cross-entropy (all $C^\infty$), with the ReLU nodes replaced by their selected linear pieces. The index function $s(w)$ records which activation pattern is active at weights $w$, so $f(w) = f_{s(w)}(w)$.

What backpropagation computes. AD (backprop) computes $\nabla f_{s(w)}(w)$, the gradient of the active smooth branch. This is a selection derivative: it belongs to $D_f(w) = \mathrm{conv}\{\nabla f_j(w) : j \in I(w)\}$.

Does Theorem 2.9 (KL) apply? Theorem 2.9 has two kinds of hypotheses: one on the function (proper l.s.c., bounded below, KL property) and one on the iterates produced by the algorithm (H1 sufficient decrease, H2 relative error in $\partial f$, H3 continuity).

On the function: the ReLU loss $f$ is continuous, bounded below, and semi-algebraic (ReLU is semi-algebraic; cross-entropy is log-exp definable; compositions and finite averages preserve definability). Hence $f$ is a KL function (Bolte–Daniilidis–Lewis 2007). So the function-class hypotheses of Theorem 2.9 are satisfied.

On the iterates: the obstruction for ReLU networks is producing iterates that satisfy H1 and H2 with respect to the limiting subdifferential.

Algorithm on ReLU loss $f$ H1 (sufficient decrease) H2 (relative error in $\partial f$) Applies Thm 2.9?
GD with AD (backprop) fails: $f$ not $C^1$, no Lipschitz gradient, descent lemma inapplicable fails: AD output is a selection derivative, generally not in $\partial f$ no
GD with true limiting subgradient fails: same reason (no Lipschitz gradient) fails: H2 is a condition on $\partial f(x^{k+1})$, not on the subgradient $v^k\in\partial f(x^k)$ used for the step; without Lipschitz gradient, no element of $\partial f(x^{k+1})$ is bounded by $\|x^{k+1}-x^k\|$ no
GD + true subgradient + line search (e.g., Clarke steepest descent with Armijo) holds: Armijo ensures $f(x^{k+1})\leq f(x^k)-c\gamma_k\|v^k\|^2$; with step sizes bounded above, this gives H1 with $a=c/\bar{\gamma}$ fails: no mechanism forces an element of $\partial f(x^{k+1})$ to have norm $\leq b\|x^{k+1}-x^k\|$; near a ReLU kink, subgradient norms reflect the gradient jump across the kink, not the step size no (H1 yes, H2 no)
Proximal method (e.g., forward–backward with prox of the full loss) holds (proximal optimality) holds (proximal optimality) yes in principle, but the prox operator of a deep-network loss is intractable

So Theorem 2.9 applies to the ReLU loss function (it is a KL function), but no practical algorithm on a ReLU network is known to satisfy H1 and H2 with respect to the limiting subdifferential. The conservative field framework (Theorem 4 below) circumvents this by replacing $\partial f$ with $D_f$ and using a different discrete-to-continuous bridge. See the nonsmooth proof page for a smooth-activation classification example where GD does satisfy all of H1, H2, H3 directly.

Why Theorem 4 (conservative gradients) does apply. The cost function $f$ is definable (cross-entropy is log-exp definable, ReLU is semialgebraic), so $f$ is path differentiable and $D_f$ is a conservative field. Theorem 4 guarantees: SGD with backpropagation converges, and accumulation points are Clarke critical ($0 \in \partial_C f(\bar{w})$) for almost all initializations. No smoothness of the activation function is required.

Two frameworks, two activation classes. For smooth activations (sigmoid/tanh/softplus): Theorem 2.9 gives full sequence convergence to a limiting critical point, with convergence rate from the KL exponent. For ReLU: Theorem 4 gives subsequential convergence to a Clarke critical point for a.a. initializations, without rate. The smooth case gives stronger conclusions; the ReLU case matches what practitioners actually compute.

Bolte & Pauwels, Conservative set valued fields, automatic differentiation, stochastic gradient methods and deep learning, NeurIPS 2020, §1.1, Theorems 1–4.

Appendix: Proof sketch — convergence of GD with AD (deterministic case)

We prove the deterministic case of NeurIPS 2020, Theorem 4. The stochastic case (SGD) adds a martingale noise term but the overall structure is the same.

Algorithm. Given a cost function $f$ with conservative field $D_f$, run deterministic gradient descent with AD:

$$x_{k+1} = x_k - \gamma_k v_k, \qquad v_k \in D_f(x_k),$$

where $v_k$ is the AD output at $x_k$ (e.g., the backpropagation gradient of a ReLU network; it belongs to $D_f(x_k)$ by construction).

Assumptions.

Theorem. Under these assumptions, every accumulation point $\bar{x}$ of $(x_k)$ satisfies $0 \in D_f(\bar{x})$ (selection criticality). Moreover, for almost all initializations, $0 \in \partial_C f(\bar{x})$ (Clarke criticality).

Proof structure. The proof has five steps, based on the Benaïm–Hofbauer–Sorin (2005) ODE-method for differential inclusions.

Recall: definition of conservative field (pathwise chain rule). A set-valued map $D_f:\mathbb{R}^n\rightrightarrows\mathbb{R}^n$ with nonempty, closed-graph, locally bounded values is a conservative field for $f:\mathbb{R}^n\to\mathbb{R}$ if for every absolutely continuous curve $\gamma:[0,1]\to\mathbb{R}^n$, the function $t\mapsto f(\gamma(t))$ is differentiable at almost every $t$, and $$\frac{d}{dt}f(\gamma(t)) \;=\; \langle v,\,\dot\gamma(t)\rangle \qquad \text{for all } v\in D_f(\gamma(t)),\; \text{a.e. } t\in[0,1].$$ Two remarkable consequences of this definition:
  • Although $f$ may fail to be differentiable at individual points, its composition with any absolutely continuous curve $\gamma$ is differentiable a.e., and the derivative has the inner-product form.
  • The value $\langle v,\dot\gamma(t)\rangle$ does not depend on the choice of $v\in D_f(\gamma(t))$: every element of $D_f(\gamma(t))$ gives the same directional derivative $\frac{d}{dt}f(\gamma(t))$.
Path differentiability of $f$ means simply that such a conservative field exists for $f$.

Step 1: Conservativity $\Rightarrow$ $f$ is a Lyapunov function for $\dot{x}\in -D_f(x)$.

Let $x(t)$ be a solution of the differential inclusion $\dot{x}(t)=-v(t)$ with $v(t)\in D_f(x(t))$ for a.e. $t$. Any solution $x(\cdot)$ is automatically absolutely continuous (since $\dot{x}$ is locally bounded: $D_f$ has locally bounded values). Applying the pathwise chain rule to the curve $\gamma(t) = x(t)$ with the specific element $v = v(t)\in D_f(x(t))$ gives, for a.e. $t$:

$$\frac{d}{dt}f(x(t)) \;\underset{\text{conservativity}}{=}\; \langle v(t),\,\dot{x}(t)\rangle \;\underset{\dot{x}=-v}{=}\; \langle v(t),\,-v(t)\rangle \;=\; -\|v(t)\|^2 \;\leq\; 0.$$

So $f$ is nonincreasing along every solution, and strictly decreases unless $v(t)=0$. Thus $f$ is a strict Lyapunov function for $\dot{x}\in -D_f(x)$: the equilibrium set is $\{x:0\in D_f(x)\}$.

Why do we need BHS for deterministic GD? For smooth $f$ with classical GD, the descent lemma gives a discrete descent inequality $f(x_{k+1})\leq f(x_k)-c\|\nabla f(x_k)\|^2$, and BHS is not needed. Here the situation is different: the AD output $v_k\in D_f(x_k)$ is a selection derivative (gradient of one active branch), not a subgradient. At a nonsmooth point (e.g., a ReLU kink), stepping into a different branch means the AD direction carries no pointwise guarantee that $f$ decreases in a single discrete step. Conservativity of $D_f$ gives $\frac{d}{dt}f(x(t))=-\|v(t)\|^2\leq 0$ only along continuous-time solutions of $\dot{x}\in -D_f(x)$, not along discrete AD steps. BHS bridges this gap: it shows the discrete AD trajectory behaves, in the limit, like a continuous solution of the differential inclusion. So BHS is about discrete $\to$ continuous for selection-derivative descent, not specifically about stochasticity.

Step 2: Interpolated discrete trajectory is an asymptotic pseudotrajectory (APT).

Assign each discrete iterate $x_k$ a continuous time $\tau_k=\sum_{j=0}^{k-1}\gamma_j$, so $\tau_0 = 0$ and $\tau_{k+1} - \tau_k = \gamma_k$. Since $\sum_k\gamma_k=\infty$, we have $\tau_k\to\infty$, and the half-open intervals $[\tau_k,\,\tau_{k+1})$ tile the half-line $[0,\infty)$: every $t\geq 0$ belongs to exactly one such interval. Define the continuous-time interpolation $w:[0,\infty)\to\mathbb{R}^n$ piecewise as the linear segment joining $x_k$ (at time $\tau_k$) to $x_{k+1}$ (at time $\tau_{k+1}$):

$$\text{for } t = \tau_k + s \text{ with } s\in[0,\gamma_k):\quad w(t) = x_k + s\cdot\frac{x_{k+1}-x_k}{\gamma_k} = x_k - s\,v_k.$$

Because the intervals tile $[0,\infty)$, this formula defines $w(t)$ for every $t\geq 0$: given any $t\geq 0$, find the unique $k$ with $\tau_k\leq t<\tau_{k+1}$ and set $s = t-\tau_k\in[0,\gamma_k)$. The resulting $w$ is continuous (agrees at breakpoints: $w(\tau_{k+1}^-) = x_{k+1} = w(\tau_{k+1}^+)$) and piecewise affine.

BHS Proposition 1.3 (informal). Consider the discrete recursion $$x_{k+1} - x_k \;\in\; \gamma_{k+1}\bigl[\,F(x_k) + U_{k+1}\bigr],$$ where $F:\mathbb{R}^n\rightrightarrows\mathbb{R}^n$ is an upper semicontinuous set-valued map with nonempty, convex, compact, locally bounded values, and $U_{k+1}$ is a noise term. Assume:
  • Step size: $\gamma_k\to 0$ and $\sum_k\gamma_k = +\infty$.
  • Cumulative noise smallness: for every $T>0$, $\displaystyle\lim_{n\to\infty}\,\sup_{\{k:\,\tau_k\leq\tau_n+T\}}\Bigl\|\sum_{i=n+1}^k\gamma_i U_i\Bigr\| = 0.$
  • The iterates $(x_k)$ are bounded.
Then the continuous-time interpolation $w$ is a perturbed solution of $\dot{x}\in F(x)$, and in particular an asymptotic pseudotrajectory (APT): for every $T>0$, $$\lim_{t\to\infty}\,\inf_{z\in\mathcal{S}_{w(t)}}\,\sup_{0\leq s\leq T}\|w(t+s)-z(s)\| = 0,$$ where $\mathcal{S}_x$ is the set of solutions of $\dot{x}\in F(x)$ with initial condition $x$.

Applied to our setting. Take $F = -D_f$ (which is upper semicontinuous with nonempty, convex, compact, locally bounded values because $D_f$ has these properties by construction). In the deterministic GD with AD, the noise term $U_{k+1}=0$, so the cumulative noise smallness condition holds trivially. Boundedness of $(x_k)$ is our standing assumption. BHS Proposition 1.3 therefore applies.

Concrete conclusion for deterministic GD with AD. The interpolation $w$ of our iterates $(x_k)$ is an asymptotic pseudotrajectory of $\dot{x}\in -D_f(x)$: for every $T>0$,

$$\lim_{t\to\infty}\,\inf_{z\in\mathcal{S}_{w(t)}}\;\sup_{0\leq s\leq T}\;\|w(t+s)-z(s)\| \;=\; 0,$$

where $\mathcal{S}_x$ is the set of absolutely continuous curves $z:[0,T]\to\mathbb{R}^n$ with $z(0)=x$ and $\dot{z}(\tau)\in -D_f(z(\tau))$ for a.e. $\tau\in[0,T]$.

What this means, in words. Fix any window length $T>0$. Take the piece of the interpolated discrete trajectory $w$ from time $t$ to time $t+T$. As $t\to\infty$, we can find a genuine solution $z$ of the differential inclusion $\dot{z}\in -D_f(z)$, starting at $z(0)=w(t)$, such that $w$ and $z$ stay arbitrarily close throughout the window $[0,T]$. So the tail of the discrete GD trajectory, viewed as a continuous path, is well-approximated over any finite window by a true continuous-time solution of the differential inclusion.

Why this is useful. Step 1 established that along true solutions of $\dot{x}\in -D_f(x)$, the function $f$ decreases (Lyapunov property). But the discrete iterates $(x_k)$ are not true solutions. The APT property of Step 2 says the iterates asymptotically behave like true solutions over any finite window. This lets us transfer the continuous-time Lyapunov property back to the limiting behavior of the discrete sequence (Steps 3–5).

Step 3: Limit set is internally chain transitive (ICT).

Logical status of Step 3. Step 3 is a direct consequence of Step 2 plus boundedness, via BHS Theorem 3.6 (Limit Set Theorem): if $w$ is a bounded APT of $\dot{x}\in F(x)$ (with $F$ u.s.c., convex compact values, locally bounded), then the limit set $L(w)$ is internally chain transitive under $F$. Schematically, $$\underbrace{\text{APT (Step 2)}}_{\text{BHS Prop 1.3}} \;+\; \underbrace{\text{bounded iterates}}_{\text{standing assumption}} \;\underset{\text{BHS Thm 3.6}}{\Longrightarrow}\; \underbrace{\text{ICT limit set (Step 3)}}_{}.$$ The implication is not obvious from the APT definition alone: BHS Theorem 3.6 is a substantial topological-dynamics result that uses compactness arguments on approximate solutions. We state Step 3 separately because Step 2 and Step 3 transfer different features from the flow to the discrete trajectory: Step 2 gives finite-window tracking; Step 3 gives asymptotic dynamical connectivity.

What is the limit set $L$? The limit set of the trajectory $w$ is

$$L \;=\; \bigcap_{t\geq 0}\overline{\{w(s):s\geq t\}} \;=\; \{\text{accumulation points of }(x_k)\}.$$

Concretely, a point $p$ lies in $L$ iff every neighborhood of $p$ is visited by the trajectory infinitely often: for every $\varepsilon>0$, the trajectory $w(t)$ satisfies $\|w(t)-p\|<\varepsilon$ for arbitrarily large $t$. Under our boundedness assumption, $L$ is nonempty, compact, and contains every possible long-run "address" the iterates might settle near.

What does "internally chain transitive" mean? Pick any two points $p,q\in L$ and fix tolerances $\varepsilon>0$ and $T>0$. ICT says we can travel from $p$ to $q$ using a finite "chain" of approximate flow segments: there exist true solutions $z_1,\ldots,z_n$ of $\dot{z}\in -D_f(z)$ and times $t_1,\ldots,t_n\geq T$ such that

So ICT means: every pair of points in $L$ is connected, in a weak sense, by the flow restricted to $L$. You cannot find two points in $L$ that are completely "isolated" from each other under the dynamics.

Why is $L$ ICT? Because $w$ is an APT (Step 2), its tail tracks true solutions of the DI over every finite window. As the trajectory wanders between neighborhoods of points in $L$, each excursion is approximately a flow segment. BHS Theorem 3.6 packages this into the formal ICT statement.

Why do we care? ICT is the missing ingredient to apply the Lyapunov property (Step 1) to the limit set. If $L$ could split into disconnected pieces, $f$ could take different values on each piece. ICT rules this out: $L$ is "dynamically connected," so the Lyapunov function $f$ must behave uniformly on $L$ — the argument of Step 4.

Step 4: $f$ is constant on $L$.

By Step 1, $f$ is a strict Lyapunov function. By definability of $f$ (and hence of the equilibrium set), the set $f(\{0\in D_f\})$ of critical values is finite (Bolte–Daniilidis–Lewis non-smooth Morse–Sard) and hence has empty interior. BHS Proposition 3.27 then gives: $L$ is contained in the equilibrium set and $f|_L$ is constant.

Step 5: Accumulation points are selection critical.

From Step 4, $L$ lies in the equilibrium set $\{x:0\in D_f(x)\}$. So every accumulation point $\bar{x}$ of $(x_k)$ satisfies

$$0 \in D_f(\bar{x}).$$

This is selection criticality. $\square$

What this proof does not give: full sequence convergence. The conclusion is only subsequential: every accumulation point is critical. The full sequence $(x_k)$ may fail to converge to a single limit. The limit set $L$ can be a connected continuum of critical points, for example:
  • A curve of critical points (e.g., if $f$ has a valley of minima along which iterates drift).
  • Any internally chain transitive subset of a single level set $\{x : f(x) = c,\; 0\in D_f(x)\}$.
ICT forces $L$ to be a singleton only when the critical set is isolated.

Contrast with Theorem 2.9 (KL): the desingularizing function $\varphi$ yields a telescoping inequality that bounds $\sum\|x^{k+1}-x^k\|<\infty$ (finite length), which forces the full sequence to converge to a single limit. No such summability estimate is available from the conservative framework, because conservativity gives only the pathwise chain rule in continuous time, not a discrete summability bound.

Upgrade to Clarke criticality (optional). The "spurious" set $\{x:0\in D_f(x),\,0\notin\partial_C f(x)\}$ is the image of a lower-dimensional definable manifold (by a Sard-type theorem for definable maps). A perturbation argument in the initial condition (or in the step-size constant) then shows that for almost all initializations $x_0$, the trajectory avoids this spurious set, so the accumulation points satisfy the stronger condition $0\in\partial_C f(\bar{x})$.

Comparison with Theorem 2.9 (KL). The KL proof (see the nonsmooth proof page) gives stronger conclusions but requires stronger hypotheses:

Theorem 2.9 (KL) Theorem 4 above (conservative)
Oracle $w^{k+1}\in\partial f(x^{k+1})$ (limiting subgradient) $v_k\in D_f(x_k)$ (any AD output)
Function class KL functions (smooth activations needed for H1/H2) definable, path differentiable (ReLU OK)
Conclusion full sequence converges to $0\in\partial f(x^*)$ with finite length accumulation points $\bar{x}$ satisfy $0\in D_f(\bar{x})$; Clarke critical for a.a. init
Rate quantitative rate from KL exponent no rate (purely asymptotic)