Piecewise smooth functions and conservative fields: calculus for nonsmooth nonconvex optimization beyond stratification
In this paper, we show that the piecewise gradient associated with a representation of a continuous piecewise-$C^{p}$ function is a selection of a conservative field. Specifically, we prove that a set-valued map whose selections include the piecewise gradients, also called associated gradients, has the chain rule property along Lipschitz curves. As a consequence, continuous piecewise smooth functions are path differentiable and their Clarke subdifferentials satisfy the chain rule property. These results establish a connection between a representation-based calculus for nonsmooth automatic differentiation and the conservative-field framework. From an algorithmic perspective, we show that bounded iterates of the stochastic piecewise-gradient method converge to the set of conservative critical points. With an additional Lebesgue-null interface condition, a generic stepsize scaling, and a generic initialization, this result holds for the Clarke critical set. Finally, we demonstrate that, even with the interface condition, the graph of a Lipschitz continuous and piecewise-$C^{\infty}$ function need not admit a $C^1$ stratification satisfying Whitney's condition (a). Thus, the analysis developed here does not fall within the setting of Whitney stratifiable functions (e.g., semialgebraic functions).