From Pixels to Torques: Policy Learning with Deep Dynamical Models

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

Abstract

Learning to control physical systems directly from high-dimensional visual data—the "pixels to torques" problem—remains a significant challenge in robotics. Traditional model-free reinforcement learning requires prohibitive amounts of data, while model-based approaches often struggle to extract controllable features from raw images. This paper introduces a Deep Dynamical Model (DDM) that jointly learns a low-dimensional latent representation and a predictive dynamics model. By optimizing for both image reconstruction and temporal prediction, the DDM creates a dynamics-aware latent space that enables efficient control via Model Predictive Control (MPC). Experimental results on a pendulum swing-up task demonstrate that the proposed method can achieve a 90% success rate in just 15 trials, significantly outperforming standard dimensionality reduction techniques.

Introduction

The goal of "pixels to torques" is to enable an agent to perform complex tasks using only raw camera frames, without prior knowledge of the system's state (e.g., joint angles). While model-based reinforcement learning (RL) offers high data efficiency by learning a "world model," applying it to high-dimensional visual input is difficult. This work addresses the gap by learning a compact, structured representation of the environment that is specifically optimized for predicting future states and executing control.

Methodology

The core of the proposed approach is the Deep Dynamical Model (DDM), which consists of a deep autoencoder and a predictive dynamics model. The autoencoder's encoder ($g^{-1}$) compresses an image $y_t$ into a low-dimensional feature vector $z_t$, while the decoder ($g$) reconstructs the image from the feature. Simultaneously, a predictive model ($f$) learns to transition between these latent features based on control inputs $u_t$.

The DDM pipeline: An image is encoded into a latent feature, evolved through a prediction model, and decoded back into image space.

A critical innovation is the joint training of these components. Rather than training the autoencoder in isolation, the loss function combines reconstruction error with prediction error. This ensures that the latent space $z$ preserves only the information necessary for both visual fidelity and accurate dynamics modeling, effectively filtering out task-irrelevant visual noise. For control, the agent employs Model Predictive Control (MPC), using the DDM to simulate potential action sequences and selecting the one that minimizes the distance to a target state in the latent space.

Experiments and Results

The DDM was evaluated on a simulated pendulum swing-up task using $51 \times 51$ grayscale images. The system demonstrated remarkable data efficiency, solving the task in approximately 15 trials (1,500 frames). In contrast, model-free methods typically require thousands or millions of interactions.

Key Insights

  • Dynamics-Aware Latent Spaces: Joint training forces the model to organize features into a structured manifold. As shown in the latent space visualization, the model naturally discovers the underlying topology of the system (such as the circular manifold of a pendulum's angle) without explicit supervision.
Visualization of the learned 2D latent space showing how joint training organizes features into a meaningful manifold.
  • Reconstruction vs. Control: The authors found that features optimized solely for reconstruction (e.g., via PCA or independent autoencoders) often fail to capture the subtle dynamics required for precise control. The "dynamics-aware" constraint is essential for bridging perception and action.

Conclusion and Future Work

The DDM provides a robust framework for learning control policies from pixels with high data efficiency. While successful in synthetic environments, future work will focus on handling real-world visual complexities, such as occlusions and lighting changes, and incorporating more sophisticated exploration strategies to further improve robustness.

Summary updated

BibTeX
@misc{wahlstrom2015from,
  author = {Niklas Wahlström and Thomas B. Schön and Marc Peter Deisenroth},
  title = {{From Pixels to Torques: Policy Learning with Deep Dynamical Models}},
  year = {2015},
  eprint = {1502.02251},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1502.02251},
}
Figure