Abstract
Reinforcement learning (RL) often requires dense reward functions that are difficult to engineer manually. We present TimeRewarder, a method that learns these rewards from passive expert videos by predicting the temporal distance between frames. By framing task progress as temporal distance, TimeRewarder provides fine-grained feedback for complex manipulation tasks. Our approach utilizes frame-wise temporal distance prediction, implicit negative sampling, and 2-hot discretization to produce stable, informative reward signals. Evaluated on Meta-World and cross-domain human videos, TimeRewarder achieves high success rates and outperforms manually designed rewards, demonstrating strong generalization from human to robot embodiments.
Introduction
Reinforcement learning is notoriously "reward-hungry." To learn efficiently, a robot needs a dense reward—a constant stream of feedback at every step. However, designing these functions manually is a complex process of trial and error, often requiring expert knowledge and access to internal simulator states that are unavailable in real-world settings.
An alternative is learning from passive videos (e.g., YouTube or expert demonstrations), which are abundant but lack action labels or explicit rewards. Previous attempts to extract rewards from these videos often struggle with "reward hacking," instability, or an inability to distinguish between meaningful progress and unproductive "near-success" behaviors.
Methodology
The core philosophy of TimeRewarder is that task progress is equivalent to temporal distance. If a robot knows how much "time" (in terms of steps) separates its current state from a successful state, it has a built-in compass for the task.
Technical Innovations
- Frame-wise Temporal Distance: Instead of binary classification (before/after), the model ($F_\theta$) predicts the normalized distance between any two frames $(o_u, o_v)$.
- Implicit Negative Sampling: The model is trained on both forward-moving pairs (positive distance) and backward-moving pairs (negative distance). This teaches the agent to penalize "regressive" actions that move away from the goal.
- Exponentially Weighted Pair Sampling: Training samples nearby frames more frequently to provide the high resolution needed for precise interactions, such as grasping small objects.
- Two-hot Discretization: The model predicts a distribution over "distance bins" rather than simple regression, leading to sharper and more reliable reward signals.
Experiments and Datasets
The researchers evaluated TimeRewarder on two primary benchmarks:
- Meta-World: A suite of 10 challenging robotic manipulation tasks (e.g., Basketball, Disassemble, Window Open).
- Cross-Domain Human Videos: A dataset of 20 human demonstration videos per task, featuring different backgrounds, viewpoints, and embodiments (human hands vs. robot grippers) to test generalization.
Results and Key Insights
TimeRewarder achieved nearly perfect success rates in 9 out of 10 Meta-World tasks using only 200,000 environment interactions, remarkably outperforming the manually designed dense rewards provided by the environment itself.
- Progress as a Potential Function: Temporal distance aligns with potential-based reward shaping, making the learned reward mathematically sound and less prone to "looping" behaviors.
- Generalization over Memorization: TimeRewarder achieves high Value-Order Correlation (VOC), understanding the sequence of events even when objects are in new positions or the robot takes a different path.
- Human-to-Robot Generalization: The model successfully distills the concept of progress from human videos and applies it to robots. Because the temporal structure of a task is similar across embodiments, the reward signal remains instructive.
- Robustness: In tasks like Basketball, TimeRewarder correctly penalized "near-misses" where baseline methods often failed by providing high rewards for unproductive proximity.
Limitations and Future Work
TimeRewarder currently struggles with repetitive, back-and-forth motions (e.g., scrubbing), where temporal distance becomes ambiguous due to state recurrence. Future work will explore hierarchical models or memory-augmented architectures to track long-term context and enable the learning of more complex, multi-stage skills.
Summary updated