Literature
Display
← All papers

Stable Port-Hamiltonian Neural Networks

Fabian J. Roth · Dominik K. Klein · Maximilian Kannapinn · Jan Peters · Oliver Weeger

· NeurIPS 2025 ↗

Contents

At a glance

Stable port-Hamiltonian neural networks (sPHNNs) combine energy-based dynamics with a convex Hamiltonian whose minimum is fixed or learned. Their unforced dynamics remain bounded; strictly positive dissipation additionally gives global asymptotic convergence under the stated assumptions. Experiments include a spinning body, measured tank levels, and thermal surrogates. Knowing the equilibrium is especially valuable with sparse data; arbitrary driven inputs are outside the zero-input convergence guarantee.

1 Introduction

Physics-informed dynamics models can still extrapolate implausibly or become unstable. sPHNNs impose both an energy-balance structure and a Lyapunov-compatible Hamiltonian, avoiding projection-based stability enforcement. The approach targets systems with a single globally stable equilibrium in the modeled coordinates, including augmented latent states. Related foundations include Hamiltonian neural networks [16] and compositional port-Hamiltonian models [38].

2 Background

The background connects Lyapunov stability with the energy balance of port-Hamiltonian systems.

2.1 Stability of dynamical systems

Lyapunov stability keeps sufficiently perturbed trajectories near an equilibrium; asymptotic stability adds convergence. A positive-definite Lyapunov function with nonpositive time derivative establishes stability, while strict decrease and radial unboundedness support global asymptotic stability.

Equations 1–2
𝒙˙​(t)=𝒇​(𝒙​(t)).\dot{\bm{x}}(t)=\bm{f}(\bm{x}(t)). (1)
V˙​(𝒙)=∂V∂𝒙⊺​𝒙˙=∂V∂𝒙⊺​𝒇​(𝒙)≤0∀𝒙∈D∖{𝟎}.\dot{V}(\bm{x})=\frac{\partial V}{\partial\bm{x}}^{\intercal}\dot{\bm{x}}=\frac{\partial V}{\partial\bm{x}}^{\intercal}\bm{f}(\bm{x})\leq 0\quad\forall\bm{x}\in D\setminus\{\bm{0}\}. (2)

2.2 Port-Hamiltonian systems

The port-Hamiltonian form separates conservative dynamics through a skew-symmetric structure matrix, dissipation through a positive-semidefinite matrix, and external energy exchange through input ports. With no input, the Hamiltonian cannot increase. A damped rigid-body example illustrates this decomposition and the distinction between physical structure and additional stability constraints.

