Switch-NeRF: Learning Scene Decomposition with Mixture of Experts for Large-scale Neural Radiance Fields

Zhenxing Mi, Dan XuICLR 2023

TL;DR

Switch-NeRF introduces an end-to-end learnable scene decomposition for large-scale Neural Radiance Fields (NeRF) using a Sparsely Gated Mixture of Experts (MoE) architecture. By replacing rigid, hand-crafted partitioning with a trainable gating network, it achieves state-of-the-art reconstruction quality and semantic specialization while maintaining efficient computation per sample.

The Challenge of Scaling NeRFs

Neural Radiance Fields have revolutionized 3D reconstruction, but scaling them to city-sized environments presents a massive challenge. A "naïve" large NeRF requires a huge number of parameters, making it computationally expensive and difficult to optimize.

To solve this, current state-of-the-art methods like Mega-NeRF or Block-NeRF use a "divide-and-conquer" strategy: they manually split the scene into grids or street blocks and train separate sub-networks for each part. However, these hand-crafted rules are rigid, require prior knowledge of the scene's structure, and often lead to visual inconsistencies (seams) where different sub-networks meet. The authors identify a critical gap: the decomposition of the scene should be learned alongside the radiance field itself, not hard-coded.

Comparison of scene decomposition strategies. Switch-NeRF replaces manual clustering with a trainable gating network.

Introducing Switch-NeRF

The core innovation is Switch-NeRF, which treats scene decomposition as a routing problem within a Mixture of Experts framework.

  • Sparsely Gated MoE: Instead of one giant Multi-Layer Perceptron (MLP), the model consists of multiple "experts" (sub-networks). For any given 3D point, a trainable gating network decides which expert is best suited to process it.
  • Top-1 Gating: To keep computation constant, the gating network uses a "Top-1" strategy—only the single most relevant expert is activated for a specific point. This ensures that even as the total number of parameters grows, the cost to render a single ray remains low.
  • Unified NeRF Head: To ensure the whole scene looks consistent, the outputs of the experts are passed through a shared "head" network. This aligns high-level features and prevents the "patchwork" look common in manually partitioned scenes.
  • Load Balancing: Training MoE models is tricky because the gating network might favor one expert, leaving others untrained. The authors use an auxiliary load-balancing loss to ensure all experts are utilized effectively.
  • Efficient Dispatch: Standard MoE implementations often drop "overflow" data to save memory. For NeRF, dropping points means holes in the image. The authors implemented a custom CUDA-based "full dispatch" operation to ensure every 3D point is processed during testing without memory overflow.

Key Insights and Results

The authors evaluated Switch-NeRF on several challenging large-scale benchmarks, including Mill 19, UrbanScene3D, BungeeNeRF datasets, and the Block-NeRF dataset.

  • Semantic Specialization: Unlike manual grids, the learnable gating network allows experts to specialize semantically. Visualizations show that different experts naturally learn to handle specific types of objects—for example, one expert might focus on buildings while another specializes in trees and grass.
  • End-to-End Optimization: By making the decomposition learnable, the network can jointly optimize "where to send a point" and "what that point looks like." This leads to much sharper details and better geometry than distance-based clustering.
  • State-of-the-Art Accuracy: Switch-NeRF consistently outperformed Mega-NeRF and NeRF++ in PSNR, SSIM, and LPIPS. For instance, on the "Sci-Art" scene, PSNR improved from 25.60 (Mega-NeRF) to 26.52.
  • Efficiency: The model achieved better results using significantly fewer parameters than baselines. For example, Switch-8 (4.53M parameters) outperformed Mega-8 (10.8M parameters).

Limitations and Future Work

While testing is highly efficient, training an MoE model end-to-end is more memory-intensive and takes longer than training independent sub-networks in parallel. Additionally, the model still relies on a separate "background NeRF" for distant elements (like the sky or far-off horizons). Finally, the current framework is designed for static large-scale scenes; extending this learnable decomposition to dynamic environments remains an open challenge.

Summary updated

BibTeX
@inproceedings{mi2023switch,
  author = {Zhenxing MI and Dan Xu},
  title = {{Switch-NeRF: Learning Scene Decomposition with Mixture of Experts for Large-scale Neural Radiance Fields}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=PQ2zoIZqvm},
}
Figure