When a gamma-ray source sits on top of a molecular cloud, astronomers want to know whether the gamma rays come from accelerated protons hitting gas or from accelerated electrons scattering off ambient light. The two answers usually fit the energy spectrum equally well. There is one clean physical handle. Proton-made gamma rays scale with the amount of gas along each line of sight, while electron-made gamma rays do not care about gas. We propose to turn that handle into a statistical test. First, split the sky into a few tiers of gas density. Then measure the gamma-ray emissivity, meaning gamma-ray output per unit of gas, in each tier. If protons dominate, emissivity should be flat across tiers. If electrons dominate, emissivity should fall roughly as the inverse of density. The tier boundaries are the cutoffs of a multilevel thresholding problem, the image-processing task of choosing $K$ intensity cutoffs that split a histogram into $K+1$ classes. Choosing them well requires search, and that search is where computational cost becomes the scientific bottleneck.
The bottleneck is not a single fit. It is calibration. A test whose tier boundaries are chosen by looking at the gamma-ray data must be re-run on thousands of simulated skies to learn how often chance alone produces a signal. Brute-force search over $\binom{L-1}{K}$ boundary sets, with a point-spread-function convolution at every step, is infeasible at that volume. Stochastic swarm optimizers sometimes miss the maximum on some simulations, and each miss quietly biases the reference distribution of the test statistic. The point-spread function (PSF) is the instrument's blurring of point sources. We propose an exact, fast search on a separable surrogate of the likelihood, followed by a short exact refinement, so that the calibrated test is cheap enough to be trustworthy.
Core Claim
The question "does gamma-ray emissivity stay constant across gas-density tiers?" can be written as piecewise-constant segmentation of a one-dimensional gas-density histogram. Once the PSF coupling is replaced by a diagonal Fisher-information approximation, the segmentation cost has the structure Framework for efficient optimal multilevel image thresholding exploits. That paper shows exact multilevel thresholds cost $O(ML^2)$ by dynamic programming when class costs depend only on class boundaries, and $O(ML)$ by the SMAWK matrix search when the cost obeys a convex quadrangle inequality. Here $M$ is the number of classes and $L$ the number of histogram bins. Exactness is what makes the look-elsewhere calibration of an adaptive-tier test reliable. The test also inherits a useful invariance. A global error in the factor that converts CO line brightness into hydrogen column shifts every tier's emissivity equally, so flatness is unaffected. Only density-dependent conversion errors matter. That removes the dominant factor-of-2–3 systematic from the hadronic budget, though not from the shape test's residual systematics.
Research Program
The model works as follows. Sort the gas column map $n_p$, where $p$ indexes sky pixels, into $L$ density bins. A threshold vector $t_1<\dots<t_K$ groups the bins into tiers $k=0,\dots,K$. The expected gamma-ray counts in pixel $p$ are
$$\lambda_p=\sum_{k=0}^{K} q_k\,\big[\mathrm{PSF}\ast(n\,\mathbb{1}_{t_k<n\le t_{k+1}})\big]_p + B_p,$$
where $q_k$ is tier $k$'s emissivity, $\mathbb{1}$ selects pixels in the tier, $t_0$ and $t_{K+1}$ are the density range endpoints, and $B_p$ is the background. Background includes diffuse Galactic emission and neighbouring sources, such as the Geminga halo in the IC 443 field. The hadronic-uniform hypothesis sets all $q_k$ equal. The alternative leaves them free. The PSF couples tiers, so the likelihood is not separable in the thresholds and neither dynamic programming nor SMAWK applies directly. This is the tension the research file flags between exact matrix search and Poisson likelihoods.
We take two steps to work around this. In the first, we fit an unconstrained emissivity $\hat q_b$ for every density bin $b$. This is a convex Poisson fit with $L$ templates. We keep the diagonal of its Fisher information, $w_b$, as a precision weight. The surrogate cost of a tier is then the weighted within-tier spread of per-bin emissivities:
$$C(k)=\sum_{b\in k} w_b\,(\hat q_b-\bar q_k)^2,\qquad \bar q_k=\frac{\sum_{b\in k} w_b\hat q_b}{\sum_{b\in k} w_b}.$$
$C(k)$ is computable in constant time from prefix sums of $w$, $w\hat q$ and $w\hat q^2$. It is a weighted form of Otsu's criterion, which Luessi et al. place in their SMAWK-solvable class. We expect the weighting to preserve the quadrangle inequality and will check this numerically on every dataset; if it fails, we fall back to the $O(ML^2)$ dynamic program, which only needs boundary-only costs. In the second step, we evaluate the exact forward-folded likelihood on the surrogate optimum and its neighbours within a few bins. We record how often the exact optimum lies outside that neighbourhood. That frequency is our measured cost of the surrogate, not an assumption.
Calibration uses mock skies drawn from the null, meaning uniform emissivity plus the fitted background and an optional extended leptonic component, at the real exposure. For each mock we rerun the full adaptive-tier search to build the test statistic's null distribution. Tier count $K$ is selected inside the mock loop, so it is calibrated too. To read results astrophysically, we compare tier emissivities separately in the 1–25 TeV and above-25 TeV bands. A proton population shows flat and similarly hard spectra across tiers, like the unbroken index ~3.0 core in IC 443. Electrons scattering off the microwave background produce emissivity falling with density at every energy.
Baselines
The naive reference is the tier-free test standard in the field. It fits the gas map as a single template alongside a symmetric Gaussian, compares likelihoods, and asks only whether gas is preferred. We run it on the same maps, background model and energy bands. The comparison asks whether our tiered test ever reverses or sharpens its conclusion, and whether it does so at equal calibrated false-positive rate.
The strongest existing method is geometric multi-component likelihood decomposition. Evidence of cosmic-ray acceleration up to sub-PeV energies in the supernova remnant IC 443 used it to split IC 443 into a point-like core on shocked clouds and a 0.67° halo. It reports a core power law of index ~3.0 extending past ~30 TeV and a 95% lower limit on proton energy of about 300 TeV. Its halo is left compatible with either origin. Deep view of composite SNR CTA1 with LHAASO in γ-rays up to 300 TeV used the same kind of point/disk/Gaussian fits for CTA1 and favours a leptonic nebula with a field of ~4.5 μG. No reported result was found on Lacuna for any gas-tier emissivity test, so there is no prior number to beat on that statistic. We reimplement the geometric decomposition on the same counts with the same number of free parameters as our $K$-tier model. Beating it means two things: higher power to detect injected hadronic sub-components in simulations at matched calibrated false-positive rate, and a decisive verdict on a component, such as the IC 443 halo, that the geometric fit left ambiguous.
For the optimizer we compare against a stochastic swarm search on the exact likelihood. We use the multi-strategy pelican optimizer of Symmetric cross-entropy multi-threshold color image segmentation based on improved pelican optimization algorithm, which ranked first of nine by Friedman test on BSDS300, run with the same wall-clock budget per mock. It wins if its calibrated null distribution matches brute force on small $K$ where brute force is feasible. On speed, Luessi et al. report SMAWK speedups "up to 2560 times" over standard dynamic programming for large $L$ and $M$. We will report our own timings rather than assume theirs transfer. Two ablations isolate the key ingredient. The first uses fixed equal-gas-mass quantile tiers, which need no search and no trial correction. The second uses exact adaptive tiers without the refinement step.
Why not just…?
Why not just use fixed quantile tiers? This is the real threat. If emissivity changes at a density that happens to sit near a quantile, fixed tiers lose nothing and need no look-elsewhere correction. Adaptive tiers should gain power only when the change sits at an unknown, off-quantile density, for example where only the densest shocked clumps are illuminated. Our injection grid places the transition across the full density range. If quantile tiers match adaptive tiers in calibrated power across the grid, we will adopt them and report the adaptive machinery as unnecessary.
Why not just fit a single gas template, as is standard? A single template tests whether gamma rays correlate with gas. It does not test whether they scale proportionally with gas. An electron halo overlapping a cloud can still prefer a gas template over a Gaussian. The single-template baseline run on leptonic injections that overlap gas will show how often it falsely favours hadrons.
Why not just run a metaheuristic on the exact likelihood? It handles the PSF coupling natively. The issue is that swarm and evolutionary optimizers can stall at high threshold counts and vary from run to run. Every stalled mock lowers the null test statistic and makes real detections look more significant than they are. We measure this directly: the fraction of mocks where the swarm result falls below the brute-force maximum at small $K$, and the resulting shift in the 5σ threshold.
Why not just deconvolve the gamma-ray map and threshold it directly? Deconvolution of low-count Poisson maps amplifies noise and has no calibrated uncertainty. Thresholding gamma-ray intensity also answers a different question from thresholding gas, and it reintroduces the arbitrary boundaries the proposal aims to remove.
Proposed Experiments
Simulation comes first. We build mock skies on real gas maps from the fields studied in the cited papers, with IC 443-like exposure and PSF at 1–25 TeV and above 25 TeV. We inject mixtures of uniform-emissivity hadronic emission, density-thresholded hadronic emission, and gas-independent leptonic emission, using spectra appropriate to each case. We measure calibrated power against the three baselines and two ablations. We also measure surrogate miss rate and runtime as $K$ grows from 2 to 8.
On public or published data we apply the test to four targets. IC 443 is the positive control; Fermi-LAT identified a $\pi^0$-decay signature there. The key question is whether the halo becomes decisive. LHAASO J2108+5157 has two molecular clouds at 2.0 and 3.1 kpc, as reported in Multiwavelength study of the galactic PeVatron candidate LHAASO J2108+5157; the test run separately on each cloud's velocity-sliced gas map could say which cloud, if either, hosts proton interactions. LHAASO J0341+5258 overlaps a molecular half-shell in Discovery of a New Gamma-Ray Source, LHAASO J0341+5258, with Emission up to 200 TeV. CTA1 is the leptonic negative control.
The decisive checks come in order. First, the null distribution must be calibrated on mocks. Second, CTA1 must not return flat emissivity. Third, IC 443's core-dominated tier must come out flat and hard. Fourth, scaling the CO-to-hydrogen factor by 2 must leave the flatness verdict unchanged. If adaptive tiers beat quantile tiers only on simulations and never change a verdict on real data, we will report that the thresholding search is not worth its complexity for current instruments.
References
- Framework for efficient optimal multilevel image thresholding
- Evidence of cosmic-ray acceleration up to sub-PeV energies in the supernova remnant IC 443
- Deep view of composite SNR CTA1 with LHAASO in γ-rays up to 300 TeV
- Symmetric cross-entropy multi-threshold color image segmentation based on improved pelican optimization algorithm
- Multiwavelength study of the galactic PeVatron candidate LHAASO J2108+5157
- Discovery of a New Gamma-Ray Source, LHAASO J0341+5258, with Emission up to 200 TeV