Mask-Based Modeling for Neural Radiance Fields

Ganlin Yang, Guoqiang Wei, Zhizheng Zhang, Yan Lu, Dong Liu

Introduction

Standard Neural Radiance Fields (NeRFs) are typically "overfit" by design, meaning a single model is trained to represent one specific scene. Generalizable NeRFs aim to break this limitation by learning to represent multiple scenes using a single model, usually by conditioning the network on features extracted from a few reference images.

However, existing generalizable methods often struggle with two primary issues:

  1. Global Context: They frequently fail to capture the complex relationships between different points in space and different camera viewpoints.
  2. Intricate Details: Without a strong "understanding" of 3D geometry (a scene prior), they produce blurry results or artifacts when faced with complex shapes or limited data.

To address this, researchers have asked whether the "mask-then-predict" logic that revolutionized NLP (like BERT) and Computer Vision (Masked Image Modeling) can be applied to the 3D world of NeRFs. The result is MRVM-NeRF, which introduces a self-supervised pretraining strategy that teaches NeRFs to "fill in the blanks" across different 3D points and camera views. By masking features along rays and across reference images, the model learns deep geometric priors, significantly boosting its ability to generalize to entirely new scenes and reconstruct high-quality details even with very few input images.

Methodology: Masked Ray and View Modeling (MRVM)

Instead of solely training the model to render pixels, the authors propose adding a self-supervised task during pretraining called Masked Ray and View Modeling (MRVM).

Overview of the MRVM-NeRF architecture, illustrating the coarse and fine branches with masked feature alignment.

The Masking Strategy

For a given 3D point along a camera ray, the model normally pulls features from several reference views. MRVM randomly masks these features at two distinct levels:

  • Ray-level: Entire points along a ray are masked, forcing the model to use neighboring points to predict the missing geometry.
  • View-level: Features from specific reference views are masked, forcing the model to "hallucinate" what a point looks like from one angle based on other available angles.

Architecture and Latent Alignment

The system utilizes a hierarchical setup. A Coarse Branch (acting as the "target") sees the full, unmasked data, while a Fine Branch (the "online" learner) processes the masked data.

The objective is not just to render the correct color, but to ensure the Fine Branch's internal representation matches the Coarse Branch's representation of the same scene. This alignment occurs in the latent (feature) space using a projector/predictor setup inspired by self-supervised learning techniques like BYOL. Using the unmasked coarse branch as a prediction target allows the model to distill "scale-specific" knowledge, helping the fine branch capture sharper details.

Importantly, MRVM is model-agnostic. The authors successfully tested it on both MLP-based (NeuRay) and Transformer-based (NeRFormer) backbones.

Datasets and Evaluation

The researchers evaluated their method on a mix of synthetic and challenging real-world benchmarks:

  • ShapeNet: A massive dataset of synthetic 3D objects, tested in both "category-agnostic" and "unseen" settings.
  • NeRF Synthetic: Classic scenes like "drums," "ship," and "lego."
  • DTU: A real-world dataset of objects captured from various viewpoints.
  • LLFF: Real-world "forward-facing" scenes, which are notoriously difficult for generalization.

Key Insights and Results

By forcing the model to predict missing information, it stops being a simple "interpolator" of pixels and starts learning a "3D scene prior"—an internal understanding of how surfaces and textures behave in 3D space. The authors also found that masking features directly on the 3D rays is much more efficient than masking 2D pixels in the input images, as 2D pixel masks don't always translate to meaningful 3D challenges along epipolar lines.

Qualitative comparisons on real-world scenes demonstrating sharper details and fewer artifacts when using MRVM.

The results demonstrate a consistent performance boost across the board when MRVM is applied:

  • Quantitative Gains: On ShapeNet, adding MRVM to the NeRFormer backbone improved PSNR from 27.58 to 29.25 and significantly lowered perceptual error (LPIPS). On the LLFF dataset, the NeuRay+MRVM model achieved a PSNR of 26.91, outperforming the baseline NeuRay (25.35) and other popular methods like IBRNet.
  • Few-Shot Superiority: In "few-shot" scenarios where only 3 reference views were provided, the MRVM-pretrained model maintained much higher quality than baselines, proving that the learned 3D prior helps fill in massive gaps in visual data.
  • Qualitative Improvement: Visualizations confirm that MRVM-NeRF produces much sharper edges, recovers intricate textures (like the mesh of a microphone), and generates fewer "floaters" (random artifacts in empty space) compared to standard models.

Limitations and Future Work

While highly effective, the approach has limitations. The two-stage process (pretraining with MRVM, then finetuning) can be computationally intensive, with some training runs taking about 10 days on a GTX-1080Ti. Additionally, like most NeRF research, this work focuses on static scenes; extending masked 3D modeling to dynamic 4D scenes remains an open challenge. Finally, while it performs exceptionally well on objects and small rooms, testing the limits of this 3D prior on massive, city-scale environments is a logical next step for future research.

Summary updated

BibTeX
@inproceedings{yang2024mask,
  author = {Ganlin Yang and Guoqiang Wei and Zhizheng Zhang and Yan Lu and Dong Liu},
  title = {{Mask-Based Modeling for Neural Radiance Fields}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=SEiuSzlD1d},
}
Figure