Example-Driven Model-Based Reinforcement Learning for Solving Long-Horizon Visuomotor Tasks

Bohan Wu, Suraj Nair, Li Fei-Fei, Chelsea Finn

Abstract

In this paper, we study the problem of learning a repertoire of low-level skills from raw images that can be sequenced to complete long-horizon visuomotor tasks. Reinforcement learning (RL) is a promising approach for acquiring short-horizon skills autonomously. However, the focus of RL algorithms has largely been on the success of those individual skills, more so than learning and grounding a large repertoire of skills that can be sequenced to complete extended multi-stage tasks. The latter demands robustness and persistence, as errors in skills can compound over time, and may require the robot to have a number of primitive skills in its repertoire, rather than just one. To this end, we introduce EMBR, a model-based RL method for learning primitive skills that are suitable for completing long-horizon visuomotor tasks. EMBR learns and plans using a learned model, critic, and success classifier, where the success classifier serves both as a reward function for RL and as a grounding mechanism to continuously detect if the robot should retry a skill when unsuccessful or under perturbations. Further, the learned model is task-agnostic and trained using data from all skills, enabling the robot to efficiently learn a number of distinct primitives. These visuomotor primitive skills and their associated pre- and post-conditions can then be directly combined with off-the-shelf symbolic planners to complete long-horizon tasks. On a Franka Emika robot arm, we find that EMBR enables the robot to complete three long-horizon visuomotor tasks at 85% success rate, such as organizing an office desk, a file cabinet, and drawers, which require sequencing up to 12 skills, involve 14 unique learned primitives, and demand generalization to novel objects.

Introduction

Modern robotics has seen significant progress in mastering short-duration, single-stage tasks such as picking up an object. However, "long-horizon" tasks—those requiring the sequencing of numerous distinct actions over extended periods—remain a formidable challenge. Completing a task like organizing a desk involves a chain of dependencies where a single failure in an early step (e.g., dropping a tool) typically leads to the failure of the entire sequence.

Two primary hurdles prevent the widespread adoption of reinforcement learning (RL) for these complex scenarios. First is the issue of robustness: robots must be able to autonomously detect failures and retry skills. Second is specification and grounding: manually defining reward functions for a vast library of skills is impractical. Furthermore, the robot needs to translate raw visual observations into symbolic states (e.g., "is the drawer open?") that a high-level planner can understand.

We present EMBR (Example-Driven Model-Based Reinforcement Learning), a framework designed to master a repertoire of low-level skills using minimal human supervision—specifically, a few "success" images—and sequence them effectively to solve long-horizon tasks.

Methods: The EMBR Framework

EMBR learns primitive skills without manual reward engineering or expert demonstrations. The architecture integrates a latent dynamics model with example-driven classifiers to bridge the gap between low-level control and high-level planning.

The EMBR architecture: A VAE and dynamics model are trained on all data, while success classifiers and Q-functions are skill-specific.

Latent Dynamics and Example-Driven Rewards

To process high-dimensional 64x64 images efficiently, EMBR employs a Variational Autoencoder (VAE) to compress visual input into a low-dimensional latent space. A dynamics model ($f_T$) is then trained to predict future latent states based on actions. This model is task-agnostic, benefiting from data collected across all skills, which significantly improves data efficiency.

Instead of hand-coded rewards, EMBR utilizes Example-Driven Classifiers. A human provides 100-200 images representing the successful completion of a skill. A binary classifier ($f_R$) is trained to distinguish these success states from the robot's own observations during exploration. These classifiers serve a dual purpose: they provide the reward signal for RL and act as "grounding" mechanisms for a symbolic planner (PDDL), ensuring the planner's world model is aligned with the robot's actual capabilities.

Hybrid Planning and Execution

At the low level, the robot uses Model Predictive Control (MPC) in the latent space, augmented by a learned Q-function, to execute individual skills. This allows for real-time, reactive control. At the high level, a symbolic planner sequences these skills. Because the success classifiers run continuously, the system can detect mid-execution failures and automatically trigger retries, creating a closed-loop system robust to perturbations.

Experimental Evaluation

The system was evaluated using a Franka Emika Panda robot arm equipped with five RGB cameras. The robot's repertoire included 14 unique primitive skills, trained using approximately 16 hours of robot time per skill (300-400 trajectories).

Long-Horizon Task Performance

EMBR was tested on three complex tasks: Organize Desk and Cabinet, Organize Markers, and Rearrange Objects. These tasks required sequencing up to 12 skills over more than 250 timesteps.

A sequence showing the robot completing a long-horizon task: putting three different objects into their respective containers.

EMBR achieved an overall 85% success rate, significantly outperforming baselines such as Qt-Opt (model-free RL) and BEE (classifier-based without latent dynamics). The system demonstrated particular strength in high-precision tasks, such as inserting markers into small holders, and showed remarkable robustness by recovering from physical perturbations or failed grasp attempts.

Generalization to Novel Objects

To assess the flexibility of the learned representations, the researchers tested the robot on a set of novel objects never seen during the training of the primitive skills. The robot successfully generalized its skills to these new items, indicating that the latent dynamics and success classifiers captured fundamental physical properties rather than just specific object appearances.

Conclusion and Future Work

EMBR demonstrates that combining example-driven model-based RL with symbolic planning provides a robust path toward solving long-horizon visuomotor tasks. By using success classifiers as a common interface for both learning and planning, the system achieves high reliability and autonomous error recovery.

Current limitations include the spatial specificity of certain skills (e.g., being tied to a specific drawer location) and the continued requirement for human-provided success images. Future research will explore scaling these skills to more diverse environments and reducing supervision requirements by learning from unlabelled video data.

Summary updated

BibTeX
@inproceedings{wu2021example,
  author = {Bohan Wu and Suraj Nair and Li Fei-Fei and Chelsea Finn},
  title = {{Example-Driven Model-Based Reinforcement Learning for Solving Long-Horizon Visuomotor Tasks}},
  booktitle = {CoRL},
  year = {2021},
  url = {https://openreview.net/forum?id=_daq0uh6yXr},
}
Figure