Geometric Representation Condition Improves Equivariant Molecule Generation

## Abstract

Abstract Recent advancements in molecular generative models have demonstrated substantial potential in accelerating scientific discovery, particularly in drug design. However, these models often face challenges in generating high-quality molecules, especially in conditional scenarios where specific molecular properties must be satisfied. In this work, we introduce GeoRCG, a general framework to enhance the performance of molecular generative models by integrating geometric representation conditions. We decompose the molecule generation process into two stages: first, generating an informative geometric representation; second, generating a molecule conditioned on the representation. Compared to directly generating a molecule, the relatively easy-to-generate representation in the first-stage guides the second-stage generation to reach a high-quality molecule in a more goal-oriented and much faster way. Leveraging EDM as the base generator, we observe significant quality improvements in unconditional molecule generation on the widely-used QM9 and GEOM-DRUG datasets. More notably, in the challenging conditional molecular generation task, our framework achieves an average 31% performance improvement over state-of-the-art approaches, highlighting the superiority of conditioning on semantically rich geometric representations over conditioning on individual property values as in previous approaches. Furthermore, we show that, with such representation guidance, the number of diffusion steps can be reduced to as small as 100 while maintaining superior generation quality than that achieved with 1,000 steps, thereby significantly accelerating the generation process.

## 1 Introduction

Recent years have seen rapid development in generative modeling techniques for molecule generation (Garcia Satorras et al., ; Hoogeboom et al., ; Luo & Ji, ; Wu et al., ; Xu et al., ; Morehead & Cheng, ), which have demonstrated great promise in accelerating scientific discoveries such as drug design (Graves et al., ). By modeling molecules as point clouds of chemical elements embedded in Euclidean space and employing equivariant models as backbone architectures, such as EGNN (Satorras et al., ), these approaches can ensure the O(3)- (or SO(3)-) invariance of the modeled molecule probability and have shown significant promise in both unconditional and conditional molecule generations.

Despite the advances, precisely modeling the molecular distribution $q(\mathcal{M})$ still remains a challenge, with current models often falling short of satisfactory results. This is especially true in the more practical scenarios where the goal is to capture the conditional distribution $q(\mathcal{M}|c)$ for conditional generation, with $c$ representing a desired property such as the HOMO-LUMO gap. In such cases, recent models still produce molecules with property errors significantly larger than the data lower bound (Hoogeboom et al., ; Xu et al., ). Such challenge arises partly because molecules are naturally supported on a lower-dimensional manifold (Mislow, ; De Bortoli, ; You et al., ), yet are embedded in a 3D space with much higher ambient dimensions ($N\times(3+d)$, where $N$ is the number of atoms and $d$ the atom feature dimension). Consequently, directly learning these distributions without additional guidance or conditioning solely on a single property can result in substantial errors (Song et al., ), often leading to unstable or undesirable molecular samples.

Figure: Figure 1: Training and sampling procedure of GeoRCG in unconditional molecule generation scenario. a) During training, each molecule $\mathcal{M}$ is mapped into an informative representation $r$ by a pre-trained, frozen geometric encoder $E$. The distribution of representations is then learned by a lightweight representation generator. The molecule generator is trained in a self-conditioned manner, generating a molecule $\mathcal{M}$ conditioned on its own representation $E(\mathcal{M})$. b) During sampling, an informative representation is first generated, which subsequently guides the molecule generator to produce high-quality molecules.
Refer to caption: x1.png

In this work, we propose GeoRCG (Geometric-Representation-Conditioned Molecule Generation), a general framework for improving the generation quality of molecular generative models by leveraging geometric representation conditions for both unconditional and conditional generation. See Figure 1 for an overview of the framework. At a high level, rather than directly learning the extrinsic molecular distribution, we aim to first transform it into a more compact and semantically meaningful representation distribution, with the help of a well-pre-trained geometric encoder $E$ such as Unimol (Zhou et al., ) and Frad (Feng et al., ). This distribution is much simpler because it does not exhibit any group symmetries, such as $O(3)/SO(3)$ and $S(N)$ groups which are present in extrinsic molecular distributions. As a result, a lightweight representation generator (Li et al., ) can effectively capture this reduced distribution. In the second stage, we employ a standard molecular generator to achieve the ultimate objective: molecular generation. Unlike conventional approaches, our molecular generator is directly informed by the first-stage geometric representation, which encapsulates crucial molecular structure and property information. This guidance enables the generation of high-quality molecular structures with improved fidelity.

Our approach is directly inspired by RCG (Li et al., ), which, however, focuses on image data with fixed size and positions and does not necessitate handling Euclidean and permutation symmetries—factors that are markedly different in molecular data. Compared to recent work GraphRCG (Wang et al., ), which applies the RCG framework to 2D graph data, we explicitly handle 3D geometry that is more complex due to the additional Euclidean symmetry. Moreover, we avoid the complicated step-wise bootstrapped training and sampling process proposed in Wang et al. () that requires noise alignment, sequential training, and simultaneous encoder training. Instead, we employ a simple and intuitive framework that enables parallel training and leverages advanced pre-trained geometric encoders containing valuable external knowledge (Zaidi et al., ; Feng et al., ), thus achieving competitive results while avoiding complex training procedures. Notably, while Li et al. () primarily focus on empirical evaluation, we also provide theoretical characterizations of general representation-conditioned diffusion models for both unconditional and conditional generation, which offers a rigorous understanding of the improved performance.

To illustrate the effectiveness of our approach, we select one of the simplest and most classical equivariant generative models, EDM (Hoogeboom et al., ), as the base molecular generator of GeoRCG. Experimentally, our method achieves the following significant improvements:

- •
Substantially enhancing the quality of the generated molecules on the widely used QM9 and GEOM-DRUG datasets. On QM9, GeoRCG not only improves the performance of EDM by a large margin, but also significantly surpasses several recent baselines with state-of-the-art performance (Wu et al., ; Xu et al., ; Morehead & Cheng, ; Song et al., ).
- •
More remarkably, in conditional molecule generation tasks, GeoRCG yields an average 31% improvement in performance, while many contemporary models struggled to achieve even marginal gains.
- •
By incorporating classifier-free guidance in the molecule generator (Li et al., ) and employing low-temperature sampling for representation generation (Ingraham et al., ), GeoRCG demonstrate a flexible trade-off between molecular quality and diversity without additional training, which is especially advantageous in molecular generation tasks that prioritizes quality over diversity.
- •
With the assistance of the representation guidance, GeoRCG can significantly reduce the number of diffusion steps needed, while preserving the molecular generation quality, thereby considerably accelerating the generation process.

## 2 Related Works

##### Molecular Generative Models

Early work has primarily focused on modeling molecules as 2D graphs (composed of atom types, connection, and edge types), utilizing 2D graph generative models to learn the graph distribution (Vignac et al., ; Jang et al., ; Jo et al., ; Luo et al., ; Zhou et al., ). However, since molecules inherently exist in 3D space, where physical laws govern their behavior and geometry provides critical information related to key properties, recent research has increasingly focused on utilizing 3D generative models to directly learn the geometric distribution by modeling molecules as point clouds of chemical elements. Notable early autoregressive models include G-SchNet (Gebauer et al., ) and G-SphereNet (Luo & Ji, ). More recently, diffusion models have demonstrated effectiveness in this domain, as evidenced by models like EDM (Hoogeboom et al., ) and subsequent advancements (Xu et al., ; Wu et al., ; Morehead & Cheng, ) that enhance EDM with latent space, prior information and more powerful backbones respectively. Furthermore, recent advances in flow methods (Lipman et al., ; Liu et al., ) have inspired the development of geometric, equivariant flow methods including EquiFM (Song et al., ) and GOAT (Hong et al., ), which can provide much faster molecule generation speed. Beyond these, there are also methods jointly model 2D and 3D information (Vignac et al., ; You et al., ; Irwin et al., ) (also called 3D graph (You et al., )), where a representative method is MiDi (Vignac et al., ) which uses a diffusion framework to jointly diffuse and denoise atom type, bond type, formal charges and coordinates.

##### Latent Generative Models

At a high level, our framework can also be viewed as a latent generative model, where data distributions are learned in a latent space (our stage 1) and decoded back through some decoder (our stage 2). Most prior works in this domain either focus on regular data forms with fixed positions and sizes (Van Den Oord et al., ; Razavi et al., ; Dai & Wipf, ; Aneja et al., ; Rombach et al., ; Li et al., ), or on data without Euclidean symmetry and require explicit modeling (Wang et al., ). Molecular data, however, presents unique challenges in both aspects. One of the key issues in this context is how to define the latent space—defining it as “latent coordinates and features” as in GeoLDM (Xu et al., ) still results in a geometrically structured and thus complex space, while defining it on representations as we do introduces the challenge of effectively “decoding” a global, non-symmetric embedding back into geometric objects. LGD (Zhou et al., ) trains a diffusion model on a unified Euclidean latent space obtained by jointly training a powerful encoder and a simple decoder, and performs both generation and prediction tasks focusing on 2D graphs. LDM-3DG (You et al., ) also adopts representation latent space but employs a cascaded (2D+3D) auto-encoder (AE) framework, where the decoder is designed (or trained) to be deterministic, rendering poor performance on the 3D part as evidenced in our experiments. In contrast, we model the decoder as a powerful generative model, focusing solely on geometric learning while demonstrating superior effectiveness.
We leave the related works of pre-trained geometric encoders in Appendix A.

## 3 Methods

### 3.1 Preliminaries

In this work, we represent molecules as point clouds of chemical elements in 3D space, denoted by $\mathcal{M}=(\mathbf{x},\mathbf{h})$, where $\mathbf{x}=(\mathbf{x}_{1},\dots,\mathbf{x}_{N})\in\mathbb{R}^{N\times 3}$ represents the atomic coordinates of $N$ atoms, and $\mathbf{h}=(\mathbf{h}_{1},\dots,\mathbf{h}_{N})\in\mathbb{R}^{N\times d}$ captures the node features of dimension $d$, such as atomic numbers and charges. This formulation follows the approach of Hoogeboom et al. (); Xu et al. (); Morehead & Cheng () and is widely utilized in molecular representation learning (Thomas et al., ; Li et al., ; Zaidi et al., ), facilitating the integration of pre-trained molecular encoders (Zaidi et al., ; Feng et al., ). We use $q$ to denote the underlying data distribution, such as molecule distributions $q(\mathcal{M})$, and $p$ to denote the approximated distributions modeled by parametric methods.

We denote the pre-trained geometric encoder as $E:\bigcup_{N=1}^{+\infty}({\mathbb{R}^{N\times 3}\times\mathbb{R}^{N\times d}}
)\to\mathbb{R}^{d_{r}}$, which embeds a molecule $\mathcal{M}$ with an arbitrary number of nodes $N$ into a representation vector $r$ of fixed dimension $d_{r}$. The geometric encoder exhibits E(3)- (or SE(3)-) invariance, meaning that $E(\mathcal{M})=E((\mathbf{x},\mathbf{h}))=E((\mathbf{x}\mathbf{R}^{T}+\mathbf{
t},\mathbf{h}))$ for any $\mathbf{t}\in\mathbb{R}^{3}$ and $\mathbf{R}\in O(3)$ (or $SO(3)$), where $O(3)$ is the set of orthogonal matrices (and $SO(3)$ being the set of special orthogonal matrices).

### 3.2 GeoRCG: Geometric-Representation-Conditioned Molecular Generation

Figure: Figure 2: T-SNE visualizations of the representations produced by Frad (Feng et al., ) for the QM9 dataset (left) and by Unimol (Zhou et al., ) for the GEOM-DRUG dataset (right). The representations exhibit clear clustering based on node count.
Refer to caption: extracted/5902367/fig/qm9_data_rep_clustering.png

##### Geometric Representation Generator

To improve the quality of the generated molecules, we propose first
transforming the geometrically structured molecular distribution $q(\mathcal{M})$ into a non-geometric representation distribution $q(r)$ using a well-pre-trained geometric encoder $E$ that maps each molecule $\mathcal{M}$ to its representation $r$. Learning the representation distribution $q(r)$ is considerably easier, since representations do not exhibit any symmetry as in explicit molecular generative models (Xu et al., ; Hoogeboom et al., ). We thus leverage a simple yet effective MLP-based diffusion architecture proposed in (Li et al., ) for the representation generator $p_{\varphi}(r)$, which adopts the DDIM architecture (Song et al., ) with MLP backbones and is optimized via the denoising score matching scheme (Vincent, ).

One deviation from previous practices (Li et al., ; Wang et al., ) is that we additionally condition the representation generator on the molecule’s node number $N$ by default(^1^11We omit the condition $N$ in our probability decompositions and mathematical derivations for statement simplicity, as its inclusion does not affect the overall framework and conclusions.). This is crucial for ensuring consistency between the size of the representation’s underlying molecule and the size of the molecule it guides to generate. Moreover, molecules with different sizes often have distinct modes in structures and properties (Hoogeboom et al., ), which is reflected in their geometric representations learned by modern pre-trained geometric encoders (Zhou et al., ; Feng et al., ), as shown in Figure 2. From the figures, it is evident that by conditioning on $N$, the learning process for the representation generator becomes simpler and more effective, leading to the following loss function of our representation generator:

$$ $\mathcal{L}_{\text{rep}}=\mathbb{E}_{(r,N)\in\mathcal{D}_{\text{train}}^{\text {rep}},\epsilon\sim\mathcal{N}(0,I),t}\left[||r-f_{\varphi}(r_{t},t,N)||^{2} \right],$ (1) $$

where $\mathcal{D}_{\text{train}}^{\text{rep}}=\{\!\!\{(E(\mathcal{M}),N(\mathcal{M})
)|\mathcal{M}\in\mathcal{D}_{\text{train}}^{\text{mol}}\}\!\!\}$, with $N(\mathcal{M})$ representing atom number of $\mathcal{M}$ and $\mathcal{D}_{\text{train}}^{\text{mol}}$ denoting the molecule dataset. Here, $f_{\varphi}$ is the MLP backbone (Li et al., ), and $r_{t}=\sqrt{\alpha_{t}}r+\sqrt{1-\alpha_{t}}\epsilon$ is the noisy representation computed with the predefined schedule $\alpha_{t}\in(0,1]$.

##### Molecule Generator

Since the ultimate goal of our framework is to generate molecules from $q(\mathcal{M})$, we decompose the molecular distribution as $q(\mathcal{M})=\int q(\mathcal{M}|r)q(r)\,dr$ to explicitly enable geometric-representation conditions. Consequently, a geometric-representation-conditioned molecular generator $p_{\theta}(\mathcal{M}|r)$ is required. In principle, we can use many modern molecule generators (Hoogeboom et al., ; Xu et al., ; Morehead & Cheng, ), as these models can all take additional conditions. To illustrate the effectiveness of our approach, however, we choose a relatively simple model EDM (Hoogeboom et al., ) as the base generator. EDM is designed to ensure the $O(3)$-invariance, i.e., for any $\mathbf{R}\in O(3)$, $p_{\theta}(\mathcal{M})=p_{\theta}(\mathbf{x},\mathbf{h}))=p_{\theta}((\mathbf
{x}\mathbf{R}^{T},\mathbf{h}))$. To accomodate EDM to representation conditions, we use the following training objective:

$$ $\mathcal{L}_{\text{mol}}=\mathbb{E}_{(\mathcal{M},r)\sim\mathcal{D}_{\text{ train}}^{\text{mol-rep}},t\sim\mathcal{U}(0,T),\epsilon\sim\hat{\mathcal{N}}(0 ,\mathbf{I})}\left[||\epsilon-f_{\theta}(\mathcal{M}_{t},t,r)||^{2}\right],$ (2) $$

