SNeRL: Semantic-aware Neural Radiance Fields for Reinforcement Learning

Dongseok Shim, Seungjae Lee, H. Jin Kim

Introduction

Reinforcement Learning (RL) agents frequently struggle to master complex control tasks directly from high-dimensional image observations. The core challenge lies in representation learning: translating a 2D grid of pixels into a low-dimensional latent vector that accurately captures the physics and geometry of the 3D world.

Traditional 2D Convolutional Neural Networks (CNNs) suffer from a "2D bias," lacking the inherent understanding that objects exist in 3D space or that a robotic arm is distinct from the environment it interacts with. While recent pioneering works have utilized Neural Radiance Fields (NeRF) to inject 3D awareness, they predominantly rely on RGB (color) reconstruction. In complex environments, color alone is insufficient to distinguish between objects, leading to sub-optimal performance. To address this, researchers introduce Semantic-aware Neural Radiance Fields for Reinforcement Learning (SNeRL), a framework that trains a 3D-aware encoder by reconstructing scenes through a multi-headed NeRF decoder, providing RL agents with a human-intuitive understanding of 3D environments.

Methodology

SNeRL employs a two-stage training pipeline to build its robust representations.

Stage 1: Pre-training the 3D-Aware Encoder

A multi-view encoder compresses images from various angles into a single latent vector. This vector is fed into a specialized NeRF decoder. Unlike standard NeRFs that predict only color and density, SNeRL's decoder predicts three parallel fields:

  • RGB Field: Captures basic geometric and color structure.
  • Semantic Field: Trained with ground-truth labels to foster object-centric representations (e.g., distinguishing a handle from a hammer).
  • Distilled Feature Field: Distills knowledge from a pre-trained Vision Transformer (ViT/DINO) to capture fine-grained details and object boundaries that simple semantic labels might miss.

Additionally, a Multi-view Self-Prediction auxiliary loss ensures the latent representation remains view-invariant, allowing the agent to recognize the same state regardless of the camera angle.

Stage 2: Downstream RL Training

Once pre-trained, the encoder is frozen and integrated into standard RL algorithms. The framework is highly versatile, supporting both model-free (Soft Actor-Critic, or SAC) and model-based (Dreamer) RL approaches.

Experimental Setup

The researchers evaluated SNeRL using the Meta-world benchmark, a standard for robotic manipulation. They focused on four challenging 3D environments: Window-open-v2, Hammer-v2, Drawer-open-v2, and Soccer-v2. Training utilized an offline dataset of 14,400 scenes, with each scene comprising three image observations from different camera views.

Key Insights and Results

  • Beyond RGB: Reconstructing visual appearance (RGB) does not guarantee task comprehension. In complex tasks like "Soccer," where the robot arm and ball may share similar colors, adding semantic and feature fields forces the encoder to recognize the functional components of the scene.
  • Leveraging Teacher Models: By utilizing a pre-trained ViT as a teacher for the feature field, SNeRL inherits the benefits of massive-scale computer vision pre-training without requiring equivalent scale in its own dataset.
  • 3D Structure as an Inductive Bias: The NeRF decoder acts as a powerful regularizer. Because it must render the scene from any angle, the encoder is forced to learn true 3D structure rather than memorizing 2D pixel patterns.
  • Superior Performance: SNeRL consistently outperformed state-of-the-art baselines like DrQ-v2 and CURL. In difficult tasks like "Hammer" and "Soccer," where standard 2D methods often failed to achieve any reward, SNeRL achieved high success rates. It also significantly surpassed previous 3D methods (like NeRF-RL) by producing sharper, more accurate reconstructions of the robot arm and environment.

Limitations and Future Directions

While SNeRL demonstrates significant improvements, it has notable constraints. The pre-training phase requires multi-view offline data, which can be challenging to collect comprehensively in real-world scenarios. Furthermore, NeRF decoders are computationally heavy compared to simple CNN decoders. This expense currently restricts SNeRL to an offline pre-training setup rather than on-the-fly learning.

For future work, the authors propose extending the framework to an online setup where the encoder continues to learn as the robot explores. This advancement would necessitate optimizing the NeRF decoder for faster inference and training speeds.

Summary updated

BibTeX
@inproceedings{shim2023snerl,
  author = {Dongseok Shim and Seungjae Lee and H. Jin Kim},
  title = {{SNeRL: Semantic-aware Neural Radiance Fields for Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=AEZXaYisI9},
}
Figure