Learning Hybrid Dynamics Models with Simulator-Informed Latent States

Katharina Ensinger, Sebastian Ziesche, Sebastian Trimpe

Introduction

Predicting the evolution of complex physical systems—ranging from robotic actuators to climate patterns—remains a fundamental challenge in engineering and science. Traditionally, researchers have relied on two distinct paradigms: data-driven models (e.g., Recurrent Neural Networks) and physics-based simulators. While RNNs excel at capturing complex patterns from noisy data, they often produce "unphysical" predictions and suffer from accumulating errors that lead to long-term drift. Conversely, physics-based simulators are physically consistent but frequently inaccurate due to simplified assumptions or incomplete knowledge of real-world parameters.

Hybrid Modeling (HM) aims to bridge this gap. However, most existing hybrid methods require "grey-box" access to a simulator's internal equations. This paper introduces KKL-RNN, a hybrid dynamics model designed to work with "black-box" simulators. By utilizing observers from control theory, the model constantly corrects its latent states based on simulator outputs, preventing the long-term drift common in pure machine learning approaches.

Methodology

The core innovation of the Hybrid KKL-RNN is the integration of a Kazantzis–Kravaris/Luenberger (KKL) observer to link the simulator to the neural network's internal representation.

The KKL-RNN architecture, featuring the KKL observer for simulator-informed latent state correction and an RNN for residual dynamics.

Latent State Splitting and Correction

The model architecture divides its internal memory (latent states) into two functional components:

  1. Observable via Simulator (OVS): These states ($u_n$) are reconstructed and corrected by the KKL observer using the simulator's output. This ensures that the primary dynamics remain physically grounded.
  2. Non-OVS: A residual component ($v_n$) handled by a standard RNN (such as a GRU) captures dynamics the simulator misses, such as transient friction or unmodeled external forces.

Instead of simply adding simulator outputs to the RNN's final prediction, the KKL observer corrects the latent states themselves. By fixing the "root" of the prediction, the model stops error accumulation before it propagates. A trainable transformation ($T^*$) is used to learn the mapping between the simulator's output space and the model's latent space, ensuring the latent states remain physically informed even when the exact relationship is unknown.

Experimental Setup

The KKL-RNN was evaluated across four distinct systems to test various aspects of dynamics modeling:

  • Damped Oscillations: A synthetic system used to test the ability to separate permanent physical dynamics from transient ones.
  • Double-Torsion Pendulum: A real-world mechanical system used to evaluate performance on noisy sensor data.
  • Drill-String System: An engineering benchmark for torsional vibrations in oil drills, used to test robustness against missing simulator data.
  • Van-der-Pol Oscillator: A scenario where a simple sine wave substitute acts as the simulator, testing the architecture's utility when high-fidelity physics engines are unavailable.

Results and Analysis

The KKL-RNN consistently outperformed standard GRUs and simple residual hybrid models across all tasks. In the Double-Torsion Pendulum task, the KKL-RNN achieved an RMSE of 0.24, significantly lower than the standard GRU (1.39) and a baseline Hybrid GRU (0.51) that received simulator data as a direct input.

Time-series prediction results showing the decomposition into simulator-informed (OVS) and residual (non-OVS) components compared to ground truth.

As shown in the rollout analysis, the KKL-RNN maintains long-term stability and synchronization with the ground truth, whereas standard models exhibit visible drift. The model effectively decomposes the signal into a simulator-predicted component and a non-OVS residuum that accounts for unmodeled effects. Furthermore, in the Drill-String experiment, the model maintained high accuracy even when 500 time steps of simulator data were randomly removed, demonstrating its ability to "buffer" physical knowledge and fill in gaps when the black-box tool is intermittent.

Conclusion

The KKL-RNN framework demonstrates that high-performing hybrid models do not require access to a simulator's source code or gradients; they only require its output trajectories. By forcing a portion of the latent space to be explainable by the simulator, the model is naturally regularized against unphysical behaviors. Future work will focus on extending this framework to stochastic systems and exploring more complex, partially observable environments where the mapping between states and measurements is further obscured.

Summary updated

BibTeX
@inproceedings{ensinger2024learning,
  author = {Katharina Ensinger and Sebastian Ziesche and Sebastian Trimpe},
  title = {{Learning Hybrid Dynamics Models with Simulator-Informed Latent States}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i11.29075},
}
Figure