Subtask-Aware Visual Reward Learning from Segmented Demonstrations

Changyeon Kim, Minho Heo, Doohyun Lee, Honglak Lee, Jinwoo Shin, Joseph J Lim, Kimin Lee

Introduction

Reinforcement Learning (RL) has demonstrated significant potential in solving complex robotic control problems. However, the efficacy of RL is fundamentally constrained by the quality of the reward function. In practical applications, "reward engineering"—the manual design of reward functions—is often prohibitively difficult, requiring specialized sensors, motion trackers, or precise object coordinates. While learning rewards from visual demonstrations offers a scalable alternative, existing video-to-reward methods frequently struggle with long-horizon tasks. These tasks, such as multi-step furniture assembly, require an agent to navigate through a sequence of intermediate states where visual cues may be subtle or ambiguous.

To address these challenges, we present REDS (REward learning from Demonstration with Segmentations), a novel framework designed to learn dense, subtask-aware reward functions from action-free video demonstrations.

The REDS Framework

REDS shifts the focus from global goal-reaching to a structured, subtask-centric approach. The framework is built upon several key technical pillars:

Subtask-Aware Learning

REDS utilizes expert videos where frames are annotated with discrete subtask labels (e.g., "reach," "grasp," "lift"). By treating a complex task as a sequence of these segments, the model provides a more granular and informative reward signal than binary success indicators.

Policy-Invariant Comparison (EPIC)

A core innovation in REDS is the use of the Equivalent Policy Invariant Comparison (EPIC) distance as a training objective. Rather than performing simple regression to match reward values, REDS is optimized to ensure that the learned reward function induces the same optimal policy as the ground-truth subtask sequence. This provides a theoretical guarantee that the agent's learned behavior will align with the expert's intent.

Temporal Modeling with Causal Transformers

Long-horizon tasks often involve states that look visually similar but occur at different stages of the process. REDS employs a Causal Transformer architecture to process sequences of video frames. This allows the reward function to incorporate temporal history, enabling the agent to distinguish between identical-looking states based on prior actions and progress.

Contrastive Alignment and Fine-tuning

To facilitate online interaction where labels are unavailable, REDS uses a contrastive learning objective to align visual representations with text-based subtask embeddings (leveraging CLIP). Furthermore, the model undergoes iterative fine-tuning using the agent's own "suboptimal" data—failed attempts that help the reward function become robust to common errors.

Experimental Evaluation

The performance of REDS was evaluated across three diverse benchmarks:

  1. Meta-World: A suite of 8 robotic manipulation tasks, including "Faucet Close" and "Peg Insert."
  2. FurnitureBench: A high-complexity environment requiring the assembly of furniture (specifically the "One Leg" task), tested in both simulation and real-world settings.
  3. RLBench: A benchmark used to assess the model's ability to generalize across different robotic embodiments.

Key Results and Insights

REDS demonstrates significant improvements over state-of-the-art baselines such as VIPER and Rank2Reward.

  • Efficiency and Performance: In Meta-World environments, REDS not only outperformed existing video-to-reward methods but also surpassed "oracle" rewards—hand-engineered functions with access to ground-truth state information.
  • Solving Long-Horizon Assembly: On the challenging FurnitureBench "One Leg" task, REDS achieved a subtask completion score of 2.45, nearly doubling the 1.25 score achieved by the strongest baseline, VIPER. This indicates that REDS successfully guides agents through difficult phases like part insertion and screwing.
  • Cross-Embodiment and Zero-Shot Generalization: By utilizing visual-textual alignment, REDS exhibits remarkable transferability. A reward model trained on a Franka Panda robot can effectively guide a Sawyer arm. Additionally, the model can provide rewards for unseen tasks (e.g., "Window Close") by leveraging its understanding of related subtasks (e.g., "Door Close").

Conclusion and Future Work

REDS provides a robust framework for learning dense rewards in complex, multi-step robotic tasks. By leveraging subtask segmentations and prioritizing policy invariance through the EPIC loss, it bridges the gap between high-level task descriptions and low-level control.

While highly effective, the model currently assumes prior knowledge of subtask sequences. Future research directions include the integration of Multimodal Large Language Models (MLLMs) to automatically define and segment subtasks from raw video, as well as improving visual robustness to extreme changes in camera angles or backgrounds.

Summary updated

BibTeX
@inproceedings{kim2025subtask,
  author = {Changyeon Kim and Minho Heo and Doohyun Lee and Honglak Lee and Jinwoo Shin and Joseph J Lim and Kimin Lee},
  title = {{Subtask-Aware Visual Reward Learning from Segmented Demonstrations}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=mqKVe6F3Up},
}
Figure