Manifold-Aware Perturbations for Constrained Generative Modeling

Katherine Keegan, Lars Ruthotto

Introduction

Standard generative models, such as Diffusion Models and Normalizing Flows, have achieved widespread success but suffer from an inherent "full-dimension" bias. They assume data is distributed across an entire ambient space (e.g., $\mathbb{R}^d$). However, in many scientific domains, data is restricted by strict equality constraints—such as conservation of energy, molecular bond lengths, or total flux in imaging.

Mathematically, this restricts the data to a low-dimensional manifold $\mathcal{M}$. Fitting standard models to these "singular" distributions causes severe mathematical breakdowns:

  • Normalizing Flows encounter exploding log-determinants because the Jacobian becomes zero.
  • Diffusion Models suffer from "score explosion," where the gradient of the log-density becomes infinite near the manifold, leading to unstable sampling and noisy outputs that violate constraints.

To address this, researchers propose a computationally cheap, mathematically grounded solution: Manifold-Aware Perturbations.

The "Lift-and-Project" Methodology

The core contribution is a three-step "lift-and-project" strategy that modifies the data distribution to be compatible with off-the-shelf generative architectures without losing the underlying geometric constraints.

  1. The Lift (Anisotropic Noising): Instead of adding isotropic noise (in all directions), the method uses the Jacobian of the constraint function to identify the "normal bundle"—directions strictly perpendicular to the manifold. Gaussian noise is added only in these normal directions. This "thickens" the manifold into a $d$-dimensional tube, giving the distribution volume in the ambient space.
  2. The Training: Standard, unconstrained generative models (like DDPMs or RealNVP) are then trained on this thickened distribution. Because the distribution now has volume, score fields and Jacobian determinants remain bounded, eliminating numerical instability.
  3. The Project: After the model generates a sample, a projection operator (analytical or via iterative optimization) "snaps" the sample back onto the manifold, ensuring strict constraint adherence.

This approach avoids the complex, computationally expensive manifold-intrinsic Stochastic Differential Equations (SDEs) required by previous Riemannian generative models.

Experimental Validation

The authors evaluated their method across a spectrum of complexities:

  • Toy Manifolds: 3D points constrained to a 2D plane and a 2D sphere.
  • Complex Geometry: A standard Gaussian distribution supported on the surface of the Stanford Bunny mesh, testing irregular and high local curvature.
  • Constrained Images: MNIST digits where the "total flux" (sum of all pixel intensities) is fixed.
  • Scientific Application: A 90-dimensional protein backbone generation task using fragments from the CASP12/SideChainNet dataset, where chemistry dictates strict bond lengths and angles.

Key Insights and Results

  • Anisotropy is the Secret Sauce: Adding noise along the manifold distorts the target distribution. By noising only in normal directions, the authors mathematically prove perfect distribution recovery for linear constraints and strictly bounded error for nonlinear ones.
  • The "Reach" of a Manifold: The accuracy of the method is tied to the manifold's "reach" (a measure of curvature). As long as the noise scale is small relative to the reach, the projection step introduces minimal distortion.
  • Unprecedented Stability and Adherence: The method significantly reduced the magnitude of scores and log-determinants across all tasks. Unlike standard diffusion models that produce blurry, off-manifold samples, this method guarantees 100% adherence to constraints.
  • Strong Empirical Performance: On the MNIST flux task, the manifold-aware approach outperformed standard DDPMs and constrained baselines in FID and class-based JSD. In the protein modeling task, it maintained competitive distributional fidelity while ensuring chemically plausible structures that baselines failed to produce.

Limitations and Future Directions

While highly effective, the method currently requires the constraint function to be known analytically to compute normal directions, which may pose challenges for manifolds defined only by discrete data points. Additionally, theoretical guarantees assume the manifold is $C^2$ smooth. Although empirical tests on meshes (with sharp edges) were successful, highly irregular surfaces might require gentle smoothing. Future work may explore adaptive noising—applying more noise in flat regions and less in high-curvature areas—to further minimize projection errors.

Summary updated

BibTeX
@inproceedings{keegan2026manifold,
  author = {Katherine Keegan and Lars Ruthotto},
  title = {{Manifold-Aware Perturbations for Constrained Generative Modeling}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=UPiyC9W4ms},
}
Figure