Answers are grounded in this paper and cite their sources.
When a ReLU preactivation in a neural network is exactly zero, the activation has no derivative, and backpropagation proceeds by assigning it a conventional value. Conventions that are harmless for each activation in isolation can still combine into a vector that is not a generalized derivative of the loss, which makes the correctness of the computed vector a property of the network as a whole. For ReLU networks with independent hidden biases and the zero-at-zero convention, we prove in Lean 4, on top of the TorchLean library and Mathlib, that at every parameter value the vector computed by backpropagation is a limit of ordinary gradients at nearby points. It therefore lies in the Clarke generalized gradient of the loss. Most of the paper explains how this proof is built, beginning with Clarke's directional derivative, which we define with values in the extended reals so that Lipschitz hypotheses appear only where finiteness is actually needed. We then connect this generic analysis to TorchLean's gradient formulas, extend it to networks of any depth and to finite batches, and show that the library's tape evaluator returns the same vector. Along the way we explain which design choices kept the proofs short, and where the transport between different representations of the same objects made them long. The result formalizes, within an existing library, the ReLU case of a theorem of Lee, Park, and Aiken. This record contains the preprint, its LaTeX source, and a snapshot of the Lean development with its pinned dependency revisions, build instructions, and the logs of a complete verification run, including the axiom audit. The Lean code is released under the MIT license stated in the archive.
No takes yet. Share an insight, caveat, or question.
Alisson Marques da Silva (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: