Fraglingo generates molecules by linking fragments with learned attachments
Fraglingo: Molecular Design via Attachment-Aware Autoregressive Fragment Generation
Artificial Intelligence
Summary
Designing new molecules by adding parts together is a common task in chemistry. The authors present Fraglingo, a method that predicts which piece to add next and exactly how it should attach, all at once. This method works by representing fragments and attachment points in a smooth mathematical space, letting it flexibly combine fragments even if they were not in its original training set. Fraglingo matches or exceeds previous methods in controlling chemical properties while producing valid and novel molecules. It can also handle much larger libraries of fragments without needing retraining.
What this means in practice
- •For chemical engineers: Generate candidate molecules by attaching desired fragments with precise connections to optimize target properties for materials or drug development.
- •For biotechnology developers: Design new bioactive compounds by flexibly combining and decorating molecular scaffolds beyond fixed fragment sets to accelerate lead discovery.
Authors
Thao Nguyen, Jeonghwan Kim, Zhenhailong Wang, Heng Ji
Abstract
Molecular design is most effective when generation mirrors the edits chemists actually make: extending a scaffold, replacing a substituent, or decorating a scaffold at a specified attachment site while optimizing molecular properties. Fragment-based molecular design naturally supports this workflow, yet existing approaches often separate fragment selection from attachment prediction, first choosing a fragment from a fixed vocabulary and then predicting how it should be connected. This decoupling restricts generation to a closed fragment vocabulary and treats attachment as a separate prediction problem. We introduce Fraglingo, an autoregressive fragment-based molecular generator that jointly models fragment identity and attachment in a continuous latent space. Fraglingo predicts an attachment-aware fragment embedding and retrieves the next fragment through latent-space nearest-neighbor search. To encode attachment context, we introduce a wildcard-anchored readout that represents the growing molecule from the perspective of its active attachment site, enabling the predicted embedding to capture both the molecular context and the required attachment. Because generation operates in a continuous embedding space rather than over fixed fragment identifiers, new fragments can be added to the inference-time vocabulary without retraining, provided their embeddings can be computed by the trained fragment encoder. This retrieval-based formulation provides a unified generation primitive for molecule generation, scaffold generation, scaffold decoration, and molecular optimization. On controlled property-conditional benchmarks, Fraglingo achieves stronger joint property control than comparably trained baselines while maintaining competitive validity, uniqueness, and novelty. Furthermore, Fraglingo generalizes to fragment libraries up to 4x larger than those used during training without retraining.