Neural Field Classifiers via Target Encoding and Classification Loss

Xindi Yang, Zeke Xie, Xiong Zhou, Boyu Liu, Buhua Liu, Yi Liu, Haoran Wang, Yunfeng Cai, Mingming Sun

Introduction

Neural fields, most notably Neural Radiance Fields (NeRF), have transformed 3D scene synthesis by mapping spatial coordinates to continuous properties like color (RGB) and volume density. Traditionally, these models are designed as regressors, optimized using Mean Squared Error (MSE) loss to minimize the distance between predicted and ground-truth continuous values. However, this regression-based approach often struggles with generalization, particularly when supervised by sparse or noisy data.

This paper introduces the Neural Field Classifier (NFC), a framework that reformulates the color prediction task as a classification problem. By employing binary-number target encoding and a classification-based loss function, NFC achieves significant improvements in both image quality and geometric reconstruction accuracy across various architectures with minimal computational overhead.

Methodology

The NFC framework is a "plug-and-play" modification applicable to most existing Neural Field Regressors (NFR). It shifts the learning objective from predicting continuous scalars to predicting discrete probability distributions over encoded color values.

Target Encoding and Classification Loss

To avoid the high memory costs associated with naive one-hot encoding for 256 color levels per channel, the authors implement Binary-Number Encoding. Each color channel is represented as an 8-bit binary string. For example, a color value of 203 is converted into a multi-label target [1, 1, 0, 0, 1, 0, 1, 1]. This allows the model to treat color prediction as a multi-label classification task, preserving the hierarchical relationship between similar color values.

The NFC pipeline (bottom) compared to the standard regression pipeline (top), highlighting the shift to binary cross-entropy (BCE) loss.

The standard MSE loss is replaced or augmented with a Binary Cross Entropy (BCE) loss. A hybrid optimization strategy is often used, combining the classification loss with a minor MSE term to ensure numerical stability and prevent vanishing gradients during early training stages.

Experimental Evaluation

The researchers evaluated NFC across a diverse set of benchmarks, including the high-resolution Replica dataset, the real-world Tanks and Temples (T&T) dataset, and various dynamic scenes (e.g., D-NeRF and 4DGS). These tests were conducted using multiple backbones, such as DVGO for fast voxel-based rendering and NeuS for high-quality surface reconstruction.

Key Results and Discussion

The transition from regression to classification yielded substantial quantitative and qualitative gains. On the Replica dataset using the DVGO backbone, the mean Peak Signal-to-Noise Ratio (PSNR) improved from 17.08 to 34.11—a nearly 100% increase in rendering quality. In terms of geometry, the NeuS-C variant reduced geometric error (Chamfer distance) by 74.6% on average.

Qualitative comparison showing how the classification approach (Ours) produces sharper details and fewer artifacts compared to standard regression.

Generalization and Robustness

A key insight of this work is that classification losses help the model converge to "flatter minima" in the loss landscape, which is strongly correlated with better generalization to unseen views. NFC proves particularly robust in "dirty data" scenarios, maintaining high performance even when training views are reduced to 20% or when images are corrupted by Gaussian noise.

Conclusion

By reframing neural field optimization as a classification task, NFC addresses fundamental limitations of the regression paradigm. The method is highly efficient, adding only 4-6% to training time while maintaining identical rendering speeds. Future work may explore the theoretical underpinnings of why classification generalizes better in these contexts and extend the framework to non-visual neural fields.

Summary updated

BibTeX
@inproceedings{yang2024neural,
  author = {Xindi Yang and Zeke Xie and Xiong Zhou and Boyu Liu and Buhua Liu and Yi Liu and Haoran Wang and YUNFENG CAI and Mingming Sun},
  title = {{Neural Field Classifiers via Target Encoding and Classification Loss}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=9NqC72m31m},
}
Figure