Manuscript Offprint
arXiv:2609.35623RIDE: Reference-Anchored Inference-Time Diffusion Editing for Scaffold Hopping
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
ABSTRACT
Scaffold hopping is a critical task in drug discovery, which seeks to discover new, structurally distinct molecules that share key functional groups and similar 3D shape with a reference binding ligand. Existing diffusion-based scaffold hopping methods formulate the problem as conditional generation of scaffolds given the functional groups. However, they lack a principled mechanism to jointly enforce 2D structural novelty and preserve the 3D shape of the reference ligand. Here, we introduce RIDE, a Reference-anchored Inference-time Diffusion Editing framework for scaffold hopping. RIDE recovers the reference diffusion noise trajectory conditioned on the binding pocket and functional groups, selects an optimal trajectory segment for editing via noise perturbation, and conducts a value-guided scaffold sampling to generate new scaffolds. Extensive experimental results demonstrate that, compared to baselines, RIDE consistently generates scaffolds with lower 2D similarity and higher 3D similarity to the reference, with an average improvements of 11.7% and 7.3%, respectively. Further analysis reveals that RIDE can accommodate various reward functions, and can preserve 3D similarity even when this is not explicitly included in the reward. Two case studies illustrate RIDE's ability to generate distinct scaffolds with different structures and properties, and its ability to introduce substantial 2D variation while maintaining very high 3D similarity. RIDE is publicly available at https://anonymous.4open.science/r/RIDE-C8A0.
1 INTRODUCTION
Scaffold hopping is a critical task in drug discovery, which seeks to discover new, structurally distinct molecules that share key functional groups and similar 3D shape with a reference binding ligand (Böhm et al., 2004). Effective scaffold hopping increases the success rate of drug discovery by exploring a variety of molecule structures with similar binding but different properties, synthesizability, and patentability (Böhm et al., 2004). Recently, generative AI methods have opened new avenues for scaffold hopping (Zheng et al., 2021; Torge et al., 2023; Yoo et al., 2024; Yang et al., 2026). These methods provide the ability to sample new molecular structures from distributions learned from vast datasets, enabling the exploration of chemical spaces beyond those familiar to domain experts and expanding opportunities to discover novel molecular scaffolds.
Among generative AI methods, diffusion models are particularly promising for scaffold hopping, as their iterative denoising process enables flexible and fine-grained control over generation. Several efforts (Torge et al., 2023; Adams et al., 2025; Yang et al., 2026) have applied diffusion to scaffold hopping, formulating the problem as the conditional generation of scaffolds given the functional groups. While these methods can generate new scaffolds, they rely on sampling stochasticity to diversify their generated results, and lack a principled mechanism to promote structural novelty, leaving the extent of structural divergence from the original scaffold largely to chance. While scaffold hopping based on diffusion models for structure-based drug design (SBDD) (Guan et al., 2023; 2024; Huang et al., 2024) can leverage protein-ligand binding information, it lacks explicit guarantees of substantial 2D structural novelty relative to known ligands. Conversely, approaches based on diffusion for ligand-based drug design (LBDD) (Chen et al., 2025; Adams et al., 2025) can explore structurally distinct scaffolds but lack explicit guidance from protein-ligand binding.
We introduce RIDE, a Reference-anchored Inference-time Diffusion Editing framework for scaffold hopping. RIDE reformulates scaffold hopping as a diffusion editing process that transforms the reference scaffold into new scaffolds. As shown in Figure 1, it operates in three steps: (1) recovery of the reference diffusion noise trajectory conditioned on the binding pocket and functional groups, (2) selection of an optimal trajectory segment for editing via noise