Equations 3–7
𝒙˙=[𝑱⁡(𝒙)−𝑹⁡(𝒙)]​∂ℋ∂𝒙​(𝒙)+𝑮⁡(𝒙)​𝒖​(t).\dot{\bm{x}}=\left[\bm{J}(\bm{x})-\bm{R}(\bm{x})\right]\frac{\partial{\mathcal{H}}}{\partial\bm{x}}(\bm{x})+\bm{G}(\bm{x})\bm{u}(t). (3)
ℋ˙=∂ℋ∂𝒙⊺​𝑱​∂ℋ∂𝒙⏟=0−∂ℋ∂𝒙⊺​𝑹​∂ℋ∂𝒙⏟≥0+∂ℋ∂𝒙⊺​𝑮​𝒖​(t)⏟s⁡(𝒙,𝒖)≤s⁡(𝒙,𝒖).\begin{split}\dot{\mathcal{H}}&=\underbrace{\frac{\partial{\mathcal{H}}}{\partial\bm{x}}^{\intercal}\mkern-8.0mu\bm{J}\frac{\partial{\mathcal{H}}}{\partial\bm{x}}}_{\begin{subarray}{c}\vphantom{\geq}=0\end{subarray}}-\underbrace{\frac{\partial{\mathcal{H}}}{\partial\bm{x}}^{\intercal}\mkern-8.0mu\bm{R}\frac{\partial{\mathcal{H}}}{\partial\bm{x}}}_{\begin{subarray}{c}\geq 0\end{subarray}}+\underbrace{\frac{\partial{\mathcal{H}}}{\partial\bm{x}}^{\intercal}\mkern-8.0mu\bm{G}\bm{u}(t)}_{\begin{subarray}{c}s(\bm{x},\bm{u})\end{subarray}}\leq s(\bm{x},\bm{u}).\end{split} (4)
𝑰​𝝎˙+𝝎×(𝑰​𝝎)=−μ​𝝎∀t>0.\bm{I}\dot{\bm{\omega}}+\bm{\omega}\times(\bm{I}\bm{\omega})=-\mu\bm{\omega}\quad\forall t>0. (5)
ℋ⁡(𝝎)=12​I1​ω12+12​I2​ω22+12​I3​ω32,{\mathcal{H}}(\bm{\omega})=\frac{1}{2}I_{1}\omega_{1}^{2}+\frac{1}{2}I_{2}\omega_{2}^{2}+\frac{1}{2}I_{3}\omega_{3}^{2}, (6)
[ω˙1ω˙2ω˙3]=([0−I3I1​I2​ω3I2I3​I1​ω2I3I1​I2​ω30−I1I2​I3​ω1−I2I3​I1​ω2I1I2​I3​ω10]⏟𝑱⁡(𝝎)−μ​[1I120001I220001I32]⏟𝑹)​∂ℋ∂𝝎.\begin{bmatrix}\dot{\omega}_{1}\\ \dot{\omega}_{2}\\ \dot{\omega}_{3}\end{bmatrix}=\Bigg(\underbrace{\begin{bmatrix}0&-\frac{I_{3}}{I_{1}I_{2}}\omega_{3}&\frac{I_{2}}{I_{3}I_{1}}\omega_{2}\\ \frac{I_{3}}{I_{1}I_{2}}\omega_{3}&0&-\frac{I_{1}}{I_{2}I_{3}}\omega_{1}\\ -\frac{I_{2}}{I_{3}I_{1}}\omega_{2}&\frac{I_{1}}{I_{2}I_{3}}\omega_{1}&0\end{bmatrix}}_{\bm{J}(\bm{\omega})}-\underbrace{\mu\begin{bmatrix}\frac{1}{I_{1}^{2}}&0\vphantom{-\frac{I_{3}}{I_{1}I_{2}}\omega_{3}}&0\\ 0&\frac{1}{I_{2}^{2}}&0\vphantom{-\frac{I_{3}}{I_{1}I_{2}}\omega_{3}}\\ 0\vphantom{-\frac{I_{3}}{I_{1}I_{2}}\omega_{3}}&0&\frac{1}{I_{3}^{2}}\\ \end{bmatrix}}_{\bm{R}}\Bigg)\frac{\partial{\mathcal{H}}}{\partial\bm{\omega}}. (7)
Original figure
Figure 1: Spinning rigid body: Interquartile mean (lines) and range (shaded regions) of the energy EE computed from the predicted states. Left: Models without stability bias; Right: Models with stability bias.

3 Stable port-Hamiltonian neural networks

Neural networks parameterize the Hamiltonian and the structure, dissipation, and input matrices.

3.1 Stability of port-Hamiltonian dynamics

The theorem assumes zero input, a twice-differentiable convex Hamiltonian with zero value and gradient at the equilibrium, and a positive-definite Hessian there. It concludes a stable equilibrium and bounded trajectories. Positive-definite dissipation strengthens this to global asymptotic stability. Conservative or merely semidefinite dissipation does not establish attraction by this theorem.

Equations 8–9
𝒙˙=[𝑱⁡(𝒙)−𝑹⁡(𝒙)]​∂ℋ∂𝒙​(𝒙),with𝑱=−𝑱⊺,𝑹=𝑹⊺⪰0.\dot{\bm{x}}=\left[\bm{J}(\bm{x})-\bm{R}(\bm{x})\right]\frac{\partial{\mathcal{H}}}{\partial\bm{x}}(\bm{x}),\quad\text{with}\quad\bm{J}=-\bm{J}^{\intercal},\,\bm{R}=\bm{R}^{\intercal}\succeq 0. (8)
ℋ⁡(𝟎)=0,\displaystyle{\mathcal{H}}(\bm{0})=0, ∂ℋ∂𝒙|𝒙=𝟎=𝟎,\displaystyle\frac{\partial{\mathcal{H}}}{\partial\bm{x}}\bigg\rvert_{\bm{x}=\bm{0}}=\bm{0}, ∂2ℋ∂𝒙​∂𝒙|𝒙=𝟎≻0.\displaystyle\frac{\partial^{2}{{\mathcal{H}}}}{\partial{\bm{x}}\partial{\bm{x}}}\bigg\rvert_{\bm{x}=\bm{0}}\succ 0. (9)

