Curious Now

Story

NeuDiff Agent: A Governed AI Workflow for Single-Crystal Neutron Crystallography

PhysicsComputing

Key takeaway

A new AI workflow can speed up analysis of complex materials like single-crystal neutron data, helping researchers understand molecular structures faster and advance fields like materials science.

Read the paper

Quick Explainer

NeuDiff Agent provides a governed AI workflow for accelerating single-crystal neutron diffraction analysis, from raw data to validated crystal structures. It formalizes the complex analysis process as an explicit state machine, constraining tool execution to an allowlist and enforcing fail-closed verification gates at workflow boundaries. This ensures consistent, auditable decisions while reducing instrument-to-publication latency. The system's distinctive features are its provenance tracking, which enables controlled replay for debugging and method verification, and its alignment with facility governance requirements around constrained actions, fail-closed verification, and auditable decisions.

Deep Dive

Technical Deep Dive: NeuDiff Agent for Single-Crystal Neutron Crystallography

Overview

NeuDiff Agent is a governed AI workflow system for accelerating single-crystal neutron diffraction analysis from raw data to validated crystal structures. It combines an explicit workflow model, constrained tool execution, fail-closed verification gates, and a provenance-first audit trail to reduce instrument-to-publication latency while preserving facility governance requirements.

Problem & Context

  • Neutron diffraction analysis workflows are well-established but complex, involving iterative decisions across configuration, reduction, integration, refinement, and validation stages
  • Latency grows when intermediate artifacts, assumptions, and validation outcomes are hard to track, reproduce, and audit across tools and stages
  • Facility governance requires that actions be constrained to approved tools, verification be fail-closed at workflow boundaries, and decisions/outcomes be auditable and replayable

Methodology

Workflow Model

  • Formalizes the analysis workflow as an explicit state machine with typed variables spanning data access, reduction, integration, refinement, and validation
  • Constrains tool invocation to an allowlist and enforces fail-closed verification gates at stage boundaries

Verification Gates

  • Hard bounds on unit cell, wavelength, d-spacing, and resolution
  • Consistency checks on UB matrices and orientation metadata
  • Parsing of tool logs for failure signatures (non-convergence, unreasonable displacements)
  • Workflow gating to block refinement and validation until prerequisites are met

Provenance Tracking

  • Produces a per-run audit bundle capturing prompts, configuration, state, tool-call arguments/outputs, warnings, and timestamps
  • Enables controlled replay for debugging and method verification

User Interface

  • Browser-based front-end with tabular artifact rendering, dialogue interactions, and figure generation
  • Interprets user intents, routes to appropriate actions, and requests explicit authorization for changes

Data & Experimental Setup

  • Benchmark dataset: TOPAZ scolecite, representative of routine operation
  • Fixed prompt protocol, controlled task definition, and repeated end-to-end runs with two LLM backends
  • Baseline is a single manual user run, agent-assisted runs are 5 independent replicates per backend

Results

Productivity and User Effort

  • Reduces end-to-end time from 435 min (manual) to 86.5 ± 4.7 min (Gemini 3.0 Pro) and 94.4 ± 3.5 min (GPT-OSS 120B)
  • Partitions time into user time and machine time, documenting speedup from workflow mechanics rather than just model verbosity

Publication Readiness

  • Treats validation as an explicit workflow stage, with fail-closed gates
  • Resolves 6 level A, 0 level B, 5 level C, and 15 level G checkCIF alerts through 7 user-authorized interventions
  • Final CIF has no level A or B alerts, meeting publication-facing criteria

Interpretation

  • Acceleration is only defensible when paired with explicit governance and provenance
  • NeuDiff Agent reduces avoidable rework by enforcing consistent execution, capturing provenance, and concentrating user attention on scientific judgments
  • Enables facility deployment by aligning with requirements for constrained actions, fail-closed verification, and auditable decisions

Limitations & Uncertainties

  • Benchmark focused on a single reference case - broader validation across varied datasets is an ongoing engineering activity
  • Extending verification gates to handle more failure modes and instrument variations is an area for further research

What Comes Next

  • Deployment and broader validation in the TOPAZ user facility
  • Exploring methods to incorporate expert feedback and learning into the verification gate framework
  • Investigating ways to scale the provenance-first, fail-closed approach to other neutron and X-ray crystallography workflows

Source

You're offline. Saved stories may still be available.