lagrangian neural networks

Lagrangian Neural Networks (LNNs) are neural networks that learn the Lagrangian function $L(q, dot{q})$ of a physical system — deriving the equations of motion via the Euler-Lagrange equation, without requiring knowledge of the system's coordinate system or Hamiltonian structure.

How LNNs Work

  • Network: A neural network $L_\theta(q, dot{q})$ approximates the Lagrangian (kinetic minus potential energy).
  • Euler-Lagrange: $\frac{d}{dt}\frac{\partial L}{\partial dot{q}} - \frac{\partial L}{\partial q} = 0$ gives the equations of motion.
  • Second Derivatives: Computing the EOM requires second derivatives of $L_\theta$ — computed via automatic differentiation.
  • Training: Fit to observed trajectory data by matching predicted accelerations $ddot{q}$.

Why It Matters

  • Generalized Coordinates: LNNs work in any coordinate system — no need to identify conjugate momenta (simpler than HNNs).
  • Constraints: Lagrangian mechanics naturally handles holonomic constraints through generalized coordinates.
  • Broader Applicability: Some systems (dissipative, non-conservative) are more naturally expressed in Lagrangian form.

LNNs are learning the Lagrangian from data — a physics-informed architecture using variational mechanics to derive correct equations of motion.

Go deeper with CFSGPT

Get AI-powered deep-dives, save terms, and run advanced simulations — free account.

Create Free Account