Figure 1: Overview of RIDE. a, RIDE generates new scaffolds based on a reference scaffold, fixed functional groups, and protein pocket; b, RIDE recovers the noise trajectory for the reference ligand from a diffusion-based molecule generation model adapted to scaffold hopping; c, RIDE identifies a reference-optimal noise trajectory segment for editing; and d, RIDE performs a value-guided transition within the reference-optimal trajectory segment for a controlled editing of the noise trajectory, thus sampling a set of new scaffolds.
perturbation, and (3) value-guided scaffold sampling to generate new scaffolds. RIDE leverages a reward function measuring 2D structural novelty and 3D shape similarity to guide noise perturbation and scaffold sampling, jointly enforcing 2D structural novelty and preserving the 3D shape of the reference ligand. As a framework for inference-time editing, RIDE can adapt pre-trained diffusion-based molecular generative models for controllable scaffold hopping without retraining.
We rigorously evaluate RIDE with state-of-the-art baseline models on 60 scaffold hopping tasks for protein-ligand complexes related to major human diseases. Compared to baselines, RIDE consistently generates scaffolds with lower 2D similarity and higher 3D similarity to the reference, with an average improvements of 11.7% and 7.3%, respectively. Further analysis reveals that RIDE can accommodate various reward functions, and can preserve 3D similarity even when this is not explicitly included in the reward. RIDE can be applied iteratively to explore even more structurally distinct scaffolds, where a RIDE-generated molecule is used as a new “reference” to RIDE for further scaffold hopping. Experiments reveal a trade-off in multiple hops between progressively improving the similarity profile and preserving binding. Additionally, two case studies illustrate RIDE’s ability to generate distinct scaffolds with different structures and properties, and its ability to introduce substantial 2D variation while maintaining very high 3D similarity. RIDE is publicly available at https://anonymous.4open.science/r/RIDE-C8A0.
3 PRELIMINARIES
3.1 INVERSION-BASED DIFFUSION METHODS
Inversion-based diffusion methods aim to invert a reference sample into its latent diffusion trajectory and edit the recovered trajectory for controlled generation (Kim et al., 2022; Mokady et al., 2023; Hertz et al., 2022). By editing the recovered trajectory, these methods can generate samples that preserve reference-specific features and introduce desired changes. These methods build upon the reverse sampling process of diffusion models. A common approach to recovering the reference state trajectory is DDIM inversion (Song et al., 2020; Wallace et al., 2023). Starting from a reference sample , DDIM inversion maps it back to the corresponding intermediate states , where denotes the total number of diffusion timesteps. The inversion process is represented as
where is the noise predictor learned during diffusion training, is a time-dependent cumulative coefficient determined by the predefined noise schedule. Under DDPM sampling (Ho et al., 2020), each transition along the recovered reference state trajectory is associated with a specific sampling noise . Therefore, the reference state trajectory can be equivalently represented by a corresponding noise sequence , with each recovered as follows (Huberman-Spiegelglas et al., 2024),
where is the parameterized mean of the reverse transition distribution, is the noise variance schedule at timestep , and is the predefined standard deviation of the transition distribution.
Although the inversion-based methods were originally proposed for Gaussian diffusion, the inversion can also be extended to categorical diffusion, where each state in the reference trajectory is categorical. The inversion process can be constructed as follows (He et al., 2026), ,
(3)
where denotes the categorical forward transition (Hoogeboom et al., 2021), is the one-hot vector corresponding to category , is the number of discrete categories, and is predefined noise schedule at timestep . Given the recovered categorical reference trajectory , the corresponding noise sequence can be determined as follows,
where denotes the one-step reverse categorical transition, is a small positive margin to ensure that the category can be strictly selected, and denotes the positive-part operator.
3.2 VALUE-BASED METHODS FOR INFERENCE-TIME OPTIMIZATION IN DIFFUSION
Inference-time optimization methods for diffusion models focus on modifying their reverse process to improve generated samples with respect to specific objectives (Chung et al., 2022; Tang et al., 2024; Kim et al., 2025). However, most existing approaches rely on gradients (Guo et al., 2026; Yang et al., 2024), which are not often available for objectives in molecular generation (Shen et al., 2025; Tan et al., 2025). Value-based methods provide an alternative for non-differentiable objectives by estimating the expected future reward of an intermediate state with the value function defined as (Li et al., 2024; Uehara et al., 2025), where is the reward function defined on the final state .
Recent efforts (Kim et al., 2026) reformulate the value estimates using the samples generated from as follows to bypass potential computational limitations in using (Li et al., 2024; Jain et al., 2025):
This reformulation enables to be estimated in two steps: (1) perform -independent lookahead sampling from the noise prior to obtain and , and (2) compute in closed form by connecting to the lookahead samples through the forward transition .
4 METHODS
4.1 PROBLEM DEFINITION AND NOTATIONS
A ligand can be decomposed into a scaffold and a set of functional groups. The functional groups correspond to atoms involved in key interactions with the ligand's binding pocket, and the scaffold atoms define the molecular backbone.
connecting them. Scaffold hopping seeks to identify ligands that preserve the 3D shape and binding pattern of a known reference ligand (or “reference”) and that are also structurally distinct from it in 2D. Accordingly, we represent a ligand as , where denotes the scaffold and denotes the functional groups, and represent the protein pocket as . , , and are all represented as sets of atoms involved, with each atom characterized by a continuous position and a categorical atom type .
Given a pocket and a reference ligand bound to , scaffold hopping can be formulated as generating a new ligand by replacing the reference scaffold with a different, generated scaffold . Existing methods (Torge et al., 2023; Yoo et al., 2024) typically formulate this problem as conditional scaffold generation using a diffusion model, that is, , parameterized by , where the reference scaffold is not involved in the generation process. As a result, the diffusion model cannot explicitly exploit the structural features of the reference scaffold to tailor generation to the desired 2D and 3D similarity profile.
Here, we propose RIDE (Figure 1), a novel reference-anchored editing framework that reformulates scaffold hopping as a principled transformation from the reference scaffold to a set of new scaffolds . This formulation enables critical reference-specific features, such as the 3D shape and binding pose, to be preserved while introducing desired 2D changes to the scaffolds. To implement this formulation, RIDE first adapts state-of-the-art SBDD models to scaffold hopping to construct the base model , with details described in Appendix A.1, and propose an inference-time method that modifies its sampling process to obtain a new distribution anchored to (Section 4.2). Thus, the new distribution can be identified by solving the following new optimization problem:
where is the reward function defined as follows:
which considers 2D similarity Sim2D and 3D similarity Sim3D to ; and balances the two similarities. The reward is computed only for structurally valid scaffolds and is set to 0 for invalid ones.
4.2 REFERENCE-ANCHORED SCAFFOLD GENERATION VIA NOISE EDITING
Our goal is to construct the generation distribution from the base scaffold generation distribution . To address the competing objectives of low 2D similarity and high 3D similarity with desired by the generated scaffolds, we anchor scaffold generation to retain 3D shape, and apply a new value-guided sampling to encourage simultaneous 2D deviation. The algorithm is summarized in Appendix A.2.
4.2.1 REFERENCE NOISE TRAJECTORY RECOVERY
To establish a reference anchor for controlled scaffold generation during inference time, RIDE first recovers the state and noise trajectory reproducing under the base diffusion model , as illustrated in Figure 1b. We represent as , where and denote the scaffold atom positions and atom types, respectively. As the base model employs Gaussian diffusion for atom positions and categorical diffusion for atom types, we recover the reference position trajectory and reference atom-type trajectory using Eq. 1 and Eq. 3, respectively, with and . The corresponding position noise trajectory and atom-type noise trajectory are then derived from the reference state trajectories using Eq. 2 and Eq. 4, respectively.
Here, we denote the reverse transition with a specific noise sequence from timestep to ( ) as
and the transition using the reference noise as
Thus, we have
For notational simplicity, we omit P and in below.
4.2.2 REFERENCE TRAJECTORY EDITING VIA NOISE PERTURBATION
RIDE explores alternative scaffolds similar to the reference via reference trajectory editing, and implement this as noise perturbation over a segment of the reference noise trajectory between and , with , where is the segment length. Specifically, we design a perturbation distribution
over the atom position noise and type noise as follows and are omitted below for simplicity):
where
is the Dirac delta function. That is, RIDE explores different trajectories by editing the reference noise between and , replacing it with sampled noise from , with the remaining noise intact. Unlike existing inversion-based methods that directly modify recovered intermediate states, we perturb the trajectories by resampling the diffusion noise at selected timesteps. This avoids the difficulty of designing appropriate state-space edits and reduces the risk of moving the generation too far from the diffusion manifold. Meanwhile, retaining a majority of the original reference noise trajectories outside and provides a strong mechanism for preserving 3D shape and binding pose enabled by .
Reference-Optimal Perturbation Segment Selection The optimal trajectory segment to edit depends on the reference ligand. Thus, RIDE adopts a reference-specific strategy to optimally select a noise trajectory segment, illustrated in Figure 1c. RIDE first discretizes the search space of as , where denotes the number of uniformly sampled timesteps along the full diffusion trajectory, and and specify the allowed range for . For each candidate , we generate Monte Carlo samples following Eq. 11 and define a score to quantify over the samples as follows:
where
and is the reward function (Eq. 7). Given that the recovered reference trajectory already provides strong preservation of the reference 3D shape, we prioritize reducing 2D similarity when identifying the optimal . Thus, we select the optimal as follows,
where is a hyperparameter determining the length of the perturbation segment. That is, the optimal is omitted for simplicity) identifies a segment that produces promising scaffolds under , providing a favorable starting point for subsequent optimization.
4.2.3 VALUE-GUIDED SCAFFOLD SAMPLING
With the optimal perturbation segment starting from , RIDE estimates the value of each intermediate scaffold state ( ) sampled under (Eq. 11) to guide state selection within the segment, as illustrated in Figure 1d. RIDE reformulates the value estimator in Eq. 5 to adapt it to a new reference-anchored sampling, using and samples from the segment endpoint .
Theorem 1. Given a selected perturbation starting timestep and the corresponding reference state , the value of any intermediate state , where , can be expressed as
where
is the reward function (Eq. 7), and (conditioning on and is omitted for simplicity) denotes the transition distribution from timestep to under and diffusion parameters .
The conditioning on , and is also omitted in to align with . We provide the proof in Appendix A.3.1. In practice, we approximate the distribution using samples obtained from it, which yields a Monte Carlo estimator , described in Appendix A.3.2.
Value-Guided Transition Within the perturbation segment between and , RIDE performs value-guided greedy search for optimal scaffold state candidates. Specifically, at selected timesteps, given the current state ( ), RIDE samples noises from (Eq. 11), and identifies the optimal noise based on the estimated value (Eq. 21) as follows,
and thus, the optimal next scaffold state as
By iteratively selecting the optimal scaffold states along the edited noise trajectories, RIDE provides a new transition distribution to address scaffold hopping (Eq. 6).
5 EXPERIMENTS
5.1 EXPERIMENTAL SETTING
Datasets We adapt the SBDD models using the training sets of the original models, which are all derived from CrossDocked2020 training data (Francoeur et al., 2020). We evaluate RIDE on the test set introduced by Gao et al. (2026), excluding pocket-ligand complexes for which either no or all ligand atoms are identified as functional-group atoms, resulting in 60 complexes with 58 unique ligands. We use this test set because it focuses exclusively on human protein targets related to major diseases, avoiding the substantial proportion (67%) of non-human targets in the CrossDocked2020 test set and providing a more human-disease-relevant evaluation setting. This test set has no overlap with the CrossDocked2020 training set. The identification of functional-group atoms follows the protocol introduced by Guan et al. (2024). Across the 60 test complexes, ligands have an average of 28.7 heavy atoms, including 13.8 scaffold atoms and 14.9 functional-group atoms.
Baselines We evaluate three types of baselines on scaffold hopping: (1) conDitar (Gao et al., 2026) and IPDiff (Huang et al., 2024), adapted to scaffold hopping (Appendix A.1), referred to as conDitar-a and IPDiff-a, respectively. (2) DiffHopp (Torge et al., 2023); and (3) ShEPhERD (Adams et al., 2025), due to their strong generation performance and the availability of public checkpoints for adaptation. These three models, conDitar-a, IPDiff-a, and DiffHopp, serve two roles in our experiments: they are evaluated directly as scaffold hopping baselines, and they are also used as the base models on which RIDE performs inference-time editing. Details on datasets are available in Appendix A.4.
Evaluation Metrics We evaluate the generated scaffolds from two perspectives: (1) similarities with respect to the reference ligands (Sim , Sim ), and (2) general physicochemical properties for drug development (Vina S/M/D, QED, SA, Conn.(%)). These metrics are described in detail in Appendix A.5.
Iterative Hopping To explore more structurally distinct scaffolds, we use a generated scaffold from RIDE as a new “reference” ligand and apply RIDE over for a second “hop.” The details on selection are provided in Appendix A.6. We denote RIDE with two hops as , and the original RIDE with one hop as . Note that in , the reward (Eq. 7) in the second hop is evaluated against the original reference .
Experimental Protocol In RIDE, we use the same hyperparameters as the corresponding base models. Because RIDE performs atom-level trajectory recovery of the reference scaffold, the edited scaffold is constrained to have the same number of atoms as the reference. To ensure fair comparison, we use the same scaffold size for all baselines. A potential pitfall of encouraging greater 2D structural novelty is that the generated molecules may deviate from the favorable chemical characteristics of the reference, leading to less desirable drug-like properties. Therefore, we introduce a second setting for RIDE and RIDE where Sim is replaced with QED in the reward function (Eq. 7). Results under this reward function are indicated by “(QED)”. The implementation details are provided in A.7.
5.2 EXPERIMENTAL RESULTS
5.2.1 OVERALL COMPARISON
Comparison of RIDE with Baselines Table 1 presents a comprehensive comparison between RIDE and all the baselines. Overall, RIDE consistently achieves lower Sim and higher Sim than those from corresponding base models (as baselines). In terms of improvement of RIDE with a base model (e.g., RIDE with conDitar-a(QED)) over its corresponding base model (e.g., conDitar-a), RIDE achieves 11.7% decrease in Sim and 7.3% increase
Table 1: Comparison of RIDE with baselines on the test set with . Best and second-best results are shown in bold and underlined, respectively.
| Model | Similarity | Vina | QED ↑ | SA ↑ | Conn. (%) ↑ | ||||
|---|---|---|---|---|---|---|---|---|---|
| Vina S ↓ | Vina M ↓ | Vina D ↓ | |||||||
| Baselines | conDitar-a | 0.398 | 0.795 | -7.192 | -7.753 | -8.564 | 0.455 | 0.622 | 85.2 |
| IPDiff-a | 0.420 | 0.856 | -7.706 | -8.176 | -8.897 | 0.456 | 0.619 | 94.7 | |
| DiffHopp | 0.426 | 0.812 | -2.223 | -6.209 | -8.642 | 0.535 | 0.667 | 89.5 | |
| ShEPhERD | 0.417 | 0.881 | -6.471 | -7.402 | -8.390 | 0.404 | 0.576 | 29.4 | |
| RIDE(1) | conDitar-a | 0.354 | 0.884 | -7.508 | -8.049 | -8.833 | 0.427 | 0.601 | 91.5 |
| conDitar-a(QED) | 0.354 | 0.859 | -7.636 | -8.163 | -8.828 | 0.457 | 0.610 | 95.8 | |
| IPDiff-a | 0.363 | 0.903 | -7.422 | -7.975 | -8.688 | 0.408 | 0.584 | 93.1 | |
| IPDiff-a(QED) | 0.356 | 0.897 | -7.368 | -7.975 | -8.683 | 0.437 | 0.581 | 93.8 | |
| DiffHopp | 0.395 | 0.867 | -4.593 | -6.983 | -8.820 | 0.511 | 0.696 | 96.4 | |
| RIDE(2) | conDitar-a | 0.325 | 0.893 | -7.405 | -7.988 | -8.783 | 0.426 | 0.607 | 93.7 |
| conDitar-a(QED) | 0.334 | 0.844 | -7.488 | -8.064 | -8.801 | 0.470 | 0.604 | 93.0 | |
| IPDiff-a | 0.322 | 0.892 | -7.088 | -7.604 | -8.477 | 0.403 | 0.587 | 95.3 | |
| IPDiff-a(QED) | 0.333 | 0.874 | -7.046 | -7.648 | -8.550 | 0.471 | 0.595 | 94.4 | |
| DiffHopp | 0.372 | 0.863 | -4.759 | -7.109 | -8.802 | 0.498 | 0.708 | 98.2 | |
in Sim on average across all base models (ShEPhERD is excluded in this calculation). Compared to the baselines, the fundamental difference of RIDE is in its value-guided editing over the reference noise trajectories in the base models – the reference noise trajectories help preserve the reference 3D shape during editing, whereas value-guided search directs the generation toward low Sim. The superior performance of RIDE demonstrates that such editing is able to effectively steer the scaffold generation toward the desired chemical subspace beyond what is explored by the baselines. Meanwhile, on Vina S, RIDE achieves an average improvement 39.1% over conDitar-a and DiffHopp, while maintaining similar Vina M and Vina D scores compared to those of all the base models. In terms of Conn.(%), RIDE also introduces a noticeable average improvement 5.0% over the base models. Although RIDE exhibits slight degradation in QED and SA scores, the resulting values remain within acceptable ranges. Such slight degradation also reflects RIDE's exploration of novel chemical structures essential for scaffold hopping.
Base model-specific RIDE performance With Sim and Sim in the optimization objectives (Eqs. 6 and 7), RIDE exhibits different improvement patterns across the two adapted SBDD models, conDitar-a and IPDiff-a. On conDitar-a, RIDE improves both Sim and Sim substantially, reducing Sim by 11.1% while increasing Sim by 11.2%. In contrast, on IPDiff-a, which starts with worse Sim and better Sim as a baseline compared to conDitar-a, RIDE achieves a larger gain in Sim (13.6%) but a more moderate improvement in Sim (5.5%). These results suggest that RIDE can adapt to different SBDD base models by adjusting its optimization focus based on base models's generation behaviors. On DiffHopp, RIDE also consistently improves both Sim and Sim, with improvements of 7.3% and 6.8%, respectively. Note that DiffHopp has a much worse Vina S (-2.223) than the other baselines, and therefore, the noise trajectory of the reference ligand, which has high binding affinity and thus good Vina S, could be out of distribution for DiffHopp. The fact that RIDE substantially improves Vina S to -4.593 over DiffHopp suggests that its in-distribution perturbation and value-guided editing could partially compensate for the distribution mismatch. Overall, these improvements across different base models demonstrate that RIDE can serve as a plug-and-play inference-time editing framework that generalizes across different molecular diffusion models.
In addition to the three structure-based models, we compare RIDE with the ligand-based model ShEPhERD, which is specifically trained to generate molecules with shapes similar to the reference. RIDE can achieve Sim even higher than that of ShEPhERD, demonstrating its strong capability of retaining preferred 3D shapes.
Comparison of Different Reward Functions in RIDE We further investigate whether RIDE remains effective under various reward functions. Under RIDE, with a reward function combining Sim and QED of generated molecules, conDitar-a(QED) and IPDiff-a(QED) achieve 7.0% and 7.1% higher QED than conDitar-a and IPDiff-a, respectively. The corresponding gains increase to 10.3% and 16.9% under RIDE. This suggests that RIDE can accommodate different reward functions, and could be extended to other molecular properties through appropriate reward design. Note that although not explicitly optimized, Sim after Sim and QED optimization in RIDE still remains higher than that of the corresponding baseline, with improvements of 8.1% and 4.8% for conDitar-a(QED) and IPDiff-a(QED), respectively. This suggests that the reference noise trajectory helps retain favorable 3D shape even when is not explicitly included in the reward.
Comparison of RIDE and RIDE Table 1 also shows the performance changes between RIDE and RIDE. Compared with RIDE, RIDE generally further reduces Sim while maintaining high Sim. For example, Sim decreases from 0.354 to 0.325 on conDitar-a and from 0.363 to 0.322 on IPDiff-a, while Sim remains above 0.890 for both models. However, this increased 2D diversification is accompanied by weaker binding affinity: when averaged over conDitar-a and IPDiff-a, with and without QED optimization, Vina S changes from under RIDE to under RIDE. This might be due to the fact that the second hop uses a generated molecule as its anchor. This may cause deviations to accumulate across hops in properties not constrained by the similarity profile, potentially degrading binding affinity. Overall, these results highlight a trade-off in RIDE, and more generally, in scaffold hopping, between progressively improving the similarity profile and preserving binding affinity over multiple hops.
5.2.2 COMPARISON OF RANDOM PERTURBATION AND VALUE-GUIDED SAMPLING
Table 2: Comparison of random perturbation and value-guided sampling on and (perturbation segment starting from to the end of the diffusion trajectory), using conDitar-a as the base model. Best and second-best results are shown in bold and underlined, respectively.
| L | Similarity | Vina | QED ↑ | SA ↑ | Conn. (%) ↑ | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Sim2D ↓ | Sim3D ↑ | Vina S ↓ | Vina M ↓ | Vina D ↓ | ||||||
| random perturbation (Eq. 11) | T/10 | RIDE(1) | 0.387 | 0.898 | -7.742 | -8.213 | -8.840 | 0.442 | 0.614 | 86.6 |
| RIDE(2) | 0.343 | 0.874 | -7.581 | -8.091 | -8.813 | 0.425 | 0.604 | 90.0 | ||
| T | RIDE(1) | 0.391 | 0.866 | -7.837 | -8.308 | -9.028 | 0.462 | 0.629 | 92.3 | |
| RIDE(2) | 0.356 | 0.854 | -7.763 | -8.232 | -8.915 | 0.450 | 0.620 | 95.2 | ||
| value-guided sampling (Eq. 18) | T/10 | RIDE(1) | 0.354 | 0.884 | -7.508 | -8.049 | -8.833 | 0.427 | 0.601 | 91.5 |
| RIDE(2) | 0.325 | 0.893 | -7.405 | -7.988 | -8.783 | 0.426 | 0.607 | 93.7 | ||
| T | RIDE(1) | 0.340 | 0.882 | -7.612 | -8.157 | -8.904 | 0.440 | 0.628 | 95.1 | |
| RIDE(2) | 0.334 | 0.887 | -7.539 | -8.054 | -8.806 | 0.432 | 0.621 | 93.8 | ||
Table 2 compares results with random perturbation (Eq. 11) and value-guided sampling (Eq. 18) applied in RIDE. We choose conDitar-a for this study because RIDE applied to conDitar-a achieves strong performance and maintaining stable Vina S across hops. Overall, pairwise comparisons across the 4 settings ( vs , RIDE vs RIDE) show that value-guided sampling reduces average Sim by 8.3% and improves Sim by 1.6% relative to random perturbation. This suggests that the performance gains arise from guided search toward desired properties rather than from perturbation-induced changes alone.
Table 2 also compares the performance of RIDE under two perturbation segment lengths: a shorter segment covering one-tenth of the diffusion trajectory () and a longer segment extending from to the end of the diffusion trajectory (denoted as ). We use to provide a moderate discretization granularity over the diffusion trajectory, balancing exploration of distinct molecules and preservation of reference shapes. With , when averaged over RIDE and RIDE, value-guided sampling improves Sim by 6.9% over random perturbation, with a minor improvement in Sim of 0.31%. This trend becomes more significant with , where value-guided sampling reduces Sim by 9.6% and increases Sim by 2.9%. The larger gains with may be explained by the longer perturbation segment, which preserves less information from the reference structure and provides greater room for value-guided sampling to adjust the similarity profile.
5.2.3 COMPARISON OF REFERENCE-OPTIMAL AND FIXED
Figures 2a and 2b illustrate Sim and Sim across candidate values and at the reference-optimal , using conDitar-a and IPDiff-a as the base model, respectively, under random perturbation (Eq. 11). On both hops, compared with a fixed , the reference-optimal achieves the best Sim while with competitive Sim, indicating that the reference-optimal identifies a strong starting point for subsequent value-guided sampling. Meanwhile, RIDE and RIDE exhibit different trends in Sim and Sim across candidate values. With RIDE, a later perturbation improves Sim at the cost of degrading Sim, which is consistent with the intuition that later perturbation preserves more of the reference shapes. A similar pattern in Sim and Sim is observed with RIDE, but with lower Sim

