Diffusion Models with Double Guidance: Generate with aggregated datasets

Yanfeng Yang, Kenji FukumizuarXiv 2025 · DOI

Introduction

Training high-fidelity generative models typically requires large-scale datasets where each sample is fully annotated with all relevant labels. However, in many domains like drug discovery or specialized image generation, obtaining complete annotations is prohibitively expensive. Researchers often resort to aggregating multiple datasets, which results in block-wise missing conditions. For instance, one dataset might label molecules for stability, while another labels them for toxicity, but no single molecule possesses both labels. Standard conditional diffusion models fail in this regime because they cannot learn the joint relationship between conditions they never see together.

Methodology: Double and Hybrid Guidance

To address this, we introduce Diffusion Model with Double Guidance (DMDG) and Diffusion Model with Hybrid Guidance (DMHG). These methods enable generation conditioned on multiple attributes even when those attributes are never co-observed in training.

The mathematical foundation of our approach is the Conditional Independence (CI) assumption: given the clean data $X_0$, the conditions $C_1$ and $C_2$ are independent. This allows us to decompose the complex "conditional score function"—the vector field guiding the diffusion process—into simpler, independently estimable components.

Comparison of score function gradients under independent and dependent conditions.

Our method employs a Tweedie Projection to estimate the clean data $X_0$ at each step of the noisy diffusion process. Separate, simple regressors trained on individual datasets then provide "guidance" based on this estimate. This approach is training-free for the guidance component; pre-trained models can be augmented with these guides without requiring a joint dataset for retraining.

A critical insight of this work is that even if conditions $C_1$ and $C_2$ are independent given $X_0$, they are implicitly correlated because they both stem from the same underlying data point. Previous methods often ignored this "shared link," leading to poor controllability. By accounting for this relationship through the Tweedie projection, DMDG achieves significantly better alignment with the target joint distribution.

Experimental Results

We evaluated our methods across synthetic data, molecule generation, and image inpainting.

Molecule Generation

In the task of de novo drug design, we aggregated the GEOM-DRUG (stability properties) and ZINC250k (solubility properties) datasets. DMDG achieved a remarkable 76% success rate in meeting six simultaneous property targets, whereas existing baselines typically remained below 20%.

Performance comparison on molecule generation tasks using GEOM and ZINC250k datasets.

As shown in the figure above, our proposed methods (DMDG and DMHG) consistently outperform imputation-based baselines like GAIN or K-NN. They maintain a lower Wasserstein distance ($W_2$) to the target distributions while achieving higher success rates across multiple tasks.

Image and Synthetic Data

In synthetic 5D Gaussian mixture tests, our methods demonstrated superior recovery of the true distribution compared to traditional imputation. For image inpainting on ImageNet, DMHG produced results with higher visual fidelity (PSNR) and better semantic alignment with class labels than standard Diffusion Posterior Sampling (DPS).

Conclusion and Future Work

Double Guidance provides a robust framework for leveraging fragmented, aggregated datasets for complex conditional generation. While the current approach relies on the Conditional Independence assumption, it effectively "hallucinates" missing joint distributions by exploiting the structure of individual datasets. Future work will explore relaxing the CI assumption for more complex dependencies and scaling the method to handle even larger numbers of aggregated condition blocks.

Summary updated

Abstract

Creating large-scale datasets for training high-performance generative models is often prohibitively expensive, especially when associated attributes or annotations must be provided. As a result, merging existing datasets has become a common strategy. However, the sets of attributes across datasets are often inconsistent, and their naive concatenation typically leads to block-wise missing conditions. This presents a significant challenge for conditional generative modeling when the multiple attributes are used jointly as conditions, thereby limiting the model's controllability and applicability. To address this issue, we propose a novel generative approach, Diffusion Model with Double Guidance, which enables precise conditional generation even when no training samples contain all conditions simultaneously. Our method maintains rigorous control over multiple conditions without requiring joint annotations. We demonstrate its effectiveness in molecular and image generation tasks, where it outperforms existing baselines both in alignment with target conditional distributions and in controllability under missing condition settings.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
De novo molecular generation on aggregated GEOM-DRUG and ZINC250k; Tasks 1 & 2DMDG (λ₁=63, λ₂=21)Joint Task 1 & 2 success rate76.0 %5,000 molecules generated per method; success requires all six properties to satisfy Ta…
Source quote
L599: 76.0 % │ 93.4 % │ 81.5 % │ 63 │ 21
De novo molecular generation on aggregated GEOM-DRUG and ZINC250k; Tasks 1 & 2DMIDG (λ₁=63, λ₂=30)Joint Task 1 & 2 success rate58.7 %5,000 molecules generated per method; success requires all six properties to satisfy Ta…
Source quote
L613: 58.7 % │ 66.2 % │ 90.6 % │ 63 │ 30
Nearby sampling, ZINC250k test-set source moleculesDMDGSuccess rate37.50 %split: test
Source quote
L345: DMDG (ours) │ 37.50 % │ 57.12 % │ 75.62 % │ 79.87 % │ 94.37 %
Nearby sampling, ZINC250k test-set source moleculesCOATI-LDM (CG)Success rate0.62 %split: test
Source quote
L348: COATI-LDM (CG) \cite{Kaufman_2024_coatildm} │ 0.62 % │ 4.91 % │ 45.27 % │ 84.44 % │ 96.2 %
BibTeX
@misc{yang2025diffusion,
  author = {Yanfeng Yang and Kenji Fukumizu},
  title = {{Diffusion Models with Double Guidance: Generate with aggregated datasets}},
  year = {2025},
  eprint = {2505.13213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.13213},
}
Figure