What Score Errors Leave Behind Below a Detector's Threshold

Diffusion models generate data by learning to undo gradually added noise. The quantity they learn, called the score, is the direction in which the data density increases. These models are now being used as learned priors for scientific inverse problems: recovering a true signal from blurred, noisy measurements. Physics has a natural place to try this. A particle detector reports pulse heights, and the analyst wants the true energy spectrum of the recoils that produced them. Near the detector's energy threshold, the instrument barely responds, so the measurement says almost nothing about that energy range. Whatever a reconstruction reports there comes mostly from the prior. If the prior is a neural score, that answer comes mostly from the network's errors.

This note proposes to make that statement quantitative and testable. Score-error theory treats network error as a single average number. One recent result notes that score errors imprint on the output only when they align with directions the data can observe (Quantifying Error Propagation and Model Collapse in Diffusion Models). In an inverse problem the logic flips. Errors along directions the measurement can see get corrected by the data. Errors along directions it cannot see pass straight into the answer. Low-energy recoil spectra have a growing blind region near threshold, and that region is exactly where physically motivated spectra are steepest. This makes them the cleanest available stress test for the claim. We would build a threshold-aware audit of diffusion-based unfolding and a hybrid prior that removes the problem by design.

Core Claim

Write the measured spectrum as $y = R\Phi + n$. Here $\Phi$ is the true recoil spectrum in energy bins, $R$ is the detector response matrix, and $n$ is counting noise. Let $P$ be the projector onto the directions in spectrum space that $R$ resolves above the noise level. The posterior score that a diffusion-based unfolding method uses is the prior score plus a likelihood term. The likelihood term has essentially no component outside the range of $P$. Write $s_\theta$ for the learned prior score and $s$ for the true one. To first order, the reconstruction's bias in the unobserved directions is driven only by

$$ b_\perp(t) = (I - P)\,\big(s_\theta(\Phi_t, t) - s(\Phi_t, t)\big), $$

where $\Phi_t$ is the noised spectrum at diffusion time $t$. No amount of data removes this bias. In a xenon or germanium detector, efficiency falls toward zero at low energy (Search for Light Dark Matter with 259 Days of Data in PandaX-4T). The lowest-energy bins therefore move almost entirely into the range of $I - P$. Two further facts point the same way. Light-mediator models put most of their rate there, because the rate scales as $q^{-4}$ in the momentum transfer $q$ (Constraining Dark Matter Models with a Light Mediator at the PandaX-II Experiment). Score networks are least accurate in the nearly clean regime that sets fine structure (DualFast).

The specific prediction is this: per-bin reconstruction bias near threshold should track the null-space projection of the measured score error, not the global average score error. A second prediction concerns sampler choice. Switching from a deterministic sampler to a stochastic one should not fix this bias. The contraction that stochastic samplers provide (Diffusion models for Gaussian distributions: Exact solutions and Wasserstein errors) pulls samples toward the learned prior, not the true one. The likelihood exerts no restoring force in the unobserved directions.

The constructive half of the claim is a hybrid prior. It uses the learned score inside the range of $P$, where data can catch its mistakes. It replaces the learned score in $I - P$ with the score of an explicit low-dimensional physics family, such as mediator-mass-parameterized recoil shapes plus a smooth background. This is not meant to beat classical unfolding everywhere. Its purpose is to make the answer in the blind region depend on stated physics assumptions instead of on undocumented network error.

Relation to Prior Work

The obvious combination is "use a diffusion prior to unfold detector spectra," which the file lists as an open gap. That is not our contribution. A skeptic would rightly ask why a one-dimensional spectrum needs it.

Diff-Unfolding separates a known forward operator from a learned denoising prior in unrolled form and reports gains on image restoration and MRI. It supplies the method we would audit. It does not study where prior error survives in the null space of the operator, and it uses Gaussian noise rather than counting statistics.

The neutron unfolding work on EJ-301 scintillators (High-fidelity unfolding of 252Cf neutron spectra) supplies the benchmark and the strongest classical baseline. It calibrates a simulated response with gamma-source Compton edges and inverts it with MLEM and GRAVEL down to 0.35 MeV. It also reports instability below 1–2 MeV, which is the regime we target.

Several theory papers motivate the claim. Convergence Analysis of Probability Flow ODE bounds total error by the global score error. On the Robustness of Langevin Dynamics to Score Function Error shows small average error can still cause failure. Both use global error norms. Neither separates error by whether a measurement can observe it, which is the separation we add.

Two correction methods constrain the design. DualScore adds a learned correction to enforce marginal constraints. Variance-tuned diffusion importance sampling removes score bias by reweighting against an exact target density. Both need a target that can be evaluated. In the blind region no such target exists beyond what physics assumes. This is why our fix inserts an explicit physics prior there rather than another learned correction.

Research Program

The work has three parts.

The first part is a known-answer testbed. The prior over spectra is chosen so that the exact score is computable at every noise level: Gaussian and Gaussian-mixture families fitted to physically generated spectra, following the exact solutions of the Gaussian-diffusion paper. The spectra are light-mediator recoil shapes over a range of mediator masses, plus flat and exponential backgrounds. They are folded through response matrices whose efficiency curves imitate a xenon detector's low-energy cutoff. We take the published PandaX-II window of S1 between 3 and 45 photoelectrons as a template. On this testbed we inject controlled score errors that are localized in energy and in diffusion time. We then check whether reconstruction bias per bin matches the predicted $b_\perp$ propagation.

