When particle physicists measure a short-lived particle (a "resonance"), the particle and the smooth background process (the "continuum") often lead to the same final particles. Quantum mechanics then requires adding their complex amplitudes before squaring, so the observed spectrum contains an interference term that can raise or lower the rate on either side of the peak. As a result, the fitted mass, width, and decay fractions depend on exactly how each amplitude is written down. The honest way to quote this "model-dependent" error is to refit the data under many alternative amplitude models. In practice analysts fit a handful of hand-picked variants, because each unbinned likelihood fit over tens of thousands to millions of events is expensive, and the variants that matter most are the ones where lineshape parameters float and nothing can be cached.
This note proposes to treat the whole family of alternative models as one computation. The family is compiled into a single merged forward-and-backward graph. Sub-amplitudes common to many variants are evaluated once per event. The order of operations and the choice of which intermediates to store or recompute are then optimized so that the family fits in lockstep under a fixed GPU memory budget. The claim is systems-level but aimed at a physics payoff. If the dominant cost of a variant scan is shared lineshape evaluation, an exhaustive scan over component subsets and lineshape choices becomes about as cheap as a few independent fits. That in turn allows a direct test of whether the handful-of-variants practice under-reports model-dependent uncertainty.
Core Claim
The intensity at a point $\mathbf{s}$ in the decay's kinematic phase space, under variant $m$, is
$$I_m(\mathbf{s};\theta_m) = \Big|\sum_{j \in S_m} c_{j} \, A_j(\mathbf{s};\lambda_j)\Big|^2 .$$
Here $S_m$ is the set of intermediate states included in variant $m$. Each $c_j$ is a complex coupling, and each $A_j$ is a lineshape with shape parameters $\lambda_j$, such as a mass, a width, or K-matrix poles. Across a realistic systematic-variation family, most pairs $(A_j,\lambda_j)$ recur in many variants. Variants differ in a few components, usually in the broad scalar "S-wave." The resulting merged graph is wide and irregular, with many variant heads sharing leaves. It is not a chain of repeated blocks. We claim that a schedule exploiting this sharing cuts the wall-clock time of an $M$-variant scan by a factor that grows with the fraction of shared lineshape computation. We further claim that this holds against the strongest practical alternative: independent, event-chunked, checkpointed fits. The fitted parameters must match reference double-precision fits to numerical round-off, because nothing lossy is introduced.
Why this gap is real
The physics side supplies the motivation. Aubert et al. measured $\cos 2\beta$ with a time-dependent Dalitz fit of $D^0\to K_S\pi^+\pi^-$ and found that the scalar parameterization was the dominant systematic. Aubert et al. and del Amo Sanchez et al. report the same propagation into the angle $\gamma$ and into charm mixing parameters. Mitchell et al. fit $D_s^+\to K^+K^-\pi^+$ and found that fit fractions sum to nearly 130%, a direct sign of strong interference. Dropping the broad $f_0(1370)$ distorts the fit near $m^2(KK)\approx 1.3$ GeV$^2$. Bonvicini et al. replaced the $K\pi$ S-wave lineshape with freely floating per-bin magnitudes and phases (the quasi-model-independent partial-wave approach). They found phases that disagree with scattering averages. Rubin et al. and Cawlfield et al. show that different parameterizations of broad states give mutually incompatible pictures of the dynamics. None of these works scans the model space systematically. The obstacle they share is cost, not method.
The systems side supplies techniques but constrains how they can be reused. MODeL solves operator ordering and memory placement as one integer program. It reports up to 38% peak-memory reduction from reordering alone, but only on static forward graphs. Topoformer learns orderings and is also forward-only. SERENITY handles irregular wiring with dynamic programming, again for inference. Rockmate optimizes recomputation in training graphs. It splits the graph at cut vertices, which assumes a chain of blocks, and the research file notes that this partitioning collapses on wide, tangled graphs. The merged variant graph sits exactly in the gap these papers leave: backward pass included, non-chain, with sharing that none of them models. We reuse their ingredients, namely lifetime-aware integer programming and block-wise recomputation, and change the graph they operate on.
Research Program
We will build a compiler that takes a declarative variant family and emits one merged graph. The family consists of a base isobar model plus alternative component sets, alternative S-wave forms (Breit-Wigner, K-matrix, binned free-phase waves), and alternative barrier radii. Nodes are keyed by component identity and parameter binding, so a lineshape with the same floating parameters is computed once per event batch and fanned out to every variant that uses it. Parameters that differ across variants become separate nodes.
The negative log-likelihood of each variant is a sum over events of $\log I_m$ minus a normalization integral over simulated phase-space events. Every event contributes independently, so the scheduler has three decisions to make. It chooses the event-batch size. It orders the variants within a batch so that shared lineshape tensors are consumed by all their users and then freed. It decides, per node, whether to keep that node's backward intermediates or recompute them. Recomputing cheap Breit-Wigners is attractive; recomputing K-matrix or three-body-unitarity lineshapes of the kind used by Mikhasenko et al. is not.
We will formulate this as an integer program in the style of MODeL, extended to the joint forward-backward graph. The objective is throughput under a hard memory ceiling. The integer program is solved on one representative event batch and then replayed, because the graph is static once the family is fixed. All operations are exact reorderings or exact recomputations, so results must be bitwise-comparable to a naive reference up to floating-point summation order. We will verify that.
The physics study built on top of the compiler is the real test of value. We will generate pseudo-data with the published event counts and background fractions from the Mitchell et al. $D_s^+$ model (14,400 candidates, about 15% background) and a Bonvicini-style $D^+\to K^-\pi^+\pi^+$ model (67,086 candidates). The raw collaboration data are not available to us. Because the generating model is known, we can ask whether the spread of fitted fit-fractions and strong phases across an exhaustive variant scan covers the truth more often than the spread across a conventional hand-picked set of five to ten variants. We will then scale event counts toward the million-event regime of B-factory and BESIII samples, such as the $1.31\times10^9$ $J/\psi$ analysis of Ablikim et al., to find where the method's advantage appears.
Baselines
The naive reference point is what many analyses do: fit each variant sequentially with full reverse-mode autodiff, storing all activations, with event chunking only as far as needed to avoid running out of memory. It anchors the absolute speedup and the numerical-agreement check.
The strongest competitor is independent per-variant fits run with two optimizations. First, gradients are accumulated over event chunks, so memory is bounded by the chunk size. Second, Rockmate's recomputation is applied inside each variant's graph. Structurally identical variants are batched together with vectorized mapping. This is what a competent engineer would build today, and Rockmate is the best documented training-memory scheduler in the file. It reports 50% memory saved at 5% compute overhead on GPT-2 Large and a 2 to 5 times activation-memory reduction at 10–20% overhead. No reported result found on Lacuna for amplitude-fit throughput under any of these tools, so we will produce that number ourselves.
For fairness, every method gets the same GPU, the same memory ceiling (swept from 4 to 40 GB), the same pseudo-data and phase-space integration sample, the same optimizer and stopping tolerance, and the same float64 arithmetic. Chunk size is tuned by grid search for the baseline with the same budget our scheduler gets. Beating the baseline means lower wall-clock time for the full $M$-variant scan at equal memory, with all fitted parameters agreeing within $10^{-8}$ relative error.
We also run MODeL's reordering on the forward half of the merged graph. This measures how much of the gain an existing forward-only scheduler already captures.
Two ablations isolate the key ingredient. "Sharing only" merges the graph but uses a default topological order and default storage. "Scheduling only" applies our integer program to each variant separately, with no merging. If "sharing only" captures nearly all the gain, the scheduling contribution is not needed and we will say so.
Why not just…?
Why not just chunk over events and vectorize over variants? This is the real threat. Chunking already removes the activation-memory wall for a single fit, since the likelihood is a sum over independent events. Vectorization handles identical-structure variants. What it cannot do is share a lineshape across variants that differ in structure, which describes most S-wave systematics. The prediction is falsifiable: our speedup over this baseline should track the measured fraction of shared lineshape FLOPs in the family. If families with high sharing show no gain, the proposal fails on its central claim.
Why not just cache the per-event amplitudes? When all lineshape parameters are fixed, each $A_j(\mathbf{s}_i)$ can be precomputed once, and only the couplings float. Caching then wins, and we will include it as a baseline for fixed-shape variants. But the systematics these papers identify as dominant come from broad scalar states whose masses, widths, K-matrix poles, or per-bin phases float. Aubert et al. and Bonvicini et al. are the concrete cases. There the cache is invalidated at every optimizer step.
Why not just compress activations to low precision, as GACT does? GACT reaches up to 8.1 times activation-memory reduction with under 0.5% accuracy loss on classification. Its gradients are unbiased but noisier, and an amplitude fit converges to a precise optimum whose relative phases are the physics output. We will run 4-bit and 8-bit GACT-style compression on the same fits and measure bias and spread of fitted strong phases over toys. We expect degradation, but we treat it as an empirical question.
Why not just use Rockmate or MODeL unchanged? We run both as baselines. The contrast is structural. Rockmate's cut-vertex blocks assume chain-like graphs, and MODeL, Topoformer, and SERENITY optimize forward graphs only. The ablations will show whether their structural limits actually cost anything on this workload.
Decisive Checks
Three results would settle the proposal.
The first is a speedup curve: wall-clock time of the full variant scan against memory ceiling, for our scheduler versus the chunked-and-checkpointed baseline. We report it for variant families of 10, 100, and 1,000 members at pseudo-data sizes from $10^4$ to $10^6$ events. It is paired with the shared-FLOP fraction of each family, so gain can be attributed to sharing. Numerical agreement with naive float64 fits is a pass/fail gate.
The second is the coverage test on known-truth pseudo-data. Across a few hundred toys, we compare how often the true fit fractions and phases fall inside the model-systematic band from an exhaustive scan versus a conventional small scan. If the two coverages agree, the physics motivation weakens and the contribution reduces to a faster fitter.
The third is the compression ablation. It determines whether lossy activation methods are admissible for phase-sensitive interference fits at all, which is itself a useful negative or positive result for anyone applying training-memory tools to scientific likelihoods.
References
- Measurement of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi>cos</mml:mi><mml:mo></mml:mo><mml:mn>2</mml:mn><mml:mi>β</mml:mi></mml:math>in<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msup><mml:mi>B</mml:mi><mml:mn>0</mml:mn></mml:msup><mml:mo>→</mml:mo><mml:msup><mml:mi>D</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mo>*</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msup><mml:mi>h</mml:mi><mml:mn>0</mml:mn></mml:msup></mml:math>Decays with a Time-Dependent Dalitz Plot Analysis of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi>D</mml:mi><mml:mo>→</mml:mo><mml:msubsup><mml:mi>K</mml:mi><mml:mi>s</mml:mi><mml:mn>0</mml:mn></mml:msubsup><mml:msup><mml:mi>π</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi>π</mml:mi><mml:mo>−</mml:mo></mml:msup></mml:math>
- Constraints on the CKM angleγinB0→D¯0K*0andB0→D0K*0from a Dalitz analysis ofD0andD¯0decays toKSπ+π−
- Measurement of D-0-(D)over-bar(0) Mixing Parameters Using D-0 -> K-S(0)pi(+) pi(-) and D-0 -> (KSK+K-)-K-0 Decays
- Dalitz plot analysis of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msubsup><mml:mi>D</mml:mi><mml:mi>s</mml:mi><mml:mo>+</mml:mo></mml:msubsup><mml:mo>→</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi>K</mml:mi><mml:mo>−</mml:mo></mml:msup><mml:msup><mml:mi>π</mml:mi><mml:mo>+</mml:mo></mml:msup></mml:math>
- Dalitz plot analysis of the D+ ---> K- pi+ pi+ decay
- Search for<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi>C</mml:mi><mml:mi>P</mml:mi></mml:math>violation in the Dalitz-plot analysis of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msup><mml:mi>D</mml:mi><mml:mo>±</mml:mo></mml:msup><mml:mo>→</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi>K</mml:mi><mml:mo>−</mml:mo></mml:msup><mml:msup><mml:mi>π</mml:mi><mml:mo>±</mml:mo></mml:msup></mml:math>
- Measurement of interfering<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msup><mml:mi>K</mml:mi><mml:mrow><mml:mo>*</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:msup><mml:mi>K</mml:mi><mml:mo>−</mml:mo></mml:msup></mml:math>and<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msup><mml:mi>K</mml:mi><mml:mrow><mml:mo>*</mml:mo><mml:mo>−</mml:mo></mml:mrow></mml:msup><mml:msup><mml:mi>K</mml:mi><mml:mo>+</mml:mo></mml:msup></mml:math>amplitudes in the decay<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:msup><mml:mi>D</mml:mi><mml:mn>0</mml:mn></mml:msup><mml:mo>→</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi>K</mml:mi><mml:mo>−</mml:mo></mml:msup><mml:msup><mml:mi>π</mml:mi><mml:mn>0</mml:mn></mml:msup></mml:math>
- MODeL: Memory Optimizations for Deep Learning
- Neural Topological Ordering for Computation Graphs
- Ordering Chaos: Memory-Aware Scheduling of Irregularly Wired Neural Networks for Edge Devices
- Rockmate: an Efficient, Fast, Automatic and Generic Tool for Re-materialization in PyTorch
- Pole position of the <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:msub><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mn>1260</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math> from <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi>τ</mml:mi></mml:math>-decay
- Amplitude Analysis of the Decays η^{'}→π^{+}π^{-}π^{0} and η^{'}→π^{0}π^{0}π^{0}.
- GACT: Activation Compressed Training for Generic Network Architectures