where $\mathcal{D}_{\text{train}}^{\text{mol-rep}}=\{\!\!\{(\mathcal{M},E(\mathcal{M}
))|\mathcal{M}\in\mathcal{D}_{\text{train}}^{\text{mol}}\}\!\!\}$, and sampling from $\hat{\mathcal{N}}(0,\mathbf{I})$ entails drawing $\epsilon_{0}=[\epsilon_{0}^{(x)},\epsilon_{0}^{(h)}]$ from $\mathcal{N}(0,\mathbf{I})$, adjusting $\epsilon_{0}^{(x)}$ by subtracting its geometric center to obtain $\epsilon^{(x)}$, and setting $\epsilon=[\epsilon^{(x)},\epsilon_{0}^{(h)}]$. This ensures the zero center-of-mass property, as the distribution is defined on this subspace to ensure translation invariance (Hoogeboom et al., ). The noisy molecule is given by $\mathcal{M}_{t}=\alpha_{t}^{(\mathcal{M})}[\mathbf{x},\mathbf{h}]+\sigma_{t}^{
(\mathcal{M})}\epsilon$, with time-dependent schedules $\alpha_{t}^{(\mathcal{M})}$ and $\sigma_{t}^{(\mathcal{M})}$, while the diffusion backbone $f_{\theta}$, which is instantiated with EGNN (Satorras et al., ), is conditioned on $r$.

##### Combining the Two Generators Together

The representation generator $p_{\varphi}(r)$ and the molecule generator $p_{\theta}(\mathcal{M}|r)$ together model the molecular distribution $p_{\varphi,\theta}(\mathcal{M})=\int p_{\theta}(\mathcal{M}|r)p_{\varphi}(r)\,dr$, which approximates the data distribution $q(\mathcal{M})=\int q(\mathcal{M}|r)q(r)\,dr$ that we aim to capture. One notable advantage of the framework is that the decomposition enables parallel training of the two generators. The entire training and sampling procedure is summarized in Algorithm 1.

There are several key properties of GeoRCG that facilitate high-quality molecule generation. First, GeoRCG preserves all symmetry properties of the base molecule generator $p_{\theta}(\mathcal{M})$:

###### Proposition 3.1 .

(Symmetry Preservation) Assume the original molecular generator $p_{\theta}(\mathcal{M})$ is O(3)- or SO(3)-invariant. Then, the two-stage generator $p_{\varphi,\theta}(\mathcal{M})$ is also O(3)- or SO(3)-invariant.

###### Proof.

This result follows directly from the definition. Specifically, $p_{\varphi,\theta}(\mathcal{M})=\int p_{\theta}(\mathcal{M}|r)\,p_{\varphi}(r)
\,dr=\int p_{\theta}((\mathbf{x}\mathbf{R}^{T},\mathbf{h})|r)\,p_{\varphi}(r)
\,dr=p_{\varphi,\theta}((\mathbf{x}\mathbf{R}^{T},\mathbf{h}))$ for any $\mathbf{R}\in O(3)$ (or $SO(3)$). The second equality holds due to the symmetric property of $p_{\theta}(\mathcal{M})$, which remains valid when additional non-symmetric conditions $r$ are applied.
∎

Moreover, representation-conditioned diffusion models can achieve no higher overall total variation distance than traditional diffusion models, and can arguably yield better results, as the representation encodes key data information that may further reduce estimation error. We present the rigorous bound in Theorem 3.1, and provide the proof and detailed discussions in Section E.1. Notably, this is a general theoretical characterization that applies to prior experimental work (Li et al., ).

###### Theorem 3.1 .

Consider the random variable $x\in\mathbb{R}^{d}\sim q(x)$, and assume that the second moment $m_{x}$ of $x$ is bounded as $m_{x}^{2}:=\mathbb{E}_{q(x)}[\|x-\bar{x}\|^{2}]<\infty$, where $\bar{x}:=\mathbb{E}_{q(x)}[x]$. Further, assume that the score $\nabla\ln q(x_{t})$ is $L_{x}$-Lipschitz for all $t$, and that the score estimation error in the second-stage diffusion is bounded by $\epsilon_{\varphi,\theta,\text{cond}}$ such that $\mathbb{E}_{r\sim p_{\varphi}(r),\,x_{t}\sim q_{t}(x_{t}|r)}[\|s_{\theta}(x_{t
},t,r)-\nabla\ln q_{t}(x_{t}|r)\|^{2}]\leq\epsilon_{\varphi,\theta,\text{cond}
}^{2}$. Denote the step size as $h:=T/N$, where $T$ is the total diffusion time and $N$ is the number of discretization steps, and assume that $h\preceq 1/L_{x}$. Suppose we sample $x\sim p_{\theta}(x|r)$ from Gaussian noise, where $r\sim p_{\varphi}(r)$, and denote the final distribution of $x$ as $p_{\theta,\varphi}(x)$. Define $p_{0}^{q_{T|\varphi}}$, which is the endpoint of the reverse process starting from $q_{T|\varphi}$ instead of Gaussian noise. Here, $q_{T|\varphi}$ is the $T$-th step in the forward process starting from $q_{0|\varphi}:=\frac{1}{A}\int_{r}q(x_{0}|r)p_{\varphi}(r)\,dr$, where $A$ is the normalization factor. Denote $k$-dim isotropic Gaussian distribution as $\gamma^{k}$. Then the following holds,

$$ $\displaystyle{\rm TV}(p_{\theta,\varphi}(x),q(x))\preceq$ $\displaystyle\underbrace{\sqrt{{\rm KL}(q_{0|\varphi}||\gamma^{d+3})}\exp(-T)} _{\text{convergence of forward process}}+\underbrace{(L_{x}\sqrt{(d+3)h}+L_{x} m_{x}h)\sqrt{T}}_{\text{discretization error}}$ (3) $\displaystyle\ +\underbrace{\epsilon_{\varphi,\theta,\rm cond}\sqrt{T}}_{\text {conditional score estimation error}}+\underbrace{{\rm TV}(q_{0|\varphi},q_{0} )}_{\text{representation generation error}}$ (4) $$

Figure: Figure 3: A single molecule generator can be employed for both unconditional and conditional molecule generation with respect to various properties. For conditional generation, only the representation generator is re-trained on (molecule, property) pairs, allowing it to conditionally sample property-meaningful representations during the sampling stage.
Refer to caption: x2.png

###### Proposition 3.1 .

###### Proof.

###### Theorem 3.1 .

##### Balancing Quality and Diversity of Molecule Generation

In many scientific applications, researchers prioritize generating higher-quality molecules over more diverse ones. To address this preference, we introduce a feature that allows fine-grained control over the trade-off between diversity and quality in the sampling stage (thus without retraining). This is achieved by integrating two key techniques: low-temperature sampling (Ho & Salimans, ) (controlled via the temperature $\mathcal{T}$) for the representation generator, and classifier-free guidance (Ho & Salimans, ) (controlled via the coefficient $w$) for the molecule generator. We provide more details about the two techniques in Appendix B. Combining the two features enables a flexible and explicit control, which we refer to as “Balancing Controllablility” and demonstrate its effectiveness in Section 4.2.

##### Handling Conditional Molecule Generation

The framework discussed thus far focuses on unconditional molecule generation, where no specific property $c$ (e.g., HOMO energy) is pre-specified. However, for molecule generation, a more practical and desired scenario is conditional (also called controllable) generation, where additional conditions $c$, such as HOMO-LUMO gap energy, is introduced, and our objective shifts to generating molecules from the distribution $q(\mathcal{M}|c)$. In GeoRCG, this conditional generation is naturally decomposed as $p_{\theta,\varphi}(\mathcal{M}|c)=\int p_{\theta}(\mathcal{M}|r)p_{\varphi}(r|
c)\,dr$ , meaning that we first generate a “property-meaningful” molecular representation $r$, which is then independently used to condition the second-stage molecule generation. See Figure 3 for illustration. A key advantage of this modeling approach is that, when different properties (e.g., HOMO, LUMO, GAP energy) need to be captured, only the representation generator requires retraining under the new conditions. This retraining is highly efficient due to the lightweight nature of the representation generator. Notably, GeoRCG demonstrates outstanding conditional generation performance, as shown in Section 4.3. Moreover, we theoretically demonstrate that, under mild assumptions, the representation generator can provably estimate the conditional distribution and generate representations that lead to provable reward improvements toward the target, which subsequently benefits the second-stage generation. Further details are provided in Section E.2.

## 4 Experiments

### 4.1 Experiment Setup

##### Datasets and Tasks

As a method for 3D molecule generation, we evaluate GeoRCG on the widely used datasets QM9 (Ramakrishnan et al., ) and GEOM-DRUG (Gebauer et al., ; ). We focus on two tasks: unconditional molecule generation, where the goal is to sample from $q(\mathcal{M})$, and conditional (or controllable) molecule generation, where a property $c$ is given, and we aim to sample from $q(\mathcal{M}|c)$. To ensure fair comparisons, we follow the dataset split and configurations exactly as in Anderson et al. (); Hoogeboom et al. (); Xu et al. (). Without further clarification, we bold the highest scores and underline the second-highest one. Additionally, to illustrate the direct improvement over our base model, EDM (Hoogeboom et al., ), we display green numbers next to the score to indicate the average improvement, and red numbers to denote a decrease. All results are calculated based on 10k randomly sampled molecules, averaged over three runs, with standard errors reported in parentheses.

##### Instantiation of the Pre-trained Encoder

We employ Frad (Feng et al., ), which was pre-trained on the PCQM4Mv2 dataset (Nakata & Shimazaki, ) using a hybrid noise denoising objective, as the geometric encoder for QM9 dataset. For GEOM-DRUG, we adopt Unimol (Zhou et al., ) and pre-train it on the GEOM-DRUG dataset itself, since GEOM-DRUG contains distinct chemical elements not present in PCQM4Mv2 or other commonly used pre-training datasets such as ZINC or ChemBL (Li et al., ).

##### Baselines

A direct comparison is made with our base molecule generator, EDM (Hoogeboom et al., ). Additionally, we benchmark against the non-equivariant counterparts of EDM and GeoLDM (Xu et al., ), namely GDM(-AUG) (Hoogeboom et al., ) and GraphLDM(-AUG) (Xu et al., ), as well as the autoregressive method G-SchNet (Gebauer et al., ). For further comparison, we include advanced equivariant diffusion models like GeoLDM (Xu et al., ), EDM-Bridge (Wu et al., ), and GCDM (Morehead & Cheng, ), along with fast equivariant flow-based methods such as E-NF (Garcia Satorras et al., ), EquiFM (Song et al., ), and GOAT (Hong et al., ). A recent Bayesian-based method GeoBFN (Song et al., ) is also considered for its high-quality samples. Finally, we extend the comparison to 2D and 3D methods like MiDi (Vignac et al., ) and LDM-3DG (You et al., ).

Additionally, we provide further experiments, including ablation studies on the pre-trained encoder, in Appendix D.

### 4.2 Unconditional Molecule Generation

**Table 1: Quality comparison of unconditional molecular generation across different methods. The gray cells denotes the base molecule generator employed in GeoRCG.**
|  | QM9 | DRUG |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Methods<br>Metrics | Atom Sta (%) $\uparrow$ | Mol Sta (%) $\uparrow$ | Valid (%) $\uparrow$ | Valid & Unique (%) $\uparrow$ | Atom Sta (%) $\uparrow$ | Valid (%) $\uparrow$ |
| Data | 99 | 95.2 | 97.7 | 97.7 | 86.5 | 99.9 |
| G-Schnet | 95.7 | 68.1 | 85.5 | 80.3 | - | - |
| GDM | 97 | 63.2 | - | - | 75 | 90.8 |
| GDM-AUG | 97.6 | 71.6 | 90.4 | 89.5 | 77.7 | 91.8 |
| GraphLDM | 97.2 | 70.5 | 83.6 | 82.7 | 76.2 | 97.2 |
| GraphLDM-AUG | 97.9 | 78.7 | 90.5 | 89.5 | 79.6 | 98 |
| EDM | 98.7 | 82 | 91.9 | 90.7 | 81.3 | 92.6 |
| EDM-Bridge | 98.8 | 84.6 | 92 | 90.7 | 82.4 | 92.8 |
| GeoLDM | 98.9(0.1) | 89.4(0.5) | 93.8(0.4) | 92.7(0.5) | 84.4 | 99.3 |
| GCDM | 98.7(0.0) | 85.7(0.4) | 94.8(0.2) | 93.3(0.0) | 89 | 95.5 |
| ENF | 85 | 4.9 | 40.2 | 39.4 | - | - |
| EquiFM | 98.9(0.1) | 88.3(0.3) | 94.7(0.4) | 93.5(0.3) | 84.1 | 98.9 |
| GOAT | 98.4 | 84.1 | 90.9 | 89.99 | 81.8 | 96.0 |
| GeoBFN (1k) | 99.08(0.03) | 90.87(0.1) | 95.31(0.1) | 92.96(0.1) | 86.1 | 91.66 |
| GeoRCG | 99.12(0.03) 0.43% | 92.32(0.06) 12.59% | 96.52(0.2) 5.03% | 92.45(0.2) 1.93% | 84.3(0.12) 3.69% | 98.5(0.12) 6.37% |

We first evaluate the quality of unconditionally generated molecules from GeoRCG, with the commonly adopted validity and stability metrics for assessing molecules’ quality (Hoogeboom et al., ). See Appendix C for detailed descriptions of these metrics.

##### Main Results

We present the main results on the QM9 and DRUG datasets in Table 1. Below, we highlight the key findings: (i) Improvement over the base model (EDM): By leveraging geometric representations, GeoRCG significantly outperforms the base model, EDM, on both QM9 and DRUG datasets. Notably, on QM9, it increases stable molecules from $82\%$ to $93.9\%$ and validity from $91.9\%$ to $97.4\%$, while also improving molecule uniqueness. (ii) Superior performance compared to advanced methods: GeoRCG also surpasses included advanced models on the QM9 dataset. On the DRUG dataset, it outperforms models such as EDM-Bridge and GOAT, and gets a high score in validity. Although it falls short of achieving the best performance, we attribute this to the quality of the encoder’s representations, as we pre-trained it on the GEOM-DRUG dataset, which may lack diversity and sufficient size. Crucially, many structures in GEOM-DRUG lack the equilibrium conditions necessary for pre-training methods that enable effective learning of force fields (Zaidi et al., ; Feng et al., ). Additionally, GeoRCG adopts EDM (Hoogeboom et al., ) as the base molecule generator, which can be weaker compared to recent advanced models. Nevertheless, further improvement to GeoRCG can be achievabled by incorporating more advanced molecule generators or higher-quality pre-trained encoders.

##### Balancing Controllability

We proceed to investigate the “Balancing Controllablility”” feature of GeoRCG introduced in Section 3.2. To this end, we conducted a grid search by varying both $w$ and $\mathcal{T}$ on QM9 dataset, as depicted in Figure 4. The results indicate a clear trend: increasing $w$ and decreasing $\mathcal{T}$ improve validity and stability at the expense of uniqueness, allowing for fine-grained, flexible control over molecule generation. At its best, this approach achieves a molecule stability of 93.9% and a validity of 97.42%, approaching the dataset’s upper bound, with a trade-off in lower uniqueness&validity of 86.82%.