3.2 Neural network model architecture

A fully input-convex network is normalized by subtracting its value and tangent at the chosen equilibrium, with an optional positive quadratic term ensuring the required curvature. If that term is omitted in practice, the needed positive-definiteness condition must be checked after training. Skew-symmetric and Cholesky parameterizations enforce the matrix structure. The equilibrium can be fixed from physics or optimized as a parameter. The convex network follows the input-convex architecture of Amos et al. [2].

Original figure
(a) Computation graph.
Original figure
(b) Composition of the total dynamics.
Figure 2: sPHNN model architecture: 2(a) Computation graph of stable port-Hamiltonian neural network. The FICNN parameterizing ff is normalized to obtain ℋ{\mathcal{H}} and the outputs of the FFNNs for 𝑱\bm{J}, 𝑳\bm{L}, and 𝑮\bm{G} are reshaped to be skew-symmetric, lower triangular, and rectangular matrices, respectively. 2(b) Dynamics of a randomly initialized stable port-Hamiltonian neural network for n=2n=2, showing the built-in interpretability through the separation into conservative and dissipative dynamics.
Equations 10–11
𝒛1\displaystyle\bm{z}_{1} =σ0​(𝑾0​𝒙+𝒃0),\displaystyle=\sigma_{0}\left(\bm{W}_{0}\bm{x}+\bm{b}_{0}\right), (10)
𝒛i+1\displaystyle\bm{z}_{i+1} =σi(𝑼i𝒛i+𝑾i𝒙+𝒃i),i=1,2,…,k−1,\displaystyle=\sigma_{i}\left(\bm{U}_{i}\bm{z}_{i}+\bm{W}_{i}\bm{x}+\bm{b}_{i}\right),\;i=1,2,...,k-1,
f⁡(𝒙)\displaystyle f(\bm{x}) =zk,\displaystyle=z_{k},
ℋ⁡(𝒙)=f⁡(𝒙)​−f⁡(𝒙∗)−∂f∂𝒙|𝒙∗⊺​(𝒙−𝒙∗)⏟fnorm​(𝒙,𝒙∗)+ϵ​‖𝒙−𝒙∗‖2⏟freg​(𝒙,𝒙∗).{\mathcal{H}}(\bm{x})=f(\bm{x})\underbrace{-f(\bm{x}^{*})-\frac{\partial f}{\partial\bm{x}}\bigg|_{\bm{x}^{*}}^{\intercal}(\bm{x}-\bm{x}^{*})}_{f_{\text{norm}}(\bm{x},\bm{x}^{*})}+\underbrace{\epsilon\left\lVert\bm{x}-\bm{x}^{*}\right\rVert^{2}\vphantom{\frac{\partial f}{\partial\bm{x}}\bigg|_{\bm{x}^{*}}}}_{f_{\text{reg}}(\bm{x},\bm{x}^{*})}\,. (11)

3.3 Training stable port-Hamiltonian neural networks

Derivative fitting is inexpensive but requires state-derivative labels and can accumulate rollout errors. Trajectory fitting differentiates through numerical integration, handles hidden augmented states, and costs more. The authors observe better optimization behavior with their stability bias, without claiming that it eliminates every possible training difficulty.

4 Experiments

Comparisons include unconstrained NODEs, ordinary PHNNs, bounded PHNNs without the convexity constraint, fixed-equilibrium sPHNNs, and learned-equilibrium sPHNN-LM. A projected stable-NODE baseline is used only for derivative fitting because its trajectory-fitting runs did not converge. Models use matched training steps and learning rates, with adaptive Tsit5 integration for prediction. The neural differential-equation and stable-dynamics baselines follow prior architectures [7], [27].

4.1 Spinning rigid body

Ten instances per model are trained from simulated angular-velocity derivatives. sPHNN, sPHNN-LM, and bounded PHNN track rotational energy best; unconstrained models show larger variability or unphysical energy behavior. The learned-equilibrium variant’s interquartile-mean equilibrium error is 0.010 in the reported coordinates.

