Probabilistic and Semantic Descriptions of Image Manifolds and Their Applications

Peter H. Tu, Zhaoyuan Yang, Richard I. Hartley, Zhiwei Xu, Jing Zhang, Dylan Campbell, Jaskirat Singh, Tianyu Wang · DOI

Abstract

Understanding the underlying structure of image data—the image manifold—is a fundamental challenge in computer vision. This paper presents a dual-pronged framework for characterizing these manifolds through probabilistic likelihood estimation and semantic disentanglement. By leveraging Hierarchical Normalizing Flows, Diffusion Models with stabilized numerical solvers, and a novel GridVAE architecture, the authors demonstrate significant advancements in out-of-distribution detection, semantic image editing, and adversarial robustness.

1. Introduction

In high-dimensional pixel space, natural images are not distributed uniformly; instead, they reside on a lower-dimensional, non-linear structure known as the image manifold. Navigating this manifold is critical for tasks ranging from generative modeling to security. This research explores two primary ways to describe this space: probabilistically (determining the likelihood that a point belongs to the manifold) and semantically (mapping the latent factors that define image attributes).

2. Probabilistic Likelihood Estimation

To quantify the "realness" of an image, the authors employ two distinct generative paradigms to calculate exact and approximate likelihoods.

2.1 Hierarchical Normalizing Flows

Building upon the Glow architecture, the researchers utilize Hierarchical Normalizing Flows (NF) to compute exact log-likelihoods. By treating the image generation process as a series of invertible transformations, the model maps complex pixel distributions to a simple latent space, allowing for precise probability density calculations. This allows the model to mathematically determine if a specific pixel pattern is a "high-probability" image.

2.2 Diffusion Models and RK4 Stabilization

While Diffusion Models (DMs) are renowned for their generative quality, calculating likelihoods within them is computationally challenging. The authors derive a formula for negative log-probability and identify a critical instability in the backward denoising process when using large sampling steps. To mitigate this, they introduce the Runge-Kutta (RK4) numerical solver. This classical engineering approach stabilizes the denoising trajectory, allowing for more efficient and consistent likelihood estimation compared to standard methods like DDIM, even when taking larger steps.

3. Semantic Mapping via GridVAE

Beyond mere probability, understanding the "meaning" of a point on the manifold requires disentangling its semantic attributes. Standard Variational Autoencoders (VAEs) often struggle with this, as their unimodal Gaussian priors do not naturally separate distinct traits like "smiling" versus "wearing a hat."

The authors propose the GridVAE, which replaces the single Gaussian prior with a Mixture of Gaussians (MoG) arranged on a grid. This structure forces the model to cluster similar semantic concepts into discrete "bins," making the latent space more interpretable. To handle the high dimensionality of datasets like CelebA (which contains over 40 attributes), the authors implemented a "relaxed" MoG prior. This approach calculates KL-divergence only against the nearest Gaussian component, making the optimization of high-dimensional latent spaces computationally feasible.

4. Experimental Validation and Applications

The framework was evaluated using a variety of benchmarks, including CelebA for facial attributes, MNIST/Fashion-MNIST for simpler structures, and CIFAR10 for out-of-distribution testing.

4.1 Out-of-Distribution (OOD) Detection

The Hierarchical NF models demonstrated a robust ability to act as "gatekeepers." When trained on CelebA faces, the models assigned significantly lower likelihood scores to CIFAR10 images, effectively identifying them as being off-manifold and proving the model's utility in data integrity tasks.

4.2 Adversarial Purification

One of the most compelling applications of this manifold description is in defending against adversarial "patch" attacks, where a small, noisy square is added to an image to fool a classifier. The authors' purification method uses the manifold's semantic consistency to "clean" the image. For instance, on a gender classification task using CelebA, an attack reduced accuracy from 97.86% to a dismal 6.83%. By applying manifold-based purification, the researchers restored accuracy to 76.75%, demonstrating the power of semantic constraints in robust vision.

4.3 Semantic Editing

The GridVAE's latent space allows for precise, linear interpolation of attributes. Researchers were able to independently modify traits such as "smiling" or "gender" without inducing unwanted changes in other features, confirming that the model successfully disentangled the manifold's semantic axes.

5. Conclusion and Future Directions

This work provides a comprehensive toolkit for both measuring and manipulating the image manifold. However, challenges remain. The authors note that in Diffusion Models, high-resolution images often suffer from "noise dominance," making OOD detection difficult at early denoising stages because the signal-to-noise ratio is too low. Furthermore, while GridVAE achieves impressive local disentanglement, achieving global consistency across the entire manifold remains an open area for research. Future work will likely focus on scaling these probabilistic methods to even higher resolutions and more complex, non-aligned datasets.

Summary updated

BibTeX
@article{tu2023probabilistic,
  author = {Peter H. Tu and Zhaoyuan Yang and Richard I. Hartley and Zhiwei Xu and Jing Zhang and Dylan Campbell and Jaskirat Singh and Tianyu Wang},
  title = {{Probabilistic and Semantic Descriptions of Image Manifolds and Their Applications}},
  journal = {Frontiers of Computer Science},
  year = {2023},
  doi = {10.3389/fcomp.2023.1253682},
}
Figure