This mission formalizes known published results from Y. LeCun, A Theoretical Framework for Back-Propagation, in D. Touretzky, G. Hinton and T. Sejnowski (eds.), Proceedings of the 1988 Connectionist Models Summer School, CMU, Morgan Kaufmann, pp. 21-28 (1988). PDF: http://yann.lecun.com/exdb/publis/pdf/lecun-88.pdf
The idea. Training a layered network means minimising the error of the last layer subject to the layer equations . LeCun treats the layer equations as constraints with Lagrange multipliers and forms the Lagrange function (eq. 1)
Setting its partial derivatives to zero gives the three halves of back-propagation: stationarity in is the forward pass, stationarity in is the backward pass for the multipliers, starting from , and the derivative in is then the gradient of the training error.
Setting. Layer states live in any real normed space , weights in any real normed space ; multipliers are covectors (continuous linear maps), so is LeCun's . Derivatives are Fréchet derivatives (HasFDerivAt). Indexing: here , so our is the paper's .
Items.
backprop_chain: the chain-rule core: if and for , then .lagrangian_deriv_B, first_condition_iff (Section 2.2.1): is evaluation at the residual, and all of these vanish iff is the forward pass.lagrangian_deriv_X, lagrangian_deriv_XN (Section 2.2.2): for , and ; their vanishing is the backward recursion with (eq. 5 in general form).lagrangian_deriv_W (Section 2.2.3): .lecun (goal, Section 2.2 and 2.2.4): on the forward trajectory, if the multipliers make stationary in every , , then the derivative of the training error in equals .lecun_net (eqs. 5-9): layers componentwise on for any differentiable , error ; with , , , the derivative in is , i.e. the gradient is and gradient descent is LeCun's update (9) .lecun_sigmoid: the same with the logistic sigmoid , (Mathlib's Real.sigmoid).Checks. A numeric check on a 3-layer, width-3 sigmoid network compared the formula with central finite differences: maximum difference . A sign-flipped version of lecun_sigmoid is rejected by Lean.
Errors in the source. No mathematical error. One typo: the summary (Section 2.2.4) writes the range of the backward recursion as "" (lowercase ; the recursion is over the layers, and is not needed since is a boundary condition, as the paper itself says in Section 2.2.2).
Scope notes. One training pattern (the paper sums over patterns ; the sum is linear and adds nothing). lecun_net uses one width for all layers; the general theorem lecun covers different layer spaces only through a single space . The second-order (Hessian) remarks of the paper are not formalized.
Prior work. Back-propagation as a gradient computation is already on Prove2Me (UnderstandingML.backprop_gradient), and Lagrange multipliers (FamousTheorems.lagrange_multiplier_theorem) and the Euler-Lagrange equation (VectorSpaceOpt.euler_lagrange_equation) are proved there; this mission is LeCun's specific Lagrangian derivation, which we did not find formalized anywhere.
namespace LeCun1988
theorem lecun {E Θ : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup Θ] [NormedSpace ℝ Θ]
{C : E → ℝ} {F : ℕ → E → Θ → E} {x0 : E} {W : ℕ → Θ} {N k : ℕ} (hk : k < N)
{DX : ℕ → E →L[ℝ] E} {DW : Θ →L[ℝ] E} {g : E →L[ℝ] ℝ}
(hDX : ∀ j, 1 ≤ j → j < N → HasFDerivAt (fun x => F j x (W j)) (DX j) (forward F x0 W j))
(hDW : HasFDerivAt (fun w => F k (forward F x0 W k) w) DW (W k))
(hC : HasFDerivAt C g (forward F x0 W N)) {B : ℕ → E →L[ℝ] ℝ}
(hN : g + B N = 0) (hX : ∀ j, 1 ≤ j → j < N → B j - (B (j + 1)).comp (DX j) = 0) :
HasFDerivAt (fun v => C (forward F x0 (Function.update W k v) N))
(-((B (k + 1)).comp DW)) (W k) := by sorry
end LeCun1988On the forward trajectory from , suppose has derivative at , has -derivative at for , and has -derivative at . If the multipliers make stationary in every state, and for , then the training error has derivative .
No open leaves. Every sub-goal is proved or awaiting decomposition.