  Physical systems are commonly represented as a combination of particles, the
individual dynamics of which govern the system dynamics. However, traditional
approaches require the knowledge of several abstract quantities such as the
energy or force to infer the dynamics of these particles. Here, we present a
framework, namely, Lagrangian graph neural network (LGnn), that provides a
strong inductive bias to learn the Lagrangian of a particle-based system
directly from the trajectory. We test our approach on challenging systems with
constraints and drag -- LGnn outperforms baselines such as feed-forward
Lagrangian neural network (Lnn) with improved performance. We also show the
zero-shot generalizability of the system by simulating systems two orders of
magnitude larger than the trained one and also hybrid systems that are unseen
by the model, a unique feature. The graph architecture of LGnn significantly
simplifies the learning in comparison to Lnn with ~25 times better performance
on ~20 times smaller amounts of data. Finally, we show the interpretability of
LGnn, which directly provides physical insights on drag and constraint forces
learned by the model. LGnn can thus provide a fillip toward understanding the
dynamics of physical systems purely from observable quantities.