Figure: Figure 4: Balance controllable (unconditional) generation on QM9 dataset. Increasing $w$ and decreasing $\mathcal{T}$ enhances molecular stability and validity, with the cost of a reduction in uniqueness.
Refer to caption: x3.png

##### Additional Comparison with 2D&3D methods

We further compare with recent 2D&3D methods, including MiDi (Vignac et al., ) and LDM-3DG (You et al., ), which jointly learn and generate both 2D bond information and 3D geometry. However, these models rely on external tools like RDKit or OpenBabel (O’Boyle et al., ) for bond computation at the input stage, which enables them to implicitly leverage domain knowledge of such tools. In contrast, purely 3D methods like GeoRCG and those in our primary comparison utilize a coarse look-up table for bond estimation, which, while reflecting 3D learning, results in less accurate bond calculation, potentially biasing the comparison. Therefore, to provide a reference, we also report the performance of our models combined with the same external tools (e.g., OpenBabel) for precise bond calculations in our generated 3D conformations. Furthermore, as GeoRCG essentially captures 3D geometric distributions, we place more emphasis on 3D metrics that directly evaluate 3D learning capabilities, including BondLengthW1 and BondAngleW1 proposed by Vignac et al. () and detailed in Appendix C. The results in Table 2 demonstrate that GeoRCG not only significantly outperforms MiDi and LDM-3DG on 3D metrics, highlighting the advantages of using a pure 3D model for learning 3D structures, but also further enhances EDM’s performance, which has already shown considerable promise in 3D learning.

**Table 2: 3D geometry statistics and generated molecule quality on QM9 across different methods. Models marked with ^∗ indicate results obtained from our own experiments; see Appendix C for the evaluation guidelines. The stability metrics for EDM are higher than in Table 1 due to using the MiDi codebase for evaluation, which permits more valency for atoms.**
| Methods<br>Metrics | Angles (^∘) $\downarrow$ | Bond Length (e-2 Å) $\downarrow$ | Mol Sta (%) $\uparrow$ | Atom Sta (%) $\uparrow$ | Validity (%) $\uparrow$ | Uniqueness (%) $\uparrow$ |
| --- | --- | --- | --- | --- | --- | --- |
| Data | $\sim$0.1 | $\sim$0 | 98.7 | 99.8 | 98.9 | 99.9 |
| MiDi (uniform) | 0.67(0.02) | 1.6(0.7) | 96.1(0.2) | 99.7(0.0) | 96.6(0.2) | 97.6(0.1) |
| MiDi (adaptive) | 0.62(0.02) | 0.3(0.1) | 97.5(0.1) | 99.8(0.0) | 97.9(0.1) | 97.6(0.1) |
| LDM-3DG^∗ | 3.56 | 0.2 | 94.03 | 99.38 | 94.89 | 97.03 |
| EDM | 0.44 | 0.1 | 90.7 | 99.2 | 91.7 | 98.5 |
| EDM + OBabel | 0.44 | 0.1 | 97.9 | 99.8 | 99.0 | 98.5 |
| GeoRCG | 0.21(0.04) 52.27% | 0.04(0.0) 60% | 95.82(0.16) 5.6% | 99.59(0.02) 0.39% | 96.54(0.27) 5.28% | 95.74(0.18) 2.8% |
| GeoRCG + OBabel | 0.20(0.04) 54.55% | 0.07(0.06) 30% | 98.21(0.09) 0.32% | 99.88(0.00) 0.08% | 99.0(0.04) 0.0% | 95.74(0.16) 2.8% |

### 4.3 Conditional Molecule Generation

We now turn to a more challenging task: generating molecules with a specific property value $c$ from $q(\mathcal{M}|c)$. We strictly follow the evaluation protocol outlined in (Hoogeboom et al., ). Speicifically, QM9 is split into two halves, and an EGNN classifier (Satorras et al., ) is trained on the first half for evaluating the generated molecules’ property, while the generator is trained on the second half(^2^22Although Figure 3 shows that retraining the molecule generator is unnecessary, for a fair comparison, we still retrain the molecule generator on the second half of the dataset, rather than using the one in unconditional molecule generation trained on the entire dataset.). We focus on six properties: polarizability ($\alpha$), orbital energies ($\varepsilon_{\text{HOMO}}$, $\varepsilon_{\text{LUMO}}$), their gap ($\Delta\varepsilon$), dipole moment ($\mu$), and heat capacity ($C_{v}$).

**Table 3: Conditional molecule generation on QM9. The metric used is the MSE between the target property value and the classifier-predicted value. The gray cells denotes the baseline molecule generator employed in our proposed approach. Models marked with $*$ indicate results obtained from our own experiments; these are provided only as a coarse reference due to potentially differing evaluation criteria, see Appendix C for details.**
| Methods<br>Properties | $\alpha$ | $\Delta\varepsilon$ | $\varepsilon_{\text{HOMO}}$ | $\varepsilon_{\text{LUMO}}$ | $\mu$ | $C_{v}$ |
| --- | --- | --- | --- | --- | --- | --- |
| QM9 (lower bound) | 0.1 | 64 | 39 | 36 | 0.043 | 0.04 |
| Random | 9.01 | 1470 | 646 | 1457 | 1.616 | 6.857 |
| N_atoms | 3.86 | 866 | 426 | 813 | 1.053 | 1.971 |
| EDM | 2.76 | 655 | 356 | 584 | 1.111 | 1.101 |
| GeoLDM | 2.37 | 587 | 340 | 522 | 1.108 | 1.025 |
| GCDM | 1.97 | 602 | 344 | 479 | 0.844 | 0.689 |
| EquiFM | 2.41 | 591 | 337 | 530 | 1.106 | 1.033 |
| GOAT | 2.74 | 605 | 350 | 534 | 1.01 | 0.883 |
| LDM-3DG^∗ | 12.29 | 1160 | 583 | 1093 | 1.42 | 5.74 |
| GeoBFN | 2.34 | 577 | 328 | 516 | 0.998 | 0.949 |
| GeoRCG | 0.89(0.005) 67.75% | 368.2(4.6) 43.79% | 220.1(1.0) 38.17% | 290.8(3.1) 50.21% | 0.831(0.008) 25.2% | 0.542(0.004) 50.77% |

The results are presented in Table 3. The first three baselines, as introduced by EDM (Hoogeboom et al., ), represent the classifier’s inherent bias as the lower bound for performance, the random evaluation result as the upper bound, and the dependency of properties on $N$. For more details, please refer to Appendix C.

As shown, GeoRCG nearly doubles the performance of the best existing models for most properties, with an average $31\%$ improvement over the best ones. This is a task where many recent models struggle to make even modest improvements, as evidenced in the table. Notably, for different properties, we only re-train the representation generator, as demonstrated in Section 3.2, significantly saving training time. In Figure 5, we visualize the generated samples, which exhibit minimal property errors and display a clear trend as the target values increase. Additional randomly generated molecules are provided in Section F.2.

Figure: Figure 5: Conditionally generated molecules on property $\alpha$ using GeoRCG. The black number indicates the specified property value (condition), the green number represents the evaluated property value (computed by the classifier) for the generated molecule conformer.
Refer to caption: x6.png

A potential concern is that for a given property value $c$, $p_{\varphi}(r|c)$ may produce a representation corresponding to a molecule from the training dataset, allowing the molecule generator to simply recover its full conformation based on that representation. This could lead to small property errors but a lack of novelty. To address this, we conducted a thorough evaluation of the generated molecules across each property, finding that the novelty (the proportion of new molecules not present in the training dataset) remains high at approximately 70%, comparable to other methods. Additionally, the conditionally generated molecules demonstrate much higher molecule stability than EDM (Hoogeboom et al., ). Further details can be found in Appendix D.

### 4.4 Faster Generation with Fewer Steps

With geometric representation condition, it is reasonable to expect that fewer discretization steps of the reverse diffusion SDE (Song et al., ) would still yield competitive results. Therefore, we reduce the number of diffusion steps and evaluate the model’s performance. The results are presented in Table 4. As demonstrated, with the geometric representation condition, GeoRCG consistently outperforms other approaches across all step numbers. Notably, with approximately 100 steps, the performance of our method nearly converges to the optimal performance observed with 1000 steps, which already surpasses all other methods across all step numbers. This directly reflects the faster generation speed, as the time required for the first-stage representation generation is minimal and can be considered negligible.

**Table 4: Quality of generated molecules on QM9 with fewer diffusion steps. The blue cells indicate the highest value among methods with the same number of diffusion steps, while bold font emphasizes values that outperform all other methods across all diffusion steps.**
| Methods<br>Metrics | # Steps | Atom Sta (%) $\uparrow$ | Mol Sta (%) $\uparrow$ | Valid (%) $\uparrow$ | Valid & Unique (%) $\uparrow$ |
| --- | --- | --- | --- | --- | --- |
| Data | - | 99 | 95.2 | 97.7 | 97.7 |
| Best baseline in Table 1 | 1000 | 99.08 | 90.87 | 95.31 | 92.96 |
| EquiFM | 200 | 98.9(0.1) | 88.3(0.3) | 94.7(0.4) | 93.5(0.3) |
| GOAT | 90 | 98.4 | 84.1 | 90.9 | 89.99 |
| EDM | 50 | 97.0(0.1) | 66.4(0.2) | - | - |
| EDM-Bridge | 50 | 97.3(0.1) | 69.2(0.2) | - | - |
| GeoBFN | 50 | 98.28(0.1) | 85.11(0.5) | 92.27(0.4) | 90.72(0.3) |
| GeoRCG | 50 | 98.75(0.05) 1.80% | 89.08(0.52) 34.16% | 95.05(0.33) | 91.32(0.37) |
| EDM | 100 | 97.3(0.1) | 69.8(0.2) | - | - |
| EDM-Bridge | 100 | 97.9(0.1) | 72.3(0.2) | - | - |
| GeoBFN | 100 | 98.64(0.1) | 87.21(0.3) | 93.03(0.3) | 91.53(0.3) |
| GeoRCG | 100 | 99.08(0.03) 1.83% | 91.85(0.34) 31.59% | 96.49(0.27) | 92.07(0.35) |
| EDM | 500 | 98.5(0.1) | 81.2(0.1) | - | - |
| EDM-Bridge | 500 | 98.7(0.1) | 83.7(0.1) | - | - |
| GeoBFN | 500 | 98.78(0.8) | 88.42(0.2) | 93.35(0.2) | 91.78(0.2) |
| GeoRCG | 500 | 99.09(0.01) 0.60% | 91.89(0.24) 13.17% | 96.57(0.12) | 92.08(0.36) |
| EDM | 1000 | 98.7 | 82 | 91.9 | 90.7 |
| EDM-Bridge | 1000 | 98.8 | 84.6 | 92 | 90.7 |
| GeoBFN | 1000 | 99.08(0.06) | 90.87(0.2) | 95.31(0.1) | 92.96(0.1) |
| GeoRCG | 1000 | 99.12(0.03) 0.43% | 92.32(0.06) 12.59% | 96.52(0.2) 5.03% | 92.45(0.2) 1.93% |

## 5 Conclusions

In this work, we present GeoRCG, an effective framework for improving the generation quality of arbitrary molecule generators by incorporating geometric representation conditions. We use EDM (Hoogeboom et al., ) as the base molecule generator and demonstrate the effectiveness of our framework through extensive molecular generation experiments. Notably, in conditional generation tasks, GeoRCG achieves a 31% performance boost compared to recent state-of-the-art models. Additionally, the representation guidance enables significantly faster sampling with 10x fewer diffusion steps while maintaining near-optimal performance. Beyond these empirical improvements, we provide theoretical characterizations of general representation-conditioned generative models, which address a key gap in the existing literature (Li et al., ).

One limitation of our framework is that its generation quality could depend on the representation quality. For instance, on the GEOM-DRUG dataset, where the encoder was less thoroughly pre-trained, the improvements were less pronounced, and GeoRCG did not surpass SOTA methods. Future work could focus on improving the effectiveness of pre-trained models or exploring enhanced representation regularization techniques. Furthermore, while we employ EDM (Hoogeboom et al., ) as the base molecule generator, our framework is general and can be applied to any molecular generative model. Integrating this framework with more advanced SOTA models offers a promising direction for future exploration and performance enhancement.

## Appendix A More Related Works

##### Pre-training for Molecular Encoders

Learning meaningful molecular representations is crucial for downstream tasks like molecular property prediction (Fang et al., ). The paradigm of pre-training on large-scale datasets followed by fine-tuning on smaller datasets has been shown to significantly enhance model performance in both vision and language domains (Kenton & Toutanova, ; Brown, ; Dosovitskiy, ), and building on this success, recent studies have proposed self-supervised pre-training methods for point-cloud-formatted molecules, aiming to achieve similar performance gains (Zhou et al., ; Feng et al., ; Liu et al., ; Fang et al., ; Jiao et al., ; Ni et al., ). Typical proxy tasks involve masking and recovering atom types, bond lengths, and bond angles (Fang et al., ; Zhou et al., ). However, since molecules reside in continuous 3D space, a more effective approach is to introduce carefully designed noise to the coordinates and train the model to denoise it. Examples include isotropic Gaussian noise (Zaidi et al., ; Zhou et al., ), Riemann-Gaussian noise (Jiao et al., ), and complex hybrid noise (Ni et al., ; Feng et al., ; Jiao et al., ). Notably, Zaidi et al. () demonstrated that denoising equilibrium structures corresponds to learning the force field, thereby producing representations that are both physically and chemically informative.

## Appendix B Algorithms

##### Parallel Training and Sequential Sampling

We provide the high-level training and sampling algorithm for GeoRCG in Algorithm 1.

Figure: Algorithm 1 Parallel Training and Sequential Sampling for GeoRCG

##### Representation Perturbation

Unlike typical conditional training scenarios, GeoRCG faces a unique challenge: the representations that condition the molecule generator during training may not always coincide with those generated by the representation generator during the sampling stage. This issue is particularly pronounced in molecular generation than image case (Li et al., ), where pre-trained encoders are typically not trained on that large datasets with advanced regularization techniques like MoCo v3 (Chen et al., ). Consequently, the molecule generator is susceptible to overfitting to the training representations, as evidenced by our preliminary experiments on QM9 molecule generation shown in Table 5.

**Table 5: Quality of molecules generated by GeoRCG trained on the QM9 dataset without using the representation perturbation technique, comparing different representation sources. “Training Dataset” refers to representations sampled from $\mathcal{D}_{\text{train}}^{\text{rep}}$, while “Sampled” refers to representations generated by the trained representation generator $p_{\varphi}(r)$. See Appendix C for detailed descriptions of the metrics.**
| Rep source<br>Metrics | Mol Sta (%) ($\uparrow$) | Valid (%) ($\uparrow$) |
| --- | --- | --- |
| Training Dataset | 93.20 (0.50) | 97.07 (0.32) |
| Sampled | 86.93 (0.50) | 89.12 (0.21) |

We find that applying a simple way by perturbing the geometric representation with Gaussian noise $\sigma_{\text{rep}}\epsilon$ (where $\epsilon\sim\mathcal{N}(0,I)$ and $\sigma_{\text{rep}}$ is a small variance) during the molecule generator’s training is particularly effective. Formally, after sampling a data point $(E(\mathcal{M}),\mathcal{M})$ from $\mathcal{D}_{\text{train}}^{\text{mol-rep}}$, we use $(\mathcal{M},E(\mathcal{M})+\sigma_{\text{rep}}\epsilon)$ for training. Ablation study in Appendix D show this simple method can effectively prevent overfitting and ensure that performance on novel representations matches those from the training dataset.

