Learning deep dynamical models from image pixels

Niklas Wahlström, Thomas B. Schön, Marc Peter Deisenroth

This 2014 paper from Wahlström, Schön, and Deisenroth represents an early and influential bridge between the worlds of classical system identification and modern deep learning. It tackles a fundamental question: How can we learn the underlying "physics" of a system when our only window into that system is a stream of high-dimensional images?

TL;DR

The authors propose a method to learn non-linear dynamical models directly from raw pixel data by jointly training a deep auto-encoder and a predictive transition model. By forcing the latent representation to be both reconstructible and predictable, the model "discovers" the low-dimensional manifold of the system's physics, significantly outperforming models where representation and dynamics are learned separately.

What Problem Does This Paper Address?

In engineering and robotics, "system identification" is the process of building mathematical models of a system's behavior from data. If you have a linear system with a few sensors, this is a solved problem. However, real-world systems are often non-linear and observed through high-dimensional sensors like cameras.

Trying to model dynamics directly in "pixel space" is a nightmare due to the curse of dimensionality—there are simply too many variables and too much noise. The standard workaround is to first compress the images into a low-dimensional "feature space" and then learn the dynamics there. The challenge is that a feature space optimized for image compression (like a standard auto-encoder) isn't necessarily optimized for predicting the future. This paper addresses the gap between representation learning and dynamical modeling.

Methods

The authors combine two neural network architectures into a single framework:

  1. Deep Auto-encoder: An encoder ($g^{-1}$) maps a high-dimensional image ($y$) to a low-dimensional feature vector ($z$). A decoder ($g$) maps it back to reconstruct the image.
  2. NARX Predictor: A Nonlinear AutoRegressive eXogenous model ($l$) is a neural network that predicts the next feature ($z_{t+1}$) based on a window of past features and control inputs ($u$).

The "secret sauce" is Joint Training. Instead of training the auto-encoder first and then fitting a model to its features, the authors minimize a combined cost function: $$\text{Total Loss} = \text{Reconstruction Error} + \text{Prediction Error}$$

By training everything at once via backpropagation, the encoder is forced to find features that are not just good for drawing the current frame, but are also "predictable" according to the laws of the system's dynamics.

Datasets

The authors evaluated their approach on two simulated datasets designed to mimic physical systems:

  • Pendulum in a Plane: 400 frames of a 1-link robot arm ($51 \times 51$ pixels). The system is controlled by torque. While the pixels are high-dimensional, the underlying physics is defined by a single angle.
  • Moving Tile: 601 frames of a tile moving in a 2D plane ($51 \times 51$ pixels). The control inputs are velocity increments in the X and Y directions.

To speed up training, they used PCA to reduce the initial $2,601$ pixels down to $50$ dimensions before feeding them into the deep auto-encoder.

Key Insights and Ideas

  • Dynamics-Aware Embeddings: The most striking insight is that joint training changes the geometry of the latent space. In the pendulum experiment, joint training forced the 2D latent features to arrange themselves in a perfect circle—recovering the cyclic nature of the pendulum's angle—even though the model was never told the system was a pendulum.
  • The Failure of Sequential Training: When the auto-encoder is trained alone, it finds features that represent the image well but are scattered "randomly" in latent space relative to time. This makes it nearly impossible for a transition model to learn a coherent path through that space.
  • Context is King: By including the prediction error, the model uses "future" information to decide how to represent the "present." This temporal context acts as a powerful regularizer.

Key Results

  • Prediction Quality: In the pendulum task, joint training achieved a significantly better "Fit" (a measure of prediction accuracy) across long horizons compared to separate training.
  • Visual Coherence: Qualitatively, the model could "imagine" the future of the system for many steps. While separate training resulted in blurry, physically nonsensical images after just one or two steps, the joint model produced clear, accurate frames of the pendulum's trajectory.
  • Superiority over Linear Methods: The approach outperformed standard linear subspace identification, proving that the non-linear embedding captured features that linear models simply couldn't see.

Limitations and Future Work

  • Manual Architecture Design: The user still needs to manually choose the dimensionality of the latent state and the depth of the networks, which requires prior knowledge of the system's complexity.
  • Deterministic Nature: The model is deterministic. In real-world scenarios with high noise or stochasticity, a probabilistic approach (like a Variational Auto-Encoder or Sequential Monte Carlo) would be more robust.
  • Clean Data: The experiments were conducted on clean, simulated data. The authors acknowledge that real-world video with complex backgrounds and lighting would likely require more advanced architectures, such as Convolutional Neural Networks (CNNs).
  • Closing the Loop: The paper focuses on modeling (prediction), but the ultimate goal is control. The authors suggest that these learned models could eventually be used for reinforcement learning or model-predictive control.

Summary updated

BibTeX
@inproceedings{wahlstrom2015learning,
  author = {Niklas Wahlström and Thomas B. Schön and Marc Peter Deisenroth},
  title = {{Learning deep dynamical models from image pixels}},
  booktitle = {IFAC-PapersOnLine},
  year = {2015},
  doi = {10.1016/j.ifacol.2015.12.271},
}
Figure