Generative models have enjoyed widespread success in a variety of applications. However, they encounter inherent mathematical limitations in modeling distributions where samples are constrained by equalities, as is frequently the setting in scientific domains. In this work, we develop a computationally cheap, mathematically justified, and highly flexible distributional modification for combating known pitfalls in equality-constrained generative models. We propose perturbing the data distribution in a constraint-aware way such that the new distribution has support matching the ambient space dimension while still implicitly incorporating underlying manifold geometry. Through theoretical analyses and empirical evidence on several representative tasks, we illustrate that our approach consistently enables data distribution recovery and stable sampling with both diffusion models and normalizing flows.
Figures & tables
Figure 1 : An illustration of our proposed manifold-aware perturbation and comparison to isotropic perturbations showing exact recovery for linear manifolds and lower error for the spiral dataset.
Method
Train time
Sampling time
COV ↑
JSD ↓
TVD ↓
Plane
DMs
PDM
0.0012
0.4991
0.8678
0.0555
0.2270
PIDM
0.0019
0.1959
0.8119
0.0873
0.2913
p~σ
0.0012
0.2908
0.8736
0.0515
0.2015
DDPM
0.0012
0.1960
0.8632
0.0475
0.1967
DDPM (proj.)
0.0012
0.1966
0.8852
0.0442
0.1893
DDPM (proj., iso.)
0.0012
0.1966
0.8096
0.0821
0.2817
Extrinsic metrics.
Figure 2 : Metrics across varied σ for diffusion model and NF approaches on toy tasks. In all cases, learning pσ consistently outperforms or is competitive against learning p0 and post-projecting samples, with the expected possible performance decrease as σ→reach(M) .
Figure 3 : Image examples for plane and sphere tasks. In all cases, pσ samples consistently visually outperform or are competitive against the other techniques. The label “(G)” refers to Glow and the label “(R)” refers to RealNVP.
Figure 4 : Sampling stability for plane and sphere tasks. We observe the expected reduction in score and Jacobian log-determinant magnitude across both tasks and generative modeling paradigms. We present similar results for the complex tasks in Appendix E .
Figure 5 : Mesh task samples. The projected pσ samples are close to p0 and do not risk off-manifold samples as others do.
Method
Train time
Sampling time
COV ↑
JSD ↓
TVD ↓
PDM
0.0013
8.4991
0.8626
0.1912
0.4318
PIDM
0.0033
0.2196
0.5952
0.1298
0.3248
pσ (ours)
0.0012
0.3663
0.8506
0.1484
0.3471
DDPM
0.0013
0.2246
0.7104
0.1266
0.3090
DDPM (proj.)
0.0013
0.2415
0.8643
0.1480
0.3458
Table 2 : Mesh task metrics at σ=0.0005 . Learning pσ is consistently competitive with other methods while avoiding outliers and off-manifold samples through projection.
Figure 6 : Metrics across varied σ on complex tasks. Learning pσ consistently improves upon the projected DDPM baseline on all advanced problems. We remark that the coverage and FID metrics are computed in the embedding space due to the challenges of distributional evaluation of images, and their competitive performance combined with consistently outperforming class JSD illustrates the utility of our approach for constrained image generation.
Figure 7 : Performance improvement with respect to number of samples and σ on MNIST task. Learning pσ at the tested σ levels consistently improves performance on all metrics, with an expected increase as the number of training samples increases.
Method
Train time
Sampling time
COV ↑
FID ↓
Class JSD ↓
pσ (ours)
0.0083
39.0945
0.8765
1.512×10−5
0.0730
PDM
0.0083
78.1216
0.8457
2.218×10−5
0.0874
DDPM
0.0083
39.0982
0.8954
7.434×10−6
0.0868
PIDM
0.0089
39.0990
0.4713
1.665×10−4
0.2174
DDPM (proj.)
0.0083
39.1013
0.8954
7.379×10−6
0.0869
Table 3 : MNIST metrics at σ=0.01 with 10,000 training samples.
Figure 8 : Backbone fragment with atom coordinates as generated variables. In our setting, a single data sample consists of L residues ( L=3 in this figure) with each residue made up of 3 backbone atoms (N, CA, C), each represented by (x,y,z) -coordinates.
Method
Train time
Sampling time
COV
Pairwise RMSD
MMD
pσ (ours)
0.0040
5.5825
0.2200
1.6262
3.37×10−4
DDPM
0.0041
1.6013
0.2180
0.7414
3.35×10−4
PDM
0.0041
270.3082
0.3630
1.3534
3.80×10−4
DDPM (proj.)
0.0041
6.8878
0.2880
0.8445
3.36×10−4
PIDM
0.0070
1.6486
0.2240
1.4216
3.37×10−4
Table 4 : Protein backbone fragment metrics at σ=0.001 .
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Symbol
Description
Spaces and Manifolds
Rd
Ambient space (dimension d )
M
m -dimensional constraint manifold embedded in Rd
m
Intrinsic dimension of M
k=d−m
Codimension of M
TxM
Tangent space to M at point x
Appendix
Table 5 : Summary of notation used throughout this paper.
Plane
Sphere
Mesh
Images
Protein
Time embedding
Scalar
Scalar
Scalar
MLP
MLP
Time emb. dim.
1
1
1
64
16
# Training samples
100,000
100,000
100,000
10,000
20,000
Batch size
64
64
64
32
32
Epochs
200
200
200
1000
1000
Hidden dimension
64
64
128
1024
1024
Appendix
Table 6: Combined diffusion model training configurations for all tasks.
# Parameters
Plane
Sphere
Mesh
Images
Protein
RealNVP
42,780
42,780
–
–
–
Glow
28,836
28,836
–
–
–
DDPM
4,675
4,675
17,539
1,093,057
112,353
Appendix
Table 7: Total number of trainable parameters for each model across all tasks.
Figure 9 : Training and validation losses and accuracy for MNIST classifier.
Figure 10 : Mesh
Figure 11 : Image
Figure 12 : Protein
Figure 13 : Examples of effect of σ with 100 training data samples.
Figure 14 : Examples of effect of σ with 1,000 training data samples.
Figure 15 : Examples of effect of σ with 10,000 training data samples.