---
title: 'CSGD: Composable Score-based Graph Diffusion'
url: https://www.emergentmind.com/topics/composable-score-based-graph-diffusion-model-csgd
type: topic
---

# CSGD: Composable Score-based Graph Diffusion

Searching arXiv for the specified CSGD paper and related graph diffusion context.
Search query: "Composable Score-based Graph Diffusion Model for Multi-Conditional Molecular Generation"
Searching arXiv now.
Composable Score-based Graph Diffusion Model (CSGD) is a diffusion model for **multi-conditional molecular generation** that operates directly on **discrete molecular graphs** and targets controllable generation under multiple property constraints [2509.09451]. In the paper’s formulation, the generated object is a molecular graph \(G=(\mathbf X,\mathbf E)\), where node and edge variables are categorical, and the objective is to balance **distribution learning / fidelity** against **controllability** under a condition set \(\mathcal C=\{c_1,\dots,c_M\}\). CSGD is presented as **the first model that extends score matching to discrete graphs via concrete scores**, and it couples that formulation with **Composable Guidance (CoG)** and **Probability Calibration (PC)** to support flexible conditioning on arbitrary subsets of properties during sampling [2509.09451].

## 1. Problem formulation and multi-conditional objective

CSGD addresses the setting in which a molecular graph is generated subject to multiple requested properties, each of which may be numerical or categorical. The target conditional distribution is written as
\[
p(G \mid \mathcal C)=p(G \mid c_1,\dots,c_M)\propto p(G)\,p(c_1,\dots,c_M\mid G).
\]
Within this formulation, the model is required to satisfy two competing objectives. The first is **distribution learning / fidelity**, meaning that generated molecules should resemble the data distribution \(p(G)\). The second is **controllability**, meaning that generated molecules should satisfy the requested properties through alignment with \(p(\mathcal C\mid G)\) [2509.09451].

A central practical requirement is **flexibility at sampling time**. The paper emphasizes that one may want to specify only an arbitrary subset of properties rather than the entire condition set. This requirement is treated as a first-class design constraint rather than an afterthought. In that sense, CSGD is not merely a conditional generator; it is a generator designed for **subset-selectable control** over multiple properties [2509.09451].

The paper frames prior discrete graph diffusion methods as insufficiently adapted to this setting for two reasons. First, methods such as **MOOD** and **GraphDiT** use **monolithic joint conditioning**: even when numerical and categorical properties are encoded separately, they are merged into a single combined condition representation. Second, most discrete graph diffusion methods rely on **mean-prediction formulations** rather than explicit score matching. The paper argues that this deprives such methods of a score representation suitable for compositional guidance, and it further notes that predictor-guidance approaches such as **DiGress** require relaxing discrete graphs into continuous variables, which can harm generation fidelity [2509.09451].

## 2. Discrete graph diffusion and concrete-score formulation

CSGD builds a score-based formulation directly on discrete graphs. Node and edge alphabets are categorical,
\[
\mathcal X=\{1,\dots,a\}, \qquad \mathcal E=\{1,\dots,b\},
\]
and a graph is represented as
\[
G=(\mathbf X,\mathbf E), \quad \mathbf X=(x^i)_{i=1}^n,\quad \mathbf E=(e^{ij})_{i,j=1}^n.
\]
The diffusion process factorizes over nodes and edges:
\[
p_t(G_t)=\prod_{i=1}^n p_t^X(x_t^i)\prod_{i,j=1}^n p_t^E(e_t^{ij}).
\]
Each token follows a continuous-time Markov process,
\[
\frac{d p_t^X}{dt}=Q_t^X p_t^X,\qquad \frac{d p_t^E}{dt}=Q_t^E p_t^E,
\]
with time-dependent generators
\[
Q_t^X=\sigma(t)Q^X,\qquad Q_t^E=\sigma(t)Q^E.
\]
The closed-form forward transition from the clean state uses matrix exponentials with
\[
\bar\sigma(t)=\int_0^t \sigma(s)\,ds,
\]
and the full forward transition factorizes over node and edge tokens [2509.09451].

The paper considers two standard transition choices. **Absorb** introduces a MASK absorbing state. **Uniform** transitions uniformly among non-current states. These choices control the form of the corruption process on categorical graph variables [2509.09451].

