Reuse & Permissions

It is not necessary to obtain permission to reuse this article or its components as it is available under the terms of the Creative Commons Attribution 4.0 International license. This license permits unrestricted use, distribution, and reproduction in any medium, provided attribution to the author(s) and the published article's title, journal citation, and DOI are maintained. Please note that some figures may have been included with permission from other third parties. It is your responsibility to obtain the proper permission from the rights holder directly for these figures.

Export citation

Export citation

Choose format for download:

Download Citation
  • Open Access

Herglotz Lagrangian neural networks: Learning dissipative dynamics via contact variational principles

Qi Huang1, Jack Murdoch Moore1,2, Ting-Ting Gao3,*, and Gang Yan1,2,†

  • 1MOE Key Laboratory of Advanced Micro-Structured Materials, and School of Physical Science and Engineering, Tongji University, Shanghai 200092, People's Republic of China
  • 2National Key Laboratory of Autonomous Intelligent Unmanned Systems, MOE Frontiers Science Center for Intelligent Autonomous Systems, Tongji University, Shanghai 200092, People’s Republic of China
  • 3Network Science Institute, Northeastern University, Boston, Massachusetts 02115, USA

  • *Contact author: ti.gao@northeastern.edu
  • †Contact author: gyan@tongji.edu.cn

Phys. Rev. Research 8, 023224 – Published 29 May, 2026

DOI: https://doi.org/10.1103/9gnh-89jd

Abstract

Physics-informed machine learning has proven effective for learning conservative dynamical systems. However, most real-world systems are nonconservative, and current approaches typically handle dissipation through ad hoc modifications or require access to full-state information. Here, we introduce the discrete Herglotz Lagrangian neural network (HLNN), a structure-preserving framework for learning a class of smooth dissipative dynamics from data. Grounded in the Herglotz variational principle, HLNN extends classical variational learning to dissipative systems by modeling dissipation intrinsically within a contact-geometric framework, without prescribing an explicit empirical dissipation law, and can be trained from position-only observations without explicit velocity supervision. Across benchmarks spanning state-dependent damping, time-modulated damping, and external driving, HLNN reliably recovers long-term trajectories and dissipation rates, outperforming baseline models on the considered benchmarks. Our results establish a unified variational and geometric framework for learning smooth dissipative dynamics and open avenues for data-driven modeling of nonequilibrium and open systems.

View figure in article

Physics Subject Headings (PhySH)

Article Text

Supplemental Material