##### Low-Temperature Sampling

We adopt the low-temperature sampling algorithm introduced by Chroma (Ingraham et al., ), however, applying it to an MLP-based diffusion model rather than the equivariant diffusion model that processes geometric objects as Chroma.

The objective of low-temperature sampling is to perturb the learned representation distribution $p_{\varphi}(r)$ by rescaling it with an inverse temperature factor, $\frac{1}{\mathcal{T}}$, where $\mathcal{T}$ is a tunable temperature parameter during sampling, and finally enables sampling from $\mathcal{Z}_{\mathcal{T}}p_{\varphi}^{\frac{1}{\mathcal{T}}}$, where $\mathcal{Z}_{\mathcal{T}}$ is a normalization constant. The method proposed in Chroma (Ingraham et al., ) scales the score $\epsilon_{t}$ estimated at each diffusion time step using a time-dependent factor $\lambda_{t}$. The approach is derived from and has theoretical guarantees for simplified toy distributions, and its performance on complex distributions, though lacking strict guarantees, has shown consistent results when combined with annealed Langevin sampling (Song et al., ). Here we briefly introduce it for self-containess, and recommend the readers to Ingraham et al. () for detailed derivation and illustration.

Consider the vanilla reverse SDE used in DDPM sampling (VP formulation) (Song et al., ):

$$ $dr=-\frac{1}{2}\beta_{t}r-\beta_{t}\nabla_{r}\log q_{t}(r)dt+\sqrt{\beta_{t}}d \mathbf{\bar{w}},$ (5) $$

where $\mathbf{\bar{w}}$ is a reverse-time Wiener process, $q_{t}(r)$ denotes the ground-truth representation distribution at time $t$, and $\beta_{t}$ represents the time-dependent diffusion schedule. To incorporate low-temperature sampling, we utilize the following Hybrid Langevin Reverse-time SDE:

$$ $dr=-\frac{1}{2}\beta_{t}r-\left(\lambda_{t}+\frac{\lambda_{0}\psi}{2}\right) \beta_{t}\nabla_{r}\log q_{t}(r)dt+\sqrt{\beta_{t}(1+\psi)}d\mathbf{\bar{w}},$ (6) $$

where $\lambda_{t}$ is a time-dependent temperature parameter defined as $\frac{\lambda_{0}}{\alpha_{t}^{2}+(1-\alpha_{t}^{2})\lambda_{0}}$, with $\lambda_{0}=\frac{1}{\mathcal{T}}$. $\alpha_{t}$ satisfies $\frac{1}{2}\beta_{t}=\frac{d\log\alpha_{t}}{dt}$. The parameter $\psi$ controls the rate of Langevin equilibration per unit time, and as shown in Ingraham et al. (), it helps align more effectively with the reweighting objective in complex distributions. In our implementation, we employ the explicit annealed Langevin process (the corrector step from (Song et al., )) to achieve similar results, with the corrector step number fixed to 5.

##### Classifier-Free Guidance

We employ the classifier-free guidance algorithm, as introduced in (Ho & Salimans, ), for our molecule generator. Specifically, we introduce a trainable “fake” representation, denoted as $l$, which serves as the unconditional signal. During the training phase, $l$ is initialized as learnable parameters, and with a probability of $p_{\text{fake}}$, the true representation $r$ is replaced by $l$. This ensures that the model is capable of generating molecules unconditionally, i.e., $p_{\theta}(\mathcal{M}|l)$ approximates $q(\mathcal{M})$. During sampling, the final score estimate produced by the molecule generator is adjusted using the formula $(1+w)f_{\theta}(\mathcal{M}_{t},t,r)-wf_{\theta}(\mathcal{M}_{t},t,l)$, allowing flexible control over the strength of the representation guidance.

## Appendix C Experiment Details

##### Metrics and Baseline Descriptions

We adopt the evaluation metrics, guidelines and baselines commonly used in prior 3D molecular generative models to ensure a fair comparison (Hoogeboom et al., ).

- •
In the unconditional setting, we assess the generated molecules using several key metrics:
–
Atom Stability: The proportion of atoms with correct valency.
–
Molecule Stability: The proportion of molecules where all atoms within the molecule are stable.
–
Validity: The proportion of molecules that can be converted into valid SMILES using RDKit.
–
Validity & Uniqueness: The proportion of unique molecules among the valid molecules.
Following prior work on direct 3D molecular conformations $\mathcal{M}=(\mathbf{x},\mathbf{h})$ (Hoogeboom et al., ), we infer bond information based on atom types and bond lengths using look-up table methods.
Following the approach of Hoogeboom et al. (); Vignac & Frossard (), we do not report Novelty scores in the main text, since QM9 represents an exhaustive enumeration of molecules satisfying a predefined set of constraints, therefore, “novel” molecule would necessarily violate at least one of these constraints, which indicates that a model fails to fully capture the properties of the dataset. Consistent with Hoogeboom et al. (), we observe that the novelty score decreases as stability and validity scores improve, eventually stabilizing at approximately 60%. This is comparable to the final novelty score of EDM, which is around 65% (see Table 8).
When comparing with 2D & 3D models, we evaluate two 3D metrics introduced by MiDi (Vignac et al., ), which directly assess the geometry learning ability:
–
BondLengthW1: The weighted 1-Wasserstein distance between the bond-length distributions of the generated molecules and the training dataset, with weights corresponding to different bond types.
–
BondAngleW1: The weighted 1-Wasserstein distance between the atom-centered angle distributions of the generated molecules and the training dataset, with weights based on atom types.
They are formally defined as:
$\text{BondLengthsW}1=\sum_{y\in\text{bond types}}q^{Y}(y)\mathcal{W}1(\hat{D}_
{\text{dist}}(y),D_{\text{dist}}(y)),$
(7)
where $q^{Y}(y)$ is the proportion of bonds of type $y$ in the training set, $\hat{D}_{\text{dist}}(y)$ is the generated distribution of bond lengths for bond type $y$, and $D_{\text{dist}}(y)$ is the corresponding distribution from the test set. And
$\text{BondAnglesW}1=\sum_{x\in\text{atom types}}q^{X}(x)\mathcal{W}1(\hat{D}_{
\text{angles}}(x),D_{\text{angles}}(x)),$
(8)
where $q^{X}(x)$ denotes the proportion of atoms of type $x$ in the training set, restricted to atoms with two or more neighbors, and $D_{\text{angles}}(x)$ represents the distribution of geometric angles of the form $\angle(r_{k}-r_{i},r_{j}-r_{i})$, where $i$ is an atom of type $x$, and $k$ and $j$ are neighbors of $i$.
- •
In the conditional generation setting, as described in (Hoogeboom et al., ), we evaluate our approach on the QM9 dataset across six properties: polarizability $\alpha$, orbital energies $\varepsilon_{\text{HOMO}}$, $\varepsilon_{\text{LUMO}}$, and their gap $\Delta\varepsilon$, dipole moment $\mu$, and heat capacity $C_{v}$. The generative model is trained conditionally on the second half of the QM9 dataset, and an EGNN (Satorras et al., ) classifier, trained on the first half, is employed to evaluate the MAE property error of the generated samples.
Three baselines are adopted in Table 3:
–
QM9 (lower bound): The mean error of a classifier trained on the first half of the QM9 dataset and evaluated on the second half. This baseline represents the inherent bias/error of the classifier, setting a lower bound for model performance and reflecting the best possible performance a model can achieve.
–
Random: The classifier’s performance when evaluated on the second half of QM9 with randomly shuffled molecule property labels. This baseline provides an upper bound, representing the worst achievable performance.
–
N_atoms: The performance of a classifier trained exclusively on the number of atoms $N$ and evaluated using only $N$ as input. This baseline captures the intrinsic relationship between molecular properties and the number of atoms, which a generative model must surpass to demonstrate effectiveness.

##### Model Architectures, Hyperparameters and Training Details

- •
Representation Generator. We use the same architecture for the representation generator as the MLP-based diffusion model proposed in Li et al. (). We use 18 blocks of residual MLP layers with 1536 hidden dimensions, 1000 diffusion steps, and a linear noise schedule for $\beta_{t}$. The representation generator is trained for 2000 epochs with a batch size of 128 for both the QM9 and DRUG datasets. Training on QM9 takes approximately 2.5 days on a single Nvidia 4090, while training on DRUG takes around 4 days on a single Nvidia A800. Training time can indeed be further reduced, as the model shows minimal progress after approximately half of the reported time.
- •
Molecule Generator. We adopt EDM (Hoogeboom et al., ) as the base molecule generator, using the same EGNN (Satorras et al., ) architecture, with the exception of the conditioning module. Specifically, we incorporate a cross-attention (Vaswani, ) module for better conditioning on representations, placing it between every block of the EGNN to enhance regularization and increase expressiveness. For the EGNN hyperparameters, we use 9 layers with 256 hidden dimensions for QM9 and 4 layers with 256 hidden dimensions for DRUG. The number of diffusion steps is set to 1000 (except for cases in Table 4 that generate molecules with fewer steps), and we employ the polynomial scheduler for $\alpha_{t}^{(\mathcal{M})}$. Notably, all model hyperparameters are identical to those in EDM for fair comparison. During training, we use a batch size of 128 and 3000 epochs on QM9, and a batch size of 64 and 20 epochs on DRUG. The representation perturbation values are set to $\sigma_{\text{rep}}=0.3$ on QM9 and $\sigma_{\text{rep}}=0.5$ on DRUG. Training takes approximately 6 days on QM9 using a single Nvidia 4090, and around 10 days on DRUG using two Nvidia A800 GPUs.
- •
Sampling Details. During representation sampling, we use the predictor-corrector method from Song et al. () for VP SDE to achieve better equilibrium distributions, which facilitates low-temperature sampling. For molecule sampling, the process remains the same as in EDM, with the addition of classifier-free guidance. For the unconditional generation results in Table 1, we use $(w,\mathcal{T})=(1.0,1.0)$ in the QM9 dataset, except for the results in Figure 4, and $(w,\mathcal{T})=(0.0,0.5)$ in the GEOM-DRUG dataset (note that $w=0.0$ indicates that we do not use classifier-free guidance, not that the representation condition itself is not applied). Further tuning of these two hyperparameters may lead to improved results.

##### Evaluation of LDM-3DG (You et al., 2023 )

We evaluate the performance of LDM-3DG (You et al., ), an Auto-Encoder-based method that also leverages the compactness of the representation space to achieve good performance.

- •
For the unconditional results in Table 1, we utilize the 3D conformations unconditionally generated by LDM-3DG (You et al., ) and compute the bond information using the look-up table method from EDM (Hoogeboom et al., ). Notably, although LDM-3DG predicts both the 2D molecular graph and the 3D conformation, we do not use the bond information it predicts for the following reasons:
1.
For the calculation of 3D geometry statistics, we observe significant inconsistencies between the generated 2D graphs and 3D geometries (e.g., valid molecules with bond lengths exceeding $100\,\text{m}$), leading to unreliable statistics (e.g., BondLengthW1 exploding to 3900).
2.
For stability and validity metrics, which are fundamentally 2D and computed based on molecular graphs (atoms and bond types), using the generated 2D graph would ignore the contribution of the 3D module, preventing an evaluation of its 3D learning performance.
3.
Most critically, their 2D module is explicitly designed to filter out invalid (sub-)molecules during generation using the RDKit method. This means that if invalid molecules or sub-molecules are generated, they are regenerated. This explicit filtering deviates from our standard evaluation criteria and is unsuitable for a fair comparison.
- •
For the conditional results in Table 3, we first note a potential issue with LDM-3DG (You et al., ): The model cannot explicitly specify the node number $N$ during molecule generation, as it uses an auto-regressive 2D generator that automatically stops adding atoms/motifs when deemed sufficient. However, the evaluation in Table 3 requires specifying both $N$ and property $c$, following the ground-truth distribution $q(N,c)$ from the training dataset. To ensure fair evaluation, conditions feeding to LDM-3DG must also satisfy this distribution. As the authors claim the model can implicitly learn $q(N)$ and thus $q(N|c)$, we first sample 10,000 values from $q(c)$ and feed them to LDM-3DG, expecting it to infer $N$ from $c$ implicitly as argued, and thus matching the $q(N,c)$ conditions.

## Appendix D Additional Experiment Results

##### Ablation Study: Representation Encoders

Geometric representations play a pivotal role in GeoRCG. To evaluate the importance of representation quality, we conduct an ablation study comparing the quality of molecule samples generated by GeoRCG trained under different geometric encoder configurations.

We first assess the benefits provided by the pre-training stage. Specifically, we utilize the pre-trained encoder Frad (Feng et al., ), trained on the PCQM4Mv2 dataset (Nakata & Shimazaki, ) with a hybrid coordinates denoising task (Feng et al., ). This approach has been proven to equivalently learn force fields (Feng et al., ; Zaidi et al., ), and is therefore expected to produce informative representations that capture high-level molecular information. We train GeoRCG using representations from a well-pretrained Frad and a Frad with randomly initialized weights. The molecule generation quality on QM9, as shown in Table 6, clearly underscores the critical role of pre-training on large datasets with advanced techniques in improving representation quality, ultimately enhancing GeoRCG’s performance.

**Table 6: Quality of molecules generated by GeoRCG with different encoders trained on the QM9 dataset. “Random” indicates that the weights were initialized randomly without any pre-training.**
| Encoder<br>Metrics | Atom Sta (%) | Mol Sta (%) | Valid (%) | Valid & Unique (%) |
| --- | --- | --- | --- | --- |
| Random Enc | 98.55(0.01) | 78.66(0.07) | 94.68(0.09) | 55.99(0.83) |
| Pretrained Enc | 99.10(0.02) | 92.15(0.23) | 96.48(0.08) | 92.45(0.21) |

Next, we investigate the impact of different pre-trained encoders, which could vary in model structure and proxy tasks used for pre-training. Specifically, we compare Unimol (Zhou et al., ), which employs a message-passing neural network framework incorporating distance features (i.e., DisGNN in (Li et al., ; )) and primarily uses naive coordinates denoising, with Frad (Feng et al., ), which adopts TorchMD (Thölke & De Fabritiis, ) as the backbone and utilizes carefully designed hybrid-denoising tasks. Both Unimol (Zhou et al., ) and Frad (Feng et al., ) are pre-trained on the GEOM-DRUG dataset until convergence. We visualize the T-SNE of the representations generated for GEOM-DRUG. As shown in Figure 6, the T-SNE of the Unimol representations exhibits a clearer clustering pattern based on node numbers compared to the Frad representations, which may suggest better representation learning. To further investigate, we utilize both encoders to train GeoRCG and subsequently evaluate the quality of molecule generation. The Frad-based GeoRCG achieves a Validity of $96.9(0.44)$ and Atom Stability of $84.4(0.27)$, while the Unimol-based GeoRCG achieves a Validity of $98.5(0.12)$ and Atom Stability of $84.3(0.12)$: Although the Frad-based GeoRCG produces slightly higher atom stability, its high variance and significantly lower validity suggest inferior performance. These findings, along with our main results, offer insights into the types of representations more effective for guiding molecule generation, suggesting that sensitivity to molecule size may be a critical factor.

Figure: Figure 6: T-SNE visualization of representations produced by the pre-trained encoders for the GEOM-DRUG dataset, colored by node number. The left plot corresponds to Unimol (Zhou et al., ), and the right plot corresponds to Frad (Feng et al., ).
Refer to caption: extracted/5902367/fig/DRUG_data_rep_clustering_unimol.png

