In the world of robotics, "fixed dynamics" is a convenient lie. We often train models assuming gravity, friction, and mass are constants. But in reality, a robot playing table tennis might switch to a heavier paddle, or a delivery drone might face varying wind speeds and payload weights. Standard Recurrent State Space Models (RSSMs) struggle in these scenarios because they attempt to find one "average" law of physics to rule them all.
A new paper from ICLR 2022, "Hidden Parameter Recurrent State Space Models For Changing Dynamics Scenarios," introduces a framework called HiP-RSSM. It allows models to adapt on the fly by treating changing physical properties as hidden latent variables inferred from recent experience.
The Problem with "One-Size-Fits-All" Dynamics
Most state-of-the-art dynamics models assume the environment is stationary. While deep recurrent models like RSSMs are excellent at handling noise and high-dimensional inputs (like images), they are fundamentally rigid.
If a robot encounters a scenario it hasn't seen exactly—say, walking on a 10-degree slope instead of a flat floor—a standard RSSM will produce systematic errors. Existing solutions like Meta-Learning (e.g., MAML) attempt to fix this by performing gradient descent at test time. However, this is computationally heavy and often unstable for high-frequency robotic control. The authors sought a way to achieve "episodic adaptation": identifying the specific "flavor" of the current dynamics quickly and using it to sharpen predictions without expensive test-time training.
Introducing HiP-RSSM
The core innovation is the Hidden Parameter SSM (HiP-SSM). It treats the system dynamics as a function of both the current state $z_t$ and a hidden task variable $l$.
The framework operates through a few key mechanisms:
- Contextual Inference: The model maintains a "context set" of the last $N$ interactions (observations and actions). A permutation-invariant encoder processes this set to produce a Gaussian distribution over the latent task variable $l$.
- Gaussian Graphical Model: Unlike many deep learning models that rely on complex Variational Inference (VI), HiP-RSSM stays within a Gaussian framework. This allows for closed-form, differentiable updates that resemble a traditional Kalman Filter.
- Task-Conditioned Transitions: The transition model is no longer global. Instead, the inferred task mean $\mu_l$ and variance $\sigma_l$ are fed into the transition function, effectively "tuning" the physics engine to the current environment.
- Efficiency: By using a factorized covariance structure, the authors reduced the computational complexity of the observation update from $O(L^3)$ to $O(L)$, making it fast enough for real-time robotics.
Key Insights and Performance
The authors evaluated HiP-RSSM on three distinct benchmarks: a real-world Pneumatic Muscular Arm, a real-world Franka Emika Panda manipulator handling unseen loads, and a simulated Wheeled Mobile Robot traversing varying slopes.
Physics as a Latent Variable
The most striking insight is that the model learns to represent physical properties (like mass or slope) in its latent space $l$ without ever being explicitly supervised on those properties. Visualizations showed that $l$ naturally clusters by physical parameters (e.g., all "heavy load" scenarios grouped together). This suggests that simply "recognizing" the current context via a latent variable is often more effective than trying to "re-learn" weights via gradients like MAML.
Robustness and Accuracy
HiP-RSSM consistently outperformed LSTMs, GRUs, standard RSSMs (like RKN), and Neural Processes (NPs).
- Unseen Scenarios: On the Franka robot arm with unseen loads, HiP-RSSM achieved a Root Mean Square Error (RMSE) of 2.833, compared to 3.392 for the next best recurrent model (RKN).
- Mobile Robot: In the changing slope simulation, HiP-RSSM's error was nearly 3x lower than standard LSTMs and GRUs.
- Missing Data: Because it is built on a probabilistic State Space Model, HiP-RSSM is remarkably resilient to partial observability.
As seen in the Mobile Robot benchmark, when 50% of observations were missing, HiP-RSSM maintained high accuracy while standard RNNs degraded significantly. The model also showed superior performance in long-term forecasting (up to 50 steps ahead), which is critical for model-predictive control (MPC).
Limitations and Future Work
The primary limitation of HiP-RSSM is its quasi-static assumption: the model assumes the hidden parameter $l$ is fixed for the duration of a local trajectory segment. If the dynamics change abruptly during that segment (e.g., a robot suddenly drops a heavy object), the current inference scheme might lag.
However, the framework is a natural fit for Partially Observable Markov Decision Processes (HiP-POMDPs). Future work involves integrating these models into full reinforcement learning loops, allowing agents to use their understanding of "hidden parameters" to plan more sophisticated, adaptive behaviors in ever-changing real-world environments.
Summary updated