LieSPHGP: Stochastic Port-Hamiltonian Gaussian Processes for Learning from Noisy Dynamics on Lie Groups

Thribhuvan Rapolu1,* Luke McLennan2,* Chandrajit Bajaj1,2

1Department of Computer Science, University of Texas at Austin 2Oden Institute for Computational Engineering & Sciences, University of Texas at Austin *Equal contribution

Submitted to AISTATS 2027 · under review

Paper (arXiv, soon) Code Interactive results BibTeX

LieSPHGP learns the mass, potential, damping, control and diffusion of a rigid body from noisy trajectories, keeps rotations on the Lie group, and hands the learned physics to an energy-based controller without retraining.

In a Nutshell

  1. Robots need a “rule book” for how they move. To steer a drone, a pendulum or an underwater robot, a computer has to predict how it will respond to each push from its motors.
  2. Writing that rule book by hand is hard. Wind, water drag and friction are messy and hard to measure, so hand-written equations are never quite right.
  3. So we learn it from recorded data, but the data is imperfect. Sensors are noisy, some readings are missing, and gusts of wind push the robot at random.
  4. Ordinary AI models learn the wrong lessons. They can copy short clips of motion, but they break basic physics (for example, creating energy from nowhere), their small errors add up over time, and they trip over how 3D rotations work. Describing orientation with three angles fails at certain poses, a problem known as “gimbal lock”.
  5. They also don’t say how sure they are. A controller can’t tell when to trust the prediction and when to be careful.
  6. Our approach builds physics into the learning. The model keeps track of energy, makes friction only ever remove energy, and keeps rotations valid. It learns only the unknown parts, and gives an error bar on each prediction.
  7. The result is a model good enough to control the real thing. The same controller swings a pendulum upright and flies a quadrotor through wind using our learned model, nearly as well as with the true physics.

Abstract

Learning predictive models for dynamics is difficult because observations are often sparse and noisy, while the underlying dynamics evolve on nonlinear configuration manifolds and are affected by environmental dissipation and stochastic disturbances. Standard neural dynamics models can fit short-term trajectories but often violate physical structure, accumulate error over long horizons, or rely on parameterizations that introduce singularities such as gimbal lock. We introduce LieSPHGP, a stochastic Gaussian-process framework for learning rigid body dynamics with port-Hamiltonian structure and stability-aware robustness. LieSPHGP represents motion on Lie groups and Lie algebras, enabling coordinate-consistent optimization without singular parameterizations. Learned mass, potential energy, dissipation, and control components retain physical roles; a separate diffusion term represents stochastic forcing. Each component is modeled by Matérn kernel Gaussian processes which capture uncertainty induced by noisy observations. To improve physical validity, Lie group exponential map updates preserve rotational constraints, while positive-definite damping ensures nonnegative deterministic energy dissipation. The implicit-explicit integrator additionally provides unconditional stability for the frozen linear damping subsystem. The resulting model learns predictive dynamics that are robust to noise, respect rigid body geometry, and capture both intrinsic motion and environmental dissipation. Experiments on various noisy rigid body benchmarks show improved prediction accuracy, stronger long-horizon stability, and better satisfaction of manifold constraints compared with neural dynamics baselines.

Method

Overview: noisy observations of a 3D pendulum and a quadrotor are collected, five Gaussian-process subnetworks are learned through a Lie-IMEX integrator and an EKF likelihood, and the learned model drives an IDA-PBC controller.
Overview. From noisy observations $\mathcal{D}=\{(y_k,u_k)\}$ we learn a physics-structured model that captures the dynamics and their uncertainty while preserving the geometry of the state space. The learned model is then used to design a controller that drives the true system to a target state or trajectory, without additional training.

The state $x=(q,p)$ lives on a Lie group ($SO(3)$ for attitude, $SE(3)$ for pose). We model it with a stochastic port-Hamiltonian SDE in Stratonovich form,

$$dx = \big[(J(x)-R(x))\,\nabla H(x) + G(x)\,u\big]\,dt + \xi(x)\circ dW_t,$$ $$H(q,p)=\tfrac12\,p^\top M(q)^{-1}p + V(q),$$

where $J$ is the canonical structure, $R\succeq 0$ the dissipation, $G$ the control matrix and $\xi$ the diffusion. Every unknown term, $M^{-1}$, $V$, $R$, $G$ and $\xi$, is its own Gaussian-process subnetwork, so each one keeps its physical meaning and its own uncertainty.

Stochastic port-Hamiltonian model on Lie groups

A learned diffusion term models stochastic forcing such as wind separately from measurement noise and from uncertainty in the learned physics.

Lie-IMEX integrator

Exponential-map updates keep rotations exactly on the group. The learned damping is treated implicitly, which is unconditionally stable for the frozen linear damping step even when the learned damping is stiff.

GP subnetworks + Lie-group EKF

Matérn random-Fourier-feature GPs with a variational weight posterior. They are trained jointly through a differentiable extended Kalman filter that accounts for both process and observation noise.

From learned physics to control

Control loop: the frozen learned subnetworks feed an IDA-PBC controller with energy shaping and damping injection, which drives the 3D pendulum or quadrotor plant.
Model-based control. The frozen subnetworks are plugged into an IDA-PBC controller: energy shaping uses the learned $M^{-1}$, $V$ and $G$, and damping injection drives the system to the target. The same learned model serves a 3D pendulum swing-up on $SO(3)$ and quadrotor trajectory tracking on $SE(3)$.
SO(3) · simulated

Windy 3D pendulum

