Can we make NeRF-based visual localization privacy-preserving?

Maxime Pietrantoni, Martin Humenberger, Torsten Sattler, Gabriela CsurkaarXiv 2025 · DOI

Abstract

Neural Radiance Fields (NeRFs) have emerged as a powerful tool for 6DoF visual localization, yet they inherently pose significant privacy risks by storing high-fidelity scene textures. We introduce ppNeSF (Privacy-Preserving Neural Segmentation Field), a framework that replaces traditional photometric training with self-supervised segmentation. By leveraging non-injective mappings, ppNeSF effectively filters out sensitive high-frequency details while maintaining state-of-the-art localization accuracy. Our evaluation demonstrates that ppNeSF significantly reduces the success of inversion attacks while achieving a median error of just 20cm on large-scale benchmarks.

Introduction

Visual Localization (VL) is a fundamental capability for autonomous systems and augmented reality (AR), enabling devices to determine their precise position and orientation within a known environment. Recently, Neural Radiance Fields (NeRFs) have been adopted for this task due to their ability to represent complex 3D scenes implicitly. However, NeRFs are optimized to store every fine-grained detail to produce high-quality renders, making them a "privacy nightmare."

If a NeRF-based localization service is hosted in the cloud, an attacker could potentially reconstruct detailed images of a user's private space from the network's weights. Research shows that even removing color-predicting layers is insufficient; the geometry-predicting weights still encode enough high-frequency information to allow "inversion attacks" that reconstruct recognizable grayscale images of the scene.

Overview of the ppNeSF framework compared to standard NeRFs, highlighting the transition from L2 photometric loss to Cross-Entropy (CE) segmentation loss to preserve privacy.

Methodology: ppNeSF

To address these privacy concerns, we propose ppNeSF, which fundamentally alters the supervision of the implicit 3D representation.

1. Segmentation over Photometry

Instead of a photometric (RGB) loss, ppNeSF utilizes a cross-entropy loss based on segmentation labels. Segmentation acts as a "many-to-one" mapping—where various pixel textures map to a single semantic label (e.g., "chair")—which naturally discards high-frequency private data while preserving the structural landmarks necessary for navigation.

2. Self-Supervised Labeling

Manual 3D segmentation is prohibitively expensive. We employ a self-supervised pipeline that aligns 2D features from an image encoder with 3D volumetric features using Optimal Transport (Sinkhorn-Knopp). This creates a unified segmentation space where 2D query images can be matched against the 3D field without requiring explicit manual labels.

3. Hierarchical Coarse-to-Fine Strategy

To ensure the localization algorithm converges reliably, we implement a hierarchy of labels (e.g., 20 coarse classes and 100 fine classes). This provides a smooth optimization landscape for pose refinement, allowing the system to narrow down the camera pose from a rough estimate to a precise coordinate.

Experimental Results and Privacy Evaluation

We evaluated ppNeSF on standard benchmarks including 7Scenes, Indoor6, and Cambridge Landmarks. To rigorously test privacy, we designed an inversion model to attempt force-reconstruction of images from the internal features of the NeRF.

Privacy attack evaluation: Comparing original images with reconstructions from standard NeRFs and ppNeSF. LLaVA-based semantic analysis shows that ppNeSF reconstructions lack recognizable private details.

Privacy Gains

In inversion attack tests, ppNeSF reconstructions were largely unrecognizable. Quantitatively, the LLaVA similarity score—which measures the semantic information leaked—dropped from 0.68 in standard NeRFs to 0.40 in ppNeSF on the mip360 dataset. This confirms that geometry weights in standard NeRFs effectively act as grayscale photographs, whereas ppNeSF successfully shields this information.

Localization Accuracy and Robustness

Despite the privacy constraints, ppNeSF achieved state-of-the-art results among privacy-preserving methods. On the Cambridge Landmarks dataset, it achieved a median error of 20cm, outperforming other "descriptor-free" methods. Furthermore, the method proved more robust to illumination changes than standard RGB-alignment methods, as segmentation labels remain more stable across different lighting conditions than raw pixel values.

Discussion and Conclusion

While ppNeSF offers a robust solution for privacy-preserving localization, some challenges remain. The training overhead is currently high, requiring approximately 9–10 hours on a high-end GPU, which may limit its immediate utility for mobile edge devices. Additionally, the optimal number of segmentation classes is currently scene-dependent, suggesting a need for automated class selection in future work.

In conclusion, ppNeSF demonstrates that it is possible to decouple high-fidelity scene reconstruction from accurate visual localization. By utilizing non-injective mappings as a shield, we can provide secure, cloud-based localization services without compromising user privacy.

Summary updated

BibTeX
@misc{pietrantoni2025can,
  author = {Maxime Pietrantoni and Martin Humenberger and Torsten Sattler and Gabriela Csurka},
  title = {{Can we make NeRF-based visual localization privacy-preserving?}},
  year = {2025},
  eprint = {2508.18971},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.18971},
}
Figure