Introduction
Generating realistic graphs—especially molecular structures—is a delicate balancing act. Early diffusion models treated graphs as continuous objects, adding Gaussian noise to adjacency matrices. However, this approach "melts" the graph into a dense, noisy blob, destroying the sparsity and structural patterns (like rings and chains) that define real-world data.
To address this, researchers shifted to discrete-state diffusion, which treats nodes and edges as categorical variables. While successful, these models were largely restricted to discrete-time steps. This rigidity meant the sampling process was inflexible; researchers could not easily trade off speed for quality without retraining the model. Furthermore, to help these models "understand" graph topology, it was common practice to feed them a complex, computationally heavy array of hand-crafted features (e.g., cycle counts, spectral features) that lacked a clear theoretical foundation.
Cometh is a new generative model for graphs that combines the flexibility of continuous-time diffusion with the structural integrity of discrete-state modeling. By replacing a "kitchen sink" of hand-crafted structural features with a single, principled random-walk encoding, Cometh achieves state-of-the-art performance in molecular generation.
Methodology
Cometh introduces three major innovations to the graph diffusion pipeline:
1. Continuous-Time Discrete-State Framework
Instead of fixed steps, Cometh utilizes Continuous-Time Markov Chains (CTMC). This allows the model to be trained on a continuous time scale ($t \in [0, 1]$). During inference, users can choose their sampling strategy—such as $\tau$-leaping or predictor-corrector methods—to find the optimal balance between generation speed and sample quality without needing to retrain the model.
2. Marginal Noise Model & Cosine Schedule
The authors extend "marginal transitions" to continuous time. Instead of noising a graph toward a random uniform state, they noise it toward the average distribution of the dataset. This crucial step preserves sparsity during the diffusion process. They also implement a cosine noise schedule, which they prove retains more information about the original graph for longer compared to standard exponential schedules.
3. RRWP Encoding
Perhaps the most elegant change is replacing the complex set of structural features used in previous models with Relative Random Walk Probabilities (RRWP). RRWP tracks the probability of a random walker landing on node $j$ starting from node $i$ in $k$ steps. The authors provide a theoretical proof that RRWP acts as a "universal" structural feature. It can implicitly determine connectivity, approximate the size of the largest connected component, and count small cycles, eliminating the need for dozens of hand-coded features.
Experiments and Results
The authors evaluated Cometh on both synthetic and real-world molecular datasets, ranging from Planar graphs (64 nodes) and Stochastic Block Models (SBM) to standard small molecule benchmarks (QM9) and large-scale datasets like MOSES (1.9M molecules) and GuacaMol (1.4M molecules).
Key Performance Highlights
- Near-Perfect Synthetic Generation: On the Planar graph dataset, Cometh achieved a 99.5% VUN score (Valid, Unique, and Novel), significantly outperforming previous discrete models like DiGress (76.0%).
- Superior Molecular Scaling: On the massive GuacaMol dataset, Cometh outperformed DiGress by 12.6% in terms of VUN samples, proving its ability to scale to complex, drug-like structures.
- State-of-the-Art Conditional Generation: When tasked with generating molecules exhibiting specific properties (like a specific dipole moment or HOMO energy), Cometh reduced the Mean Absolute Error (MAE) by 18% to 43% compared to previous state-of-the-art methods.
- Sampling Efficiency: The model achieves strong performance with as few as 50 sampling steps, though generation quality peaks around 500-700 steps.
Key Insights
- Flexibility in Sampling: Because the model operates in continuous time, it isn't "locked in" to the number of steps used during training. Increasing the number of steps during sampling significantly boosts performance on the fly.
- Sparsity as an Inductive Bias: By using a marginal noise model, the "noisy" intermediate graphs remain sparse. This makes the denoising task much easier for the underlying Graph Transformer, as it doesn't have to extract a sparse graph from a fully connected, noisy matrix.
Limitations and Future Work
While Cometh pushes the boundary for graph generation, it shares the quadratic complexity ($O(n^2)$) common to Graph Transformer-based models, making it difficult to generate very large graphs (e.g., proteins) without further optimization. Additionally, the current framework is strictly for discrete/categorical data and cannot yet generate continuous features, such as 3D atomic coordinates, which are vital for advanced drug discovery. Finally, on the most complex datasets, the model still occasionally produces disconnected fragments or chemically unstable rings, suggesting room for incorporating stronger chemical inductive biases in future iterations.
Summary updated