cs.LGSep 25, 2026

Lagrangian and Hamiltonian Neural Networks With a Dissipative System

Authors: V. Rayamajhi, J. Singal

Organizations: University of Richmond

Abstract

We investigate the applicability of Lagrangian and Hamiltonian Neural Network models to a dissipative system that has explicit time dependence in its Lagrangian, Hamiltonian, and total energy. To do so we consider these neural network models for simulated systems of a harmonic one-dimensional, one-component oscillator with damping, as well as without damping for comparison. We find that both the Lagrangian and Hamiltonian approaches are able to predict the empirical physical behavior of the damped oscillator systems and to effectively ``learn'' to varying degrees the underlying Lagrangians and Hamiltonians, as has previously been shown to be the case with undamped oscillator systems. These investigations elucidate important properties of Lagrangian and Hamiltonian mechanics, including properties that are not manifest when considering systems without explicit time dependence.

Figures & tables

Explore similar work

Apr 1, 2026

Phase space integrity in neural network models of Hamiltonian dynamics: A Lagrangian descriptor approach

We propose Lagrangian Descriptors (LDs) as a diagnostic framework for evaluating neural network models of Hamiltonian systems beyond conventional trajectory-based metrics. Standard error measures quantify short-term predictive accuracy but provide little insight into global geometric structures such as orbits and separatrices. Existing evaluation tools in dissipative systems are inadequate for Hamiltonian dynamics due to fundamental differences in the systems. By constructing probability density functions weighted by LD values, we embed geometric information into a statistical framework suitable for information-theoretic comparison. We benchmark physically constrained architectures (SympNet, HénonNet, Generalized Hamiltonian Neural Networks) against data-driven Reservoir Computing across two canonical systems. For the Duffing oscillator, all models recover the homoclinic orbit geometry with modest data requirements, though their accuracy near critical structures varies. For the three-mode nonlinear Schrödinger equation, however, clear differences emerge: symplectic architectures preserve energy but distort phase-space topology, while Reservoir Computing, despite lacking explicit physical constraints, reproduces the homoclinic structure with high fidelity. These results demonstrate the value of LD-based diagnostics for assessing not only predictive performance but also the global dynamical integrity of learned Hamiltonian models.
Oct 11, 2026

Dissipative Lagrangian Neural Networks for the Interpretable Modelling of Passive Mechanical Systems

In this paper, we propose the Dissipative Lagrangian Neural Network (dLNN), a continuous-time system identification technique that separately learns the conservative and dissipative dynamics of a mechanical system directly from data. A key contribution is a novel parametrisation of dissipative forces that (i) is structurally constrained to be dissipative, enforcing passivity of the learned model, (ii) cannot absorb conservative mechanics, and (iii) retains sufficient expressivity to represent a broad family of state-dependent damping and regularised friction forces. The model is validated on prediction tasks on two real-world mechanical systems: trajectory prediction of a chaotic double pendulum and inverse-dynamics modelling of a six-degree-of-freedom industrial robot. Across these tasks, the dLNN demonstrates improved predictive performance over existing Lagrangian architectures while remaining competitive with a black-box neural model. The imposed physical structure also improves generalisation to unseen states, with the benefits becoming particularly pronounced when training data is limited. Finally, we introduce a symbolic distillation procedure that extracts closed-form expressions from the learned physical components. Applied to the industrial robot, this produces interpretable symbolic models that retain high predictive accuracy while reducing the computational overhead associated with evaluating neural Lagrangian models.
Feb 17, 2026

Controlled oscillation modeling using port-Hamiltonian neural networks

Learning dynamical systems through purely data-driven methods is challenging as they do not learn the underlying conservation laws that enable them to correctly generalize. Existing port-Hamiltonian neural network methods have recently been successfully applied for modeling mechanical systems. However, even though these methods are designed on power-balance principles, they usually do not consider power-preserving discretizations and often rely on Runge-Kutta numerical methods. In this work, we propose to use a second-order discrete gradient method embedded in the learning of dynamical systems with port-Hamiltonian neural networks. Numerical results are provided for three systems deliberately selected to span different ranges of dynamical behavior under control: a baseline harmonic oscillator with quadratic energy storage; a Duffing oscillator, with a non-quadratic Hamiltonian offering amplitude-dependent effects; and a self-sustained oscillator, which can stabilize in a controlled limit cycle through the incorporation of a nonlinear dissipation. We show how the use of this discrete gradient method outperforms the performance of a Runge-Kutta method of the same order. Experiments are also carried out to compare two theoretically equivalent port-Hamiltonian systems formulations and to analyze the impact of regularizing the Jacobian of port-Hamiltonian neural networks during training.