Crystal structure diffusion

t = —

All three crystal components are denoised jointly by one E(3)-equivariant graph network:


DPO — aligning the generator with stability

The pre-trained generator is aligned with a stability objective using Direct Preference Optimization. Unlike online RL (which queries a reward model inside the training loop), DPO is offline: sample a pool of crystals once, score each by CHGNet stability, pair a more-stable winner against a less-stable loser, and train the generator to prefer the winner — a supervised-style loss with no reward model in the loop and no policy-gradient instability.

1Sample a poolcrystals from the SFT generator
2Score stabilityCHGNet energy / atom
3Build pairsstable winner vs loser
4Prefer winnerDPO update (β-regularized)

How DPO works on one preference pair

One real winner/loser pair; the gauge plays back the real σ(z) = P(prefer winner) during training.

Mathematical formulation

Standard DPO turns a preference (winner xw ≽ loser xl) into a logistic loss on the policy-vs-reference log-likelihood ratio:

𝓛 = − 𝔼  log σ ( β [ log πθ(xw)πref(xw) − log πθ(xl)πref(xl) ] )

A diffusion model's likelihood is intractable, so each crystal's term becomes its denoising error, decomposed over the three DiffCSP components — lattice (L), fractional coordinates (F), atom types (A) — under a shared noise level t:

Δφ(x) = wL ‖εL − εφL‖² + wF ‖sF − sφF‖² + wA ‖εA − εφA‖²φ ∈ {θ, ref}

Lower Δ means the model denoises that crystal better (higher implied likelihood). The implemented loss compares policy to reference on the winner and the loser:

z = −βT [ (Δθ(xw) − Δref(xw)) − (Δθ(xl) − Δref(xl)) ],   𝓛 = −𝔼 log σ(z)
  • xw is the more thermodynamically stable crystal (lower CHGNet energy/atom), xl the less stable — the only supervision DPO needs.
  • β controls how far the policy may drift from the frozen reference πref: small β gives a stronger shift but risks chemistry collapse (reward hacking); large β stays close to πref.
  • Only a lightweight adapter + the Tc-conditioning pathway are updated; the equivariant backbone and πref's component errors are frozen/pre-cached, so each step forwards only πθ.
  • σ(z) = P(prefer winner); over the β=0.5 run it rose 0.51 → 0.67.

Result: the generator shifts toward more stable crystals

Energy-per-atom distribution shift

Smaller β pushes the generator toward lower (more stable) energies. But β=0.1's dramatic shift is reward hacking — it collapses onto a handful of stable transition-metal chemistries (158 of 826 chemical systems), so its gain is diversity loss, not better generation. β=0.5 (headline) gives a genuine, diversity-preserving shift; larger β stay near the baseline.