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 enables language models to solve complex problems through explicit intermediate steps. We ask whether this principle can extend from language to chemical space. We introduce Chain-of-Molecules (CoM), in which intermediate states are molecules connected by explicit chemical edits. In Agentic CoM, an autoregressive policy proposes an edit, a symbolic chemical environment executes or rejects it, and the resulting molecule conditions the next decision, enabling iterative refinement and backtracking. We evaluate CoM on constrained molecular optimization across five properties, requiring outputs to reach a target value while satisfying a specified graph-edit-distance interval. Four matched generation formats isolate the effects of intermediate molecular states and interleaved environment execution. Approximately one-million-parameter models are trained through pretraining, supervised finetuning, and RL post-training. GRPO increases in-distribution joint success by a factor of $4.2$--$4.4$ across all formats. Agentic CoM performs best, achieving joint success 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. These results demonstrate that small autoregressive agents can acquire effective step-by-step optimization behavior beyond language in chemical space.
Chat is not available.
Successful Page Load