Masked Diffusion Language Agents for Tool-Integrated Chemical Reasoning

Mengdi Liu, Chenghao Jia, Hong Chang, Shiguang Shan

TL;DR

ChemDiffAgent is the first masked diffusion language agent designed for complex chemical reasoning. By moving away from the standard "left-to-right" autoregressive generation and adopting an iterative denoising approach, it achieves a 20% performance boost over traditional models, allowing an 8B parameter model to rival or even surpass giants like GPT-5.5 and Claude Opus 4.7 in scientific tasks.

What Problem Does This Paper Address?

Most modern AI agents are built on an autoregressive (AR) paradigm—they generate text one token at a time, from left to right. While this works for general conversation, it’s a poor fit for chemistry for three main reasons:

  1. Bidirectional Modalities: Chemical identifiers like SMILES strings are not just linear sequences; a character at the end of a string (like a ring closure) can fundamentally change the meaning of a character at the start.
  2. Global Tool Planning: In complex tasks, the choice of a tool, its arguments, and the reasoning goal are all interdependent. AR models often "prematurely commit" to a tool name before they’ve fully planned the arguments, leading to execution errors.
  3. Evidence Integration: Chemistry often requires synthesizing conflicting data from multiple sources. AR models struggle to reconcile this information globally, often falling into "hallucination traps" based on the most recent token they generated.

Methods

The researchers introduce ChemDiffAgent, which reformulates chemical reasoning as an iterative denoising process. Instead of predicting the "next" word, the model starts with a "noisy" (masked) block of text and refines it over several steps.

Key components include:

  • Block Diffusion Architecture: It uses a hybrid approach that allows bidirectional attention within a reasoning block (so the model can look "ahead" and "back" simultaneously) while maintaining a causal order between blocks to support long trajectories.
  • Agentic Supervised Fine-Tuning (SFT): The model is trained on "infilling" tasks where it must reconstruct missing parts of a reasoning chain. Crucially, it only learns to generate the agent's "thoughts" and "tool calls," while treating external tool responses as fixed, grounded context.
  • Agentic VRPO (Variance-Reduced Preference Optimization): A second training stage that helps the model distinguish between successful and failed multi-step trajectories, refining its decision-making for long-horizon tasks.
Figure 2: Overview of CHEMDIFFAGENT. In training, both Agentic SFT and Agentic VRPO use Block Attention and Agentic Noising to compute the Agentic ELBO. It learns from complex block- infilling tasks at training time and enables flexible order-agnostic reasoning at inference time.

Datasets

The authors constructed a comprehensive benchmark covering six fundamental chemistry task families:

  • Composition Inference
  • Name Conversion (e.g., Name to SMILES)
  • Property Prediction
  • Retrosynthesis
  • Molecular Optimization
  • Forward Synthesis

They evaluated the model on two splits:

  1. Single-turn: Derived from existing datasets like SMolInstruct and ChemToolBench.
  2. Multi-turn: A newly introduced graph-conditioned tool-use benchmark. This requires agents to coordinate between 2 and 7 different tool calls (categorized as Easy, Medium, and Hard) to reach a final answer.

Key Insights and Ideas

  • The "Infilling" Advantage: By training the model to fill in blanks anywhere in a block, it becomes much better at coordinating interdependent decisions. It can resolve high-confidence structural tokens (like tool delimiters) before tackling low-confidence chemical details (like specific atoms in a SMILES string).
  • Decision Boundary Alignment: Because the model can refine its entire "thought" block at once, it is better at recognizing the limits of its own knowledge and deciding exactly when it needs to call an external tool.
  • Global vs. Local: Unlike AR agents that extend trajectories based only on the most recent state, ChemDiffAgent forms a global "latent plan," allowing it to insert validation or correction steps before committing to a final computation.
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.

Key Results

ChemDiffAgent demonstrates that bigger isn't always better if the architecture is right:

  • 20% Improvement: On single-turn tasks, the 8B ChemDiffAgent outperformed its autoregressive counterpart (Qwen3-8B) by nearly 20 percentage points.
  • Surpassing Frontier Models: In single-turn success rates, ChemDiffAgent reached 91.8%, outperforming Claude Opus 4.7 (90.9%) and GPT-5.5 (70.6%).
  • Multi-turn Resilience: On the "Hard" multi-turn tasks (6-7 tool rounds), ChemDiffAgent remained competitive with Claude Opus 4.7, while most other 8B models saw their performance collapse.
  • Efficiency: The model generated clearer, more concise trajectories with fewer redundant tool calls than larger frontier models.
Table 1: Single-turn success rate performance across six chemistry task families: composition inference, name conversion, property prediction, retrosynthesis, molecular optimization, and forward synthesis. Red numbers denote absolute gains of SDAR-8B+SFT over Qwen3-8B+SFT, and of SDAR-8B+SFT+RL over SDAR-8B+SFT. The best and second-best results are highlighted.

Limitations and Future Work

While a major step forward, the authors note several areas for growth:

  • Scale: The current study is limited to the 8B parameter scale. Testing whether these advantages hold for 70B+ models is a key next step.
  • Domain Scope: The work focused on computational chemistry. Future versions could expand into biology, physics, or "wet-lab" automated workflows.
  • Infrastructure: Diffusion-based language models currently lack the highly optimized serving infrastructure (like specialized KV-caching) that makes AR models so fast to deploy in production. Improving the "deployment-readiness" of dLLMs is a critical engineering challenge.

Summary updated

BibTeX
@inproceedings{liu2026masked,
  author = {Mengdi Liu and Chenghao Jia and Hong Chang and Shiguang Shan},
  title = {{Masked Diffusion Language Agents for Tool-Integrated Chemical Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=6BW0xHIq1l},
}
Figure