4.2 Cascaded tanks

One 1,024-sample measured trajectory trains a two-state model of cascaded tanks, with only the lower tank observed. Across 20 instances, stability-biased models are more accurate and consistent. After the pump is switched off, fixed-equilibrium sPHNN relaxes to the expected zero level. Learned equilibria range from −0.196 to 0.432 V; boundedness alone does not ensure the physically correct final level.

Original figure
(a) Training and test RMSEs.
Original figure
(b) Relaxation.
Figure 3: Cascaded tanks: 3(a) RMSE of the models on training and test trajectory. 3(b): Predictions for the extended test trajectory. At t=4096 st=$4096\text{\,}\mathrm{s}$, the pump is turned off. Lines correspond to the interquartile mean and shaded areas represent the interquartile range of the predictions from the 2020 model instances.

4.3 Thermal food processing surrogate

The food-processing surrogate predicts two internal temperatures from oven temperature using multiphysics simulation data. With two 280-sample training trajectories, added latent states help sPHNN while unconstrained models can become unstable in longer rollouts. Known equilibrium improves sparse-data performance over learning it. Table 1 reports median errors over 20 instances under noisy training; at 25% noise, test RMSE is 3.177 for sPHNN, 3.677 for sPHNN-LM, and 4.362 for NODE.

Original figure
(a) Test root mean squared errors for nD=2n_{D}=$2$ training trajectories.
Original figure
(b) Test root mean squared errors for nA=3n_{A}=$3$ augmented dimensions.
Original figure
(c) Model predictions for different combinations of augmented dimensions and training data.
Figure 4: Thermal food processing surrogate: 4(a) and 4(b) RMSEs evaluated on 1515 test trajectories for various numbers of augmented dimensions nAn_{A} and training trajectories nDn_{D}. 4(c) Interquartile mean and range of the TAT_{A} predictions for a custom test case. Top row: Varying number of augmented dimensions with fixed number nD=2n_{D}=$2$ of training trajectories. Bottom row: Varying number of training trajectories with fixed number nA=3n_{A}=$3$ of augmented dimensions. The time t=1395 st=$1395\text{\,}\mathrm{s}$ marks the length of the training trajectories.
Table 1: Median root mean squared error of 2020 instances per models using nA=3n_{A}=$3$ augmented dimensions, trained on nD=2n_{D}=$2$ noisy trajectories and evaluated on noise-free training and test sets.
Training Test
Model 5 %5\text{\,}\mathrm{\%} noise 15 %15\text{\,}\mathrm{\%} noise 25 %25\text{\,}\mathrm{\%} noise 5 %5\text{\,}\mathrm{\%} noise 15 %15\text{\,}\mathrm{\%} noise 25 %25\text{\,}\mathrm{\%} noise
sPHNN 0.332 0.854 1.354 1.170 2.595 3.177
sPHNN-LM 0.638 1.096 1.622 2.420 2.888 3.677
bPHNN 0.500 1.049 2.207 1.572 2.828 5.231
PHNN 2.828 6.750 5.779 28.233 25.631 24.224
NODE 0.993 1.974 2.423 3.577 3.482 4.362

4.4 Additive manufacturing surrogate

A simulated additive-manufacturing heat field is reduced to 40 temperature and 40 input coordinates. Models train on two of 25 parameterized trajectories using derivative fitting followed by trajectory fine-tuning. The reported sPHNN aggregate thermal error peaks below 30 K, while NODE and PHNN errors grow from unstable dynamics. This is surrogate modeling of simulation data, not a physical manufacturing deployment.

Refer to caption
Figure 5: Heat source field and temperature field predictions on the cuboid domain for a test case with v=12.5 mm s−1v=$12.5\text{\,}\mathrm{mm}\text{\,}{\mathrm{s}}^{-1}$, Q=400 WQ=$400\text{\,}\mathrm{W}$. The instances selected for this evaluation resulted in the median test error for the corresponding model type. Colors are clipped to remain in the legend’s range.

5 Conclusion

