  Risk minimization for nonsmooth nonconvex problems naturally leads to
first-order sampling or, by an abuse of terminology, to stochastic subgradient
descent. We establish the convergence of this method in the path-differentiable
case and describe more precise results under additional geometric assumptions.
We recover and improve results from Ermoliev and Norkin [Cybern. Syst. Anal.,
34 (1998), pp. 196--215] by using a different approach: conservative calculus
and the ODE method. In the definable case, we show that first-order subgradient
sampling avoids artificial critical points with probability one and applies
moreover to a large range of risk minimization problems in deep learning, based
on the backpropagation oracle. As byproducts of our approach, we obtain several
results on integration of independent interest, such as an interchange result
for conservative derivatives and integrals or the definability of set-valued
parameterized integrals.