(a)
(b)

(c)
(b)
Figure 2: Comparison of Sim vs. Sim across and with . (a) conDitar-a; (b) IPDiff-a.
Figure 3: Example of generated scaffolds for AK1BA (PDB ID: 5liu).
(a)

(b)
(c)
Sim : 1.00 Sim : 1.00
Vina S: -12.26 QED: 0.42 SA: 0.86
Sim : 0.34 Sim : 0.97
Vina S: -10.53 QED: 0.51 SA: 0.70
Sim : 0.41 Sim : 0.94
Vina S: -11.40 QED: 0.39 SA: 0.77
Figure 4: Example of generated scaffolds for TNKS2 (PDB ID: 5aeh).
and Sim than those in RIDE and smaller variations across candidate values, indicating that the RIDE is less sensitive to the choice of perturbation segment. This may be due to the fact that the RIDE is anchored to a generated molecule that is already structurally distant from the original reference. Therefore, further perturbations can induce only limited additional changes in the similarity profile with respect to the reference molecule.
5.2.4 CASE STUDIES
Figures 3b and 3c show two generated scaffolds by RIDE for AK1BA, a protein target involved in gastrointestinal cancers (Wang et al., 2026). Both generated scaffolds have low Sim and high Sim with the reference scaffold, as in Figure 3a. However, these scaffolds differ greatly in flexibility. The scaffold in Figure 3b is more flexible, with 6 rotatable bonds in the linker compared to 5 in that of the reference scaffold. Flexible molecules can better adapt to protein conformation shifts or resistance mutations in cancer (Fang et al., 2014). However, such flexibility often incurs an entropic penalty to the binding energies; this aligns with the slightly lower Vina S observed here. In contrast, the scaffold in Figure 3c has a shorter, more rigid linker than the reference, with only 4 rotatable linker bonds. More rigid molecules tend to have lower entropic binding penalties and higher selectivity, improving effectiveness while reducing off-target effects (Fang et al., 2014). Together, these examples show RIDE can generate scaffolds with different structures and properties.
Figures 4 presents another example from RIDE for TNKS2, a target implicated in many cancers (Huang et al., 2009). Both generated scaffolds (Figures 4b-c) have moderately low Sim and very high Sim with the reference scaffold in Figure 4a. The generated scaffolds share some common deviations from the reference: both use carbon to bind the two cyclic functional groups and replace one ketone with an alcohol. These changes alter physicochemical properties (e.g., pKa, lipophilicity) that influence absorption, distribution, metabolism, excretion, and toxicity properties of molecules. The scaffold in Figure 4b also uses cyclopentane in place of one benzene and adds an additional rotatable bond. These changes generally increase flexibility. Meanwhile, the generated scaffolds retain some key reference scaffold features – a benzene ring connected to another ring by a linker with a ketone. This helps the generated scaffolds attain very high Sim , while still introducing substantial 2D variation via atom-type, bond-type, ring-size, and linker changes.
6 CONCLUSION
RIDE is a novel inference-time diffusion editing framework for scaffold hopping. Our experimental results demonstrate that RIDE is effective, consistently generating scaffolds with low 2D similarity and high 3D similarity to the reference scaffold. Furthermore, RIDE has demonstrated its effectiveness under a variety of different settings, including different base models, reward functions, perturbation segment lengths, and number of scaffold hopping iterations. These results motivate future work to extend the framework to optimize additional molecular properties and further improve generated molecule quality. Future work may also investigate the development of more adaptive perturbation strategies for even more effective optimization.
ACKNOWLEDGMENTS
This project was made possible, in part, by support from the National Science Foundation grant no. IIS-2435819 (X.N.), the National Library of Medicine grant no. 1R01LM014385 (X.N.), and the Sanofi iDEA-TECH Awards North America (X.N.). Any opinions, findings, conclusions or recommendations expressed in this paper are those of the authors and do not necessarily reflect the views of the funding agency. The authors would like to thank Benjamin Burns and Ye Liu for their proofreading of the manuscript. The authors would also like to thank Daniel Adu-ampratwum for a helpful discussion regarding case study molecules.
AI USE STATEMENT
During the preparation of this work, the authors used AI tools to assist with language editing, improving the clarity of the manuscript, and identifying relevant literature. All AI-assisted content was reviewed and verified by the authors.
ETHICS STATEMENT
RIDE is a novel inference-time diffusion editing framework for scaffold hopping, which is an important problem in chemistry. While we have not designed RIDE for any unsafe or harmful purpose, we acknowledge that not all generated scaffolds and molecules are safe, and that RIDE could generate harmful content. Therefore, we strongly encourage responsible human expert supervision for any use of RIDE or its generated scaffolds and molecules. Specifically, human expert chemists should verify the safety of any generated scaffolds and molecules before any attempt is made to synthesize or test them in the laboratory. Furthermore, we exhort all users of RIDE to follow all applicable safety regulations, ethical guidelines, laws, and professional best practices.
REPRODUCIBILITY STATEMENT
All the source code has been made available at https://anonymous.4open.science/r/RIDE-C8A0. All the datasets are public. We reported all the experimental protocol in Section 5.1, and all the hyperparameters in Appendix A.6.
REFERENCES
Keir Adams, Kento Abeywardane, Jenna Fromer, and Connor Coley. Shepherd: Diffusing shape, electrostatics, and pharmacophores for bioisosteric drug design. In International Conference on Learning Representations, volume 2025, pp. 32280–32342, 2025.
Hans-Joachim Böhm, Alexander Flohr, and Martin Stahl. Scaffold hopping.
Ziqi Chen, Bo Peng, Tianhua Zhai, Daniel Adu-Ampratwum, and Xia Ning. Generating 3d small binding molecules using shape-conditioned diffusion models with guidance. Nature machine intelligence, 7(5):758–770, 2025.
Hyungjin Chung, Jeongsol Kim, Michael T Mccann, Marc L Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209.14687, 2022.
Jerome Eberhardt, Diogo Santos-Martins, Andreas F. Tillack, and Stefano Forli. Autodock vina 1.2.0: New docking methods, expanded force field, and python bindings. Journal of Chemical Information and Modeling, 61(8):3891–3898, 08 2021. ISSN 1549-9596. doi: 10.1021/acs.jcim.1c00203. URL https://doi.org/10.1021/acs.jcim.1c00203.
Zengjun Fang, Yu'ning Song, Peng Zhan, Qingzhu Zhang, and Xinyong Liu. Conformational restriction: an effective tactic in 'follow-on'-based drug discovery. Future medicinal chemistry, 6(8):885–901, 2014.
Paul G. Francoeur, Tomohide Masuda, Jocelyn Sunseri, Andrew Jia, Richard B. Iovanisci, Ian Snyder, and David R. Koes. Three-dimensional convolutional neural networks and a cross-docked data set for structure-based drug design. Journal of Chemical Information and Modeling, 60(9):4200–4215, 09 2020. ISSN 1549-9596. doi: 10.1021/acs.jcim.0c00411. URL https://doi.org/10.1021/acs.jcim.0c00411.
Ruoxi Gao, Jiangweizhi Peng, Ziqi Chen, Frazier N Baker, David C Kombo, John L Kane Jr, Andrew A Scholte, Yi Li, Matthew J LaMarche, Luigi I Iconaru, et al. Generating developable 3d molecules via pocket-conditioned diffusion and property-aware optimization. arXiv preprint arXiv:2607.12349, 2026.
Siyi Gu, Minkai Xu, Alexander Powers, Weili Nie, Tomas Geffner, Karsten Kreis, Jure Leskovec, Arash Vahdat, and Stefano Ermon. Aligning target-aware molecule diffusion models with exact energy optimization. Advances in neural information processing systems, 37:44040–44063, 2024.
Jiaqi Guan, Wesley Wei Qian, Xingang Peng, Yufeng Su, Jian Peng, and Jianzhu Ma. 3d equivariant diffusion for target-aware molecule generation and affinity prediction. arXiv preprint arXiv:2303.03543, 2023.
Jiaqi Guan, Xiangxin Zhou, Yuwei Yang, Yu Bao, Jian Peng, Jianzhu Ma, Qiang Liu, Liang Wang, and Quanquan Gu. Decompdiff: diffusion models with decomposed priors for structure-based drug design. arXiv preprint arXiv:2403.07902, 2024.
Yingqing Guo, Yukang Yang, Hui Yuan, and Mengdi Wang. Training-free guidance beyond differentiability: Scalable path steering with tree search in diffusion and flow models. Advances in Neural Information Processing Systems, 38:73343–73384, 2026.
Paul CD Hawkins, A Geoffrey Skillman, and Anthony Nicholls. Comparison of shape-matching and docking as virtual screening tools. Journal of medicinal chemistry, 50(1):74–82, 2007.
Xiaoxiao He, Quan Dao, Ligong Han, Song Wen, Minhao Bai, Di Liu, Han Zhang, Felix Juefei-Xu, Chaowei Tan, Bo Liu, et al. Dice: Discrete inversion enabling controllable editing for masked generative models. In
Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt-to-prompt image editing with cross attention control.(2022). URL https://arxiv.org/abs/2208.01626, 3(3), 2022.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
Emiel Hoogeboom, Didrik Nielsen, Priyank Jaini, Patrick Forré, and Max Welling. Argmax flows and multinomial diffusion: Learning categorical distributions. Advances in neural information processing systems, 34:12454–12465, 2021.
Shih-Min A Huang, Yuji M Mishina, Shanming Liu, Atwood Cheung, Frank Stegmeier, Gregory A Michaud, Olga Charlat, Elizabeth Wiellette, Yue Zhang, Stephanie Wiessner, et al. Tankyrase inhibition stabilizes axin and antagonizes wnt signalling. Nature, 461(7264):614–620, 2009.
Zhilin Huang, Ling Yang, Xiangxin Zhou, Zhilong Zhang, Wentao Zhang, Xiawu Zheng, Jie Chen, Yu Wang, Bin CUI, and Wenming Yang. Protein-ligand interaction prior for binding-aware 3d molecule diffusion models. In B. Kim, Y. Yue, S. Chaudhuri, K. Fragkiadaki, M. Khan, and Y. Sun (eds.), International Conference on Learning Representations, volume 2024, pp. 18453–18474, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/file/50ca96a1a9ebe0b5e5688a504feb6107-Paper-Conference.pdf.
Inbar Huberman-Spiegelglas, Vladimir Kulikov, and Tomer Michaeli. An edit friendly ddpm noise space: Inversion and manipulations. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 12469–12478. IEEE, 2024.
Vineet Jain, Kusha Sareen, Mohammad Pedramfar, and Siamak Ravanbakhsh. Diffusion tree sampling: Scalable inference-time alignment of diffusion models. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025. URL https://openreview.net/forum?id=3D88hC00Gd.
Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. Diffusionclip: Text-guided diffusion models for robust image manipulation. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2416–2425. IEEE, 2022.
Sunwoo Kim, Minkyu Kim, and Dongmin Park. Test-time alignment of diffusion models without reward over-optimization. In International Conference on Learning Representations, volume 2025, pp. 87238–87272, 2025.
Yeongmin Kim, Donghyeok Shin, Byeonghu Na, Minsang Park, Richard Lee Kim, and Il chul Moon. Lookahead sample reward guidance for test-time scaling of diffusion models. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=IbRm6gwmew.
Bohao Li, Xinyu Wu, Yu Cao, Jie Lin, Jingpeng Zhong, Hua Chen, Yongzhi Lu, Miru Tang, Jinping Lei, Ting Ran, et al. De novo molecular design via shape-constrained diffusion models. Journal of Chemical Information and Modeling, 66(8):4592–4606, 2026.
Xiner Li, Yulai Zhao, Chenyu Wang, Gabriele Scalia, Gokcen Eraslan, Surag Nair, Tommaso Biancalani, Shuiwang Ji, Aviv Regev, Sergey Levine, et al. Derivative-free guidance in continuous and discrete diffusion models with soft value-based decoding. arXiv preprint arXiv:2408.08252, 2024.
Shitong Luo, Jiaqi Guan, Jianzhu Ma, and Jian Peng. A 3d generative model for structure-based drug design. Advances in neural information processing systems, 34:6229–6239, 2021.
Ron Mokady, Amir Hertz, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Null-text inversion for editing real images using guided diffusion models. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6038–6047. IEEE, 2023.
Arne Schneuing, Charles Harris, Yuanqi Du, Kieran Didi, Arian Jamasb, Ilia Igashov, Weitao Du, Carla Gomes, Tom L Blundell, Pietro Lio, et al. Structure-based drug design with equivariant diffusion models. Nature Computational Science, 4(12):899–909, 2024.
Yuchen Shen, Chenhao Zhang, Sijie Fu, Chenghui Zhou, Newell Washburn, and Barnabas Poczos. Chemistry-inspired diffusion with non-differentiable guidance. In International Conference on Learning Representations, volume 2025, pp. 10211–10245, 2025.
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020.
Kim Yong Tan, Yueming Lyu, Ivor Tsang, and Yew-Soon Ong. Fast direct: Query-efficient online black-box guidance for diffusion-model target generation. In International Conference on Learning Representations, volume 2025, pp. 19385–19422, 2025.
Zhiwei Tang, Jiangweizhi Peng, Jiasheng Tang, Mingyi Hong, Fan Wang, and Tsung-Hui Chang. Inference-time alignment of diffusion models with direct noise optimization. arXiv preprint arXiv:2405.18881, 2024.
Jos Torge, Charles Harris, Simon V Mathis, and Pietro Lio. Diffhopp: A graph diffusion model for novel drug design via scaffold hopping. arXiv preprint arXiv:2308.07416, 2023.
Masatoshi Uehara, Yulai Zhao, Chenyu Wang, Xiner Li, Aviv Regev, Sergey Levine, and Tommaso Biancalani. Inference-time alignment in diffusion models with reward-guided generation: Tutorial and review. arXiv preprint arXiv:2501.09685, 2025.
Bram Wallace, Akash Gokul, and Nikhil Naik. Edict: Exact diffusion inversion via coupled transformations. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 22532–22541. IEEE, 2023.
Chen Wang, Zhuang Xiong, Xiang Wang, Jing Liang, Haoyang Li, Siqi He, Chengkun Wang, and Yang Zhang. The pathway network of aldo-keto reductase 1b10: a new perspective on gene-targeted therapy. npj Gut and Liver, 3(1): 20, 2026.
Brian Yang, Huangyuan Su, Nikolaos Gkanatsios, Tsung-Wei Ke, Ayush Jain, Jeff Schneider, and Katerina Fragkiadaki. Diffusion-es: Gradient-free planning with diffusion for autonomous and instruction-guided driving. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 15342–15353. IEEE, 2024.
Julong Yang, Wen Huang, Junhui Chen, and Jian Peng. Decode: Decoupling binding position and molecular conformation in 3d ligand diffusion for structure-based drug design. In Forty-third International Conference on Machine Learning.
Yuwei Yang, Xiaoqing Gong, Shukai Gu, Jing Li, Bo Liu, Yanan Tian, Qianqian Zhang, Xiaojun Yao, and Huanxiang Liu. Diffusion-based generative model with scaffold-hopping strategy yields highly potent bioactive molecules. Advanced Science, pp. e75674, 2026.
Kiwoong Yoo, Owen Oertell, Junhyun Lee, Sanghoon Lee, and Jaewoo Kang. Turbohopp: accelerated molecule scaffold hopping with consistency models. Advances in neural information processing systems, 37:41157–41185, 2024.
Shuangjia Zheng, Zengrong Lei, Haitao Ai, Hongming Chen, Daiguo Deng, and Yuedong Yang. Deep scaffold hopping with multimodal transformer neural networks. Journal of cheminformatics, 13(1):87, 2021.
A APPENDIX
A.1 ADAPTING DIFFUSION-BASED SBDD MODELS TO SCAFFOLD HOPPING
To adapt a pretrained diffusion-based SBDD model, denoted as , to a base model for scaffold hopping, with as additional conditioning, we fix and restrict the diffusion loss to scaffold atoms and update the diffusion parameters as follows,
where denotes the partially noised ligand with fixed functional groups at , indicates whether the -th atom belongs to the noised scaffold , and denotes the SBDD diffusion loss on the -th atom.
Although the additional conditioning can also be imposed through inpainting during inference time of SBDD models, inpainting can create a mismatch with the distribution learned during training, potentially leading to invalid molecular structures and unfavorable conformations. The distribution mismatch may also make the model more vulnerable to modifications on the diffusion trajectory, thereby reducing control over the generated structures. Compared to training a conditional generative model from scratch or inpainting, adapting a pretrained SBDD model offers multiple benefits: Adaptation leverages the pretrained SBDD model's capacity as a strong prior for generating chemically valid molecules with favorable binding affinity and 3D shapes; it also optimizes the model parameters to accommodate the additional conditioning ().
A.2 ALGORITHMS
A.2.1 RIDE
Algorithm 1 RIDE
Input: Protein pocket , reference scaffold and functional groups , perturbation length , diffusion model
Output: Generated scaffold
Reference noise trajectory recovery
1: ,
▷ Details in Algorithm 2
Reference-optimal perturbation segment selection
2:
▷ Details in Algorithm 3
3:
Value-guided scaffold sampling
4:
▷ Details in Algorithm 4
5:
▷ Reuse reference noise
6: return
RIDE is summarized in Algorithm 1. The following sections describe each component in detail.
A.2.2 REFERENCE TRAJECTORY INVERSION
The inversion of reference scaffold is summarized in Algorithm 2.
A.2.3 OPTIMAL SELECTION
The procedure for selecting is summarized in Algorithm 3.
A.2.4 VALUE-GUIDED SAMPLING
The procedure for value estimation and value-guided sampling is summarized in Algorithm 4.
Algorithm 2 Trajectory Inversion of
1: function INVERSION() 2: 3: for do 4: 5: 6: 7: for do 8: 9: 10: 11: 12: 13: return 14: end function
Algorithm 3 Selection of
1: function SEGMENTSELECTION(, , ) 2: for do 3: for do 4: 5: 6: 7: 8: return 9: end function
Algorithm 4 Value-Guided Sampling
1: function VALUEGUIDEDSAMPLING(, , ) 2: 3: for do 4: ▷ Prepare lookahead samples 5: for do 6: if is a guided timestep then 7: for do 8: , ▷ Propose a candidate for selection 9: ▷ Estimate value using Eq. 21 10: ▷ Value-guided selection 11: else 12: , ▷ Reverse transition without selection 13: return 14: end function
A.3 ADDITIONAL THEORIES
A.3.1 PROOF FOR THEOREM 1
Proof. By definition, the value of an intermediate state is the expected terminal reward obtained by continuing the reverse process from .
Then,
□
A.3.2 THEOREM 2
Theorem 2. Given samples from , the value of an intermediate state in Eq. 16 can be estimated as
where
The two log-transition terms in are calculated in closed form using the Gaussian forward kernel for atom positions and the categorical forward kernel for atom types. We provide the proof and detailed derivation of the log-transition terms below.
Proof for theorem 2
Proof. By applying a Monte Carlo approximation to the expectations in Eq. 16, we obtain
with and ,
Define
then,
Therefore,
Detailed derivations of log transitions
Proof. The forward transition factorizes over atom positions and atom types,
then,
Similarly,
Therefore,
where
and
For atom positions, the DDPM forward process admits the closed-form transition
Let
Then, for a scaffold with n atoms,
Similarly,
Therefore,
For atom types, the forward process is
where
For a n-atom scaffold,
and
Therefore,
A.4 BASELINES FOR EXPERIMENTS
We evaluate three types of baselines on scaffold hopping: (1) SBDD models adapted to scaffold hopping (Appendix A.1), (2) a structure-based scaffold hopping model, DiffHopp (Torge et al., 2023) and (3) a ligand-based scaffold hopping model, ShEPhERD (Adams et al., 2025). For SBDD models, we choose two recent state-of-the-art diffusion-based models, conDitar (Gao et al., 2026) and IPDiff (Huang et al., 2024), due to their strong generation performance and the availability of public checkpoints for adaptation. To enable stable trajectory recovery and better preservation of reference shape and interaction with the binding pockets, we slightly modify IPDiff's generation process, with details provided in Appendix A.8. We denote the adapted models of conDitar and IPDiff as conDitar-a and IPDiff-a, respectively. We also include DiffHopp, the only structure-based diffusion model for scaffold hopping with publicly available checkpoints. These three models, conDitar-a, IPDiff-a, and DiffHopp, serve two roles in our experiments: they are evaluated directly as scaffold hopping baselines, and they are also used as the base models on which RIDE performs inference-time editing. In addition to these models, we use a ligand-based model, ShEPhERD, as a baseline. ShEPhERD performs scaffold hopping via ligand-based inpainting given 3D shape, functional group, and/or electrostatic conditions. We do not use ShEPhERD as a base model for RIDE because it generates molecules through inpainting, making both RIDE and its adaptation strategy not directly applicable.
A.5 EVALUATION METRICS
We evaluate the generated scaffolds from two perspectives: (1) similarities with respect to the reference ligands, and (2) general physicochemical properties for drug development. Please note, we use similarities between entire molecules as a proxy for scaffold similarity, as functional groups already remain fixed for a given reference. For similarities with the reference ligands, we use Sim , which is measured by the Tanimoto distance between molecular fingerprints, and Sim , which is calculated using ROCS tool following Hawkins et al. (2007). To ensure that reference functional-group atoms remain at the same positions in the generated and reference molecules, we skip the pre-alignment step in ROCS before Sim computation, ensuring Sim reflects the generated pose. For general physicochemical properties, we report three binding affinity metrics predicted by AutoDock Vina (Eberhardt et al., 2021): Vina Score (Vina S) on the original generated pose, Vina Minimization (Vina M) after local energy minimization, and Vina Dock (Vina D) after docking. We also use quantitative estimates of drug-likeness (QED) and synthetic accessibility (SA) following Luo et al. (2021) as metrics to assess the overall physicochemical profile and synthesizability of generated molecules. In addition, following Torge et al. (2023), we evaluate Conn.(%), defined as the percentage of generated molecules in which the generated scaffold is successfully connected to reference functional groups. For each reference ligand, we generate 100 samples and consider only the resulting valid and connected molecules for evaluation. Each metric is first averaged over the generated molecules on a per-reference basis and then across all test complexes.
A.6 ANCHOR MOLECULE SELECTION FOR RIDE
For RIDE , we select the anchor molecule from the molecules generated in one hop using a simple hierarchical filtering procedure. For each reference, we first retain the top 30% of molecules according to 3D shape similarity to the reference, and then select the candidate with the lowest 2D similarity as the anchor for two hops.
A.7 IMPLEMENTATION DETAILS AND REPRODUCIBILITY
RIDE uses in its reward for reference-optimal perturbation segment selection for all models. RIDE follows the same settings, except for IPDiff-a, where segment selection. During value-guided scaffold sampling, RIDE uses for its reward, while RIDE uses to better encourage retaining the reference 3D shape over multiple hops. Both conDitar-a and IPDiff-a use , following their original papers (Gao et al., 2026; Huang et al., 2024). For these models, RIDE and RIDE use , and . DiffHopp uses , following its original paper (Torge et al., 2023). Therefore, RIDE and RIDE use , and for this model to maintain the same segment length as other models. For selecting optimal segment in 13, we use . For estimating the value in 21, we use .
A.8 MODIFICATION TO IPDIFF'S GENERATION PROCESS
IPDiff extends the standard SBDD diffusion process by incorporating protein-ligand interaction embeddings into both the forward and reverse diffusion processes. During generation, IPDiff dynamically extracts the interaction embeddings at each timestep using the predicted clean ligand from the previous timestep, leading to transition distributions evolving over the denoising trajectory. To enable a consistent and stable trajectory recovery and preserve the reference 3D shape and pocket-ligand interaction pattern, we modify IPDiff's original inference process by fixing the interaction embeddings to those extracted from the anchor ligand during generation in both hopping iterations.
A.9 ADDITIONAL EXPERIMENTAL RESULTS
Comparison of Value-Guided Sampling and Random Perturbation under QED optimization We observe a similar behavior to that in Figure 2 when the downstream objective is changed from Sim to QED, as shown in Figure 5. Across candidate values, lower Sim is accompanied by changes in QED, showing that the perturbation starting timestep also controls the trade-off between the Sim and QED objectives. By comparing the QED curves with the Sim curves, we observe that QED and Sim show similar responses to the perturbation starting timestep, with higher QED generally corresponding to higher Sim under random perturbation. This suggests that 3D preservation is partially aligned with good QED. Our similarity-based dynamic timestep selection also identifies a reasonable starting point balancing Sim , QED and Sim for subsequent optimization.
Comparison of Inversion and Non-Inversion By comparing results with and without inversion in Table 3, we observe that removing inversion leads to worse Sim and Sim , highlighting the importance of trajectory inversion in balancing 2D novelty and 3D shape preservation. With RIDE , trajectory inversion consistently improves both
Table 3: Comparison of generation results with and without trajectory inversion using conDitar-a as the base model. Random perturbation corresponds to generation under , while value-guided sampling further performs search from to . Best and second-best results are shown in bold and underlined, respectively.
| Inversion | Sampling | Similarity | Vina | QED ↑ | SA ↑ | Conn. (%) ↑ | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| Vina S ↓ | Vina M ↓ | Vina D ↓ | ||||||||
| √ | random | 0.391 | 0.866 | -7.837 | -8.308 | -9.028 | 0.462 | 92.3 | ||
| perturbation | 0.356 | 0.854 | -7.763 | -8.232 | -8.915 | 0.450 | 0.620 | 95.2 | ||
| value-guided | 0.340 | 0.882 | -7.612 | -8.157 | -8.904 | 0.440 | 0.628 | 95.1 | ||
| sampling | 0.887 | -7.539 | -8.054 | -8.806 | 0.432 | 0.621 | 93.8 | |||
| ✕ | random | 0.401 | 0.833 | -7.668 | -8.144 | -8.794 | 0.623 | 91.7 | ||
| perturbation | 0.354 | 0.845 | -7.825 | -8.275 | -8.853 | 0.450 | 0.622 | 97.2 | ||
| value-guided | 0.353 | 0.852 | -7.497 | -7.985 | -8.757 | 0.426 | ||||
| sampling | 0.341 | 0.884 | -7.644 | -8.220 | -9.053 | 0.443 | 0.624 | 94.7 | ||

Figure 5: Comparison of vs. QED and vs. results across values () and with , under reward function of and QED. (a)-(b): conDitar-a, (c)-(d): IPDiff-a.
objectives, increasing from 0.833 to 0.866 at and from 0.852 to 0.882 after search, while also reducing . With , the improvement is more modest but remains consistent, with increasing from 0.845 to 0.854 at and from 0.884 to 0.887 after search, together with a further improvement in after value-guided sampling.
Sensitivity to Figure 6 reports the results of two hops with varied from 0 to 1 in increments of 0.1. Across the tested values, increasing is associated with lower and a gradual decrease in . This trend is consistent with the role of in the reward, where larger values prioritize 2D dissimilarity over 3D similarity. The other molecular properties, including QED and SA, remain relatively stable across different values. Vina S shows moderate variation with better values generally observed at higher . Among the Pareto-optimal subset of the tested values, provides a favorable trade-off between low and high .

Figure 6: Sensitivity analysis of the reward weight in the second hop.