##### Ablation Study: Representation Perturbation

As discussed in Appendix B, we investigate the effectiveness of the straightforward representation perturbation technique by introducing random noise to perturb the representations during training. Additionally, we apply extra dropout in the conditioning module of our molecule generator to mitigate overfitting on the representation conditions. Ablation experiments presented in Table 7 demonstrate the efficacy of these simple yet impactful methods.

**Table 7: Quality of molecules generated by GeoRCG trained on the QM9 dataset, with and without representation perturbation and representation condition dropout.**
| Hyper-parameters<br>Metrics | Atom Sta (%) | Mol Sta (%) | Valid (%) | Valid & Unique (%) |
| --- | --- | --- | --- | --- |
| rep noise ✗  cond. dropout ✗ | 98.53(0.08) | 86.93(0.5) | 93.69(0.09) | 89.12(0.21) |
| rep noise ✗  cond. dropout ✓ | 98.62(0.08) | 87.9(0.35) | 94.64(0.18) | 90.15(0.02) |
| rep noise ✓ cond. dropout ✗ | 99.05(0.01) | 91.69(0.08) | 96.48(0.11) | 92.38(0.12) |
| rep noise ✓ cond. dropout ✓ | 99.10(0.02) | 92.15(0.23) | 96.48(0.08) | 92.45(0.21) |

##### Quality of Conditionally Generated Molecules

Detailed molecular metrics for conditionally generated molecules are provided in Table 8. For comparison, we also include the stability metrics of molecules conditionally generated by EDM, which highlight a notable improvement in stability with GeoRCG. Specifically, EDM’s stability scores are: $\alpha$ (80.4%), $\Delta\varepsilon$ (81.73%), $\varepsilon_{\text{HOMO}}$ (82.81%), $\varepsilon_{\text{LUMO}}$ (83.6%), $\mu$ (83.3%), and $C_{v}$ (81.03%).

**Table 8: Supplementary evaluation of conditionally generated molecules from GeoRCG. The right side reports metrics for unconditionally generated molecules from other methods for reference. Note that conditional models (left) were trained on half of the QM9 dataset, while unconditional models (right) were trained on the full dataset, which may account for slight decreases in stability and validity metrics.**
|  | $\alpha$ | $\Delta\varepsilon$ | $\varepsilon_{\text{HOMO}}$ | $\varepsilon_{\text{LUMO}}$ | $\mu$ | $C_{v}$ | Ours | EDM | GeoLDM | EquiFM |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Atom Sta (%) | 98.93(0.06) | 98.84(0.02) | 98.81(0.04) | 98.85(0.02) | 98.85(0.02) | 98.8(0.03) | 99.12(0.03) | 98.7 | 98.9(0.1) | 98.9(0.1) |
| Mol Sta (%) | 88.89(0.51) | 88.83(0.25) | 88.50(0.09) | 89.04(0.09) | 88.66(0.15) | 88.7(0.29) | 92.32(0.06) | 82 | 89.4(0.5) | 88.3(0.3) |
| Valid (%) | 94.85(0.42) | 94.83(0.06) | 94.84(0.15) | 95.01(0.15) | 94.82(0.11) | 94.95(0.16) | 96.52(0.2) | 91.9 | 93.8(0.4) | 94.7(0.4) |
| Valid & Unique (%) | 90.31(0.58) | 90.42(0.04) | 90.44(0.28) | 90.73(0.12) | 90.52(0.18) | 90.65(0.19) | 92.45(0.24) | 90.7 | 92.7(0.5) | 93.5(0.3) |
| Valid & Unique & Novelty (%) | 71.38(0.46) | 72.23(0.58) | 71.95(0.30) | 71.79(0.41) | 72.47(0.59) | 72.53(0.72) | 61.32(0.77) | 65.7 | 58.1 | 57.4 |

## Appendix E Theoretical Analysis

In this section, we provide rigorous theoretical analysis on representation-conditioned diffusion models. Our theory is not limited to molecule generation, and is the first theoretical breakthrough for the RCG framework (Li et al., ).

Our analysis is organized as follows. In Section E.1, we analyze the generation bound of representation-conditioned diffusion models in unconditional generation tasks by showing: (i) the representation can be well generated by the first-stage diffusion model with mild assumptions (Section E.1.1); (ii) the second-stage representation-conditioned diffusion model exhibits no higher generalization error than traditional one-stage diffusion model, and can arguably achieve lower error leveraging the informative representations (Section E.1.2). Then in Section E.2, we analyze conditional generation tasks as follows: (iii) under mild assumptions of representations and targets, we provide novel bound for score estimation error (Section E.2.1); (iv) generated representations have provable reward improvement towards the target, with the suboptimality composed of offline regression error and diffusion distribution shift (Section E.2.2), thus would improve the second stage of conditional generation (Section E.2.3).

##### Notations.

In this section, we use SDE and score matching formulations of diffusion models to present our theoretical results, given their equivalence with the DDPM family (Song et al., ). We consider the random variable $x\in\mathbb{R}^{d}$, and use $q(\cdot)$ to denote the ground truth distributions, $p(\cdot)$ to denote the posterior distribution predicted by diffusion models. For instance, $q(x)$ is the ground truth distribution of the underlying data $x$, while $p_{\varphi}(r)$ is the predicted distribution of latent representations. We use $T$ to denote the total time of diffusion models, and $N$ to represent the discretization step number. We consider a SDE with continuous time $[0,T]$, as well as its discretized DDPM which has $N$ diffusion steps with step size $h:=T/N$. The forward process is denoted as $(x_{t})_{t\in[0,T]}\sim q_{t}$, and the reverse process is denoted as $(\bar{x}_{t})_{t\in[0,T]}\sim p_{t}$. If the reverse process is predicted by the score matching network, we use its parameters as the subscript. Please note that there are two different initialization of the reverse process: the end of forward process $q_{T}$ and standard Gaussian noise $\gamma^{d}$. We use superscript $q_{T}$ to differentiate the former from the latter.

### E.1 Unconditional Generation

#### E.1.1 Provable Generation of Representations

Recall the two-stage generation process of representation-conditioned generation: $p(x,r)=p_{\theta}(x|r)p_{\varphi}(r)$. To quantitatively evaluate the generation process, we consider two stages separately. In this subsection, we first provide theoretical analysis on the provable generation of representations $p_{\varphi}(r)$.

###### Assumption E.1 .

(Second moment bound of representations.)

$$ $\displaystyle m_{r}^{2}:=\mathbb{E}_{q(r)}[||r-\bar{r}||^{2}]<\infty$ (9) $$

where $q(r)$ is the ground truth distribution of the representations, and $\bar{r}:=\mathbb{E}_{q(r)}[r]$.

###### Assumption E.2 .

(Lipschitz score of representations). For all $t\geq 0$, the score $\nabla\ln q(r_{t})$ is $L_{r}$-Lipschitz.

where $q(r_{t})$ is the distribution of noisy latent $r_{t}$ at diffusion step $t$ in the forward process.

Finally, the quality of diffusion models obviously depends on the expressivity of score network $\varphi$ with prediction $s_{\varphi}^{(t)}$.

###### Assumption E.3 .

(Score estimation error of representations). For all $t\in[0,T]$,

$$ $\mathbb{E}_{q(r_{t})}[||s_{\varphi}^{(t)}-\nabla\ln q(r_{t})||^{2}]\leq \epsilon_{\varphi,\rm score}^{2}$ (10) $$

These are similar assumptions to the ones in (Chen et al., ).

###### Proposition E.1 .

Suppose Assumption E.1, Assumption E.2, Assumption E.3 hold, and the step size $h:=T/N$ satisfies $h\preceq 1/L_{r}$. Then the following holds,

$$ $\displaystyle{\rm TV}(p_{\varphi}(r_{0}),q(r))$ $\displaystyle\preceq\underbrace{\sqrt{{\rm KL}(q(r)||\gamma^{d_{r}})}\exp(-T)} _{\text{convergence of forward process}}+\underbrace{(L_{r}\sqrt{d_{r}h}+L_{r} m_{r}h)\sqrt{T}}_{\text{discretization error}}+\underbrace{\epsilon_{\varphi, \rm score}\sqrt{T}}_{\text{score estimation error}}$ (11) $$

This is a direct conclusion from (Chen et al., ). In typical DDPM implementation, we choose $h=1$ and thus $T=N$.
Remarkably, Proposition E.1 indicates the benefit of generating the representation first: since $d_{r}\ll d$, the generation quality (measured by the TV distance in Proposition E.1) of the low-dimensional representation can easily outperform directly generating the high-dimensional data points $x$. The theorem also accounts for applying a lightweight MLP as the denoising network while in the stage of generating the representation.

###### Assumption E.1 .

###### Assumption E.2 .

###### Assumption E.3 .

###### Proposition E.1 .

#### E.1.2 Provable Second-Stage Generation

##### Tractable Training Loss.

Now we analyze the generation quality of the second-stage diffusion model. Since we sample from $p_{\theta}(x,r)$, we have representations as conditions even for unconditional generation tasks. To learn the score function conditioning on the representations, consider the following loss for score matching,

$$ $\mathcal{L}(\theta)=\int_{0}^{T}\lambda(t)\mathbb{E}_{x_{t},r}[||s_{\theta}(x_ {t},r,t)-\nabla_{x_{t}}\log q_{t|r}(x_{t}|r)||^{2}]dt$ (12) $$

However, since $q_{t|r}(x_{t}|r)$ is intractable, we use the following equivalent losses:

$$ $\mathcal{L}(\theta)=\int_{0}^{T}\lambda(t)\mathbb{E}_{x_{0},r}\Big{[}\mathbb{E }_{x_{t}|x_{0}}\big{[}||s_{\theta}(x_{t},r,t)-\nabla_{x_{t}}\log q_{t|0}(x_{t} |x_{0})||^{2}|x_{0}\big{]}\Big{]}dt+C$ (13) $$

###### Proposition E.2 .

(Tractable representation-conditioned score matching loss.)

$$ $\displaystyle\mathcal{L}(\theta):$ $\displaystyle=\int_{0}^{T}\lambda(t)\mathbb{E}_{x_{t},r}[||s_{\theta}(x_{t},r, t)-\nabla_{x_{t}}\log q_{t|r}(x_{t}|r)||^{2}]dt$ (14) $\displaystyle=\int_{0}^{T}\lambda(t)\mathbb{E}_{x_{0},r}\Big{[}\mathbb{E}_{x_{ t}|x_{0}}\big{[}||s_{\theta}(x_{t},r,t)-\nabla_{x_{t}}\log q_{t|0}(x_{t}|x_{0} )||^{2}|x_{0}\big{]}\Big{]}dt+C$ (15) $$

###### Proof.

The key is the following important property holds since the gradient is taken w.r.t. $x_{t}$ only:

$$ $\nabla_{x_{t}}\log q_{t|r}(x_{t}|r)=\nabla_{x_{t}}\log q_{t,r}(x_{t},r)$ (16) $$

The remaining of the derivation parallels to traditional DDPM. We can replace $\nabla_{x_{t}}\log q_{t,r}(x_{t},r)$ with $\nabla x_{t}\log q_{t,r|0}(x_{t},r|x_{0})$:

$$ $\nabla x_{t}\log q_{t,r}(x_{t},r)=\mathbb{E}_{x_{0},r|x_{t}}\Big{[}\nabla_{x_{ t}}\log q_{t,r|0}(x_{t},r|x_{0})\Big{|}x_{t}\Big{]}$ (17) $$

Thus,

$$ $\displaystyle\mathbb{E}_{r}\mathbb{E}_{x_{t}\sim q(x_{t}|r)}[||s_{\theta}(x_{t },r,t)-\nabla_{x_{t}}\log q_{t|r}(x_{t}|r)||^{2}]$ (18) $\displaystyle=$ $\displaystyle\mathbb{E}_{r}\mathbb{E}_{x_{0}\sim q(x_{0}|r)}\mathbb{E}_{x_{t} \sim q(x_{t}|r,x_{0})}[||s_{\theta}(x_{t},r,t)-\nabla_{x_{t}}\log q_{t|r}(x_{t }|x_{0},r)||^{2}]$ (19) $\displaystyle=$ $\displaystyle\mathbb{E}_{r}\mathbb{E}_{x_{0}\sim q(x_{0}|r)}\mathbb{E}_{x_{t} \sim q(x_{t}|x_{0})}[||s_{\theta}(x_{t},r,t)-\nabla_{x_{t}}\log q_{t|r}(x_{t}| x_{0})||^{2}]$ (20) $$

which is equivalent to our tractable score matching loss.
∎

###### Proposition E.2 .

###### Proof.

##### Rigorous Error Bound for Second-Stage Generation.

Utilizing Proposition E.2, analysis of the second-stage diffusion parallels to the first stage, except that the score network takes additional inputs $r$.

###### Assumption E.4 .

(Second moment bound of molecule features.)

$$ $\displaystyle m_{x}^{2}:=\mathbb{E}_{q(x)}[||x-\bar{x}||^{2}]<\infty$ (21) $$

where $q(x)$ is the ground truth distribution of the molecule features, and $\bar{x}:=\mathbb{E}_{q(x)}x$.

###### Assumption E.5 .

(Lipschitz score of second stage). For all $t\geq 0$, the score $\nabla\ln q(x_{t})$ is $L_{x}$-Lipschitz.

where $q(x_{t})$ is the distribution of noisy latent $x_{t}$ at diffusion step $t$ in the forward process.

Finally, we make some assumptions of the score network estimation error.

###### Assumption E.6 .

(Score estimation error of second-stage diffusion). For all $t\in[0,T]$,

$$ $\mathbb{E}_{r\sim p_{\varphi}(r),x_{t}\sim q_{t}(x_{t})}[||s_{\theta}(x_{t},t, r)-\nabla\ln q_{t}(x_{t})||^{2}]\leq\epsilon_{\theta,\rm score}^{2}$ (22) $$

This assumption contains the error brought by generating representations, i.e., the TV distance shown in Proposition E.1. Later in Theorem E.1 we explicitly deal with the error brought by representation generation, which results in a more fine-grained error bound.

We now present a key lemma which facilitates analysis and the proof of the central Theorem E.1.

###### Lemma E.1 .

Suppose Assumption E.4, Assumption E.5, Assumption E.6 hold, and the step size $h:=T/N$ satisfies $h\preceq 1/L_{x}$. Suppose we sample $x\sim p_{\theta}(x|r)$ from Gaussian noise where $r\sim p_{\varphi}(r)$, and denote the final distribution of $x$ as $p_{\theta,\varphi}(x)$. Then the following holds,

$$ $\displaystyle{\rm TV}(p_{\theta,\varphi}(x),q(x))$ $\displaystyle\preceq\underbrace{\sqrt{{\rm KL}(q(x)||\gamma^{d+3})}\exp(-T)}_{ \text{convergence of forward process}}+\underbrace{(L_{x}\sqrt{(d+3)h}+L_{x}m_ {x}h)\sqrt{T}}_{\text{discretization error}}+\underbrace{\epsilon_{\theta,\rm score }\sqrt{T}}_{\text{score estimation error}}$ (23) $$

###### Proof.

Recall the notation that $p_{\theta,\varphi}(x):=\int_{r}p_{0|r}(x_{0}|r)p_{r}(r)dr=p_{0}$ predicted by denoising networks $\theta,\varphi$ starting from Gaussian noise $\gamma^{d+3}$. Consider the reverse process $p_{0}^{q_{T}}(x_{0})$ starting from $q_{T}$ instead of $\gamma^{d+3}$,

