Skip to main content
Back to timeline
researchsquare.comSource publication:

Molecular generators learn to unlearn: SemlaFlow cuts motif-bearing molecules from 31.1% to 2.2%

Synopsis

Molecular generators often emit reactive, metal-binding, charged or assay-interference motifs, while molecules lacking a given motif are scattered across chemical space and hard to learn as a positive class. Negative extrapolation (NE) instead fine-tunes on motif-containing molecules and reverses the resulting weight update to suppress the motif directly. On the 3D flow-matching generator SemlaFlow, standard NE lowered the fraction of valid molecules carrying any target motif from 31.1% to 5.3% but cut RDKit-valid graph yield from 93.9% to 65.9%; adding a correction direction learned from motif-free molecules brought the motif fraction to 2.2%, restored valid graph yield to 88.3%, and raised fixed-budget 3D usable yield from 60.0% to 80.8%.

Source-provided article image: Negative Extrapolation for Targeted Motif Suppression in Molecular Generators
researchsquare.com

Interpretation

Negative extrapolation turns suppressing a class of chemical structures into a single parameter-space edit rather than post-generation filtering or repeated reward optimization. Earlier options either discarded motif-bearing molecules from a fixed sampling budget or fine-tuned on motif-free molecules, which reinforces the chemistry of the selected positive set without specifying which part of the learned distribution should be suppressed. Across the RNN, Transformer and public REINVENT prior, covering four motif classes (reactive, metal-binding, charged and assay-interference) in twelve architecture-objective combinations, NE reduced target motifs more strongly than conventional fine-tuning and norm-matched random NE; relative to fine-tuning, hit fractions were 0.32–7.80 percentage points lower for the RNN, 0.91–5.41 lower for the Transformer and 2.59–4.99 lower for the REINVENT prior.

The procedure first makes the motif direction explicit, then steps the opposite way. It continues training on motif-containing molecules with the model's native generative objective to obtain a weight update from the base model, then applies it in reverse as θNE = θbase − λ(θbad − θbase), with λ setting the edit strength. On SemlaFlow, targeting all four motif classes jointly, 31.1% of valid base-generator molecules carried at least one target motif; conventional fine-tuning reduced this to 13.3%, standard NE to 5.3%, while norm-matched random NE reached only 25.7%.

Corrected NE separates motif removal from valid generation, letting the 3D generator recover graph validity while still suppressing motifs. Standard full-model NE pulled SemlaFlow's RDKit-valid graph yield from 93.9% to 65.9%; corrected NE first subtracts a task vector learned independently from motif-free molecules from the negative-set update, then extrapolates. CNE restored valid graph yield to 88.3% and lowered the motif fraction to 2.2%, raising 3D usable yield from the base 60.0% to 80.8%; relative to conventional fine-tuning, liability frequency was 11.11 percentage points lower (95% CI 10.82–11.40) and 3D usable yield 4.17 points higher (95% CI 3.42–4.93), both significant after Holm correction.

Perspective

The conclusions rest on four SMARTS-defined structural motifs, which are structural proxies rather than experimentally validated toxicity or developability measurements; evaluation covers four generator implementations and is entirely unconditional generation, with no conditional ligand- or structure-based design.

A drop in motif frequency is not concept erasure or machine unlearning: the experiments measure changes in the generated distribution and did not test whether later fine-tuning could restore motif generation. The decomposition of the negative-set update into shared and motif-associated components is a hypothesis not independently verified at the weight level, and FCD and FDD have no universal thresholds for defining small or large distributional shifts.