References (63)

  1. S. L. Brunton and J. N. Kutz, Promising directions of machine learning for partial differential equations, Nat. Comput. Sci. 4, 483 (2024).
  2. H. Levine and Y. Tu, Machine learning meets physics: A two-way street, Proc. Natl. Acad. Sci. USA 121, e2403580121 (2024).
  3. H. Wang, T. Fu, Y. Du, W. Gao, K. Huang, Z. Liu, P. Chandak, S. Liu, P. Van Katwyk, A. Deac, et al., Scientific discovery in the age of artificial intelligence, Nature (London) 620, 47 (2023).
  4. R. Yu and R. Wang, Learning dynamical systems from data: An introduction to physics-guided deep learning, Proc. Natl. Acad. Sci. USA 121, e2311808121 (2024).
  5. K. Hornik, M. Stinchcombe, and H. White, Multilayer feedforward networks are universal approximators, Neural Networks 2, 359 (1989).
  6. S. L. Brunton, J. L. Proctor, and J. N. Kutz, Discovering governing equations from data by sparse identification of nonlinear dynamical systems, Proc. Natl. Acad. Sci. USA 113, 3932 (2016).
  7. M. Schmidt and H. Lipson, Distilling free-form natural laws from experimental data, Science 324, 81 (2009).
  8. T.-T. Gao and G. Yan, Autonomous inference of complex network dynamics from incomplete and noisy data, Nat. Comput. Sci. 2, 160 (2022).
  9. T.-T. Gao, B. Barzel, and G. Yan, Learning interpretable dynamics of stochastic complex systems from experimental data, Nat. Commun. 15, 6029 (2024).
  10. G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, and L. Yang, Physics-informed machine learning, Nat. Rev. Phys. 3, 422 (2021).
  11. S.-M. Udrescu and M. Tegmark, AI Feynman: A physics-inspired method for symbolic regression, Sci. Adv. 6, eaay2631 (2020).
  12. Z. Liu and M. Tegmark, Machine learning conservation laws from trajectories, Phys. Rev. Lett. 126, 180604 (2021).
  13. Z. Zhang, Y. Shin, and G. E. Karniadakis, GFINNs: GENERIC formalism informed neural networks for deterministic and stochastic dynamical systems, Philos. Trans. R. Soc. A 380, 20210207 (2022).
  14. H. Yu, X. Tian, W. E, and Q. Li, OnsagerNet: Learning stable and interpretable dynamics using a generalized Onsager principle, Phys. Rev. Fluids 6, 114402 (2021).
  15. X. Chen, B. W. Soh, Z.-E. Ooi, E. Vissol-Gaudin, H. Yu, K. S. Novoselov, K. Hippalgaonkar, and Q. Li, Constructing custom thermodynamics using deep learning, Nat. Comput. Sci. 4, 66 (2024).
  16. J. Yang, W. Rao, N. Dehmamy, R. Walters, and R. Yu, Symmetry-informed governing equation discovery, in Advances in Neural Information Processing Systems, Vol. 37 (NeurIPS, 2024), pp. 65297–65327.
  17. J. Zhang, Q. Zhu, and W. Lin, Learning Hamiltonian neural Koopman operator and simultaneously sustaining and discovering conservation laws, Phys. Rev. Res. 6, L012031 (2024).
  18. S. Greydanus, M. Dzamba, and J. Yosinski, Hamiltonian neural networks, in Proceedings of the 33rd International Conference on Neural Information Processing Systems (Curran Associates Inc., Red Hook, NY, 2019), pp. 15379–15389.
  19. M. Cranmer, S. Greydanus, S. Hoyer, P. Battaglia, D. Spergel, and S. Ho, Lagrangian neural networks, arXiv:2003.04630.
  20. P. Jin, Z. Zhang, A. Zhu, Y. Tang, and G. E. Karniadakis, Sympnets: Intrinsic structure-preserving symplectic networks for identifying Hamiltonian systems, Neural Networks 132, 166 (2020).
  21. H. C. Öttinger, Nonequilibrium thermodynamics for open systems, Phys. Rev. E 73, 036126 (2006).
  22. M. te Vrugt and R. Wittkowski, Metareview: A survey of active matter reviews, Eur. Phys. J. E 48, 12 (2025).
  23. A. Di Vita, Non-Equilibrium Thermodynamics, Lecture Notes in Physics (Springer, Cham, 2022),Vol. 1007.
  24. C. R. Galley, Classical mechanics of nonconservative systems, Phys. Rev. Lett. 110, 174301 (2013).
  25. A. Sosanya and S. Greydanus, Dissipative Hamiltonian neural networks: Learning dissipative and conservative dynamics separately, arXiv:2201.10085.
  26. S. A. Desai, M. Mattheakis, D. Sondak, P. Protopapas, and S. J. Roberts, Port-Hamiltonian neural networks for learning explicit time-dependent dynamical systems, Phys. Rev. E 104, 034312 (2021).
  27. S. Xiao, J. Zhang, and Y. Tang, Generalized Lagrangian neural networks, Commun. Comput. Phys. 39, 59 (2026).
  28. Z. Chen, M. Feng, J. Yan, and H. Zha, Learning neural Hamiltonian dynamics: A methodological overview, arXiv:2203.00128.
  29. A. Testa, S. Hauberg, T. Asfour, and L. Rozo, Geometric contact flows: Contactomorphisms for dynamics and control, in Proceedings of the 42nd International Conference on Machine Learning, edited by A. Singh, M. Fazel, D. Hsu, S. Lacoste-Julien, F. Berkenkamp, T. Maharaj, K. Wagstaff, and J. Zhu, Proceedings of Machine Learning Research, Vol. 267 (PMLR, Vancouver, Canada, 2025), pp. 59259–59284.
  30. P. Canizares, D. Murari, C.-B. Schönlieb, F. Sherry, and Z. Shumaylov, Symplectic neural flows for modeling and discovery, arXiv:2412.16787.
  31. V. Sundararaghavan, M. N. Shah, and J. P. Simmons, Lagrangian neural networks for reversible dissipative evolution, arXiv:2405.14645.
  32. Y. Chen, T. Matsubara, and T. Yaguchi, Neural symplectic form: Learning Hamiltonian equations on general coordinate systems, in Proceedings of the 35th International Conference on Neural Information Processing Systems, NIPS '21 (Curran Associates Inc., Red Hook, NY, 2021).
  33. M. Vermeeren, A. Bravetti, and M. Seri, Contact variational integrators, J. Phys. A: Math. Theor. 52, 445206 (2019).
  34. A. Anahory Simoes, D. M. de Diego, M. Lainz Valcázar, and M. de León, On the geometry of discrete contact mechanics, J. Nonlinear Sci. 31, 53 (2021).
  35. A. Bravetti, H. Cruz, and D. Tapias, Contact Hamiltonian mechanics, Ann. Phys. (NY) 376, 17 (2017).
  36. H. Geiges, An Introduction to Contact Topology (Cambridge University Press, Cambridge, 2008), Vol. 109.
  37. B. Georgieva, R. Guenther, and T. Bodurov, Generalized variational principle of Herglotz for several independent variables. First Noether-type theorem, J. Math. Phys. 44, 3911 (2003).
  38. A. A. Simoes, M. De León, M. L. Valcázar, and D. M. De Diego, Contact geometry for simple thermodynamical systems with friction, Proc. R. Soc. A 476, 20200244 (2020).
  39. J. E. Marsden and M. West, Discrete mechanics and variational integrators, Acta Numer. 10, 357 (2001).
  40. See Supplemental Material at http://link.aps.org/supplemental/10.1103/9gnh-89jd for additional theoretical derivations, implementation details, robustness analyses, and supplementary numerical results, which includes Refs. [62, 63].
  41. R. T. Q. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, Neural ordinary differential equations, in Proceedings of the 32nd International Conference on Neural Information Processing Systems (Curran Associates Inc., Red Hook, NY, 2018), pp. 6572–6583.
  42. P. Wulff, L. Lentz, and U. von Wagner, Determination of the polynomial restoring force of a one DoF bistable Duffing oscillator by linear regression, Acta Mech. 234, 1973 (2023).
  43. A. Bravetti, M. Á. García-Ariza, and D. Tapias, Thermodynamic entropy as a Noether invariant from contact geometry, Entropy 25, 1082 (2023).
  44. J. Gaset, M. Lainz, A. Mas, and X. Rivas, The Herglotz variational principle for dissipative field theories, Geom. Mech. 01, 153 (2024).
  45. A. Bravetti, Contact Hamiltonian dynamics: The concept and its use, Entropy 19, 535 (2017).
  46. R. MrugaŁa, Geometrical formulation of equilibrium phenomenological thermodynamics, Rep. Math. Phys. 14, 419 (1978).
  47. J. Lee, C. K. Liu, F. C. Park, and S. S. Srinivasa, A linear-time variational integrator for multibody systems, in Algorithmic Foundations of Robotics XII: Proceedings of the Twelfth Workshop on the Algorithmic Foundations of Robotics, edited by K. Goldberg, P. Abbeel, K. Bekris, and L. Miller, Springer Proceedings in Advanced Robotics, Vol. 13 (Springer, Cham, 2020), pp. 352–367.
  48. J. Brüdigam, S. Sosnowski, Z. Manchester, and S. Hirche, Variational integrators and graph-based solvers for multibody dynamics in maximal coordinates, Multibody Syst. Dyn. 61, 381 (2024).
  49. K. Champion, B. Lusch, J. N. Kutz, and S. L. Brunton, Data-driven discovery of coordinates and governing equations, Proc. Natl. Acad. Sci. USA 116, 22445 (2019).
  50. P. Toth, D. J. Rezende, A. Jaegle, S. Racanière, A. Botev, and I. Higgins, Hamiltonian generative networks, in International Conference on Learning Representations (OpenReview.net, 2020).
  51. M. Lutter, C. Ritter, and J. Peters, Deep Lagrangian networks: Using physics as model prior for deep learning, in International Conference on Learning Representations (OpenReview.net, 2019).
  52. S. Saemundsson, A. Terenin, K. Hofmann, and M. Deisenroth, Variational integrator networks for physically structured embeddings, in Proceedings of the 23rd International Conference on Artificial Intelligence and Statistics, edited by S. Chiappa and R. Calandra, Proceedings of Machine Learning Research, Vol. 108 (PMLR, Online, 2020), pp. 3078–3087.
  53. Z. Chen, J. Zhang, M. Arjovsky, and L. Bottou, Symplectic recurrent neural networks, in International Conference on Learning Representations (OpenReview.net, 2020).
  54. A. López-Gordón, L. Colombo, and M. De León, Nonsmooth Herglotz variational principle, in Proceedings of the 2023 American Control Conference (ACC) (IEEE, Piscataway, NJ, 2023), pp. 3376–3381.
  55. Q. Zhan, J. Duan, X. Li, and Y. Li, Numerical integration of stochastic contact Hamiltonian systems via stochastic Herglotz variational principle, Phys. Scr. 98, 055211 (2023).
  56. Q. Zhan, J. Duan, and L. Wang, Numerical integrations of stochastic contact Hamiltonian systems via stochastic contact Hamilton–Jacobi equation, Commun. Nonlinear Sci. Numer. Simul. 150, 108986 (2025).
  57. E. Massa and E. Pagani, On the Herglotz variational problem, J. Math. Phys. 64, 102902 (2023).
  58. Y. Lishkova, P. Scherer, S. Ridderbusch, M. Jamnik, P. Liò, S. Ober-Blöbaum, and C. Offen, Discrete Lagrangian neural networks with automatic symmetry discovery, IFAC-PapersOnLine 56, 3203 (2023).
  59. S. Ober-Blöbaum and C. Offen, Variational learning of Euler–Lagrange dynamics from data, J. Comput. Appl. Math. 421, 114780 (2023).
  60. M. D. Hansen, E. Celledoni, and B. K. Tapley, Learning mechanical systems from real-world data using discrete forced Lagrangian dynamics, arXiv:2505.20370.
  61. G. H. Golub and C. F. Van Loan, Matrix Computations, 4th ed. (Johns Hopkins University Press, Baltimore, MD, 2013).
  62. R. M. Santilli, Foundations of Theoretical Mechanics I: The Inverse Problem in Newtonian Mechanics (Springer, New York, 1978), reprinted 2013.
  63. J. Brüdigam, M. Schuck, A. Capone, S. Sosnowski, and S. Hirche, Structure-preserving learning using Gaussian processes and variational integrators, in Proceedings of the 4th Annual Learning for Dynamics and Control Conference, edited by R. Firoozi, N. Mehr, E. Yel, R. Antonova, J. Bohg, M. Schwager, and M. Kochenderfer, Proceedings of Machine Learning Research, Vol. 168 (PMLR, Stanford, CA, 2022), pp. 1150–1162.

Outline

Information

Sign In to Your Journals Account

Filter

Filter

Article Lookup

Enter a citation