Assessing Sample Quality via the Latent Space of Generative Models

1 Stony Brook University - New York - USA

2 EPFL - Lausanne - Switzerland
Stony Brook Logo EPFL Logo ECCV 2024 Logo

Abstract

Advances in generative models increase the need for sample quality assessment. To do so, previous methods rely on a pre-trained feature extractor to embed the generated samples and real samples into a common space for comparison. However, different feature extractors might lead to inconsistent assessment outcomes. Moreover, these methods are not applicable for domains where a robust, universal feature extractor does not yet exist, such as medical images or 3D assets. In this paper, we propose to directly examine the latent space of the trained generative model to infer generated sample quality. This is feasible because the quality a generated sample directly relates to the amount of training data resembling it, and we can infer this information by examining the density of the latent space. Accordingly, we use a latent density score function to quantify sample quality. We show that the proposed score correlates highly with the sample quality for various generative models including VAEs, GANs and Latent Diffusion Models. Compared with previous quality assessment methods, our method has the following advantages: 1) pre-generation quality estimation with reduced computational cost, 2) generalizability to various domains and modalities, and 3) applicability to latent-based image editing and generation methods. Extensive experiments demonstrate that our proposed methods can benefit downstream tasks such as few-shot image classification and latent face image editing.

TL;DR

A single pre-trained diffusion model can generate thousands of images of “Yorkshire Terrier” or “Notre-Dame de Paris”. In this paper, we aim to answer the question: among the samples generated from the model, how to measure the quality of each individual one? We find that the latent density highly correlates the sample quality.

Dataset compression scale

The latent density of generative models highly correlates with the sample quality: latent codes residing in high-density latent areas yield samples of superior quality, whereas codes in sparse latent areas produce low-quality samples.

Results

Application in Face Editing

BibTeX


        @misc{xu2024assessingsamplequalitylatent,
        title={Assessing Sample Quality via the Latent Space of Generative Models}, 
        author={Jingyi Xu and Hieu Le and Dimitris Samaras},
        year={2024},
        eprint={2407.15171},
        archivePrefix={arXiv},
        primaryClass={cs.CV},
        url={https://arxiv.org/abs/2407.15171}, 
  }