# Neural Port-Hamiltonian Differential Algebraic Equations for Compositional Learning of Electrical Networks

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

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 27 of its 45 references that are in the map.
- First posted on arXiv 15 Dec 2024.

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

- [SGDR: Stochastic Gradient Descent with Warm Restarts](https://mlsanity.com/paper/1608.03983/) (2016)
- [Neural Ordinary Differential Equations](https://mlsanity.com/paper/1806.07366/) (2018)
- [Hamiltonian Neural Networks](https://mlsanity.com/paper/1906.01563/) (2019)
- [DGM: A deep learning algorithm for solving partial differential equations](https://mlsanity.com/paper/1708.07469/) (2017)
- [Solving high-dimensional partial differential equations using deep learning](https://mlsanity.com/paper/1707.02568/) (2017)
- [Universal Differential Equations for Scientific Machine Learning](https://mlsanity.com/paper/2001.04385/) (2020)
- [PDE-Net: Learning PDEs from Data](https://mlsanity.com/paper/1710.09668/) (2017)
- [Physics-informed neural networks with hard constraints for inverse design](https://mlsanity.com/paper/2102.04626/) (2021)
- [On Neural Differential Equations](https://mlsanity.com/paper/2202.02435/) (2022)
- [Deep Hidden Physics Models: Deep Learning of Nonlinear Partial Differential Equations](https://mlsanity.com/paper/1801.06637/) (2018)
- [PDE-Net 2.0: Learning PDEs from Data with A Numeric-Symbolic Hybrid Deep Network](https://mlsanity.com/paper/1812.04426/) (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)
- [DAE-PINN: A Physics-Informed Neural Network Model for Simulating Differential-Algebraic Equations with Application to Power Networks](https://mlsanity.com/paper/2109.04304/) (2021)
- [Compositional Learning of Dynamical System Models Using Port-Hamiltonian Neural Networks](https://mlsanity.com/paper/2212.00893/) (2022)
- [Distributed neural network control with dependability guarantees: a compositional port-Hamiltonian approach](https://mlsanity.com/paper/2112.09046/) (2021)
- [Port-Hamiltonian Neural ODE Networks on Lie Groups For Robot Dynamics Learning and Control](https://mlsanity.com/paper/2401.09520/) (2024)
- [MINN: Learning the dynamics of differential-algebraic equations and application to battery modeling](https://mlsanity.com/paper/2304.14422/) (2023)
- [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)
- [Total Energy Shaping with Neural Interconnection and Damping Assignment -- Passivity Based Control](https://mlsanity.com/paper/2112.12999/) (2021)
- [Physics-Constrained Learning for PDE Systems with Uncertainty Quantified Port-Hamiltonian Models](https://mlsanity.com/paper/2406.11809/) (2024)
- [Structure-preserving discretization for port-Hamiltonian descriptor systems](https://mlsanity.com/paper/1903.10451/) (2019)
- [Data-driven Bayesian Control of Port-Hamiltonian Systems](https://mlsanity.com/paper/2309.04678/) (2023)
- [Neural Energy Casimir Control for Port-Hamiltonian Systems](https://mlsanity.com/paper/2112.03339/) (2021)
- [A Robust Consensus Algorithm for Current Sharing and Voltage Regulation in DC Microgrids](https://mlsanity.com/paper/1708.04608/) (2017)

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

- [A Simultaneous Approach for Training Neural Differential-Algebraic Systems of Equations](https://mlsanity.com/paper/2504.04665/) (2025)
- [Dirac-Interconnected Neural Elements: Discovering Modularity in Physical Systems Without Reduction](https://mlsanity.com/paper/2610.02960/) (2026)

## Abstract (arXiv)

We develop compositional learning algorithms for coupled dynamical systems, with a particular focus on electrical networks. While deep learning has proven effective at modeling complex relationships from data, compositional couplings between system components typically introduce algebraic constraints on state variables, posing challenges to many existing data-driven approaches to modeling dynamical systems. Towards developing deep learning models for constrained dynamical systems, we introduce neural port-Hamiltonian differential algebraic equations (N-PHDAEs), which use neural networks to parameterize unknown terms in both the differential and algebraic components of a port-Hamiltonian DAE. To train these models, we propose an algorithm that uses automatic differentiation to perform index reduction, automatically transforming the neural DAE into an equivalent system of neural ordinary differential equations (N-ODEs), for which established model inference and backpropagation methods exist. Experiments simulating the dynamics of nonlinear circuits exemplify the benefits of our approach: the proposed N-PHDAE model achieves an order of magnitude improvement in prediction accuracy and constraint satisfaction when compared to a baseline N-ODE over long prediction time horizons. We also validate the compositional capabilities of our approach through experiments on a simulated DC microgrid: we train individual N-PHDAE models for separate grid components, before coupling them to accurately predict the behavior of larger-scale networks.
