Abstract
Backpropagation is typically presented as a symbolic procedure: a backward pass topologically distinct from inference, with non-local error signals and synchronous global clocking, features with no clear analog in physical reality. Existing physics-inspired alternatives recover gradients only approximately, in vanishing-perturbation limits, or under weight-symmetry constraints incompatible with feedforward architectures. In this paper, we address this gap by deriving exact backpropagation from Hamilton's least-action principle. By recasting the forward dynamics in continuous time and adapting a Lagrangian formalism for non-conservative systems to the resulting flow, we unify inference and gradient computation within a single variational framework on a doubled phase space, whose two conjugate fields jointly encode activations and sensitivities. A single global Lagrangian governs the dynamics: the task loss enters as a symmetry-breaking perturbation of the forward manifold, and credit assignment emerges as the tension that develops between the conjugate states. Inference and gradient computation thus unfold simultaneously through local interactions, requiring no separate backward circuit. Ultimately, standard backpropagation is recovered exactly as the discrete-time projection of this continuous flow. This perspective unifies the formalism of physics with backpropagation, opening a principled pathway for applying tools from classical mechanics - symplectic geometry, Noether's theorem, path-integral methods - to the analysis of learning dynamics. As a downstream consequence, it also points toward analog and neuromorphic substrates in which learning is embodied in the hardware itself.