Tracking Bragg Peaks Through Pressure as a Crossing-Arc Parsing Problem

When a crystal is squeezed in a diamond anvil cell, the experimenter records a powder diffraction pattern at each of dozens of pressure steps. Each pattern is a set of peaks, and each peak comes from a family of lattice planes. To learn how the lattice compresses, where a phase transition happens, or which new phase appears, the analyst first has to answer a plain question: which peak at this pressure is the same reflection as which peak at the next one? The answer is hard in exactly the conditions that matter most. Different crystal axes compress at different rates, so peaks moving at different speeds overtake one another and their paths cross. Once the liquid that transmits pressure freezes, the stress becomes non-hydrostatic (unequal in different directions), and peaks broaden and merge. This proposal treats peak tracking across a pressure series as a structured matching problem with the same shape as RNA pseudoknot prediction. In both, the goal is to find partners under an "at most one partner" rule, and the paths of different pairs are allowed to cross.

The analogy has a concrete algorithmic basis. Simple trackers align peaks while preserving their order, which is the diffraction counterpart of nested RNA folding: it is efficient but structurally blind to crossings. Linking peaks consistently across three or more pressure steps, with a reward for smooth trajectories, is a multi-dimensional assignment problem. That is the same tripartite-matching structure that Kao et al. used to prove that arbitrary pseudoknot prediction is NP-hard. In RNA, the response to that hardness has been learned scoring followed by decoding that respects the constraint. We propose to build that kind of learned, crossing-aware, constraint-respecting peak-trajectory parser for high-pressure diffraction. We will test whether it recovers lattice evolution and transition pressures in the crossing-heavy, broadened regime where present tools fail.

Core Claim

Peak trajectories in a pressure series form a crossing-arc structure. Each peak at step $t$ links to at most one peak at step $t+1$. Peaks may also be born or die at phase transitions, or merge when broadening makes two reflections unresolvable. We claim that a parser built on three ingredients will recover trajectories and derived lattice parameters more accurately than current tools, and that its advantage will concentrate at crossings and merges. The first ingredient is learned pairwise scores that use peak position, intensity, and shape. The second is a differentiable row-and-column normalization that enforces the at-most-one-partner rule, borrowed from RFold. The third is a multi-step smoothness term modelled on the "stacking pair" reward that stabilizes RNA helices. The decisive prediction is a split result. On non-crossing, well-resolved peaks, simple frame-by-frame matching should already be nearly optimal. On crossing and merged peaks, it should break down, and our parser should not.

Why the RNA machinery is the right donor

Three RNA results supply the method. RFold represents a sequence as an $L \times L$ chessboard and treats base pairs as non-attacking rooks, meaning no two pairs share a row or column. It multiplies row-wise and column-wise softmax distributions so that the at-most-one-partner rule holds by construction. It reports 100% structural validity, compared with as low as 50% for unconstrained learned decoders without post-processing. We reuse that decoder directly, on a rectangular board whose rows are peaks at step $t$ and whose columns are peaks at step $t+1$. We add one "null" row and one null column to absorb peak births and deaths.

DEPfold recasts pseudoknots as non-projective dependencies, that is, parse edges that cross when drawn above the sequence, and scores all edges with a biaffine attention layer. We adopt its biaffine pair scorer, and with it the point that crossings should be scored natively rather than repaired afterwards. RNAinformer shows that an unconstrained 2D adjacency representation can express base multiplets, where one base takes part in several interactions. That motivates our explicit merge state, in which one broadened peak at $t+1$ may receive two reflections.

Kao et al. plays two roles. It constrains the proposal, because exact optimization over multi-step trajectories with smoothness rewards should not be expected to be tractable. It also supplies a fallback, because their greedy stacking-pair maximization with a guaranteed one-third approximation gives a principled non-learned decoder for us to compare against.

Why diffraction needs it

The high-pressure literature in the file motivates the problem rather than solving it. Single-crystal work on CeNiC₂ (Ma et al.) measured linear compressibilities of $3.70$, $1.97$, and $1.39 \times 10^{-3}$ GPa⁻¹ along $a$, $c$, and $b$. Reflections weighted toward different axes therefore drift at different rates and must cross at some pressure. The same study saw nearest-neighbour directions swap near 7 GPa, which is exactly the kind of reordering that an order-preserving tracker would mislabel.

