This paper by Nikhil Mishra, Pieter Abbeel, and Igor Mordatch introduces a fundamental shift in how we approach robot dynamics: moving from predicting the immediate next step to predicting entire "temporal segments" of behavior.
Instead of predicting the next state one frame at a time, this method uses deep generative models—specifically Conditional Variational Autoencoders (CVAEs)—to predict entire trajectories of future states. By modeling dynamics over temporal segments and utilizing a "latent action prior," the authors achieve more stable long-horizon predictions and significantly more sample-efficient control than traditional model-free or one-step methods.
The Problem with One-Step Models
In model-based reinforcement learning, an agent learns a "dynamics model" to simulate how its actions affect the environment. Traditionally, these are one-step models: given the current state and action, they predict the immediate next state. However, one-step models suffer from three major issues:
- Compounding Errors: Small errors in a single step accumulate rapidly when rolling out the model into the future, leading to divergent, unrealistic trajectories.
- Stochasticity and Discontinuity: Events like collisions or sensory noise are hard to capture at a single-timestep level. A single frame often lacks enough information to resolve the physics of a sudden impact.
- Model Exploitation: During planning, an optimizer might find unusual action sequences that the model thinks will result in high rewards, but only because the model is making wild guesses in unexplored regions of the state space.
Temporal Segment Models (TSMs)
To overcome these limitations, the authors propose Temporal Segment Models (TSMs). Instead of modeling $x_{t+1} = f(x_t, u_t)$, they model the conditional distribution of a future segment of states $X^+$ given a history of past states $X^-$, past actions $U^-$, and planned future actions $U^+$.
Key Technical Components
- Conditional Variational Autoencoder (CVAE): The model uses a latent variable $Z$ to capture the underlying uncertainty of the future trajectory. This allows the model to represent multiple possible outcomes (e.g., a ball bouncing left or right after a collision).
- Dilated Causal Convolutions: Borrowing from architectures like WaveNet, the decoder uses 1D dilated convolutions. This grants the model a large receptive field to look far back into the past without the vanishing gradient problems common in RNNs or LSTMs.
- Latent Action Prior: To prevent model exploitation, the authors train a second CVAE specifically on action sequences. During planning, the agent optimizes over the latent space of this action prior. This ensures the agent only considers action sequences that resemble "natural" behavior seen during training.
- Differentiable Planning: Because the entire model is a neural network, the agent can use backpropagation to calculate exactly how to adjust its actions to maximize reward, making trajectory optimization highly efficient.
Key Insights and Results
The authors evaluated their method using modified versions of the OpenAI Gym Reacher environment, introducing challenges like obstacles, pushable objects, sensory noise, and action delays.
By predicting a segment (e.g., 10 timesteps at once), the model can be "holistically" correct about a collision even if it slightly misses the exact frame of impact. This makes it much more robust than LSTMs, which struggle with discontinuities. Furthermore, operating over segments allows the model to implicitly filter out sensory noise, removing the need for hand-tuned Kalman filters.
The results demonstrate several key advantages:
- Superior Prediction: In environments with collisions, TSMs achieved significantly higher log-likelihoods than LSTMs or one-step models. LSTMs saw performance degrade sharply when faced with the sudden changes of a collision.
- Better Control: In the Pushing task, TSMs with a latent action prior achieved the highest rewards and the lowest "discrepancy" (the gap between predicted and actual outcomes). The latent action prior acts as a crucial regularizer, forcing the optimizer to stay within the manifold of valid dynamics.
- Sample Efficiency and Robustness: TSMs learned effective policies much faster than model-free policy gradient methods. They were also the only models able to maintain high performance in the face of 5-step action delays and heavy sensory noise.
Limitations and Future Work
While highly effective for a 2-DOF arm, the paper relies on random actions for data collection. In more complex environments, a sophisticated active learning strategy would be needed for adequate state space coverage. Additionally, while the convolutional architecture is theoretically well-suited for high-dimensional inputs like raw pixels, this scaling was not explicitly explored. Finally, hyperparameters like segment length and latent dimension were found empirically; developing a principled way to choose these based on the physical time scales involved remains an open question.
Summary updated