Effective molecular design requires that the generation process mirrors the edits chemists actually perform—extending a scaffold, swapping a substituent, or decorating a scaffold at a designated attachment site while optimizing molecular properties. Fragment‑based design naturally fits this workflow, yet most existing methods decouple fragment selection from attachment prediction: a fragment is first chosen from a fixed vocabulary, then its connection is predicted. This separation restricts generation to a closed fragment set and treats attachment as an independent prediction task.
Fraglingo introduces an autoregressive fragment generator that jointly models fragment identity and attachment in a continuous latent space. The model emits an attachment‑aware fragment embedding and retrieves the next fragment via nearest‑neighbor search in the latent space. To capture the context of the active attachment site, a wildcard‑anchored readout is employed, representing the growing molecule from the perspective of that site so that the embedding encodes both molecular context and the required connection.
Because generation operates on continuous embeddings rather than discrete fragment identifiers, new fragments can be added at inference time without retraining, provided their embeddings can be computed by the trained fragment encoder. This retrieval‑based formulation unifies molecule‑wide generation, scaffold generation, scaffold decoration, and property optimization.
On controlled property‑conditional benchmarks, Fraglingo achieves stronger joint property control than comparably sized baselines while maintaining competitive validity, uniqueness, and novelty. Crucially, the model scales to fragment libraries up to four times larger than those seen during training without any retraining.
Review