Learning Sparse Control Tasks from Pixels by Latent Nearest-Neighbor-Guided Explorations

Ruihan Zhao, Ufuk Topcu, Sandeep Chinchali, Mariano PhielipparXiv 2023 · DOI

Introduction

Deep reinforcement learning (RL) has demonstrated significant potential in robotic control, yet two primary challenges hinder its widespread deployment: the difficulty of state estimation and the complexity of reward engineering. While vision-based RL allows agents to learn directly from pixel observations, it is often prohibitively sample-inefficient. Furthermore, most successful RL applications rely on "dense" rewards—meticulously hand-crafted functions that provide continuous feedback. In contrast, real-world tasks are more naturally defined by "sparse" rewards (e.g., a binary signal upon task completion), which often lead to the "needle-in-a-haystack" exploration problem where an agent rarely encounters a reward signal during random exploration.

This paper presents a novel framework that leverages a small number of human demonstrations to guide exploration in sparse-reward, vision-based tasks. By learning a temporally consistent latent embedding, the proposed method provides dense exploration rewards based on proximity to demonstrated trajectories, significantly improving learning efficiency in both simulated and real-world environments.

Methodology: Latent Nearest-Neighbor-Guided Exploration

The core of the proposed approach is a pipeline that transforms sparse rewards into a dense guidance signal using a latent representation of task demonstrations. The system consists of three main stages: demonstration processing, nearest-neighbor matching, and off-policy RL updates.

The proposed pipeline: (a) collecting demonstrations, (b) matching current observations to demonstrations in latent space to generate exploration rewards, and (c) performing RL updates with stability enhancements.

Latent Dynamics and Distance Metrics

Rather than comparing high-dimensional raw pixels, which are sensitive to task-irrelevant visual noise, the system learns a low-dimensional embedding using a Variational Autoencoder (VAE) integrated with a locally-linear dynamics model. This ensures the latent space is "temporally consistent," meaning states occurring close together in time during a demonstration are mapped to nearby points in the embedding space.

To ensure robustness, the authors introduce an Augmentation-invariant Distance Metric (ADM). By training the encoder with heavy data augmentation, the distance between the agent's current observation and a demonstration state becomes resilient to background changes and visual artifacts.

Demonstration-Guided Exploration

The agent receives a dense exploration reward ($r_e$) if its current latent state falls within a specific distance threshold of any state in the demonstration set. This reward is strategically discounted based on the demonstration state's temporal distance from the goal, effectively creating a "follow-the-breadcrumbs" incentive that guides the agent through task checkpoints toward completion.

Experimental Evaluation

The framework was evaluated across four simulated manipulation tasks in Robosuite (Lift a Block, Stack Blocks, Open a Door, and Move a Can) and three real-world tasks using a Franka Emika Panda robot arm. Demonstrations were minimal, ranging from only 5 to 20 trajectories per task, collected via teleoperation.

Quantitative Results

In simulation, the method demonstrated superior sample efficiency compared to state-of-the-art baselines such as MoDem and DreamerV2. Notably, on the most complex task, "Move a Can," the proposed method was the only one to achieve a near 100% success rate within the allotted environment steps.

Success rates across four simulated tasks. The proposed method (red) consistently outperforms baselines in both learning speed and final performance.

Real-World Performance

The real-world experiments highlighted the practical viability of the approach. The Franka Panda robot achieved a 100% success rate on tasks like opening a drawer after only 2 to 4 hours of training. This represents a significant improvement over traditional vision-based RL methods, which often require days of physical interaction time.

Conclusion and Future Work

By combining the stability of model-free RL with the efficiency of model-based reward shaping, this work provides a robust path for learning complex robotic behaviors from pixels and sparse rewards. The use of a latent nearest-neighbor metric effectively bridges the gap between high-dimensional visual input and low-dimensional task progress. Future research directions include improving the system's ability to filter suboptimal demonstrations and distinguishing between causal actions and incidental movements within the demonstration data.

Summary updated

BibTeX
@misc{zhao2023learning,
  author = {Ruihan Zhao and Ufuk Topcu and Sandeep Chinchali and Mariano Phielipp},
  title = {{Learning Sparse Control Tasks from Pixels by Latent Nearest-Neighbor-Guided Explorations}},
  year = {2023},
  eprint = {2302.14242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.14242},
}
Figure