$$ ${\rm TV}(p_{0},q(x))\leq{\rm TV}(p_{0},p_{0}^{q_{T}})+{\rm TV}(p_{0}^{q_{T}},q _{0})$ (24) $$

Using the convergence of the OU process in KL divergence (see (Chen et al., )), the following holds for the first term,

$$ ${\rm TV}(p_{0},p_{0}^{q_{T}})\leq{\rm TV}(\gamma^{d+3},q_{T})\leq\sqrt{{\rm KL }(q(x)||\gamma^{d+3})}\exp(-T)$ (25) $$

The second term is caused by score estimation error and discretization error, which can be bounded by

$$ ${\rm TV}(p_{0}^{q_{T}},q_{0})^{2}\leq{\rm KL}(q_{0}||p_{0}^{q_{T}})\preceq( \epsilon_{\theta,\rm score}^{2}+L_{x}^{2}(d+3)h+L_{x}^{2}m_{x}^{2}h^{2})T$ (26) $$

We start proving Equation 26 by proving

$$ $\sum_{k=0}^{N-1}\mathbb{E}_{q_{0},r\sim p_{\varphi}}\int_{kh}^{(k+1)h}||s_{ \theta}^{(kh)}(x_{kh},kh,r)-\nabla\ln q_{t}(x_{t})||^{2}dt\preceq(\epsilon_{ \theta,\rm score}^{2}+L_{x}^{2}(d+3)h+L_{x}^{2}m_{x}^{2}h^{2})T$ (27) $$

For $t\in[kh,(k+1)h]$, we decompose

$$ $\displaystyle\mathbb{E}_{q_{0},r\sim p_{\varphi}}[||s_{\theta}^{(kh)}(x_{kh}, kh,r)-\nabla\ln q_{t}(x_{t})||^{2}]$ (28) $\displaystyle\preceq$ $\displaystyle\mathbb{E}_{q_{0},r\sim p_{\varphi}}[||s_{\theta}^{(kh)}(x_{kh}, kh,r)-\nabla q_{kh}(x_{kh})||^{2}]+\mathbb{E}_{q_{0}}[||\nabla q_{kh}(x_{kh})- \nabla q_{t}(x_{kh})||^{2}]$ (29) $\displaystyle+\mathbb{E}_{q_{0}}[||\nabla q_{t}(x_{kh})-\nabla q_{t}(x_{t})||^ {2}]$ (30) $\displaystyle\preceq$ $\displaystyle\epsilon_{\theta,\rm score}^{2}+\mathbb{E}_{q_{0}}\Big{[}\big{|} \big{|}\nabla\ln\frac{q_{kh}}{q_{t}}(x_{kh})\big{|}\big{|}^{2}\Big{]}+L^{2} \mathbb{E}_{q_{0}}[||x_{kh}-x_{t}||^{2}]$ (31) $$

Note that we omit the term $r$ in expectation of last two terms because they are independent of $r$.

Utilizing Lemma 16 from (Chen et al., ), we bound

$$ $\big{|}\big{|}\nabla\ln\frac{q_{kh}}{q_{t}}(x_{kh})\big{|}\big{|}^{2}\preceq L _{x}^{2}(d+3)h+L_{x}^{2}h^{2}||x_{kh}||^{2}+(L_{x}^{2}+1)h^{2}||\nabla\ln q_{t }(x_{kh})||^{2}$ (32) $$

For the last term,

$$ $\displaystyle||\nabla\ln q_{t}(x_{kh})||^{2}$ $\displaystyle\preceq||\nabla\ln q_{t}(x_{t})||^{2}+||\nabla\ln q_{t}(x_{kh})- \nabla\ln q_{t}(x_{t})||^{2}$ (33) $\displaystyle\preceq||\nabla\ln q_{t}(x_{t})||^{2}+L^{2}||x_{kh}-x_{t}||^{2}$ (34) $$

where the second term is absorbed into the third term of the decomposition Equation 28. Thus,

$$ $\displaystyle\mathbb{E}_{q_{0},r\sim p_{\varphi}}[||s_{\theta}^{(kh)}(x_{kh}, kh,r)-\nabla\ln q_{t}(x_{t})||^{2}]$ (35) $\displaystyle\preceq$ $\displaystyle\epsilon_{\theta,\rm score}^{2}+L_{x}^{2}(d+3)h+L_{x}^{2}h^{2} \mathbb{E}_{q_{0}}[||x_{kh}||^{2}]+L_{x}^{2}h^{2}\mathbb{E}_{q_{0}}[||\nabla \ln q_{t}(x_{t})||^{2}]+L_{x}^{2}\mathbb{E}_{q_{0}}[||x_{kh}-x_{t}||^{2}]$ (36) $\displaystyle\preceq$ $\displaystyle\epsilon_{\theta,\rm score}^{2}+L_{x}^{2}(d+3)h+L_{x}^{2}h^{2}(d+ 3+m_{x}^{2})+L_{x}^{3}(d+3)h^{2}+L_{x}^{2}(m_{x}^{2}h^{2}+(d+3)h)$ (37) $\displaystyle\preceq$ $\displaystyle\epsilon_{\theta,\rm score}^{2}+L_{x}^{2}(d+3)h+L_{x}^{2}h^{2}m_{ x}^{2}$ (38) $$

Analogous to (Chen et al., ), using properties of Brownian motions and local martingales, we can apply Girsanov’s theorem and complete the stochastic integration. Since $q_{0}$ is the end of the reverse SDE, by the lower semicontinuity of the KL divergence and the data-processing inequality, we take the limit an+d obtain

$$ ${\rm KL}(q_{0}||p_{0}^{q_{T}})\preceq(\epsilon_{\theta,\rm score}^{2}+L_{x}^{2 }(d+3)h+L_{x}^{2}h^{2}m_{x}^{2})T$ (39) $$

We finally conclude with Pinsker’s inequality ($\text{TV}^{2}\leq\text{KL}$).
∎

This result holds for general representation-conditioned diffusion models, and to our best knowledge we are the first to provide theories for representation-conditioned generation, which is a general generation framework suitable for various domains such as images (Li et al., ) and graphs.

Lemma E.1 quantitatively characterizes the bound on generalization error in representation-conditioned diffusion. It directly suggests that the error of representation-conditioned diffusion will be no higher than that of its one-stage counterpart. This is because the first two components of the generalization error (i.e., the convergence of the forward process and the discretization error) of the representation-conditioned diffusion model align with those of traditional DDPM, provided that both are parameterized using the same diffusion processes. Furthermore, the third component (score estimation error) can be made identical if we simply set all representation-relevant parameters in $s_{\theta}$ to zero and disregard representation’s impact. We therefore have the following conclusion,

###### Corollary E.1 .

Self-representation-conditioned diffusion model can have the same or a lower generation distribution error than one-stage diffusion model.

We now give a more fine-grained error bound analysis of representation-conditioned diffusion, given the relationship between $r$ and $x$ that enables our further qualitative analysis for the argubly better performance.

###### Assumption E.7 .

(representation-conditioned score estimation error of second-stage diffusion).
For all $t\in[0,T]$,

$$ $\mathbb{E}_{r\sim p_{\varphi}(r),x_{t}\sim q_{t}(x_{t}|r)}[||s_{\theta}(x_{t}, t,r)-\nabla\ln q_{t}(x_{t}|r)||^{2}]\leq\epsilon_{\varphi,\theta,\rm cond}^{2}$ (40) $$

The following main theorem is novel and precise since it (i) deals with the generation error of first-stage representations explicitly; (ii) takes advantages of the conditional distribution $q(x|r)$ in the denoising network.

###### Theorem E.1 .

(Theorem 3.1 in the main text)
Suppose Assumption E.4, Assumption E.5, Assumption E.7 hold, and the step size $h:=T/N$ satisfies $h\preceq 1/L_{x}$. Suppose we sample $x\sim p_{\theta}(x|r)$ from Gaussian noise where $r\sim p_{\varphi}(r)$, and denote the final distribution of $x$ as $p_{\theta,\varphi}(x)$. Define $p_{0}^{q_{T|\varphi}}$, which is the end point of the reverse process starting from $q_{T|\varphi}$ instead of Gaussian. Here $q_{T|\varphi}$ is the $T$-th step in the forward process starting from $q_{0|\varphi}:=\frac{1}{A}\int_{r}q(x_{0}|r)p_{\varphi}(r)dr$ where $A$ is the normalization factor. Then the following holds,

$$ $\displaystyle{\rm TV}(p_{\theta,\varphi}(x),q(x))\preceq$ $\displaystyle\underbrace{\sqrt{{\rm KL}(q_{0|\varphi}||\gamma^{d+3})}\exp(-T)} _{\text{convergence of forward process}}+\underbrace{(L_{x}\sqrt{(d+3)h}+L_{x} m_{x}h)\sqrt{T}}_{\text{discretization error}}$ (41) $\displaystyle\ +\underbrace{\epsilon_{\varphi,\theta,\rm cond}\sqrt{T}}_{\text {conditional score estimation error}}+\underbrace{{\rm TV}(q_{0|\varphi},q_{0} )}_{\text{representation generation error}}$ (42) $$

###### Proof.

The proof sketch parallels that of Lemma E.1, except that in the first step we decompose the TV distance as follows,

$$ ${\rm TV}(p_{\theta,\phi},q(x))\leq{\rm TV}(p_{0},p_{0}^{q_{T|\varphi}})+{\rm TV }(p_{0}^{q_{T|\varphi}},q_{0|\varphi})+{\rm TV}(q_{0|\varphi},q_{0})$ (43) $$

We complete the proof analogously to the proof of Lemma E.1.
∎

Remarkably, when $q_{0|\varphi}$, i.e., $p_{\varphi}$ fully recovers the ground truth marginal distribution of representations $q(r)$, Theorem E.1 has the same format as Lemma E.1 but with $\epsilon_{\varphi,\theta,\rm cond}<\epsilon_{\theta,\rm score}$. This is because the former is the score estimation error based on explicit relationship between $x$ and $r$ while the latter learns implicitly. Thus, Theorem E.1 is a much tighter bound for representation-conditioned generation. To the best of our knowledge, this is the first rigorous theoretical analysis on RCG (Li et al., ). We now provide some qualitative discussions on why representations can arguably lead to better generalization error.

Typically, representations are powerful (and sometimes even complete) as they encode key information about $x$ with potential additional knowledge via pretraining tasks (for example, coordinates denoising for molecules (Zaidi et al., ; Feng et al., )). Therefore, it is reasonable to expect that score estimation conditioned on representations can be more accurate (i.e., $\epsilon_{\theta,\rm score}$ could be significantly smaller than when estimating the score without representation conditioning). If the representations are complete—where a special case would be $r=x$—this would greatly assist in predicting the noise. The same applies when $r$ can be properly transformed back to $x$ by a neural network. More generally, there are intermediate cases where $r$ reflects partial information about $x$ (e.g., a multiset of atoms and bonds), which would still aid in improving prediction.

To conclude this subsection, we provide a detailed characterization of the generalization error of representation-conditioned diffusion models. It is important to note that some parameters in our assumptions, such as Lipschitz scores and estimation errors, are not constants; they are functions of the SDE total time $T$ and the number of diffusion steps $N$. Our conclusions also explain why representation-conditioned generation methods remain competitive even when the number of second-stage diffusion steps $N$ is decreased for faster generation. This is because the score estimation error can remain small even when the number of diffusion steps is reduced, given the guidance from representations. As a result, reducing $N$ causes a slower increase in $\epsilon_{\varphi,\theta,\rm cond}(N)$ compared to the score estimation error without representation conditioning, leading to representation-conditioned generative models’ strong performance with fewer steps.

###### Assumption E.4 .

###### Assumption E.5 .

###### Assumption E.6 .

###### Lemma E.1 .

###### Proof.

###### Corollary E.1 .

###### Assumption E.7 .

###### Theorem E.1 .

###### Proof.

### E.2 Conditional Generation

In this subsection, we aim to prove that conditional generation using our representation-conditioned generation have probable reward improvement. While we used $c$ to denote conditions in the main text, we use the notation $y$ instead for the targets or “reward” to keep coordinate with existing literature. Denote $q_{a}:=q(\cdot|y=a)$ as the ground truth conditional distribution, and $\hat{p}_{a}:=p(\cdot|y=a)$ the estimated distribution. Suppose the ground truth distribution satisfies $y:=f^{*}(x,r)$ which can be decomposed as

$$ $f^{*}(x,r)=g^{*}(x_{\parallel},r_{\parallel})+h^{*}(x_{\perp},r_{\perp})$ (44) $$

where we denote $x=x_{\parallel}$ when $x\sim q(x)$, $r=r_{\parallel}$ when $r\sim q(r)$, and $f^{*}(x,r)=g^{*}(x,r)$ when $x\sim q(x),r\sim q(r)$.

To start with, we assume a linear relationship between $r$ and $y$, which is reasonable thanks to the powerful pretrained model (which makes the representations helpful in predicting molecule properties and even complete) if some noises are allowed. In detail, the reward is $f^{*}(x,r)=\hat{w}^{\top}r+\xi$ and $\xi\sim\mathcal{N}(0,\nu^{2})$. In some cases, we may further make Gaussian assumptions on $r$ (WLOG, $r\sim\mathcal{N}(\mu,\Sigma)$) but is not necessary.

#### E.2.1 Parametric Conditional Score Matching Error

First, we give a detailed form of the representation score estimation error presented in Assumption E.1 under the assumptions above.

###### Lemma E.2 .

For $\delta\geq 0$, with probability $1-\delta$, the score estimation error $\epsilon_{r}\simeq\epsilon_{\varphi,\rm score}$ is bounded by

$$ $\frac{1}{T-t_{0}}\int_{t_{0}}^{T}\mathbb{E}_{(r_{t},y)\sim q_{t}}[||\nabla\log q _{t}(r_{t}|y)-\hat{s}_{\varphi}(r_{t},y,t)||_{2}^{2}]{\rm d}t\leq\epsilon_{r}^ {2}=\mathcal{O}\Big{(}\frac{1}{t_{0}}\sqrt{\frac{\mathcal{N}(\mathcal{S},\frac {1}{n})d_{r}^{2}\log\frac{1}{\delta}}{n}}\Big{)}$ (45) $$

where $t_{0}$ is the early stopping time of the SDE, $n$ is the number of samples, $\mathcal{S}$ is the parametric function class of denoising network, and $\mathcal{N}(\mathcal{S},\frac{1}{n})$ is the log covering number of $\mathcal{S}$. When $\mathcal{S}$ is linearly parameterized, $\mathcal{N}(\mathcal{S},\frac{1}{n})=\mathcal{O}(d_{r}^{2}\log(\frac{d_{r}n}{
\nu^{2}}))$.

###### Proof.

This is a direct extension of Lemma C.1 from Yuan et al. (). Note that we consider the special case where the low-dimensional subspace is the original space (i.e., $A=I_{d_{r}}$ and $d=D=d_{r}$ in their paper), and our noised linear assumption between $r$ and $y$ is identical to their pseudo labeling setting (i.e., $\hat{y}=\hat{w}^{\top}r+\xi$ where $\xi\sim\mathcal{N}(0,\nu^{2})$). We only provide the proof sketch here.

When $r$ follows the Gaussian design, some algebra gives

