SNeRL: Semantic-aware Neural Radiance Fields for Reinforcement Learning

Dongseok Shim, Seungjae Lee, H. Jin Kim

Abstract

As previous representations for reinforcement learning cannot effectively incorporate a human-intuitive understanding of the 3D environment, they usually suffer from sub-optimal performances. In this paper, we present Semantic-aware Neural Radiance Fields for Reinforcement Learning (SNeRL), which jointly optimizes semantic-aware neural radiance fields (NeRF) with a convolutional encoder to learn 3D-aware neural implicit representation from multi-view images. We introduce 3D semantic and distilled feature fields in parallel to the RGB radiance fields in NeRF to learn semantic and object-centric representation for reinforcement learning. SNeRL outperforms not only previous pixel-based representations but also recent 3D-aware representations both in model-free and model-based reinforcement learning.

Introduction

Reinforcement Learning (RL) agents trained directly from images often struggle to comprehend the 3D structure of their environments. Standard encoders, such as those used in DrQ-v2 or CURL, typically treat visual observations as 2D pixel arrays. This approach ignores the underlying spatial relationships and object-centric properties that are intuitive to humans and critical for complex manipulation tasks.

While recent research has explored using Neural Radiance Fields (NeRF) to inject 3D priors into RL, these methods often rely solely on RGB reconstruction. RGB data alone frequently fails to capture "what" an object is or where its functional boundaries lie. Furthermore, previous semantic-aware attempts like NeRF-RL required per-object masks during both training and deployment, a constraint that is often impractical for real-world applications. SNeRL (Semantic-aware Neural Radiance Fields for Reinforcement Learning) overcomes these limitations by grounding latent representations in both 3D geometry and semantic features.

Methodology

SNeRL utilizes a two-stage training pipeline designed to create a robust, 3D-aware feature extractor.

Stage 1: Pre-training the Multi-view Encoder

The framework begins by training a convolutional encoder on an offline dataset of multi-view images. This encoder fuses multiple perspectives into a single latent vector $z$. This vector is then processed by a specialized NeRF decoder that predicts three distinct fields in parallel:

  • RGB Radiance Field: Focuses on standard NeRF reconstruction to capture the geometric structure of the scene.
  • 3D Semantic Field: Predicts semantic labels (e.g., "handle," "hammer," "table") using ground-truth labels derived from the simulator.
  • Distilled Feature Field: SNeRL distills knowledge from a pre-trained Vision Transformer (DINO ViT). This allows the model to learn fine-grained features and object boundaries that simple semantic labels might overlook.
  • Self-Predictive Loss: An auxiliary loss is employed to ensure the latent representation remains viewpoint-invariant, ensuring the agent's understanding of the scene is consistent regardless of camera orientation.

Stage 2: Downstream RL Training

Once pre-trained, the encoder is frozen and utilized as a fixed feature extractor for standard RL algorithms. The authors demonstrate SNeRL's versatility by integrating it with both model-free (Soft Actor-Critic, SAC) and model-based (Dreamer) RL frameworks.

Experimental Setup

The researchers evaluated SNeRL using the Meta-world benchmark, focusing on four challenging visual control tasks: Window-open-v2, Hammer-v2, Drawer-open-v2, and Soccer-v2. The training data consisted of an offline dataset of 14,400 scenes, each featuring three camera views, collected through a combination of random and expert-assisted policies.

Key Results and Insights

SNeRL consistently outperformed state-of-the-art pixel-based methods (DrQ-v2, CURL) and existing 3D-aware representations (NeRF-RL, CNN-AE).

  • Performance Gains: In high-complexity tasks like Soccer-v2 and Hammer-v2, SNeRL achieved significantly higher episode returns, whereas many baseline models failed to learn the tasks entirely.
  • Model-Based Synergy: When paired with Dreamer, SNeRL's 3D-aware features provided a more stable and accurate foundation for world models compared to standard 2D CNN features.
  • Mask-Free Deployment: A significant advantage of SNeRL is that it does not require object masks during the RL phase or at test time. The semantic awareness is effectively "baked" into the encoder's weights during the pre-training phase.
  • Ablation Studies: Removing either the semantic field or the distilled feature field resulted in a measurable performance drop. This suggests that 3D geometry alone is insufficient; agents benefit significantly from an explicit understanding of the objects within that geometry.

Conclusion and Future Work

SNeRL demonstrates that incorporating semantic and distilled features into a 3D-aware representation significantly enhances the data efficiency and success rates of RL agents. While the current implementation relies on multi-view offline data and carries the computational weight of NeRF decoders, it represents a major step toward more intuitive robotic perception. Future research may focus on "online" updates to the 3D representation and testing the framework's robustness on physical hardware against real-world lighting and sensor noise.

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