Renderers are Good Zero-Shot Representation Learners: Exploring Diffusion Latents for Metric Learning

Michael Tang, David ShustinarXiv 2023

Abstract: Can the latent spaces of modern generative neural rendering models serve as representations for 3D-aware discriminative visual understanding tasks? We use retrieval as a proxy for measuring the metric learning properties of the latent spaces of Shap-E, including capturing view-independence and enabling the aggregation of scene representations from the representations of individual image views, and find that Shap-E representations outperform those of the classical EfficientNet baseline representations zero-shot, and is still competitive when both methods are trained using a contrative loss. These findings give preliminary indication that 3D-based rendering and generative models can yield useful representations for discriminative tasks in our innately 3D-native world.

Introduction

Most modern computer vision models are "2D-native," trained on flat images for tasks like classification or detection. While effective, these models often lack an innate understanding of the 3D world, frequently failing to recognize that two different camera angles show the same object. In contrast, humans possess strong 3D priors, understanding that an object’s identity remains constant regardless of viewpoint.

This research investigates whether generative neural rendering models—which must learn to produce 3D structures from 2D inputs—naturally develop "view-independent" representations. Specifically, the authors test if these models can be used for metric learning: the ability to map similar objects (like different views of the same car) close together in a mathematical vector space.

Methods and Experimental Setup

The study compares two primary architectures: EfficientNet (a classic 2D CNN) and Shap-E (a generative model using diffusion to produce 3D assets). The core experiment is a 2D image retrieval task using the ShapeNet dataset. Given a "query" image of a specific car, the models must search a database of images to find other views of that same car.

Overview of the 2D image retrieval task pipeline, showing how query and database images are mapped to latent embeddings for comparison.

The models were evaluated in two settings:

  1. Zero-Shot: Using raw, pre-trained embeddings without additional training.
  2. Contrastive Learning (SimCLR): Training a small head on top of frozen models to explicitly group different views of the same scene.

Crucially, the query and database views were always disjoint, forcing the models to rely on geometric understanding rather than simple pixel matching.

Key Results

Zero-Shot Superiority

The most striking finding is that Shap-E’s latent space—designed for reconstruction—is naturally more "metric" than EfficientNet’s. In the zero-shot setting, Shap-E significantly outperformed the baseline, achieving a Recall@1 of 0.86 and a Mean Reciprocal Rank (MRR) of 0.90, compared to EfficientNet’s 0.82 and 0.85, respectively. This suggests that learning to render the world provides a powerful shortcut to understanding its geometry.

t-SNE visualization of Shap-E features, illustrating the inherent clustering and structure of the latent space that enables effective zero-shot retrieval.

Contrastive Learning as a Leveler

While Shap-E wins in the zero-shot setting, applying SimCLR allows EfficientNet to catch up and even exceed Shap-E in some metrics (Recall@1 of 0.94 vs 0.88). This indicates that while generative models get 3D awareness "for free," 2D models can be taught these priors with specific supervision.

View Aggregation

The researchers also explored averaging embeddings from multiple views to create a "master" representation. While this hurt performance in the zero-shot setting, it became highly effective after contrastive training, enabling efficient scene-level retrieval.

Discussion and Limitations

While promising, the use of generative latents for discriminative tasks faces challenges. Shap-E embeddings are massive (over 1 million dimensions), creating a significant "memory tax" for large-scale databases. Furthermore, this study was limited to synthetic data from ShapeNet; performance on real-world, "in-the-wild" datasets remains an open question.

Future work may explore whether other generative architectures, such as GAN-based renderers or Gaussian Splatting, yield similar representation benefits, and whether these 3D-aware latents can improve performance in fields like robotics or spatial reasoning tasks.

Summary updated

Abstract

Can the latent spaces of modern generative neural rendering models serve as representations for 3D-aware discriminative visual understanding tasks? We use retrieval as a proxy for measuring the metric learning properties of the latent spaces of Shap-E, including capturing view-independence and enabling the aggregation of scene representations from the representations of individual image views, and find that Shap-E representations outperform those of the classical EfficientNet baseline representations zero-shot, and is still competitive when both methods are trained using a contrative loss. These findings give preliminary indication that 3D-based rendering and generative models can yield useful representations for discriminative tasks in our innately 3D-native world. Our code is available at \url{https://github.com/michaelwilliamtang/golden-retriever}.
BibTeX
@misc{tang2023renderers,
  author = {Michael Tang and David Shustin},
  title = {{Renderers are Good Zero-Shot Representation Learners: Exploring Diffusion Latents for Metric Learning}},
  year = {2023},
  eprint = {2306.10721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.10721},
}
Figure