$$ $\nabla_{r}\log q_{t}(r,y)=\frac{\alpha(t)}{h(t)}B_{t}\Big{(}\alpha(t)r+\frac{h (t)}{\nu^{2}}yw\Big{)}-\frac{1}{h(t)}r$ (46) $$

where $\alpha(t)=\exp(-t/2),h(t)=1-\exp(-t),B(t)=\Big{(}\alpha^{2}(t)I_{d_{r}}+\frac{
h(t)}{\nu^{2}}ww^{\top}+h(t)\Sigma^{-1}\Big{)}^{-1}$. We then bound the estimation error with PAC-learning concentration argument by using Dudley’s entropy integral to bound the Rademacher complexity, and obtain

$$ $\epsilon_{r}^{2}=\mathcal{O}\Big{(}\frac{1}{t_{0}}\sqrt{\frac{\mathcal{N}( \mathcal{S},\frac{1}{n})d_{r}^{2}\log\frac{1}{\delta}}{n}}\Big{)}$ (47) $$

Further, the log covering number of $\mathcal{S}$ under Gaussian design satisfies

$$ $\mathcal{N}(\mathcal{S},\frac{1}{n})\leq d_{r}^{2}\log\Big{(}1+\frac{d_{r}n}{t _{0}\lambda_{\min}\nu^{2}}\Big{)}$ (48) $$

where $0<\lambda_{\min}<1$ is the smallest eigenvalue of $\Sigma$, and typically the early stopping time $t_{0}=\mathcal{O}(1)$. In (Yuan et al., ) the authors assume $\nu^{2}=1/d_{r}$ which states that the variance $\nu^{2}$ of regression residuals $\xi$ reduces when we increase the representation dimensions, which is reasonable.
∎

Lemma E.2 provides a detailed score estimation error given the linear assumption between $r$ and $y$, which serves as a special case of $\epsilon_{\varphi,\rm score}^{2}$. Substituting it into Proposition E.1, we can obtain a quantitative result of representation generation error.

###### Lemma E.2 .

###### Proof.

#### E.2.2 Reward Improvement via Conditional Generation

Next, we want to obtain the reward guarantees of the generated samples give the condition $y$. Define the suboptimality of distribution $P$ as

$$ ${\rm SubOpt}(P;y^{*})=y^{*}-\mathbb{E}_{(x,r)\sim P}[f^{*}(x,r)]$ (49) $$

where $y^{*}$ is the target reward value (condition) and $f^{*}$ is the ground truth reward function. We use the notation $\hat{p}_{a}:=p_{\varphi}(r|y^{*}=a)$, then we have the following result for ${\rm SubOpt}(\hat{p}_{a};y^{*}=a)$, which can also be viewed as a form of off-policy regret.

###### Lemma E.3 .

(Theorem 4.6 in (Yuan et al., ).)

$$ ${\rm SubOpt}(\hat{p}_{a};y^{*}=a)\leq\underbrace{\mathbb{E}_{r\sim q_{a}}\Big{ [}\big{|}(\hat{w}-w)^{\top}r\big{|}\Big{]}}_{\mathcal{E}_{1}}+\underbrace{\Big {|}\mathbb{E}_{r\sim q_{a}}[g^{*}(r_{\parallel})]-\mathbb{E}_{r\sim\hat{p}_{a} }[g^{*}(r_{\parallel})]\Big{|}}_{\mathcal{E}_{2}}+\underbrace{\mathbb{E}_{r \sim\hat{p}_{a}}[h^{*}(r_{\perp})]}_{\mathcal{E}_{3}}$ (50) $$

###### Proof.

Recall the notation $q_{a}:=q(\cdot|y=a)$, we have

$$ $\displaystyle\mathbb{E}_{r\sim\hat{p}_{a}}[f^{*}(r)]$ (51) $\displaystyle\geq$ $\displaystyle\mathbb{E}_{r\sim q_{a}}[f^{*}(r)]-\big{|}\mathbb{E}_{r\sim\hat{p }_{a}}[f^{*}(r)]-\mathbb{E}_{r\sim q_{a}}[f^{*}(r)]\big{|}$ (52) $\displaystyle\geq$ $\displaystyle\mathbb{E}_{r\sim q_{a}}[\hat{f}(r)]-\mathbb{E}_{r\sim q_{a}}\big {[}\big{|}\hat{f}(r)-f^{*}(r)\big{|}\big{]}-\big{|}\mathbb{E}_{r\sim\hat{p}_{a }}[f^{*}(r)]-\mathbb{E}_{r\sim q_{a}}[f^{*}(r)]\big{|}$ (53) $\displaystyle\geq$ $\displaystyle\mathbb{E}_{r\sim q_{a}}[\hat{f}(r)]-\underbrace{\mathbb{E}_{r \sim q_{a}}\big{[}\big{|}\hat{f}(r)-g^{*}(r)\big{|}\big{]}}_{\mathcal{E}_{1}}- \underbrace{\big{|}\mathbb{E}_{r\sim q_{a}}[g^{*}(r_{\parallel})]-\mathbb{E}_{ r\sim\hat{p}_{a}}[g^{*}(r_{\parallel})]\big{|}}_{\mathcal{E}_{2}}-\underbrace{ \mathbb{E}_{r\sim\hat{p}_{a}}[h^{*}(r_{\perp})]}_{\mathcal{E}_{3}}$ (54) $$

where $\hat{w}$ is the estimated $w$ by Ridge regression, $\mathbb{E}_{r\sim q_{a}}[\hat{f}(r)]=\mathbb{E}_{a\sim q}[a]$ and $r=r_{\perp},f*(r)=g^{*}(r)$ when $r\sim q_{a}$.
∎

Here we give a brief interpretation of the decomposition. $\mathcal{E}_{1}$ is the prediction and generalization error coming from regression, which is independent from the diffusion error. Both $\mathcal{E}_{2}$ and $\mathcal{E}_{3}$ come from the diffusion process, where $\mathcal{E}_{2}$ reflects the disparity between $\hat{p}_{a}$ and $q_{a}$ on the subspace support while $\mathcal{E}_{3}$ measures the off-subspace error in $\hat{p}_{a}$. The following results give concrete bounds for the terms in Lemma E.3.

###### Lemma E.3 .

###### Proof.

##### Bounding Regression Error with Offline Bandits.

By estimating $w$ with Ridge regression, we have

$$ $\hat{w}=(R^{\top}R+\lambda I)^{-1}R^{\top}(Rw^{*}+\eta)$ (55) $$

where $R^{\top}=(r_{1},\dots,r_{n})$ and $\eta=(\xi_{1},\dots,\xi_{n})$ where $\xi_{i}\sim\mathcal{N}(0,\nu^{2})$. Define $V_{\lambda}:=R^{\top}R+\lambda I$, $\hat{\Sigma}_{\lambda}:=\frac{1}{n}V_{\lambda}$ and $\Sigma_{q_{a}}:=\mathbb{E}_{r\sim q_{a}}rr^{\top}$ and take $\lambda=1$, we have

###### Proposition E.3 .

With high probability,

$$ $\mathcal{E}_{1}\leq\sqrt{{\rm Tr}(\hat{\Sigma}_{\lambda}^{-1}\Sigma_{q_{a}})} \cdot\frac{\mathcal{O}(||w^{*}||+\nu^{2}\sqrt{d_{r}\log n})}{\sqrt{n}}$ (56) $$

Further when $r$ has Gaussian design $r\sim\mathcal{N}(\mu,\Sigma)$,

$$ ${\rm Tr}(\hat{\Sigma}_{\lambda}^{-1}\Sigma_{q_{a}})\leq\mathcal{O}\big{(}\frac {a^{2}}{||w^{*}||_{\Sigma}}+d_{r}\big{)}$ (57) $$

when $n=\Omega(\max\{\frac{1}{\lambda_{\rm min}},\frac{d_{r}}{||w^{*}||_{\Sigma}^{2}
}\})$.

###### Proof.

First we have

$$ $\mathcal{E}_{1}=\mathbb{E}_{\hat{p}_{a}}|r^{\top}(w^{*}-\hat{w})|\leq\mathbb{E }_{\hat{p}_{a}}||r||_{V_{\lambda}^{-1}}\cdot||w^{*}-\hat{w}||_{V_{\lambda}}$ (58) $$

where

$$ $\mathbb{E}_{\hat{p}_{a}}||r||_{V_{\lambda}^{-1}}\leq\sqrt{\mathbb{E}_{\hat{p}_ {a}}r^{\top}V_{\lambda}^{-1}r}=\sqrt{{\rm Tr}(V_{\lambda}^{-1}\mathbb{E}_{\hat {p}_{a}}rr^{\top})}\simeq\sqrt{{\rm Tr}(V_{\lambda}^{-1}\Sigma_{q_{a}})}$ (59) $$

Hence we only need to prove

$$ $||w^{*}-\hat{w}||_{V_{\lambda}}\leq\mathcal{O}(||w^{*}||+\nu^{2}\sqrt{d_{r} \log n})$ (60) $$

Using the closed form expression, we have

$$ $\hat{w}-w^{*}=V_{\lambda}^{-1}R^{\top}\eta-\lambda V_{\lambda}^{-1}w^{*}$ (61) $$

Thus,

$$ $||w^{*}-\hat{w}||_{V_{\lambda}}\leq||R^{\top}\eta||_{V_{\lambda}^{-1}}+\lambda ||w^{*}||_{V_{\lambda}^{-1}}$ (62) $$

where $\lambda||w^{*}||_{V_{\lambda}^{-1}}\leq\sqrt{\lambda}||w^{*}||$, and according to (Abbasi-yadkori et al., ),

$$ $||R^{\top}\eta||_{V_{\lambda}^{-1}}=||R^{\top}\eta||_{(R^{\top}R+\lambda I)^{- 1}}\leq\mathcal{O}(\nu^{2}\sqrt{d_{r}\log n})$ (63) $$

with high probability. We hence conclude the first part of proof.

Further, when $r$ has Gaussian design $r\sim\mathcal{N}(\mu,\Sigma)$, according to Lemma C.6 of (Yuan et al., ), we can prove the results.
The key here is the conditional distribution follows the Gaussian below,

$$ $P_{r}\big{(}r|\hat{f}(r)=a\big{)}=\mathcal{N}\Big{(}\mu+\Sigma\hat{w}(\hat{w}^ {\top}\Sigma\hat{w}+\nu^{2})(a-\hat{w}^{\top}\mu),\Sigma-\Sigma\hat{w}(\hat{w} ^{\top}\Sigma\hat{w}+\nu^{2})^{-1}\hat{w}^{\top}\Sigma\Big{)}$ (64) $$

Thus

$$ ${\rm trace}(\hat{\Sigma}_{\lambda}^{-1}\Sigma_{q_{a}})={\rm trace}\bigg{(} \frac{\Sigma^{1/2}\hat{w}\hat{w}^{\top}\Sigma\hat{\Sigma}_{\lambda}^{-1}\Sigma ^{1/2}a^{2}}{(||\hat{w}||_{\Sigma}^{2}+\nu^{2})^{2}}\bigg{)}\leq(1+\frac{1}{ \sqrt{\lambda_{\rm min}n}})\cdot\mathcal{O}(\frac{a^{2}}{||\hat{w}||_{\Sigma}^ {2}}+d_{r})$ (65) $$

Notice that $||\hat{w}||_{\Sigma}\geq||w^{*}||_{\Sigma}-||\hat{w}-w^{*}||_{\Sigma}$. We have

$$ $||\hat{w}-w^{*}||_{\Sigma}=\mathcal{O}\bigg{(}\frac{||w^{*}||+\nu^{2}\sqrt{d_{ r}\log(n)}}{\sqrt{n}}\bigg{)}$ (66) $$

where we can prove $||\hat{w}||_{\Sigma}\geq\frac{1}{2}||w^{*}||_{\Sigma}$ when $n=\Omega(\frac{d_{r}}{||w^{*}||^{2}_{\Sigma}})$.
∎

Remarkably, this is a more precise bound improving the results (Lemma C.5 and C.6) in (Yuan et al., ), where we make less assumptions on the relationship between $y$ and $r$, explicitly taking $||w||$ and $\nu^{2}$ into account.

###### Proposition E.3 .

###### Proof.

##### Bounding Distribution Shift in Diffusion.

We define the distribution shift between two arbitrary distributions $p_{1}$ and $p_{2}$ restricted under function class $\mathcal{L}$ as

$$ $\mathcal{T}(p_{1},p_{2};\mathcal{L}):=\sup_{l\in\mathcal{L}}\frac{\mathbb{E}_{ x\sim p_{1}}[l(x)]}{\mathbb{E}_{x\sim p_{2}}[l(x)]}$ (67) $$

We have the follow lemma.

###### Lemma E.4 .

Under the assumption that $r$ follows Gaussian design, then

$$ ${\rm TV}(\hat{p}_{a},q_{a})=\mathcal{O}\bigg{(}\sqrt{\frac{\mathcal{T}(q(r,y=a ),q_{ry};\mathcal{S})}{\lambda_{\rm min}}}\cdot\epsilon_{r}\bigg{)}$ (68) $$

where $\epsilon_{r}$ is defined in Lemma E.2. We can bound $\mathcal{E}_{2}$ with:

$$ $\mathcal{E}_{2}=\mathcal{O}\Big{(}({\rm TV}(\hat{p}_{a},q_{a})+t_{0})\sqrt{M(a )}\Big{)}$ (69) $$

where $M(a)=\mathcal{O}(\frac{a^{2}}{||w^{*}||_{\Sigma}}+d)$. By plugging in $\epsilon_{r}^{2}=\tilde{\mathcal{O}}(\frac{d_{r}^{2}}{t_{0}\sqrt{n}})$, when $t_{0}=(d_{r}^{4}/n)^{1/6}$, $\mathcal{E}_{2}$ admits the best trade off with bound

$$ $\mathcal{E}_{2}=\tilde{\mathcal{O}}\bigg{(}\sqrt{\frac{\mathcal{T}(q(r,y=a),q_ {ry};\mathcal{S})}{\lambda_{\rm min}}}\cdot(d_{r}^{4}/n)^{1/6}a\bigg{)}$ (70) $$

###### Proof.

The proof directly follows from Lemma C.4 and Lemma C.7 in (Yuan et al., ). However, the conclusion is slightly different as we do not assume a low dimensional subspace of $r$.
∎

One can also verify that when $r$ follows Gaussian design, $T(q(r,y=a),q_{ry};\mathcal{S})=\mathcal{O}(a^{2}\vee d_{r})$.

###### Lemma E.4 .

###### Proof.

#### E.2.3 Second Stage of Conditional Generation

Now that we have proved that: (i) the first-stage diffusion model can estimate the score function with provable error bound (Section E.2.1); and (ii) the generated representations have provable reward improvement (Section E.2.2). We continue to show that the ultimate generated samples also have distribution shift towards the desired target in the following contexts. Particularly, we want to answer the question: why utilizing the conditionally generated representations is enough for the second stage generation?

First, when we use the generated representations as the only condition of the second stage diffusion model, the generation process is identical to the second stage of unconditional generation. Therefore, the results in Section E.1.2 can be directly applied to analyze the second stage generation of conditional generation, which states that the generation conditioning on representations has small TV distance error compared with ground truth conditional distribution. Thus, when we have high-quality first-stage generation, the corresponding second stage generation would introduce almost no additional error, which implies provable reward improvements towards the desired target. In addition, the well-pretrained encode ensures that the correspondence between representations and data points is good, which makes it possible to rigorously construct the data points given the representations (a special case would be $r$ is the complete representation of $x$).

