Polarity Sampling: Quality and Diversity Control of Pre-Trained Generative Networks via Singular Values

Abstract

We present Polarity Sampling, a theoretically justified plug-and-play method for controlling the generation quality and diversity of any pre-trained deep generative network (DGN). Leveraging the fact that DGNs are, or can be approximated by, continuous piecewise affine splines, we derive the analytical DGN output space distribution as a function of the product of the DGN's Jacobian singular values raised to a power rho. We dub rho the polarity parameter and prove that rho focuses the DGN sampling on the modes (rho < 0) or anti-modes (rho > 0) of the DGN output space probability distribution. We demonstrate that nonzero polarity values achieve a better precision-recall (quality-diversity) Pareto frontier than standard methods, such as truncation, for a number of state-of-the-art DGNs. We also present quantitative and qualitative results on the improvement of overall generation quality (e.g., in terms of the Frechet Inception Distance) for a number of state-of-the-art DGNs, including StyleGAN3, BigGAN-deep, NVAE, for different conditional and unconditional image generation tasks. In particular, Polarity Sampling redefines the state-of-the-art for StyleGAN2 on the FFHQ Dataset to FID 2.57, StyleGAN2 on the LSUN Car Dataset to FID 2.27 and StyleGAN3 on the AFHQv2 Dataset to FID 3.95. Colab Demo: bit.ly/polarity-samp

Cite

Text

Humayun et al. "Polarity Sampling: Quality and Diversity Control of Pre-Trained Generative Networks via Singular Values." Conference on Computer Vision and Pattern Recognition, 2022. doi:10.1109/CVPR52688.2022.01038

Markdown

[Humayun et al. "Polarity Sampling: Quality and Diversity Control of Pre-Trained Generative Networks via Singular Values." Conference on Computer Vision and Pattern Recognition, 2022.](https://mlanthology.org/cvpr/2022/humayun2022cvpr-polarity/) doi:10.1109/CVPR52688.2022.01038

BibTeX

@inproceedings{humayun2022cvpr-polarity,
  title     = {{Polarity Sampling: Quality and Diversity Control of Pre-Trained Generative Networks via Singular Values}},
  author    = {Humayun, Ahmed Imtiaz and Balestriero, Randall and Baraniuk, Richard},
  booktitle = {Conference on Computer Vision and Pattern Recognition},
  year      = {2022},
  pages     = {10641-10650},
  doi       = {10.1109/CVPR52688.2022.01038},
  url       = {https://mlanthology.org/cvpr/2022/humayun2022cvpr-polarity/}
}