In drug discovery, researchers rarely start from a blank slate. Instead, they begin with a "lead compound"—a molecule that already shows some biological activity but has flaws, such as high toxicity or poor solubility. The goal is to "tweak" this molecule to fix the flaws without destroying the core structural framework, or scaffold, that makes it work in the first place.
Traditional generative models often fail this task. When asked to optimize a property, they tend to perform "structural drift," where the model aggressively explores chemical space and produces a high-scoring molecule that looks nothing like the original. This is a failure of lead optimization: if you change the scaffold, you likely lose the specific biological binding that made the molecule a "lead" to begin with.
The Scaffold as a Fixed Anchor
The most direct way to prevent structural drift is to treat the scaffold as a hard constraint. In Scaffold-based molecular design using graph generative model, Jaechang Lim and colleagues proposed starting the decoding process from a fixed subgraph. By making the scaffold the "root" of the generation process, the model is forced to only add functional groups to the periphery, guaranteeing that the essential pharmacophore remains unchanged.
This "anchor" intuition is also central to MultiMol, where Jiajun Yu frames optimization as a conditional reconstruction task. By treating the primary molecular framework as a hard constraint rather than a suggestion, the model can focus entirely on the "decorations" (side chains) that influence pharmacokinetics without risking the loss of primary biological activity.
Surgical Editing via Masking and In-painting
If we view a molecule as a graph, optimization becomes a task of "surgical editing." Instead of regenerating the whole molecule, models like FMOP by Bo Du use a fragment-masking approach. They identify the core scaffold, mask the peripheral fragments, and use a diffusion model to "in-paint" new side chains.
This approach works because it decouples the global geometric identity of the molecule from its local atomic composition. As Zitao Chen notes in MolAlign3D, maintaining the 3D backbone is critical; if you add or remove atoms without constraints, the entire structure can collapse. By treating predefined sub-structures as rigid bodies during the diffusion process—an idea explored in EdGr by Rohan V. Koodli—models prevent functional groups from drifting apart.
Alignment and the Inductive Bias of Invariance
In chemical reactions and retrosynthesis, most of the molecule actually stays the same. Researchers like Shengyu Zhang in Retroformer use an alignment loss to enforce this inductive bias. The model is penalized if it tries to "hallucinate" changes to the parts of the molecule that should be "spectators" to the reaction.
Similarly, Kaipeng Zeng introduced UAlign, which uses unsupervised SMILES alignment to force the model to "reuse" unchanged substructures. This prevents the model from trying to reconstruct the entire molecule from scratch, which is where most errors in invariant regions occur.
Agentic Feedback and Natural Language Gradients
The most recent shift in this field involves using Large Language Models (LLMs) as "agents" that can reason about these trade-offs. Le Huy Khiem and Hua Ting developed AgentDrug, which uses a nested feedback loop.
Instead of a single-shot generation, the agent proposes a modification, receives "natural language gradient" feedback (e.g., "this change improved solubility but broke the piperazine ring's rigidity"), and tries again. This iterative refinement, also seen in MolAct by Zhuo Yang, allows the model to navigate the "Whac-A-Mole" problem: improving one property while explicitly monitoring and preserving the structural integrity of the scaffold.
Why It Works: Balancing Exploration and Exploitation
The success of scaffold-constrained methods lies in how they manage the tension between exploration (finding new chemical groups) and exploitation (leveraging a known-good scaffold).
- Search Space Reduction: By fixing the scaffold, the model searches a much smaller, more relevant neighborhood of chemical space.
- Reward Shaping: Models like MOLER by Tianfan Fu incorporate global structural similarity rewards, penalizing the model for moving too far from the starting point.
- Chemical Validity: As shown in GCPN by Jiaxuan You, building molecules atom-by-atom or fragment-by-fragment on top of a valid scaffold ensures 100% chemical validity, a feat global SMILES generators often struggle to achieve.
By treating the molecular scaffold as a stable anchor, these researchers have moved AI from "dreaming up" random molecules to performing the precise, surgical optimizations required for real-world drug development.