We then partially answer this question from the information theoretic perspectives. We use $H(\cdot)$ to denote the information entropy, and $I(\cdot;\cdot)$ to denote the mutual information between two variables.

- •
$I(x;r)\geq I(x;y)$. On the one hand, $r$ contains enough information to recover the targets $y$ thanks to the results in Section E.2.2, thus we do not explicitly need $y$ for the second stage. One the other hand, benefit from the pretraining task, the representations obviously contains more information in addition to $y$. This assumption is valid if $w^{*}$ in previous analysis is sparse (there are components in $r$ independent of $y$), i.e., $H(r)>H(y)$. Therefore, generating $x$ conditioning on $r$ is much easier than generating conditioning on $y$ (traditional one stage generation), as the score estimation error of the former one would obviously be much smaller than the latter.
- •
$I(x,r;y)\geq I(x;y)$. Recall Equation 44 which states the target property $y$ depends on both $x$ and $r$. Hence, $r$ may contain additional information of $y$ obtained from pretrained tasks that is hard to (or cannot) be directly extracted from $x$ - the complex pretrained model assists in extracting relevant information in our two-stage generation, while one-stage generation solely relies on the single denoising model to do so. Therefore, by leveraging representations with provable error bounds, we can better shift the distribution towards the target.

In summary, $r$ is an ideal middle state connecting $x$ and $y$ - it is easy to recover $r$ from $y$ (Section E.2.1) and to recover $x$ from $y$ (Section E.1.2), and vice versa. In comparison, it is somewhat more difficult to directly recover $x$ from $y$ or predict $y$ from $x$.
Consequently, $r$ may be a better indicator of $y$ compared with $x$ due to the aforementioned reasons.

Indeed, one-stage diffusion models generate $x$ directly from conditions $y$ need to optimize a highly complex score $\nabla_{x}\log p(x|y)$ where $x$ and $y$ are highly non-linearly mapped. As Theorem E.4 in (Yuan et al., ) points out, the nonparametric SubOpt of $x$ generated by deep neural networks is larger than our results in Section E.2.2, which further validates the advantage of first generating $r$ that can be well mapped from $y$.

## Appendix F Visualization

### F.1 Representation Visualization

To illustrate how well $p_{\varphi}(r)$ fits $q(r)$, we sample from both $q(r)$ (i.e., the representations produced by the pre-trained encoder for the QM9 and GEOM-DRUG datasets) and the trained representation generator $p_{\varphi}(r)$. We then visualize them in Figure 7, with colors indicating whether the samples are from $q(r)$ or $p_{\varphi}(r)$. We compute the Silhouette Score of the clustering results, scaled by $\mathbf{10^{2}}$ for clarity. A score close to zero suggests that the two clusters are difficult to distinguish, indicating a good fit between $p_{\varphi}(r)$ and $q(r)$. Similarly, we provide the visualization of conditionally generated representations in Figure 8

Figure: Figure 7: T-SNE visualizations of representations unconditionally generated by the representation generator ($\mathcal{T}=1.0$) vs. those produced by the pre-trained encoder on the QM9 and DRUG datasets. The Silhouette Score is scaled by $\mathbf{10^{2}}$ for clarity.
Refer to caption: extracted/5902367/fig/qm9_data_sampler_rep_clustering.png

Figure: Figure 8: T-SNE visualization of representations conditionally generated by the representation generator vs. those produced by the pre-trained encoder on the QM9 dataset: (a) $\alpha$, (b) $\Delta\epsilon$, (c) $\epsilon_{\text{HOMO}}$, (d) $\epsilon_{\text{LUMO}}$, (e) $\mu$, and (f) $C_{v}$. The Silhouette Score is scaled by $\mathbf{10^{2}}$ for clarity.
Refer to caption: extracted/5902367/fig/qm9_data_sampler_rep_clustering_alpha.png

### F.2 Visualization of Molecule Samples

In this section, we provide additional random molecule samples to offer deeper insights into the performance of GeoRCG. Figure 9 and Figure 10 show unconditional random samples generated by GeoRCG trained on the QM9 and GEOM-DRUG datasets, respectively. Figure 11 presents random samples conditioned on the $\alpha$ property, along with their corresponding errors.

Figure: Figure 9: Unconditional random samples from GeoRCG trained on QM9. The number of nodes is randomly sampled from the node distribution $q(N)$.
Refer to caption: extracted/5902367/fig/unconditional_random.png

Figure: Figure 10: Unconditional random samples from GeoRCG trained on GEOM-DRUG. The number of nodes is randomly sampled from the node distribution $q(N)$.
Refer to caption: extracted/5902367/fig/drug_unconditional_random.png

Figure: Figure 11: Conditional random samples from GeoRCG trained on QM9 dataset and $\alpha$ property. Black numbers indicate the specified property value condition, while green numbers represent the evaluated property value of the generated samples. The number of nodes and property value conditions are randomly sampled from the joint distribution $q(N,c)$.
Refer to caption: extracted/5902367/fig/conditional_random.png

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: See weakness
soundness: 2
strengths: The key strength of GeoRCG lies in its innovative use of geometric representations to condition molecular generation. By transforming the generation problem into a two-stage process—first generating a geometric representation and then generating the molecule conditioned on this representation—the paper introduces an effective way to simplify the complex task of molecular generation. This approach addresses major challenges like handling 3D geometric symmetries and provides a significant improvement over existing methods that attempt to directly learn molecular distributions.

The clear and structured presentation of the methodology, supported by well-executed empirical evaluations and visual explanations, adds to the clarity and accessibility of the paper. GeoRCG's advancements could have a significant impact on drug discovery and material design, highlighting its importance for both research and practical applications.
summary: The paper, titled "Geometric Representation Condition Improves Equivariant Molecule Generation" (GeoRCG), presents a novel approach to improving molecular generative models by incorporating geometric representation conditions. The GeoRCG framework divides the molecule generation process into two stages: first, generating an informative geometric representation; second, generating a molecule conditioned on this representation.

The core idea is to first generate a compact geometric representation of a molecule using a pre-trained geometric encoder. This representation captures essential information about molecular structure without the complexity associated with 3D symmetries, making the generation task simpler and more effective. Leveraging this representation, the second stage uses a molecule generator to produce the final molecule. The framework employs EDM as the base generator and shows significant improvements in both unconditional and conditional molecule generation tasks. Specifically, GeoRCG achieves an average 31% performance gain over state-of-the-art methods on challenging conditional generation tasks.
weaknesses: While the paper emphasizes the use of geometric representations to simplify the generation task, there is insufficient analysis of how different pre-trained encoders impact the overall quality of the generated molecules. The choice of pre-trained encoders (UniMol and Frad) is central to the approach, but the authors do not explore how variations in the pre-training dataset or encoder architecture affect the representations. Conducting a more comprehensive analysis, such as comparing multiple pre-trained models trained on different datasets or architectures, would help clarify the impact of representation quality and improve confidence in the method’s robustness.


The representation generator aims to remove symmetries such as O(3) and S(N), but the impact of symmetry removal on downstream tasks is not thoroughly analyzed. Specifically, it would be beneficial to explore whether there are specific symmetries that contribute positively to certain molecular properties or whether removing all symmetries has unintended negative effects on some downstream applications. Conducting ablation studies that selectively preserve certain symmetry properties could offer insights into how symmetry affects molecule generation and provide a more nuanced understanding of its role.

In the conditional generation setting, the paper discusses training the representation generator on (molecule, property) pairs. However, this strategy is limited to simple properties like HOMO-LUMO gap, polarizability, etc., and there is no clear extension for complex properties such as molecular binding affinity or ADMET (Absorption, Distribution, Metabolism, Excretion, and Toxicity) properties. Such properties typically require more context or knowledge beyond geometric structure alone. Addressing this limitation, either by discussing possible extensions or incorporating more sophisticated conditioning mechanisms (e.g., using multi-modal data such as 3D structure and protein targets), would make GeoRCG more applicable to real-world drug discovery problems.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: Could you add bond length and bond angle metric comparisons for the GEOM Drugs dataset? Providing these metrics would offer a more complete evaluation of the model’s performance on larger and more complex datasets.

Would you consider comparing your model with others like JODO, EQGATDiff, or SemlaFlow, which generate the full graph including bonds? A comparison with these models, especially SemlaFlow due to its speed and reduced number of steps, could be particularly beneficial in highlighting the advantages and limitations of your approach.

In the paper, there is no reference to the GEOM paper, and there is a claim: “Crucially, many structures in GEOM-DRUG lack the equilibrium conditions necessary for pre-training methods that enable effective learning of force fields,” which could be misleading. All GEOM Drugs molecules have optimized geometries with respect to GFN2-xTB energy calculations. Could you reconsider this statement? Clarifying this point and accurately referencing the GEOM dataset would enhance the credibility and accuracy of your pape
soundness: 3
strengths: Improved Speed through Latent Diffusion: Latent diffusion has great potential to enhance the speed of 3D molecule generation. In this paper, the authors demonstrated that they were able to reduce the number of diffusion steps from the commonly used 1000 or 500 to just 100 without any performance drop. Performing diffusion in a simpler latent representation appears to be a highly effective approach.

Better Bond Length and Angle Distributions on QM9 Dataset: The proposed model generates bond length and bond angle distributions that more closely resemble those of the QM9 dataset. This is a reasonable metric for assessing the quality of generated 3D structures and indicates an improvement over previous methods.
summary: The paper presents a theoretical foundation and specific implementation of latent diffusion for molecular generation. Instead of directly operating with molecular graphs (e.g., continuous Euclidean coordinates and categorical atom types), the method proposes projecting molecules into a latent space and using latent representations that are O(3) and SO(3) invariant. Diffusion is performed in this simplified latent space, and then the molecules are reprojected to predict their structures. This approach reduces computational costs, resulting in a denoising neural network that is much smaller and simpler, as well as reducing the number of steps required for diffusion.
weaknesses: Limited 3D Metrics on Larger Datasets: The only reported 3D metric for the more realistic and larger GEOM Drugs dataset is atom stability. Since the atom stability is only 0.86 for GEOM Drugs itself, this raises questions about the reliability of the metric. A more comprehensive and accurate comparison is required to fully assess the model’s performance on larger datasets.

Overlooking Models That Do Not Rely on External Software: The paper states that models such as MiDi and LDM3DG use domain knowledge through Open Babel, which gives them advantages. However, there are models like JODO, EQGATDiff, and SemlaFlow that directly predict bonds without relying on external software. Including these models in comparisons would provide a more comprehensive evaluation and highlight the strengths and weaknesses of the proposed method.

Questionable Reliance on Lookup Tables: The reliance on a lookup table for bond lengths is questionable. Depending on the molecular configuration and the specific energy calculation method used (which is GFN2-xTB for GEOM Drugs), bond lengths can vary within a 10% interval. This variability suggests that a static lookup table may not accurately capture the nuances of bond lengths across different molecules.

Lack of Comparison with Faster Models: While the method aims for faster molecule generation by reducing the number of diffusion steps, previous models have already utilized flow matching to reduce steps to 200 (EquiFM) or even 20 (SemlaFlow). Including these models in the comparison would strengthen the research by providing context for the improvements and demonstrating how the proposed method stands relative to existing fast-generation techniques.

---

confidence: 3
contribution: 3
initial_rating: 5
presentation: 4
questions: Is it possible to get (during revisions) a more extensive effort to match or exceed SOTA for the DRUG dataset? This would raise my reviewer score. At the moment, I think this paper is a  technical but not revolutionary improvement and may belong to a journal or another venue rather than ICLR. If the improvement over larger molecules is demonstrated, I think it may be more of interest to this community.
soundness: 4
strengths: This paper is well-written and easy to read. The authors present their results clearly and clearly, and the method is also well described.
summary: This paper introduces an intermediate representation approach to find better property conditioning for molecular generation. The authors show success for properties such as polarizability (\alpha) over the QM9 data set, but other state-of-the-art models outperform the model on the more extensive dataset DRUG.
weaknesses: The main weakness of this approach is that the performance in the DRUG dataset does not beat SOTA. QM9 is a great research-level dataset for small molecules, but DRUG is industrially relevant and has more realistic molecules.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: - How does low-temperature sampling impact prior DRUGS baselines, as it is used in Table 1? Methods mentioned, such as Chroma, suggest that it can have a significant impact.
- How does this same method apply to other models beyond EDM given it is a general framework?
- How does the performance vary as a function of sampling steps for DRUGs and their respective benchmarks?
soundness: 3
strengths: - Overall GeoRCG demonstrates how leveraging powerful pretrained molecule representations to condition generative models can improve results for QM9 molecules.
- Strong evidence shows that guidance mixed with low-temperature sampling improves QM9 results in Figure 4.
- By conditioning the cheap representation generator on the property of interest it pushes the complexity of conditional generation to be more managible.
summary: The authors introduce GeoRCG, a general framework to enhance conditional molecule generative models by including geometric representations. GeoRCG splits the generation process into two parts the first being to create an informative geometric representation followed by generating a molecule conditioned on this representation. Using GeoRCG they can improve upon base EDM for QM9 and GEOM-DRUGs datasets, reducing the number of inference steps from 1000 to 100.
weaknesses: - There is an overemphasis on QM9 in the benchmarks, with little attention to the more challenging GEOM DRUGS which more accurately represents drug-like molecules. Molecule stability, connectivity, and other metrics are included in MIDI but have not been reported. This is important, especially for a method that demonstrates improvement over base EDM for QM9, since for Drugs EDM obtains only 5.5% molecule stability and 40.3% after OpenBabel (numbers taken from MIDI).
  Connectivity is not reported for any method, which is important for 3D molecule generation. If the molecule is not connected, RDKit can often still parse it, but it is not a single-molecule structure. From MIDI EDM + OpenBabel, the result is only 41.4%, which is quite low.

Overall, it's hard to understand what is translatable as a general method for other biological tasks since QM9 is a toy task.

---

confidence: 3
contribution: 4
initial_rating: 8
presentation: 3
questions: - Please define EDM in your abstract.
- The writers vaguely refer to the improved “quality” of the generated molecules as the first achievement of this method. This is too vague—what does quality mean here?  
- Again, the second bullet talks about model performance, citing a 31% increase. What is this “performance”? Please cite the metric and the benchmark here.
- Last bullet—reduce the number of diffusion steps by what percent on average? Please be specific here at this point in the paper.
soundness: 3
strengths: Good background, appreciate the previous work review in the appendix.

Appreciate the heat maps in Figure 4, good demonstration of these parameters allowing a scientist to specify the tradeoff between properties depending on application.
summary: This paper introduces a novel framework to improve 3D molecular generation by integrating certain geometric representation conditions into the molecular generation process, and then conditioning on these representations to generate a molecule.
weaknesses: There are no glaring weaknesses of this paper. All choices made have been clearly communicated and motivated. Important limitations of the method are clearly outlined in the Conclusions section of the paper.

Small change, but please change the colors used in the tables for red/green colorblind readers.

Meta-review: This paper proposes an approach to improve molecule generation by first generating a geometric representation and conditioning the molecule generation on the geometric representation.

The idea is interesting and shows improvement over the considered EDM architecture. However, as the reviewers pointed out, the evaluation is not sufficient to convincingly demonstrate the useful-ness of the new method. In particular, the authors should show the merits of their approach in the (hard and realistic) DRUG dataset and consider more backbone generative models / neural architectures. 

Overall, I recommend rejection for this paper, but believe this would be a strong resubmission after convincingly showing the merits of their approach.

Decision: Reject