The distinctive step is the replacement of continuous gradients by **concrete scores**. In continuous diffusion, a score is \(\nabla_x \log p_t(x)\). In CSGD, the discrete analogue is a local ratio of probabilities between an alternative token state and the current token state. For nodes,
\[
s_\theta^X(G_t,t)_{i,\tilde x_t^i} \approx \frac{p_t^X(x_t^1,\dots,\tilde x_t^i,\dots,x_t^n)}
{p_t^X(x_t^1,\dots,x_t^i,\dots,x_t^n)}, \quad \tilde x_t^i\neq x_t^i.
\]
An analogous expression is used for edges. Thus, the model does not directly estimate the clean-sample distribution; it estimates **local ratios** that play the role of discrete scores. The denoiser is a **Graph Transformer** that processes node and edge tokens and outputs node and edge concrete scores [2509.09451].

## 3. Training objective, reverse process, and sampling dynamics

The training objective is **Diffusion Weighted Denoising Score Entropy**, adapted from **SEDD**. The node loss is defined by comparing the predicted concrete score against the corresponding forward-process probability ratio; the edge loss is analogous. The final objective is
\[
\mathcal L_t=\mathcal L_t^X+\lambda \mathcal L_t^E.
\]
Optimization uses **Adam**, **gradient clipping**, and **learning-rate warmup** [2509.09451].

This training criterion is the operational core of the paper’s claim that CSGD extends **score matching to discrete graphs via concrete scores**. The target of learning is no longer a denoised graph distribution in the conventional mean-prediction sense, but a collection of token-level score ratios defined on the noisy marginal [2509.09451].

The reverse process constructs token-level reverse transition probabilities by combining the learned concrete score with the forward generator for a step \(s=t-\Delta t\). The full reverse transition again factorizes across nodes and edges:
\[
p_{s|t}(G_s|G_t;\theta) = \prod_{i=1}^n p_{s|t}^{X}(x_s^i|x_t^i;\theta) \prod_{i,j=1}^n p_{s|t}^{E}(e_s^{ij}|e_t^{ij};\theta).
\]
Sampling proceeds by iterating from
\[
G_T\sim p_{\text{base}}
\]
down to \(G_0\), using **\(\tau\)-leaping / Euler-style discrete updates token by token** [2509.09451].

The paper’s ablation evidence links this formulation to improved discrete molecular generation. When CSGD is used **without PC** and with **CFG instead of CoG**, it still improves validity over GraphDiT: on **Polymers**, validity rises from **82.45** for GraphDiT to **90.15** with **CSGD Absorb** and **95.81** with **CSGD Uniform**; on **HIV**, validity rises from **69.06** to **74.01** and **81.30**, respectively. The paper interprets this as support for the claim that **concrete-score modeling itself improves discrete molecular generation** [2509.09451].

## 4. Composable Guidance and Probability Calibration

The conditional guidance mechanism is where CSGD most sharply departs from fixed joint-conditioning schemes. As a baseline, the paper considers standard **classifier-free guidance (CFG)**:
\[
s_\theta^{\mathrm{CFG}}(G_t,\mathcal C,t) = s_\theta(G_t,\varnothing,t) + w\bigl(s_\theta(G_t,\mathcal C,t)-s_\theta(G_t,\varnothing,t)\bigr).
\]
This still treats \(\mathcal C\) as a single joint condition [2509.09451].