In (Li₁₋ₓFeₓ)OHFe₁₋ᵧSe, Sun et al. report that the glycerol medium solidified above 10 GPa, broadened peaks, and hid a steep $c$-axis anomaly. Europium compressed without a medium (Bi et al.) shows hcp, $C2/c$, and $Pnma$ coexisting from 18 to 66 GPa, which means heavy peak overlap together with births and deaths of whole peak families. HfTe₅ (Liu et al.) passes through two symmetry-lowering transitions, $Cmcm \to C2/m \to P\bar{1}$, and both multiply the number of peaks.

On the machine-learning side, Rincón et al. document the core failure. A Swin Transformer V2 reaches 82.79% top-5 space-group accuracy on simulated SIMPOD patterns but 35% on 20 experimental patterns, which the authors attribute partly to unmodelled broadening and strain. X-TEC clusters intensity series versus temperature at fixed reciprocal-space points. It is a useful contrast: it assumes the points stay put, whereas under compression the peaks themselves move and reorder. Our method addresses that moving-peak problem, which neither tool handles.

Research Program

We first build a simulator, because no labelled pressure-series benchmark exists. We take crystal structures from the 467,861-entry SIMPOD/COD collection and compress each one along a sampled anisotropic equation of state. Per-axis compressibilities are drawn over ranges that include CeNiC₂-like anisotropy. Each structure is assigned a "solidification pressure", above which we add two effects. One is a widening distribution of local pressures, which broadens peaks. The other is direction- and reflection-dependent lattice-strain shifts, which are the standard signature of uniaxial stress.

Phase transitions are inserted at sampled pressures. Each transition has an optional coexistence interval, modelled on Eu, and an optional symmetry-lowering daughter structure. Because every simulated peak keeps its reflection index and phase identity, we obtain ground-truth trajectories, including which pairs cross and which peaks merge.

The parser runs in three stages. A peak detector proposes peak positions and shapes in each frame. A transformer then encodes each detected peak together with its context in a window of neighbouring frames. Finally, a biaffine scorer produces a board for each pair of consecutive frames, which is decoded with the row-and-column constraint. Training maximizes the likelihood of the true links plus a smoothness ("stacking") term. Writing $M^{(t)}$ for the soft assignment between frames $t$ and $t+1$ and $S^{(t)}$ for the learned scores, the decoding objective is

$$\max_{M^{(1)},\dots,M^{(T-1)}} \sum_t \langle S^{(t)}, M^{(t)} \rangle + \lambda \sum_t \sum_{a,b,c} M^{(t)}_{ab} M^{(t+1)}_{bc}\, \kappa_{abc}.$$

Here $\langle \cdot,\cdot \rangle$ is the elementwise inner product. The term $\kappa_{abc}$ rewards a three-frame chain $a \to b \to c$ whose position-versus-pressure curve has low curvature, and $\lambda$ weights that reward. The second term is what makes the problem tripartite and therefore hard. At test time we decode it with iterated conditional updates initialized from the per-frame constraint-respecting solution.

The linked trajectories then feed a lightweight indexing step that fits lattice parameters for each phase as a function of pressure. That step yields the downstream quantities physicists actually want: compressibilities and transition onsets.

Baselines

The do-nothing reference is nearest-neighbour tracking: each peak links to the closest unclaimed peak in the next frame. This greedy linker is the diffraction analogue of GreedySP and sets the floor.

The nested analogue is an order-preserving dynamic-programming alignment between consecutive frames, similar to time warping. By construction it cannot represent crossings. It is the most direct test of the pseudoknot analogy, in the same way that pseudoknot-free folding packages such as ViennaRNA serve as the reference for pseudoknot predictors.

The strongest generic competitor is optimal frame-by-frame bipartite matching (the Hungarian algorithm) on position-and-intensity costs, followed by a Kalman smoother along each trajectory. This baseline is polynomial, allows crossings, and is what a careful engineer would build. It is the main threat to the proposal.

The strongest physics baseline is sequential Le Bail or Rietveld refinement seeded with the correct phases. Since it is given the correct phases, it is an oracle-informed upper reference on simulated data rather than a fair competitor. It is run only where phases are known.

