Source-linked AI summary
M^4olGen: Multi-Agent, Multi-Stage Molecular Generation under Precise Multi-Property Constraints
Yizhan Li, Florence Cloutier, Sifan Wu, Ali Parviz, Boris Knyazev, Yan Zhang, Glen Berseth, Bang Liu
TL;DR
Precise multi-property molecular generation remains difficult because LLMs lack reliable numeric control and external feedback. M4olGen combines retrieval-augmented fragment prototyping with GRPO-based fragment refinement, achieving the lowest normalized total error across evaluated LLM and graph baselines, including 0.146 in one benchmark.
Problem
Precise control of multiple numeric molecular properties remains difficult for text-only planning because LLMs struggle with numeric design and lack explicit distance-to-target minimization.
Method
M4olGen uses retrieval-augmented fragment-level prototyping followed by GRPO-trained multi-hop fragment optimization against property targets.
Results
Across QED, LogP, MW, HOMO, and LUMO targets, M4olGen attains the lowest normalized total error among LLM and graph baselines, reaching 0.146 in one benchmark.
Takeaways & Limitations
The results support M4olGen as a precise, property-constrained molecular generation framework with monotonic gains as refinement hops increase.
Takeaways & Limitations
Evaluation relies on computed properties and a narrow set of QED, LogP, MW, HOMO, and LUMO objectives, while deeper hops increase computation cost with diminishing returns.
Abstract
from arXiv · showhide
Generating molecules that satisfy precise numeric constraints over multiple physicochemical properties is critical and challenging. Although large language models (LLMs) are expressive, they struggle with precise multi-objective control and numeric reasoning without external structure and feedback. We introduce \textbf{M olGen}, a fragment-level, retrieval-augmented, two-stage framework for molecule generation under multi-property constraints. Stage I : Prototype generation: a multi-agent reasoner performs retrieval-anchored, fragment-level edits to produce a candidate near the feasible region. Stage II : RL-based fine-grained optimization: a fragment-level optimizer trained with Group Relative Policy Optimization (GRPO) applies one- or multi-hop refinements to explicitly minimize the property errors toward our target while regulating edit complexity and deviation from the prototype. A large, automatically curated dataset with reasoning chains of fragment edits and measured property deltas underpins both stages, enabling deterministic, reproducible supervision and controllable multi-hop reasoning. Unlike prior work, our framework better reasons about molecules by leveraging fragments and supports controllable refinement toward numeric targets. Experiments on generation under two sets of property constraints (QED, LogP, Molecular Weight and HOMO, LUMO) show consistent gains in validity and precise satisfaction of multi-property targets, outperforming strong LLMs and graph-based algorithms.
1 Introduction
Precise simultaneous control over multiple molecular properties remains scarce, despite its importance for scientific discovery and development. M^4olGen addresses this gap with retrieval-augmented prototyping, GRPO-based fragment optimization, and large-scale neighbor supervision.
- Motivation and challenge: Precise simultaneous matching of user-specified numerical targets across multiple molecular properties remains uncommon in molecular generation.Much prior work maximizes one or a few surrogate properties instead.
- Study properties: The study evaluates drug-likeness (QED), lipophilicity (logP), and molecular weight (MW) as fundamental properties shaping permeability, exposure, and developability.These properties are selected from those commonly used in prior work.
- Data and supervision: More than 2 million molecules are decomposed into BRICS fragments with corresponding properties to support optimizer fine-tuning.The dataset is used to construct relational supervision for controllable reasoning.
- Data and supervision: 1.17 million molecule pairs form an automatically derived neighbor relational dataset based on valid single-fragment additions, removals, or replacements.Chaining one-hop moves grows neighbor forests and enables long, controllable reasoning chains.
- Framework contributions: M^4olGen couples retrieval-augmented prototyping with GRPO-based fragment-level optimization for exact numeric control over multiple properties.The framework also regulates edit complexity and deviation from the starting structure during refinement.
2 Related Work
Related work spans deep generative models for property-controlled molecular design, LLM-based molecular generation and reasoning, multi-agent planning, and reinforcement-learning approaches for multi-property optimization. These methods establish broad capabilities but leave challenges in precise numerical control and balancing multiple objectives.
- Molecular Generation with Property Control: Deep generative models use graph- or sequence-based molecular representations for molecular design and property control.Representative approaches include VAEs, GANs such as MolGAN, and graph-based models including GCPN, GraphAF, and MoFlow.
- LLMs for Molecular Design and Reasoning: LLMs such as ChemGPT, ChemBERTa, MolT5, ChemFM, and Chemformer capture chemical syntax and semantics for general-purpose molecular generation.Despite this expressiveness, LLMs remain limited in precise numerical reasoning and property control; Chain-of-Thought prompting improves interpretability and multi-step reasoning.
- Multi-Agent Planning and Reasoning in Molecule Design: Molecule-design systems have mostly remained single-agent, while recent work explores multi-agent role decomposition across generation, property evaluation, and refinement.Agent-based systems have a longer history in robotics, distributed AI, and resource allocation.
- Policy Optimization for Multi-Property Objectives: Reinforcement-learning methods for molecular optimization include REINFORCE, PPO, and MolDQN, but balancing multiple numeric objectives precisely remains difficult.REINFORCE and PPO are policy-gradient methods, whereas MolDQN uses Q-learning for multi-objective optimization.
3 Methodology
M4olGen frames constrained molecular generation as distance-to-target optimization over fragment edits, using retrieval-anchored prototyping followed by GRPO-trained multi-hop refinement. RDKit feedback, validity checks, and complexity controls support precise, reproducible optimization toward QED, LogP, MW, HOMO, and LUMO targets.
- Stage I: Prototype Generation: Stage I retrieves near-target reference molecules and uses a multi-agent reasoner to propose iterative fragment-level edits toward a chemically valid prototype.References are selected under property-specific tolerances and provide in-distribution exemplars for the prototype reasoner.
- Stage I: Prototype Generation: RDKit feedback evaluates every candidate, while reference molecules, prior edit experience, and early stopping guide Stage I toward the feasible region.The reasoner stops when distance-to-target falls below τ or when the maximum step budget Tmax is reached.
- Stage II: Multi-hop Optimization: Stage II treats refinement as optimization over an actionable fragment-edit space because text-only planning struggles with precise multi-property numeric control.The optimizer uses BRICS fragments to support localized, chemically meaningful edits and applies add, remove, or replace actions.
- Stage II: Multi-hop Optimization: GRPO trains an LLM policy to rank candidate edits by rewards encoding property match, format, diversity, repetition, and validity using fast RDKit oracles.The policy conditions on the previous molecule, its properties, and the target vector at each hop.
- Stage II: Multi-hop Optimization: Controlled multi-hop refinement accumulates small local edits to reduce target error while hop budgets and regularizers bound complexity and deviation from the prototype.The framework supports adaptive planning and curriculum-style difficulty scaling.
4 Experiment
Experiments evaluate precise multi-property control, the necessity of retrieval and multi-hop refinement, and generalization across QED/LogP/MW and HOMO/LUMO targets. M^4olGen achieves the strongest reported results, with errors improving as optimizer hop count increases.
- Experimental Setup: The study benchmarks M^4olGen against commercial and chemical LLMs plus graph-based methods under identical compute budgets.Baselines include GPT-4.1, Gemini-Flash, Claude-Haiku, GPT-4o, SmileyLlama-8B, DrugAssist-7B, and graph methods.
- Metrics: Evaluation uses per-property MAE, normalized total error, uniqueness, and fingerprint-based diversity to assess constraint accuracy and set quality.HOMO/LUMO errors use eV units, while the normalized total error accounts for differing property ranges.
- Protocol: 100 uniformly sampled target tuples are evaluated with 10 independent trials per baseline, reporting the best-of-10 under a shared compute budget.Targets span QED, LogP, MW, HOMO, and LUMO across admissible ranges.
- Main Results: 0.146 NTE is achieved by 3-hop-GPT-4o, improving 42.7% over GPT-4.1 at 0.255 and outperforming the best non-LLM baseline.The Qwen-based configuration is second best with NTE 0.159, indicating performance is not limited to commercial models.
- Main Results: 0.155 total error is achieved in the 3-hop HOMO/LUMO setting, with HOMO and LUMO errors of 0.060 and 0.095 and nearly 90% less inference time than Graph-GA.The 1-hop and 2-hop settings reach total errors of 0.540 and 0.227, respectively, while reducing both electronic-property errors.
- Ablation Study: 0.146 NTE is reached at 3 hops, following 0.187 at 1 hop and 0.160 at 2 hops, while retrieval alone lowers NTE from 0.307 to 0.265.The 3-hop setting yields a 52.4% drop versus baseline; retrieval improves logP by 20.7% and MW by 7.8%.
5 Conclusion
M4olGen introduces a two-stage, fragment-level framework and reasoning-ready dataset for precise property-constrained molecular generation. Across QED, LogP, MW, HOMO, and LUMO targets, it achieves the lowest normalized total error among LLM and graph baselines while maintaining validity, uniqueness, and diversity.
- M4olGen is a two-stage, fragment-level framework for precise, property-constrained molecular generation.
- The accompanying reasoning-ready dataset contains BRICS fragments, neighbor pairs, and measured property deltas for training.
- M4olGen attains the lowest normalized total error among LLM and graph baselines across QED, LogP, MW, HOMO, and LUMO targets.
- Its performance improves monotonically as hop count increases while maintaining validity, uniqueness, and diversity.
Limitations
The study is limited by its reliance on computed property estimates and evaluation on a narrow set of properties. Deeper-hop refinement improves performance but incurs substantially higher computation cost with diminishing returns.
- The study relies on computed properties, including RDKit estimators, rather than reported experimental measurements.This limits the scope of the validation.
- Evaluation covers only QED, LogP, MW, HOMO, and LUMO, making this an initial validation of GRPO for precise property control.The framework explores discrete chemical action spaces with rapid reward feedback and fundamental physicochemical objectives.
- Deeper hops improve performance but incur substantially higher computation cost with diminishing returns.
A Appendix · A.1 Dataset Details
The appendix describes a large, reasoning-ready molecular dataset assembled from ZINC, CHEMBL, and MOSES, with standardized molecules, computed properties, fragment decompositions, and connectivity maps. It also illustrates fragment-level editing supervision, where real-data property changes support controllable molecule refinement.
- A.1 Dataset Details: 2,945,596 molecules comprise the final dataset after combining and deduplicating ZINC, CHEMBL, and MOSES.The passage states that molecules were combined, filtered, and deduplicated, though its final dataset-count sentence is truncated after the reported value.
- A.1 Dataset Details: Each molecule includes SMILES, molecular formula, QED, LogP, molecular weight, HOMO, and LUMO annotations.QED, LogP, and molecular weight are computed with RDKit, while HOMO and LUMO use a pretrained DimeNet++-based evaluator.
- A.1 Dataset Details: The pipeline standardizes and deduplicates molecules with RDKit canonical SMILES, neutralization, and valence/aromaticity sanity checks.These preprocessing steps are part of the automated construction of the reasoning-ready resource.
- A.1 Dataset Details: BRICS fragmentization yields each molecule’s fragment multiset Φ(m) and an inter-fragment connectivity map.The map identifies which fragments are joined and at which bonds.
- A.1 Dataset Details: A training example represents an intermediate molecule as a SMILES string composed of five identified fragments.The listed fragments include carbonyl, nitrogen, carbon, fused aromatic, and heterocyclic components.
- A.1 Dataset Details: The example requests one fragment-level replace, add, or remove operation targeting QED, LogP, and molecular-weight changes.The target changes are QED 0.146 lower, LogP 0.366 higher, and molecular weight 53.068 lower.
- A.1 Dataset Details: GRPO requires no ground-truth edit labels, while property changes remain derived from real data to preserve distribution realism.This distinguishes the editing supervision requirement from the source of property-change targets.
A.2 Stage I Algorithm
Stage I uses a multi-agent planning algorithm for local optimal candidate generation. The algorithm takes a user query and molecule database as inputs and returns a valid target molecule when available.
- Stage I is titled “Local Optimal Candidate Generation via Multi-Agent Planning.”
- The algorithm requires a user query q and molecule database M.
- The procedure returns a valid mT if any exists.
A.3 End-to-End Demo: From Local Reasoner to GRPO Refinement
The demo targets QED ≈0.70, LogP ≈1.50, and MW ≈300 through iterative fragment-level construction followed by GRPO-guided refinement. Stage 2 improves the best Stage-1 candidate to a molecule with normalized total error 0.042.
- Target: The demo targets QED ≈0.70, LogP ≈1.50, and MW ≈300.
- Stage 1 — Iterative construction (LLM planner): Stage 1 uses iterative fragment-level edits with numeric feedback, producing a seed candidate with normalized total error 0.116.The seed has QED = 0.764, LogP = 1.210, and MW = 284.381.
- Stage 2 — GRPO Refinement (Accepted Path with Reasoning): Stage 2 uses GRPO to request single fragment edits with specified property deltas and accepts moves only when they improve the objective.Two accepted hops adjust hydrophobic mass and polarity while refining the Stage-1 seed.
- Final Outcome: The final molecule reaches QED = 0.681, LogP = 1.700, MW = 302.422, and normalized total error 0.042.The best molecule along the path is CCNC1=CNNC=CC(O)CC(C)C1Cc1ncccc1.