PROJECT 03

Differentiable Multimodal X-ray Scattering

A GPU-accelerated, end-to-end pipeline for operando SAXS / WAXS / GISAXS / GIWAXS that reproduces the Shin et al. (PNAS 2019) azopolymer dataset with physics-informed temporal regularization and automated peak tracking.

2025 – 2026 · Lead developer · 4 min read
SAXS / WAXS GISAXS / GIWAXS PyTorch Differentiable APS 12-ID-B/C
Differentiable Multimodal X-ray Scattering

01 Overview

Operando small- and wide-angle X-ray scattering produces enormous time-resolved datasets, but the analysis chain — radial integration, background subtraction, peak fitting, phase tracking — is usually a stack of separate, lossy tools. This pipeline does the whole thing inside a single differentiable PyTorch graph, which means peak parameters and physical priors can be optimized jointly across an entire time series.

It reproduces the four scattering modalities reported in Shin et al., PNAS 2019 — a light-triggered thermal-conductivity transition in azopolymer thin films, collected at APS beamlines 12-ID-B and 12-ID-C — end-to-end, and packages the analysis into a 51-page auto-generated report.

02 Method

Core ideas:

  • Differentiable peak fitting with Adam + L-BFGS, supporting Voigt / pseudo-Voigt profiles and per-frame uncertainty diagnostics
  • Temporal regularization that penalizes frame-to-frame jumps in peak position and width, producing smoother trajectories without giving up sensitivity to real phase transitions
  • Richardson–Lucy deconvolution for resolving overlapping peaks
  • Automated beam-center calibration from ring-finding on calibrant frames
  • MPS / GPU acceleration with batching across frames

03 Visuals

Corrected 2D SAXS q-map (azopolymer, frame snapshot)
Corrected 2D SAXS q-map (azopolymer, frame snapshot)
Time-resolved peak position & width across UV illumination
Time-resolved peak position & width across UV illumination
AI analysis dashboard — visible→liquid→crystal transition
AI analysis dashboard — visible→liquid→crystal transition
GISAXS reciprocal-space map
GISAXS reciprocal-space map
GIWAXS analysis — wedge-method comparison
GIWAXS analysis — wedge-method comparison

04 Why it matters

Beamlines are bottlenecked by analysis throughput: time-series scattering data piles up faster than humans can fit peaks. A single differentiable pipeline that fits all peaks, all frames, and all modalities jointly — with calibration and uncertainty baked in — is the kind of tooling that turns a multi-week post-experiment slog into a same-shift result. That's the argument for AI-enabled high-throughput characterization, demonstrated on a real, published dataset.