The vision baseline stacks the pressure series into a 2D "waterfall" image and segments trajectories with the SIMPOD-style Swin V2 architecture, using the same training data.

All learned methods share the same simulator draws, the same peak detector, and the same hyperparameter search budget. The classical baselines receive their costs tuned on the same validation split.

There is no reported result on Lacuna for pressure-series peak tracking. The closest reported figures for reference are the 82.79% to 35% top-5 drop for Swin V2 in Rincón et al. and RFold's 100% validity against as low as 50% for unconstrained decoders. Beating the Hungarian-plus-Kalman baseline means two things. Trajectory link F1 must be higher on the crossing-and-merge subset, with the confidence interval excluding zero improvement. Errors in the recovered compressibility and the transition onset must also be lower. Parity on non-crossing links is acceptable.

The key ablations isolate each ingredient. Replacing the learned scorer with hand-crafted costs while keeping our decoder tests the scoring. Feeding our learned scores to Hungarian decoding instead of the row-and-column decoder tests whether the decoder matters, given good scores. Setting $\lambda = 0$ tests the multi-step term, and removing the merge state tests multiplet handling.

Why not just…?

Why not just run Hungarian matching frame by frame and smooth with a Kalman filter? This is the alternative most likely to match us, and the experiments are built to test it. Pairwise matching is optimal for a single pair of frames, but it ignores three-frame consistency. Two peaks that converge, touch, and separate are symmetric at the moment they touch, and only curvature over several frames breaks the tie. If the "learned scores plus Hungarian" ablation matches our full decoder, we will conclude that the gain comes entirely from learned scores and say so. If plain Hungarian with hand-crafted costs matches us even at crossings, the proposal fails at its core.

Why not just do sequential Rietveld or Le Bail refinement? Refinement needs a known phase model at every step, but the interesting cases are those where the model is unknown or changing. Examples are the Eu coexistence window, the emerging $P\bar{1}$ phase in HfTe₅, and the WB₂ case (WB₂ planar defects), where refinement returns the ambient $hP12$ phase while defects carry the physics. Refinement also did not reveal the broadened FeSe $c$-axis anomaly reported by Sun et al.. We include oracle-seeded refinement so that readers can see how close a phase-free tracker gets to it. We will also test whether our trajectories provide better starting points for refinement.

Why not just train a vision model on the waterfall image? That baseline inherits exactly the simulation-to-experiment gap documented by Rincón et al.. It also offers no guarantee that its output is a valid one-to-one linking, which is the failure that RFold's validity numbers quantify for RNA. We run it under identical conditions and report the fraction of its outputs that are valid.

Proposed Experiments

The first experiment is the split test on simulated data. We report link F1 separately for non-crossing links, crossing pairs, merges, and births or deaths, in the same way RNA papers separate pseudoknot F1 from overall F1. We also sweep the solidification pressure and the broadening width to locate where each baseline breaks down. The order-preserving aligner should collapse on the crossing subset. Hungarian matching should degrade mainly at near-tangent crossings and merges. Our parser should degrade most gracefully.

The second experiment is physical recovery. We compare per-axis compressibilities fitted from the recovered trajectories against simulator ground truth. As a real-data sanity check, we compare against the published CeNiC₂ values of $3.70$, $1.97$, and $1.39 \times 10^{-3}$ GPa⁻¹ and the roughly 7 GPa coordinate switch, provided the raw series can be obtained from the authors.

The third experiment, which is the decisive real-data check, applies the trained parser without fine-tuning to the published Eu (to 92 GPa, no medium), HfTe₅, and FeSe-based pressure series where raw patterns can be obtained. It asks two questions. Do the transition onsets it infers agree with the reported 12 GPa (bcc to hcp), 18 to 66 GPa (coexistence), and 5.5 and 12 GPa (HfTe₅) boundaries? And does it recover a $c$-axis trajectory through the post-10 GPa broadened regime in the FeSe-based material?

A negative outcome would still be informative. If the frame-by-frame Hungarian baseline matches our parser on crossings in real data, the pseudoknot analogy is real but practically unnecessary for diffraction, and the simulator becomes the main contribution.