MacroGuide: Topological Guidance for Macrocycle Generation
Abstract
Macrocycles are ring-shaped molecules that offer a promising alternative to small-molecule drugs due to their enhanced selectivity and binding affinity against difficult targets. Despite their chemical value, they remain underexplored in generative modeling, likely owing to their scarcity in public datasets and the challenges of enforcing topological constraints in standard deep generative models. We introduce MacroGuide: Topological Guidance for Macrocycle Generation, a diffusion guidance mechanism that uses Persistent Homology to steer the sampling of pretrained molecular generative models toward the generation of macrocycles, in both unconditional and conditional (protein pocket) settings. At each denoising step, MacroGuide constructs a Vietoris-Rips complex from atomic positions and promotes ring formation by optimizing persistent homology features. Empirically, applying MacroGuide to pretrained diffusion models increases macrocycle generation rates from 1% to 99%, while matching or exceeding state-of-the-art performance on key quality metrics such as chemical validity, diversity, and PoseBusters checks. The implementation can be found at https://github.com/ala1705/MacroGuide.
Lay Summary
AI is a powerful tool for designing new drug molecules. Macrocycles, which are large ring-shaped molecules, are an especially valuable class of drug candidates thanks to their chemical properties. But AI systems rarely produce them, because ring-shaped molecules are uncommon in their training data and reliably closing a ring is surprisingly hard. We introduce MacroGuide, a method that nudges existing molecular-design AI toward producing macrocycles, without any retraining. As the model gradually builds up a molecule from random noise, MacroGuide uses ideas from topology, a branch of mathematics that studies shape and connectivity, to detect when a ring is starting to form and gently encourage it to close. Applied to leading molecular generation models, MacroGuide raises the rate of macrocycle production from about 1% to 99%, while keeping the molecules chemically valid, structurally realistic, and diverse. This makes a previously out-of-reach class of drug candidates much more accessible to AI-driven discovery.