# Compositional Learning of Dynamical System Models Using Port-Hamiltonian Neural Networks

arXiv: https://arxiv.org/abs/2212.00893 · HTML: https://mlsanity.com/paper/2212.00893/

## Key facts

- Cited by 18 papers in the map (data through 14 Oct 2026).
- Builds on 23 of its 40 references that are in the map.
- First posted on arXiv 1 Dec 2022.

## Builds on (most cited first, 23 of 23)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [Neural Ordinary Differential Equations](https://mlsanity.com/paper/1806.07366/) (2018)
- [Hamiltonian Neural Networks](https://mlsanity.com/paper/1906.01563/) (2019)
- [Lagrangian Neural Networks](https://mlsanity.com/paper/2003.04630/) (2020)
- [Universal Differential Equations for Scientific Machine Learning](https://mlsanity.com/paper/2001.04385/) (2020)
- [Deep Lagrangian Networks: Using Physics as Model Prior for Deep Learning](https://mlsanity.com/paper/1907.04490/) (2019)
- [Hamiltonian Generative Networks](https://mlsanity.com/paper/1909.13789/) (2019)
- [Simplifying Hamiltonian and Lagrangian Neural Networks via Explicit Constraints](https://mlsanity.com/paper/2010.13581/) (2020)
- [Neural Lander: Stable Drone Landing Control using Learned Dynamics](https://mlsanity.com/paper/1811.08027/) (2018)
- [Dissipative SymODEN: Encoding Hamiltonian Dynamics with Dissipation and Control into Deep Learning](https://mlsanity.com/paper/2002.08860/) (2020)
- [Port-Hamiltonian Neural Networks for Learning Explicit Time-Dependent Dynamical Systems](https://mlsanity.com/paper/2107.08024/) (2021)
- [Neural Networks with Physics-Informed Architectures and Constraints for Dynamical Systems Modeling](https://mlsanity.com/paper/2109.06407/) (2021)
- [Benchmarking Energy-Conserving Neural Networks for Learning Dynamics from Data](https://mlsanity.com/paper/2012.02334/) (2020)
- [Hamiltonian-based Neural ODE Networks on the SE(3) Manifold For Dynamics Learning and Control](https://mlsanity.com/paper/2106.12782/) (2021)
- [Extending Lagrangian and Hamiltonian Neural Networks with Differentiable Contact Models](https://mlsanity.com/paper/2102.06794/) (2021)
- [Modeling System Dynamics with Physics-Informed Neural Networks Based on Lagrangian Mechanics](https://mlsanity.com/paper/2005.14617/) (2020)
- [Structured Mechanical Models for Robot Learning and Control](https://mlsanity.com/paper/2004.10301/) (2020)
- [Pseudo-Hamiltonian Neural Networks with State-Dependent External Forces](https://mlsanity.com/paper/2206.02660/) (2022)
- [Taylor-Lagrange Neural Ordinary Differential Equations: Toward Fast Training and Evaluation of Neural ODEs](https://mlsanity.com/paper/2201.05715/) (2022)
- [Distributed neural network control with dependability guarantees: a compositional port-Hamiltonian approach](https://mlsanity.com/paper/2112.09046/) (2021)
- [A Non-Intrusive Method to Inferring Linear Port-Hamiltonian Realizations using Time-Domain Data](https://mlsanity.com/paper/2005.09371/) (2020)
- [Total Energy Shaping with Neural Interconnection and Damping Assignment -- Passivity Based Control](https://mlsanity.com/paper/2112.12999/) (2021)
- [Numerical methods to compute a minimal realization of a port-Hamiltonian system](https://mlsanity.com/paper/1903.07042/) (2019)

## Built on by (most cited first, 18 of 18)

- [Stable Port-Hamiltonian Neural Networks](https://mlsanity.com/paper/2502.02480/) (2025)
- [How to Learn and Generalize From Three Minutes of Data: Physics-Constrained and Uncertainty-Aware Neural Stochastic Differential Equations](https://mlsanity.com/paper/2306.06335/) (2023)
- [Morphological-Symmetry-Equivariant Heterogeneous Graph Neural Network for Robotic Dynamics Learning](https://mlsanity.com/paper/2412.01297/) (2024)
- [Data-driven identification of latent port-Hamiltonian systems](https://mlsanity.com/paper/2408.08185/) (2024)
- [Neural Port-Hamiltonian Differential Algebraic Equations for Compositional Learning of Electrical Networks](https://mlsanity.com/paper/2412.11215/) (2024)
- [Poisson-Dirac Neural Networks for Modeling Coupled Dynamical Systems across Domains](https://mlsanity.com/paper/2410.11480/) (2024)
- [Artifacts of Numerical Integration in Learning Dynamical Systems](https://mlsanity.com/paper/2507.14491/) (2025)
- [Learning Physically Consistent Lagrangian Control Models Without Acceleration Measurements](https://mlsanity.com/paper/2512.03035/) (2025)
- [Controlled oscillation modeling using port-Hamiltonian neural networks](https://mlsanity.com/paper/2602.15704/) (2026)
- [Let Physics Guide Your Protein Flows: Topology-aware Unfolding and Generation](https://mlsanity.com/paper/2509.25379/) (2025)
- [Learning Passive Continuous-Time Dynamics with Multistep Port-Hamiltonian Gaussian Processes](https://mlsanity.com/paper/2510.00384/) (2025)
- [Mesh Field Theory: Port-Hamiltonian Formulation of Mesh-Based Physics](https://mlsanity.com/paper/2605.00394/) (2026)
- [The Design and Composition of Structural Causal Decision Processes](https://mlsanity.com/paper/2605.02681/) (2026)
- [Path-independent Flow Matching for Multi-parameter Generative Dynamics](https://mlsanity.com/paper/2605.13487/) (2026)
- [Conservation Buys Stability and Factoring Buys Counterfactuals in Physical World Models](https://mlsanity.com/paper/2609.19674/) (2026)
- [Stable and Counterfactually Robust Physical World Models from Imposed Structure and Learned Physics](https://mlsanity.com/paper/2610.00280/) (2026)
- [Port-Hamiltonian Neural Networks for Systems with Multiple Asymptotically Stable Equilibria](https://mlsanity.com/paper/2610.01356/) (2026)
- [Dirac-Interconnected Neural Elements: Discovering Modularity in Physical Systems Without Reduction](https://mlsanity.com/paper/2610.02960/) (2026)

## Abstract (arXiv)

Many dynamical systems -- from robots interacting with their surroundings to large-scale multiphysics systems -- involve a number of interacting subsystems. Toward the objective of learning composite models of such systems from data, we present i) a framework for compositional neural networks, ii) algorithms to train these models, iii) a method to compose the learned models, iv) theoretical results that bound the error of the resulting composite models, and v) a method to learn the composition itself, when it is not known a priori. The end result is a modular approach to learning: neural network submodels are trained on trajectory data generated by relatively simple subsystems, and the dynamics of more complex composite systems are then predicted without requiring additional data generated by the composite systems themselves. We achieve this compositionality by representing the system of interest, as well as each of its subsystems, as a port-Hamiltonian neural network (PHNN) -- a class of neural ordinary differential equations that uses the port-Hamiltonian systems formulation as inductive bias. We compose collections of PHNNs by using the system's physics-informed interconnection structure, which may be known a priori, or may itself be learned from data. We demonstrate the novel capabilities of the proposed framework through numerical examples involving interacting spring-mass-damper systems. Models of these systems, which include nonlinear energy dissipation and control inputs, are learned independently. Accurate compositions are learned using an amount of training data that is negligible in comparison with that required to train a new model from scratch. Finally, we observe that the composite PHNNs enjoy properties of port-Hamiltonian systems, such as cyclo-passivity -- a property that is useful for control purposes.