A rigid 3D pendulum on $SO(3)$ is pushed by stochastic wind, and its states are observed with noise. LieSPHGP is the most accurate model on every accuracy, probabilistic and identification metric, in every seed. Both Lie-IMEX models keep $SO(3)$ at round-off level.

3D windy rigid-body pendulum: pivot, rod and bob with gravity, control, dissipation and wind forces, and the roll, pitch and yaw rotations.
Open-loop roll, pitch and yaw over 10 seconds for the true SDE, LieSPHGP, Lie-PH-NN-SDE and PH-NODE.
Open-loop prediction. Roll, pitch and yaw predicted over $10$ s from the true initial state using the recorded inputs. Lines show the mean of $32$ sampled paths, and shading shows $\pm1\sigma$ and $\pm2\sigma$. The trajectory shown is the held-out one with the largest gap between Lie-PH-NN-SDE and LieSPHGP ($37.0^\circ$ vs. $11.5^\circ$ mean rotation error).

Swing-up with the learned model

Each learned model is plugged into the same IDA-PBC controller, which must swing the 3D pendulum from a random attitude up to the upright position and hold it there in the wind (25 flights: 5 start attitudes × 5 wind samples). A flight succeeds if the pendulum stays within $10^\circ$ of upright over the last 2 s of the 10 s run. Lowering the gain scale $s$ weakens the feedback, so the controller relies more on the learned model.

Swing-up success rate (mean over 5 training seeds)
normal gains ($s=1$)low gains ($s=0.25$)
True model (ground truth)100 %84 %
LieSPHGP (ours)100 %78 %
PH-NODE31 %0 %

At normal gains, LieSPHGP ends $0.027$ rad from upright, almost the same as the true model's $0.024$ rad.

Angle to upright over 10 seconds for the IDA-PBC swing-up at normal and low gains.
Closed-loop IDA-PBC swing-up. Each model supplies its learned subnetworks to the same controller. LieSPHGP (orange) follows the controller built from the true model (green). A smaller gain scale $s$ makes the controller rely more on the learned model, and differences that are modest in open-loop prediction become decisive for control. The success counts in the legend are for one training seed (seed 0); the table above averages 5 seeds.
SE(3) · simulated (PyBullet)

Quadrotor in stochastic wind

A Crazyflie-type quadrotor in PyBullet with stochastic wind. Each learned model drives the same geometric tracking controller with an IDA-PBC attitude loop, whose commands go to the four rotors of the true plant. The models fly $10$ held-out $10$ s reference paths, each with $5$ wind samples.

Quadrotor body frame, rotor forces and wind disturbance.
Closed-loop tracking (mean over 3 training seeds)
position RMSE (m)velocity RMSE (m/s)valid tracking time (s)
True model (ground truth)0.1270.464—
LieSPHGP (ours)0.1330.4859.22
PH-NODE0.2510.8568.39

Valid tracking time: how long the flight stays close to the true-model controller's flight in the same wind (at most $10$ s).

3-D tracking trajectories for two held-out flights: LieSPHGP, PH-NODE and the true model.
Closed-loop tracking. Two of the ten held-out $10$ s flights (A and B). Thin lines are individual wind samples, thick lines their mean, and the dashed line is the reference. LieSPHGP (orange) tracks close to the controller that uses the true dynamics (green), while PH-NODE (purple) deviates during turns. Panel RMSEs are for one training seed and one reference; the table above averages 3 seeds and all references.
SE(3) · real data

BlueROV2 underwater vehicle

Real BlueROV2 Heavy recordings from the Marinarium dataset, with a pilot in the loop. The physics baseline is given the vehicle's published mass, added mass, damping, restoring forces and thruster map. LieSPHGP learns $M^{-1}$, $V$, $D$ and $G$ from the recorded trajectories alone.

BlueROV2 body frame and thrusters in water.
Prediction on held-out real recordings (LieSPHGP: mean over 2 training seeds)
state RMSE after 0.2 sstate RMSE after 2 svalid prediction time (s)
Physics (published parameters)0.1280.3011.62
Koopman (EDMDc)0.1260.2590.81
LieSPHGP (ours)0.1050.2521.98

State RMSE: error over all 12 state variables (position, Euler angles, linear and angular velocity), predicted from each test sample with the recorded thruster commands. Valid prediction time: how long the position error stays below $0.1$ m (mean over $15$ held-out $10$ s segments). Lower RMSE and longer valid time are better.

Predicted x, y, z and position error on a held-out BlueROV2 test segment.
Open-loop prediction on a held-out test segment. Positions $x$, $y$, $z$ (positive downward) and position error, using the recorded thruster commands and the measured initial state. Dotted lines mark the valid prediction time. LieSPHGP shows the mean of $32$ sampled paths with a $\pm2\sigma$ band. The segment shown has the median LieSPHGP valid prediction time among the $15$ test segments.

Explore the results

Replay the paper's runs in your browser: a 3-D view of the 3D pendulum swing-up and open loop and of the quadrotor tracking flights, with live error, energy and $SO(3)$ plots for every flight and wind seed.

Open the interactive explorer →
Preview of the interactive results explorer.

BibTeX

@misc{rapolu2026liesphgp,
  title         = {Stochastic Port-Hamiltonian Gaussian Processes for Learning from Noisy Dynamics on Lie Groups},
  author        = {Rapolu, Thribhuvan and McLennan, Luke and Bajaj, Chandrajit},
  year          = {2026},
  eprint        = {XXXX.XXXXX},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG}
}