Combining energy structure, equilibrium knowledge, and stability improves sparse-data extrapolation in these examples. The convex single-minimum model restricts representable dynamics and does not cover arbitrary multistability. Learning the equilibrium is possible, but supplying it from physical knowledge reduces data demands; multistable extensions remain future work.

Acknowledgments and Disclosure of Funding

The authors acknowledge DFG funding, CRC/TRR 361 CREATOR, Hessian.AI, and TU Darmstadt, along with colleagues who reviewed the manuscript.

Appendix A Proof of stability

The proof uses convexity and a strict local minimum to construct a linear radial lower bound on the Hamiltonian. This establishes global positive definiteness and bounded sublevel sets. The unforced energy-decrease condition then keeps every trajectory bounded; strictly positive dissipation and a unique stationary point yield global asymptotic convergence.

Equations A.1–A.8
𝒙˙=[𝑱⁡(𝒙)−𝑹⁡(𝒙)]​∂ℋ∂𝒙​(𝒙),with𝑱=−𝑱⊺,𝑹=𝑹⊺⪰0.\dot{\bm{x}}=\left[\bm{J}(\bm{x})-\bm{R}(\bm{x})\right]\frac{\partial{\mathcal{H}}}{\partial\bm{x}}(\bm{x}),\quad\text{with}\quad\bm{J}=-\bm{J}^{\intercal},\,\bm{R}=\bm{R}^{\intercal}\succeq 0. (A.1)
ℋ⁡(𝟎)=0,\displaystyle{\mathcal{H}}(\bm{0})=0, ∂ℋ∂𝒙|𝒙=𝟎=𝟎,\displaystyle\frac{\partial{\mathcal{H}}}{\partial\bm{x}}\bigg\rvert_{\bm{x}=\bm{0}}=\bm{0}, ∂2ℋ∂𝒙​∂𝒙|𝒙=𝟎≻0.\displaystyle\frac{\partial^{2}{{\mathcal{H}}}}{\partial{\bm{x}}\partial{\bm{x}}}\bigg\rvert_{\bm{x}=\bm{0}}\succ 0. (A.2)
ℋ⁡(𝒙)>ℋ⁡(𝟎)=0∀𝒙∈{‖𝒙‖≤R,𝒙≠𝟎}.{\mathcal{H}}(\bm{x})>{\mathcal{H}}(\bm{0})=0\quad\forall\bm{x}\in\{\left\lVert\bm{x}\right\rVert\leq R,\,\bm{x}\neq\bm{0}\}. (A.3)
λ​ℋ​(𝒙~)+(1−λ)​ℋ​(𝟎)≥ℋ⁡(λ​𝒙~+(1−λ)⋅𝟎)∀λ∈[0,1]\lambda{\mathcal{H}}(\tilde{\bm{x}})+(1-\lambda){\mathcal{H}}(\bm{0})\geq{\mathcal{H}}(\lambda\tilde{\bm{x}}+(1-\lambda)\cdot\bm{0})\quad\forall\lambda\in[0,1] (A.4)
r‖𝒙~‖​g​(𝒙~)=a>ℋ⁡(r‖𝒙~‖​𝒙~)≥a.\frac{r}{\left\lVert\tilde{\bm{x}}\right\rVert}g(\tilde{\bm{x}})=a>{\mathcal{H}}\bigg(\frac{r}{\left\lVert\tilde{\bm{x}}\right\rVert}\tilde{\bm{x}}\bigg)\geq a. (A.5)
limt→∞ℋ⁡(𝒙⁡(t))≥limt→∞g⁡(𝒙⁡(t))=∞.\lim_{t\rightarrow\infty}{\mathcal{H}}(\bm{x}(t))\geq\lim_{t\rightarrow\infty}g(\bm{x}(t))=\infty. (A.6)
ℋ(𝒙∗)−ℋ(𝒙~)≥∂ℋ∂𝒙|𝒙~⊺(𝒙∗−𝒙~)=0,\displaystyle{\mathcal{H}}(\bm{x}^{*})-{\mathcal{H}}(\tilde{\bm{x}})\geq\frac{\partial{\mathcal{H}}}{\partial\bm{x}}\bigg\rvert_{\tilde{\bm{x}}}^{\intercal}(\bm{x}^{*}-\tilde{\bm{x}})=0, (A.7)
ℋ(𝒙~)−ℋ(𝒙∗)≥∂ℋ∂𝒙|𝒙∗⊺(𝒙~−𝒙∗)=0.\displaystyle{\mathcal{H}}(\tilde{\bm{x}})-{\mathcal{H}}(\bm{x}^{*})\geq\frac{\partial{\mathcal{H}}}{\partial\bm{x}}\bigg\rvert_{\bm{x}^{*}}^{\intercal}(\tilde{\bm{x}}-\bm{x}^{*})=0. (A.8)

