Lagrangian Neural Network with Differentiable Symmetries and Relational Inductive Bias

Ravinder Bhattoo, Sayan Ranu, N. M. Anoop Krishnan

Abstract: Realistic models of the physical world rely on differentiable symmetries that, in turn, correspond to conservation laws. Recent works on Lagrangian and Hamiltonian neural networks show that the underlying symmetries of a system can be easily learned by a neural network when provided with an appropriate inductive bias. However, these models still suffer from issues such as inability to generalize to arbitrary system sizes, poor interpretability, and most importantly, inability to learn translational and rotational symmetries, which lead to the conservation laws of linear and angular momentum, respectively. Here, we present a momentum conserving Lagrangian neural network (MCLNN) that learns the Lagrangian of a system, while also preserving the translational and rotational symmetries. We test our approach on linear and non-linear spring systems, and a gravitational system, demonstrating the energy and momentum conservation. We also show that the model developed can generalize to systems of any arbitrary size. Finally, we discuss the interpretability of the MCLNN, which directly provides physical insights into the interactions of multi-particle systems.

Introduction

In recent years, Lagrangian Neural Networks (LNNs) and Hamiltonian Neural Networks (HNNs) have emerged as powerful tools for learning physical laws directly from data. By embedding the principle of stationary action into their architecture, these models naturally conserve energy. However, standard LNNs face significant challenges: they often fail to respect translational and rotational symmetries (leading to momentum drift), they are typically restricted to fixed system sizes, and they lack interpretability as they treat the entire system as a "black box."

Methodology

The Momentum Conserving Lagrangian Neural Network (MCLNN) addresses these gaps by shifting from a global view to a relational inductive bias. Instead of processing raw Cartesian coordinates for the entire system, the MCLNN reformulates the Lagrangian ($L = T - V$) using pairwise interactions.

The MCLNN architecture computes the Lagrangian by learning pairwise potential energies, ensuring symmetry-preserving dynamics.

As shown in the architecture above, the model explicitly calculates Kinetic Energy ($T$) using standard physics definitions. The Potential Energy ($V$) is learned as a pairwise potential function $V_{ij}$ that depends solely on the distance between particles. By using relative distances as inputs, the model becomes mathematically invariant to global translation and rotation. According to Noether’s Theorem, this architectural choice "hard-codes" the conservation of linear and angular momentum into the network.

Experimental Evaluation

The researchers benchmarked MCLNN against a baseline LNN using three synthetic multi-particle systems: linear springs, non-linear springs (quartic potential), and a gravitational system. Models were trained on small systems (3-4 particles) and tested on their ability to generalize to larger configurations (6-8 particles).

Results and Discussion

The MCLNN demonstrated superior long-term stability and generalization compared to standard LNNs. While baseline models began to diverge and "drift" after fewer than 100 time steps, the MCLNN remained stable over thousands of steps.

Comparison of angular momentum conservation between MCLNN and baseline models over time, showing the stability of the MCLNN approach.

Key findings include:

  • Momentum Conservation: Quantitative analysis confirms that MCLNN maintains near-zero error for both linear and angular momentum, whereas baseline models exhibit significant drift.
  • Zero-Shot Generalization: Because the network learns the interaction between any two particles rather than the state of the entire system, it is size-agnostic. A model trained on 3 particles successfully simulated 6-particle systems with high accuracy.
  • Interpretability: By plotting the learned $V_{ij}$ function, researchers found that the network essentially "rediscovered" the mathematical forms of gravity and spring potentials without prior knowledge of the equations.

Conclusion

While the MCLNN provides a robust framework for conservative systems, current limitations include a reliance on pairwise assumptions and $O(N^2)$ computational complexity. Future work may involve integrating Graph Neural Networks (GNNs) to handle massive systems and extending the framework to non-conservative forces like friction.

Summary updated

BibTeX
@inproceedings{bhattoo2022lagrangian,
  author = {Ravinder Bhattoo and Sayan Ranu and N. M. Anoop Krishnan},
  title = {{Lagrangian Neural Network with Differentiable Symmetries and Relational Inductive Bias}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=OD_dnx57ksK},
}
Figure