Chain-of-Molecules: Agentic Reasoning in Chemical Space for Constrained Molecular Optimization
Christoph Bartmann ⋅ Günter Klambauer ⋅ Sohvi Luukkonen ⋅ Johannes Schimunek
Abstract
Chain-of-thought reasoning has enabled language models to solve complex problems through explicit intermediate steps. We ask whether this paradigm can be transferred from language into chemical space. We introduce \emph{Chain-of-Molecules} (CoM), a molecular-generation paradigm in which the intermediate reasoning states are molecules and the transitions between them are explicit chemical edits. In Agentic CoM, a symbolic environment executes valid edits, rejects infeasible ones, and returns the resulting molecule, allowing the model to adapt its subsequent actions, explore alternatives, backtrack, and commit. We evaluate CoM on constrained molecular optimization across five property objectives, requiring generated molecules to attain a requested property value while remaining within a specified graph-edit-distance interval. A controlled comparison of four generation formats isolates the effects of representing intermediate molecular states and interleaving generation with environment execution. Each format follows the same three-stage training pipeline: pretraining teaches molecular syntax and search, supervised finetuning grounds the true property objectives, and GRPO directly optimizes property and structural success. GRPO increases in-distribution joint success by a factor of $4.2$--$4.4$ across all formats. Agentic CoM combines the property success enabled by intermediate molecular states with the structural control provided by environment execution, reaching joint success rates of $0.547$ in distribution and $0.573$ on held-out interpolation targets while producing the most structurally diverse successful solutions across all three target regimes.
Chat is not available.
Successful Page Load