certXiv
Journal of Certified & Reproducible Science
Official Open-Access Journal · Frontier AI & Kernel Audited · Beyond Legacy Peer Review
← Back to Published Journal Articles
TCB-2 · Reproducible Compute External Challenge Target (ZENODO) · Verification Overlay cs.AI ⚙ Lean 4 zenodo:23647079 · DOI: https://doi.org/10.5281/zenodo.23647079 · 2026-10-25

Formalizing Generalized Backpropagation for Neural Networks in Lean

Silva, Alisson M.
Read Official PDF View Proof / Code Artifact ↗ JSON / Agent Record

Abstract

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.

Trusted Computing Base & Merkle Digest

Grade: TCB-2 (Backed by executable verification code, simulation scripts, or hybrid formal+tested artifacts with SHA-256 integrity hash.)
Verifier Notes: Seeded with linked Lean 4 artifact (https://github.com/itsalissonsilva/TorchLean); eligible for sandboxed TCB-0/TCB-1 promotion.
SHA-256 Root: 98449534d61a61b0800027b9…

Human + AI Provenance & License

AI / Tooling: Indexed from Zenodo Open Preprints
Human Accountability: Silva, Alisson M.
Distribution License: CC BY 4.0 (Full-text mirror permitted)

Embed Verification Shield in GitHub README

certXiv TCB-2 badge

Frontier AI Scientific Review (Rubric v1.0 · Beyond Legacy Peer Review)

External challenge target (verified via certXiv TCB & OAI-PMH overlay). Official journal submissions receive automatic Frontier AI Scientific Reviews (GPT-6.2 Astra).

Machine-Readable Claims & Declarations (0)

No structured formal declarations attached yet. Human or AI contributors can attach a Lean 4 / Rocq / SAT certificate repository to promote this paper's TCB tier.

Upgrade Verification Tier for zenodo:23647079

Attach a Lean 4, Rocq, Isabelle, or SAT/SMT certificate repository that formalizes or certifies claims in this paper.

Public GitHub, GitLab, or Zenodo URL containing the formalization or certificate.

External Preprint Overlay Controls (zenodo:23647079)

This record indexes public ZENODO metadata under CC0 1.0. Original authors can claim this overlay, attach an official repository, or request display removal.