The paper’s main guidance mechanism is **Composable Guidance (CoG)**. It begins from the factorization
\[
p(G|c_1,\dots,c_M)\propto p(G)\prod_{m=1}^M p(c_m|G)
= p(G)\prod_{m=1}^M \frac{p(G|c_m)p(c_m)}{p(G)},
\]
which yields the composable score
\[
s_\theta^{\mathrm{CoG}}(G_t,\mathcal C,t)
= s_\theta(G_t,\varnothing,t) +
\sum_{m=1}^{M} w_m \Bigl( s_\theta(G_t,c_m,t)-s_\theta(G_t,\varnothing,t) \Bigr).
\]
Because each property contributes its own score term, inference can condition on **any subset** \(\mathcal C' \subseteq \mathcal C\): all properties, a single property, a mixed subset, or separately reweighted properties. Training uses **condition dropout** so that the model learns both conditional scores \(s_\theta(G_t,c_m,t)\) and the unconditional score \(s_\theta(G_t,\varnothing,t)\) [2509.09451].

The second control mechanism is **Probability Calibration (PC)**, introduced to address a train–test mismatch caused by strong guidance scales. The paper observes that large guidance can drive guided scores outside the range encountered during training, damaging validity and sometimes controllability. PC is applied after guided transition probabilities are computed. It first performs **dynamic thresholding**: raw probabilities are clipped at zero, percentile-based thresholds are used to define a stable interval, and values are rescaled into that interval. It then applies **temperature scaling**:
\[
p_{\mathrm{scaled}}(i)=
\frac{p_{\mathrm{clipped}}(i)^{1/\tau}}
{\sum_j p_{\mathrm{clipped}}(j)^{1/\tau}}.
\]
Here \(\tau<1\) yields sharper transitions, whereas \(\tau>1\) yields flatter transitions. The paper treats PC as a **plug-and-play postprocessing step** for guided discrete diffusion [2509.09451].

The sampling pipeline integrates these two mechanisms in sequence: sample \(G_T\sim p_{\text{base}}\); for each reverse step, compute the unconditional score, compute conditional scores for each selected property, compose them with CoG, convert the result into transition probabilities, optionally apply PC, and sample node and edge states independently tokenwise. In the paper’s summary, **CoG decides what conditions to enforce, and PC decides how strongly and stably the reverse probabilities should behave** [2509.09451].

## 5. Architecture and implementation

The implementation reuses **GraphDiT’s backbone**. The denoiser is a **Graph Transformer** equipped with **adaptive layer norm (AdaLN)**, a separate **categorical encoder**, and a separate **numerical/cluster encoder**. The timestep embedding is combined with the condition embedding as
\[
\mathbf e_y = \mathbf e_c + \mathbf e_t .
\]
The denoiser processes noisy node and edge features, updates hidden states with Graph Transformer layers conditioned on \(\mathbf e_y\), and outputs node and edge log-concrete scores. **Condition dropout** is used so that the model can learn both conditional and unconditional estimates [2509.09451].

The reported training configuration is explicit. The model uses **1000 diffusion steps**, **batch size 1200**, **learning rate \(3\times 10^{-4}\)**, **gradient clipping norm 1**, **linear warmup for 1500 iterations**, and a **log-linear noise schedule**. Training is reported on **a single NVIDIA A800 80GB GPU** [2509.09451].

These implementation choices place CSGD in a pragmatic lineage of graph diffusion systems that inherit backbone architectures from earlier discrete graph generators while modifying the probabilistic objective and sampling rule. A plausible implication is that the main novelty is concentrated in the **score representation and guidance mechanism**, rather than in a wholly new graph encoder. That implication follows from the paper’s explicit reuse of GraphDiT’s backbone and its emphasis on concrete scores, CoG, and PC [2509.09451].

## 6. Datasets, metrics, and empirical results

The empirical study uses four public molecular datasets. The **Polymers** benchmark includes four numerical properties: **Synthesizability (SAS + SCS as a 2D vector)**, **\(\mathrm O_2\) permeability**, **\(\mathrm N_2\) permeability**, and **\(\mathrm{CO}_2\) permeability**. The drug-design benchmarks are **HIV**, **BBBP**, and **BACE**; each sample there has a numerical synthesizability condition and a categorical task-specific property, respectively **HIV replication inhibition**, **BBBP label**, and **BACE label** [2509.09451].

Evaluation uses three metric families: **Validity**; **Distribution learning**, measured with **Diversity**, **Similarity**, and **FCD**; and **Controllability**, measured with **MAE for numerical properties** and **Accuracy for categorical properties**. The evaluations use **MOSES metrics** and an **Oracle random forest predictor** [2509.09451].

The headline empirical claim is that CSGD achieves **state-of-the-art performance** across the four datasets, with an **average 15.3% improvement in controllability over prior methods**, while maintaining high validity and fidelity [2509.09451]. On **Polymers**, relative to GraphDiT, **CSGD Uniform** reaches **99.38%** validity versus **82.45%**, and **FCD 6.4351** versus **6.6443**. The controllability MAEs also improve: **Synth 1.1905** versus **1.2973**; **\(\mathrm O_2\) 0.6054** versus **0.7440**; **\(\mathrm N_2\) 0.6993** versus **0.8857**; and **\(\mathrm{CO}_2\) 0.6232** versus **0.7550**. The paper reports an **average 15.3% relative improvement in MAE** over the strongest baseline on this benchmark [2509.09451].

On the drug datasets, CSGD again outperforms or matches prior methods, especially in validity and controllability. For **HIV**, GraphDiT reports **validity 69.06** and **inhibition accuracy 0.9437**, whereas **CSGD Uniform** reports **validity 83.36** and **accuracy 0.9898**. For **BBBP**, GraphDiT reports **validity 78.72**, **accuracy 0.9089**, and **MAE 0.4492**, whereas **CSGD Uniform** reports **validity 95.63**, **accuracy 0.9831**, and **MAE 1.0745**. The paper explicitly notes that this indicates a **fidelity/control trade-off depending on the transition choice**: Uniform tends to push validity and accuracy higher but can sometimes worsen MAE on some tasks. For **BACE**, GraphDiT reports **validity 76.00** and **accuracy 0.9132**, whereas **CSGD Uniform** reports **validity 96.92** and **accuracy 0.9250** [2509.09451].

The ablation study isolates the contributions of CoG and PC. The paper states that **CoG performs comparably to CFG on the same backbone**, whereas **PC consistently improves validity and controllability across datasets**. On **Polymers, Uniform**, **CFG without PC** gives **validity 95.81**, **CFG with PC** gives **99.51**, **CoG without PC** gives **98.84**, and **CoG with PC** gives **99.36**. On **HIV, Uniform**, **CFG without PC** gives **validity 81.30** and **accuracy 0.9898**, **CFG with PC** gives **82.34** and **0.9910**, **CoG without PC** gives **80.89** and **0.9869**, and **CoG with PC** gives **83.36** and **0.9898** [2509.09451].

The most direct evidence for compositional control comes from experiments on **arbitrary subsets of the Polymers properties**. CoG is tested on **only Synthesizability**, **only gas permeability properties**, mixed subsets such as **Synth + one gas property**, and the **full property set**. Reported examples include **\(\{\text{Synth}\}\): validity 99.78, Synth MAE 0.9179**; **\(\{\mathrm O_2,\mathrm N_2,\mathrm{CO}_2\}\): validity 99.38, gas MAEs all around 0.60–0.69**; and **\(\{\text{Synth},\mathrm O_2\}\): validity 99.50**, with strong control on the selected properties. This is the paper’s clearest demonstration that CoG provides **subset-selectable control** [2509.09451].

## 7. Position within graph diffusion research and related terminology

A 2024 survey of **diffusion-based graph generative methods** does **not mention “Composable Score-based Graph Diffusion Model (CSGD)” explicitly by name** in the provided text, but it gives a framework in which CSGD fits naturally [2401.15617]. The survey organizes graph diffusion into **DDPMs**, **SGMs**, and **Score SDEs**, and explicitly states that **score-based generative models (SGMs) intend to restore the original data distribution through estimating the Stein score, which is the gradient of data \(\nabla_x \log p(x)\)**. In the survey’s taxonomy, CSGD belongs most naturally to the **SGM / Score SDE family**, rather than the DDPM family, because its central operation is score estimation and score composition on noised graph states [2401.15617].

The survey also emphasizes a structural difficulty that is directly relevant to CSGD: **“due to the intrinsic discrete nature of graphs, there are a number of significant challenges when implementing diffusion models to graph generation.”** It further notes that there is **“no universal approach for graph diffusion and edge generation.”** Within that landscape, graph-specific score-based or score-SDE methods such as **EDP-GNN**, **GraphGDP**, **GSDM**, **NVDiff**, and **SLD** form the closest conceptual neighborhood for CSGD, although the survey does not discuss CSGD’s specific mechanisms of compositional guidance or probability calibration [2401.15617].

A separate but similarly named method is **CCSD**, “Combinatorial Complex Score-based Diffusion Modelling through Stochastic Differential Equations,” which targets **combinatorial complexes** rather than multi-conditional molecular graph generation [2406.04916]. CCSD generalizes graph generation to higher-order topological structures and unifies score-based paradigms under an SDE formalism. The two methods therefore share score-based language but address different modeling objects and problem settings: CSGD centers on **discrete molecular graphs, concrete scores, and flexible multi-property conditioning**, whereas CCSD centers on **combinatorial complexes and higher-order relations** [2406.04916].

The resulting conceptual significance of CSGD is specific. The paper states that it changes the conditioning paradigm for discrete graph diffusion **from fixed joint conditioning to composable per-property guidance** and that, by moving **from mean prediction to concrete score matching**, it enables score-space manipulations that were previously unavailable for discrete molecular graph diffusion [2509.09451]. This suggests that CSGD’s main contribution is not only improved controllability metrics, but also a reformulation of conditional discrete graph diffusion in a score-compositional language that supports property-wise inclusion, exclusion, and reweighting at inference time.

Source: https://www.emergentmind.com/topics/composable-score-based-graph-diffusion-model-csgd