The second part replaces the injected errors with real trained score networks. We measure their error maps against the exact score, then repeat the propagation test. This shows whether networks trained by standard denoising score matching put their error disproportionately into the low-energy null space. We expect they do, because the steep, nearly clean structure sits there.

The third part builds the hybrid prior. We compare it with full-learned priors under deterministic and stochastic samplers, with likelihood terms using both Gaussian and Poisson counting statistics.

The audit's output is a per-bin "prior-dominance" score: the fraction of posterior variance and bias in each bin that is unchanged when the data are replaced by pure noise. It is cheap to compute and applies to any unfolding method. That includes MLEM, whose blind-region answer is set by its starting spectrum and its stopping iteration.

Baselines

Naive reference. The do-nothing reference is the prior alone, sampled with no data. Any reconstruction whose low-energy bins match this reference is reporting its assumptions, not a measurement. The prior-dominance score is defined relative to it.

Strongest classical method. This is MLEM, together with GRAVEL, run on the same calibrated response matrix, as in the EJ-301 work. That paper reports an average deviation below 4.28% from the ISO 8529-1 252Cf reference above a 0.35 MeV threshold, with a best case of 1.42% using the 2-inch detector and MLEM. These numbers are the bar. We would run MLEM with its iteration count chosen by a single held-out simulated spectrum, giving it the same tuning budget as the diffusion methods. All methods receive identical response matrices and identical simulated count realizations.

Strongest learned method. This is a Diff-Unfolding-style posterior sampler with a fully learned prior, trained on the same simulated spectra at matched parameter count and sampling steps. No reported result was found on Lacuna for diffusion-based unfolding of detector spectra, so this baseline is established fresh.

Key ablation. The ablation that isolates the proposal's main ingredient swaps only the null-space component of the prior, learned versus physics-parametric, while holding everything else fixed.

What counts as success. The hybrid succeeds if it matches MLEM's deviation above 0.35 MeV. Below threshold, its bias must be bounded by the misspecification of the physics family rather than by network error. Concretely, when the true spectrum lies inside the family, its sub-threshold bias should be statistically indistinguishable from zero while the fully learned prior's is not.

Why not just…?

Why not just use MLEM or GRAVEL, which already reach 1.42%? Above threshold this is a real threat, and we expect MLEM to be competitive there. We do not claim otherwise. Below threshold, MLEM fills the blind bins from its initial spectrum and its stopping rule, and the EJ-301 paper reports artifacts and semi-convergence in that region. The prior-dominance audit applies equally to MLEM. If MLEM's sub-threshold bins turn out to be as prior-dominated as the learned prior's, the value of the work is the diagnostic, and the hybrid's advantage is only that its assumptions are explicit.

Why not just forward-fold a parametric model, as PandaX-4T does for its limits? For setting dark matter exclusion limits, forward folding with a profile likelihood is the right tool. PandaX-4T reaches 1.1 × 10⁻⁴³ cm² at 3 GeV/c² this way (Search for Light Dark Matter with 259 Days of Data in PandaX-4T). We do not propose replacing it. Our hybrid in fact moves toward forward folding in exactly the blind directions. The proposal targets settings where a model-independent spectrum is wanted, such as neutron spectrometry and calibration, and it argues that learned priors should fall back to parametric models where data are blind.

Why not just train the score network better, or use DualFast-style correction near clean noise levels? Better training shrinks the error vector $s_\theta - s$. It does not change which part of that vector the data can see. A trained network can still be confidently wrong in the null space, because the training spectra themselves are a modeling choice. The decisive test is the ablation repeated with networks trained on progressively more data. If the null-space bias falls toward zero at the same rate as the observable-space bias, this objection wins.

Why not just quantify uncertainty with an ensemble of score networks? Ensembles capture variance across networks but not bias they share from common training spectra. We test this directly: train ensembles on spectra drawn with a shifted mediator-mass distribution and check whether the ensemble spread covers the true sub-threshold spectrum. If coverage is good, ensembles are a cheaper fix, and we would say so.

Proposed Experiments

Experiment 1: propagation law on the known-answer testbed. We inject localized score errors and regress per-bin reconstruction bias on two predictors: the predicted null-space term $b_\perp$, and the global average error. We vary the threshold position, the mediator mass from heavy, contact-like shapes to the steep $q^{-4}$ regime, and the sampler, deterministic or stochastic. Two outcomes are decisive. The null-space term must explain the bias where the global error does not. And stochastic sampling must fail to reduce null-space bias while reducing observable-space bias. If stochastic samplers do suppress null-space bias, the core claim is wrong.

Experiment 2: trained networks on the same testbed. We train score networks on the same spectra and report their measured error maps as a function of energy bin and diffusion time. This shows whether real networks concentrate error where efficiency vanishes.

Experiment 3: physical benchmark. On the 252Cf/EJ-301 benchmark, the response is rebuilt by Geant4-style simulation with Gaussian energy broadening calibrated to Compton edges. We compare MLEM, GRAVEL, the fully learned diffusion prior and the hybrid against the ISO 8529-1 reference above 0.35 MeV, and against the injected truth in simulated sub-threshold bins. We report deviation, the prior-dominance score per bin and interval coverage.

Experiment 4: misspecification of the physics family. We repeat the benchmark with the true spectrum deliberately outside the physics family, for example with an unmodeled low-energy background bump. The aim is to measure honestly how the hybrid fails when its stated assumptions are wrong. Its failures should be the visible kind, unlike the learned prior's.