Manuscript Offprint

arXiv:2610.13330

Masked Diffusion Language Agents for Tool-Integrated Chemical Reasoning

Mengdi Liu, Chenghao Jia, Hong Chang, Shiguang Shan

Abstract

Designing tool-integrated reasoning agent systems for complex chemical tasks remains a fundamental challenge. Although recent chemical agents have demonstrated promising performance through the integration of external tools, they are still built on the autoregressive paradigm, which is inherently constrained by causal attention and left-to-right generation. As a result, they often struggle with bidirectional molecular understanding, global coordinated tool planning and multi-source evidence integration. To address this challenge, we introduce CHEMDIFFAGENT, the first masked diffusion language agent for tool-integrated chemical reasoning. It reformulates chemical reasoning as iterative denoising over interleaved reasoning and tool-use trajectories, enabling tool-use decisions to be jointly determined under full-trajectory context and thereby better aligning the agent's decision boundary with its knowledge boundary. We further analyze how this paradigm benefits agentic reasoning through harder infilling subproblems during training and flexible arbitrary-order decoding during inference. Then we develop a two-stage post-training framework, comprising agentic supervised fine-tuning and variance-reduced preference optimization, to enhance tool-use and reasoning capabilities. We also construct a comprehensive benchmark covering six chemistry tasks across both single-turn and multi-turn tool-use scenarios. Under matched budgets and evaluation, CHEMDIFFAGENT consistently outperforms autoregressive agents, achieving an overall improvement of approximately 20%. Notably, our 8B model achieves performance comparable to, in some cases surpassing, significantly larger frontier models, such as GPT 5.5 and Claude Opus 4.7. Code is available at https://github.com/bilemond/ChemDiffAgent.

1 Introduction

With the rapid development of reasoning capabilities [14, 29, 12, 22, 11, 18, 16], large language models (LLMs) have shown growing potential for solving complex chemistry tasks [36, 30, 8, 4, 15]. However, chemical reasoning often goes beyond parametric knowledge, requiring an agent to interpret domain-specific modalities, orchestrate tool invocations with valid arguments, and synthesize the returned response into subsequent reasoning steps. This process, which we refer to as tool-integrated chemical reasoning, tightly couples internal reasoning with external tool use, enabling agents to systematically coordinate introspection and interaction. In this sense, an effective chemistry agent should align its tool-use decision boundary with its actual knowledge boundary: recognizing the limits of its parametric knowledge, judiciously deciding when and which tool to invoke, and reconciling potentially conflicting evidence from multiple sources.

∗^{*}Equal Contribution.

†^{\dagger}Corresponding author.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Compared with autoregressive agents that commit to tool-use trajectories sequentially, ChemDiffAgent jointly refines chemical modality thinking, tool-use decisions, arguments, and evidences to better handle bidirectional chemical modalities and globally coordinated tool use.

Recently, chemistry agents have demonstrated promising advances by integrating external tools such as molecular property predictors, reaction engines and cheminformatics libraries [4, 15, 5, 24]. However, they rely on the autoregressive (AR) paradigm, where the unidirectional context modeling and left-to-right generation are inherently misaligned with the nature of chemical reasoning (as shown in Fig. 1). First, chemistry-specific modalities such as SMILES are bidirectional, with complex dependencies among tokens at different positions. Second, tool-integrated chemical reasoning is globally coupled, as the choice of tool, its arguments, and the reasoning goal mutually depend on each other. Third, complex chemical tasks frequently require integrating multiple sources of evidences into a single coherent answer. Nevertheless, autoregressive agents are inherently constrained by strict left-to-right token commitment, which precludes joint coordination across the sequence and consequently leads to locally biased tool selection and unstable multi-step execution.

To address these limitations, we introduce CHEMDIFFAGENT, the first masked diffusion language agent for tool-integrated chemical reasoning. It reformulates chemical reasoning as iterative denoising over interleaved reasoning and tool-use trajectories. This formulation allows the agent to jointly determine intermediate thinking, tool-use decisions, tool names, arguments, and multi-evidence within each block under bidirectional context. As a result, it enables more reliable and flexible chemical reasoning through a unified denoising formulation, rather than being committed prematurely.

We further analyze why this paradigm is well suited for agentic chemical reasoning from both training and inference perspectives. During agentic training, CHEMDIFFAGENT exposes the model to harder infilling subproblems over interleaved reasoning and tool-use trajectories. During inference, the arbitrary-order decoding within each block provides greater flexibility for coordinating interdependent decisions, such as selecting a tool, filling its arguments and integrating evidence before committing to the next action. Building on this analysis, we develop a two-stage post-training framework comprising agentic supervised fine-tuning (SFT) and variance-reduced preference optimization (VRPO) to enhance tool-use decision-making and chemical reasoning capabilities.

We also construct a comprehensive benchmark covering six chemistry tasks across single-turn and multi-turn tool-use scenarios. Under matched budgets and constraints, CHEMDIFFAGENT consistently outperforms autoregressive agents, achieving an overall improvement of approximately 20%. Notably, our 8B model achieves performance comparable to, and in some cases surpassing, substantially larger frontier models such as GPT-5.5 and Claude Opus 4.7. These results suggest that masked diffusion provides a promising foundation for building more reliable, globally coordinated, and tool-aware agents for complex scientific reasoning.

In summary, our contributions are as follows:

• We introduce CHEMDIFFAGENT, the first masked diffusion language agent for tool-integrated chemical reasoning. It formulates chemical reasoning as an iterative denoising process over interleaved reasoning and tool-use trajectories, enabling global attention and coordination.

• We provide a theoretical analysis revealing why the diffusion paradigm offers advantages over autoregressive generation in tool-integrated chemical reasoning. Building on this analysis, we develop a two-stage post-training framework, comprising Agentic SFT and Agentic VRPO.

• We construct a comprehensive benchmark covering six chemistry tasks spanning single-turn and multi-turn tool-use scenarios. Experiments demonstrate that CHEMDIFFAGENT substantially outperforms autoregressive agents and achieves performance comparable to, or even surpassing, larger frontier models such as GPT-5.5 and Claude Opus 4.7.

References (44)