Appendix B Experiment hyperparameters

Most experiments use two hidden layers of 16 units; the thermal-field surrogate uses 32. Tables retain training schedules, matrix parameterizations, instance counts, and computing costs. Representative sPHNN trajectory fitting takes 37.663 minutes versus 17.951 for NODE; single-trajectory integration is 0.365 versus 0.221 ms in the stated setup. Adaptive solver timings depend on the learned dynamics.

Table 2: Hyperparameters per experiment. TF and DF refer to trajectory and derivative fitting, respectively. The number of instances trained per model type is listed in the "# inst." column, and nn and mm denote the number of dimensions of state and input. The final three columns list the parametrization of the matrices for stable port-Hamiltonian neural network, stable port-Hamiltonian neural network-LM, bounded PHNN, and PHNN as either state-dependent matrices (s.) or constant matrices (c.).
Experiment # training steps learning rate # inst. nn mm matrices
𝑱\bm{J} 𝑹\bm{R} 𝑮\bm{G}
Randomly initialized model - - 11 22 - s. s. -
Spinning rigid body 50 00050\,000 DF 1×10−31\text{\times}{10}^{-3} 1010 33 - s. c. -
Cascaded tanks 50 00050\,000 TF 5×10−45\text{\times}{10}^{-4} 2020 22 11 c. c. c.
Food processing surrogate 30 00030\,000 TF 1×10−41\text{\times}{10}^{-4} 2020 2 to 525 11 c. c. c.
Additive manufacturing surrogate 20 00020\,000 DF 1×10−31\text{\times}{10}^{-3} 2020 4040 4040 c. c. c.
and 10 00010\,000 TF 1×10−51\text{\times}{10}^{-5}
Table 3: Representative computational costs for training and prediction. The top two rows report the training times for derivative and trajectory fitting, respectively. The bottom two rows show the time for a single derivative evaluation and a full trajectory integration using data and models from Section 4.3.
stable port-Hamiltonian neural network stable port-Hamiltonian neural network-LM stable NODE bounded PHNN PHNN neural ordinary differential equation
Derivative fit Section 4.1 (min\mathrm{min}) 0.577 0.644 0.672 0.635 0.539 0.346
Trajectory fit Section 4.3 (min\mathrm{min}) 37.663 39.160 - 38.329 19.111 17.951
Derivative evaluation (ms\mathrm{ms}) 0.007 0.007 - 0.007 0.007 0.005
Model integration (ms\mathrm{ms}) 0.365 0.393 - 0.422 0.237 0.221

Appendix C Spinning rigid body system

Rigid-body data use ten initial angular velocities sampled from the unit cube, inertia diagonal (1, 2, 3), damping 0.01, and 50-second trajectories. The appendix compares extended angular-velocity predictions.

Original figure
Figure C.1: Representative, extended training trajectory for spinning rigid body, including interquartile mean and range of model predictions for ω3\omega_{3}. Left: Models without stability bias; Right: Models with stability bias.

Appendix D Cascaded tanks data

The tank benchmark contains separate 1,024-sample training and test trajectories with the same unknown upper-tank initial level. A ramped-input test probes overflow saturation at a 10 V sensor output. Stability-biased models capture saturation up to roughly 7 V pump input in the reported experiment; the unconstrained alternatives fail.

Original figure
(a) Experimental setup
Original figure
(b) Cascaded tanks training data (overflow highlighted).
Original figure
(c) Saturation.
Figure D.1: Cascaded tanks: 1(a) System setup, 1(b) Training trajectory. 1(c) Predictions for a linearly increasing pump voltage. Due to an overflow, the true system exhibits a hard saturation at x2=10 Vx_{2}=$10\text{\,}\mathrm{V}$. Lines correspond to the interquartile mean, whereas shaded areas represent the interquartile range of the predictions from the 2020 model instances.

