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 paradigm can be transferred from language into chemical space. We introduce \emph{Chain-of-Molecules} (CoM), in which intermediate reasoning states are molecules and transitions are explicit chemical edits. In Agentic CoM, a symbolic environment executes each edit and returns the resulting molecule, enabling the model to adapt, explore, backtrack, and commit. We evaluate four matched generation formats on constrained molecular optimization across five property objectives, considering final-molecule performance, structural diversity, and trajectory reliability. Reinforcement learning increases in-distribution joint success by a factor of $4.2$--$4.4$ across all formats. Agentic CoM combines the property control enabled by intermediate molecular states with the structural control provided by environment execution, achieving the highest joint success in distribution ($0.547$) and on held-out interpolation targets ($0.573$). It also produces the most structurally diverse successful solutions across all target regimes. While self-generated CoM attains strong property success, its intermediate descriptions become less reliable after reinforcement learning. Overall, interleaving molecular generation with environment execution turns generation into adaptive search, enabling high-performing and diverse solutions under simultaneous property and structural constraints.
Chat is not available.
Successful Page Load