Appendix E Thermal food processing surrogate data

Thermal food data come from simulated chicken-breast heating, with center and near-surface probes. Training begins with trajectories 745 and 795; additional trajectories vary dataset size. Fifteen AP15 sequences form the test group. Scaling uses training data only and maps ambient temperature to zero.

Original figure
Figure E.1: Left and middle: Training trajectories. Right: Exemplary test trajectory with interquartile mean and range of the model predictions for TAT_{A}.

Appendix F Thermal field data

The thermal-field appendix describes dimensionality reduction and aggregate prediction errors.

F.1 Dimensionality reduction

Separate singular-value decompositions of training temperature and heat-source snapshots define linear encoders and decoders. Latent temperature is shifted so equilibrium is at the origin, and zero heat input remains zero after encoding. Preliminary autoencoders compressed more strongly but extrapolated poorly with sparse data.

Equations F.1–F.6
𝑨=𝑼​𝚺​𝑽⊺∈ℝM×N,\bm{A}=\bm{U}\bm{\Sigma}\bm{V}^{\intercal}\in{\mathbb{R}}^{M\times N}, (F.1)
𝑿=𝑴​𝒙.\bm{X}=\bm{M}\bm{x}. (F.2)
𝒙=arg​min𝐱′⁡‖𝐗−𝐌𝐱′‖=1c2​𝐌⊺​𝐗.\bm{x}=\argmin_{\bm{x}^{\prime}}\left\lVert\bm{X}-\bm{M}\bm{x}^{\prime}\right\rVert=\frac{1}{c^{2}}\bm{M}^{\intercal}\bm{X}. (F.3)
ψT​(𝑻)\displaystyle\psi_{T}(\bm{T}) =arg​min𝐱⁡‖𝐓−𝐌T​𝐱‖,\displaystyle=\argmin_{\bm{x}}\left\lVert\bm{T}-\bm{M}_{T}\bm{x}\right\rVert, ϕT​(𝒙)\displaystyle\phi_{T}(\bm{x}) =𝑴T​𝒙,\displaystyle=\bm{M}_{T}\bm{x}, (F.4)
ψq​(𝒒)\displaystyle\psi_{q}(\bm{q}) =arg​min𝐮⁡‖𝐪−𝐌q​𝐮‖,\displaystyle=\argmin_{\bm{u}}\left\lVert\bm{q}-\bm{M}_{q}\bm{u}\right\rVert, ϕq​(𝒖)\displaystyle\phi_{q}(\bm{u}) =𝑴q​𝒖.\displaystyle=\bm{M}_{q}\bm{u}. (F.5)
𝒙\displaystyle\bm{x} =ψT​(𝑻)−ψT​(𝑻eq),\displaystyle=\psi_{T}(\bm{T})-\psi_{T}(\bm{T}_{\text{eq}}), 𝑻\displaystyle\bm{T} ≈ϕT​(𝒙+ψT​(𝑻eq)).\displaystyle\approx\phi_{T}(\bm{x}+\psi_{T}(\bm{T}_{\text{eq}})). (F.6)
Original figure
Figure F.1: Model setup used in Section 4.4. The initial temperature field 𝑻⁡(t0)\bm{T}(t_{0}) and input field 𝒒⁡(t)\bm{q}(t) are mapped via encoders ϕT,ϕq\phi_{T},\phi_{q} into the latent space, where the latent dynamics 𝒇\bm{f} are integrated. Here, 𝒇\bm{f} is used as a placeholder for a specific model, e.g., neural ordinary differential equation or stable port-Hamiltonian neural network. Finally, the predicted latent trajectory 𝒙⁡(t)\bm{x}(t) is mapped to the full-order field via the decoder ϕT\phi_{T}.

F.2 Additional results

Across all 25 thermal trajectories, stability-biased models’ errors decrease as the system relaxes. Fixed-equilibrium sPHNN has the lowest peak error, nearly an order of magnitude below the bounded baseline in the reported plot. The learned-equilibrium variant is initially similar but retains a somewhat larger final offset.

Original figure
Figure F.2: Interquartile mean and range of the RMSEs evaluated with all 2525 trajectories of the thermal field data.
Concept demonstration

Open image ↗