How Many Photons Does It Take to Tell Electrons from Protons?

Many of the most energetic gamma-ray sources in our Galaxy produce smooth, featureless spectra that two very different physical processes can explain equally well. In the first, fast electrons scatter low-energy background light up to gamma-ray energies (the "leptonic" picture). In the second, fast protons hit interstellar gas and make neutral pions, which decay into gamma rays (the "hadronic" picture). The answer decides whether a source is a PeVatron, an accelerator that pushes protons to the peta-electronvolt energies needed to explain Galactic cosmic rays. Today the field settles the question by fitting both models to the data and comparing how well they fit. When the fits tie, as they do for LHAASO J2108+5157 and LHAASO J0341+5258, nobody can say whether more observing time would break the tie, which telescope should supply it, or whether the tie is permanent given the instruments we have.

We propose to answer those questions the way coding theorists answer "how good can any scheme be." Coded caching research pairs every practical scheme with a converse, a proof that no scheme can do better, and reports the ratio between the two as an optimality gap. We apply that discipline to the leptonic–hadronic question. For a given source, we compute a lower bound on the photon exposure that any statistical test needs to separate the two pictures at a target error rate. We compute it jointly across instruments, while letting each model's free physical parameters, such as magnetic field, gas density, distance, and spectral cutoff, move adversarially to mimic the other model. We then compare that bound with the exposure the standard fitting pipeline actually needs. The result is a per-source map that sorts sources into three groups: those resolvable with feasible campaigns, those that need a different allocation of telescope time, and those where photons alone can never settle the question and neutrinos or gas maps are required.

Core Claim

Leptonic–hadronic separability can be stated as a composite hypothesis test on Poisson photon counts passed through each instrument's response. Two facts then make the problem tractable. First, when the observations from different instruments are independent, the divergence between the two hypotheses grows linearly in each instrument's exposure time. Write $t_i$ for the exposure of instrument $i$, $\theta_H$ for the hadronic parameters, $\theta_L$ for the leptonic parameters, and $d_i(\theta_H\|\theta_L)$ for the Poisson Kullback–Leibler divergence per unit exposure between the two models' predicted counts in instrument $i$'s energy bins. The worst-case separation for a hadronic truth $\theta_H$ is then

$$S(t;\theta_H) = \min_{\theta_L \in \Theta_L} \sum_i t_i \, d_i(\theta_H \| \theta_L).$$

Here $\Theta_L$ is the physically allowed range of leptonic parameters. The minimum over leptonic parameters is exactly where spectral mimicry enters. A Klein–Nishina-softened inverse Compton cutoff, the high-energy steepening that occurs because electron scattering becomes less efficient at the highest photon energies, can sit close to a proton-acceleration cutoff. A standard two-point inequality (Bretagnolle–Huber) then says that any test whose two error probabilities sum to at most $\delta$ must satisfy $S(t;\theta_H) \ge \log(1/(2\delta))$. This is a converse that holds for every analysis method, not only the one a collaboration happens to run.

Second, $S$ is a minimum of linear functions of $t$, so it is concave in $t$. Choosing the exposure allocation that maximizes worst-case separation under a total time budget is therefore a convex program. That gives us an achievable design to set against the converse. The proposal's distinctive output is the multiplicative exposure gap for each source. It compares the exposure that a generalized likelihood-ratio test run through naima actually needs to reach error $\delta$ with the exposure the converse says is unavoidable, evaluated both at the published allocation and at the optimized one.

Where the Two Directions Meet

The coding-theory papers supply the method and the reporting standard, not any physics. Fundamental Limits of Caching set the template of pairing an achievable scheme with a cut-set converse and stating a constant-factor gap (12, with simulations suggesting about 5). Later work showed that the size of the reported gap depends heavily on how tight the converse is. A New Converse Bound for Coded Caching cut the gap to 4.7 by reducing groups of users to a single-user proxy. Characterizing the Rate-Memory Tradeoff in Cache Networks Within a Factor of 2 reached about 2.00884 with a demand-partitioning converse. Improved Approximation of Storage-Rate Tradeoff for Caching with Multiple Demands used Han's inequality to capture correlations that hold jointly across terminals. We borrow two lessons from this sequence. The first is to report a gap rather than a single fit. The second is that a naive bound applied one instrument at a time will badly overstate how hard the problem is, much as single cut-set bounds overstated the caching gap. Our converse is therefore defined jointly across instruments. Coded Caching With Heterogeneous User Profiles supplies a testable analogy: under a small cache, the best scheme concentrates resources on shared content rather than spreading them. We ask whether, under a small total exposure, the best allocation likewise concentrates time on one band. We treat this as a hypothesis to test, not an expectation.

The astrophysics papers supply both the motivation and the hard test cases. In Multiwavelength study of the galactic PeVatron candidate LHAASO J2108+5157, the authors combined 49 hours of LST-1 Cherenkov telescope data, 3.8 hours of XMM-Newton X-ray data and 12 years of Fermi-LAT data and modeled them with naima and jetset. Both a TeV halo (a leptonic scenario with $B < 1.2$–$1.9\ \mu$G) and proton collisions with molecular clouds at 2.0 or 3.1 kpc remained compatible. That paper is our main case for the allocation question. Discovery of a New Gamma-Ray Source, LHAASO J0341+5258, with Emission up to 200 TeV reports a source detected at 8.2σ (pretrial) with a cutoff near 50 TeV that neither picture can exclude, which isolates the cutoff-mimicry problem. Evidence of cosmic-ray acceleration up to sub-PeV energies in the supernova remnant IC 443 gives a natural internal contrast: a compact core, C0, that favors pion decay, and an ambiguous halo, C1, with a cutoff near 20 TeV. A useful bound should rate C0 as separable and C1 as hard. In Peta–electron volt gamma-ray emission from the Crab Nebula, a one-zone leptonic model fits but deviations between 60 and 500 TeV leave room for a hadronic component. That makes the Crab a calibration target for the variant of the question that asks how large a hadronic fraction can hide inside a known leptonic source. The First LHAASO Catalog of Gamma-Ray Sources, with 90 sources of which 43 are ultra-high-energy, provides the population for a catalog-wide triage.

The research file does not support a stronger link than this, and we do not claim one. Network coding plays no role here, and the Gray-Wyner decomposition of Rate-Memory Trade-off for the Two-User Broadcast Caching Network with Correlated Sources is only loosely related to separating a core from a halo, so we leave it aside.

Research Program

The first component is a forward model for each instrument. It maps a parent particle spectrum (electrons or protons, plus their nuisance parameters) to expected counts in each energy bin, using naima emission kernels and published effective-area and background approximations for LHAASO KM2A/WCDA, LST-1, XMM-Newton and Fermi-LAT. Neutrino detectors enter as an additional channel whose expected counts are nonzero only under the hadronic picture. The second component computes the converse. That means solving the inner minimization over $\Theta_L$, and the symmetric problem with the roles of the two pictures exchanged, using multi-start optimization, since mimicry regions can have more than one basin. We will also report the Chernoff exponent, which describes the asymptotic error rate of the best test and so gives a bracket that is achievable in the large-exposure limit. The third component is the allocation program, which maximizes the worst case of $S(t;\theta_H)$ over a credible region of $\theta_H$ subject to a total time budget and per-instrument limits. The fourth component is empirical: we inject synthetic sources, run the actual likelihood-ratio pipeline on the resulting count realizations, and measure the exposure at which its errors fall below $\delta$. Comparing that measured exposure with the converse gives the gap.

The physics assumption that limits all of this is the choice of $\Theta_L$ and $\Theta_H$. If the leptonic family is allowed arbitrary broken power laws, it can mimic almost anything and the bound becomes vacuous. We will report results for nested model families, from one-zone with a single cutoff, to broken power law, to two-zone. For each family we will state how much the bound depends on it, because that dependence is itself a physics result: it shows how much the unresolvability claim rests on the modeling choice.

Baselines

The naive reference point is the published allocation itself, for example the J2108+5157 campaign of 49 LST-1 hours and 3.8 XMM-Newton hours, analyzed with the Bayes-factor or likelihood comparison the authors ran. For this source the reported outcome is that both pictures remain compatible. The file gives no numerical Bayes factor, so for that quantity we have no reported result found on Lacuna. We re-run this baseline with our forward models to obtain its separation score $S$ and its empirical error rate. This anchors the claim that the published allocation sits far from what is achievable.

The strongest competitor is the profile-likelihood sensitivity forecast on an Asimov dataset. This is the standard way to predict median significance: one simulates the noiseless expected data under one hypothesis, fits it with the other while freely adjusting the nuisance parameters, and reads off the expected test statistic. It is a real threat because, for a fixed true parameter, it computes almost the same inner minimum we do and so tracks the achievable side closely. No reported result found on Lacuna for an Asimov leptonic-versus-hadronic exposure forecast on any of these sources. We will run it with the same forward models, the same nuisance ranges and the same compute budget. Beating it means two things. First, the converse must certify cases where the Asimov forecast is optimistic, either because it was evaluated at the best-fit truth rather than the worst case over the credible region, or because the pipeline's finite-sample error exceeds what the forecast predicts. Second, the minimax allocation must reduce the total exposure needed to reach error $\delta$ across the credible region by a margin larger than the Monte Carlo uncertainty.

A Fisher-information optimal design is a second competitor. It chooses the allocation that best constrains the parameters, using the determinant of the Fisher matrix (D-optimal design). We run it under the same budget. It optimizes parameter precision rather than the ability to discriminate between the two pictures, and we expect it to spend time where the spectrum is bright rather than where the two pictures differ.

The key ablation removes the adversarial minimization. We evaluate the divergence at the two best-fit models instead of at the closest leptonic match. The gap between this ablated bound and the full bound measures how much of the difficulty comes from mimicry rather than from too few photons.

Why not just…?

Why not just compute Bayes factors or BIC with MCMC, as people already do? These quantities report what the current data favor. They do not say how much more data would change the answer or whether any amount would. In the J2108+5157 study, careful naima/jetset fits left both pictures compatible, and the fits are silent on whether the next 50 hours should go to LST-1 or to X-ray observations. Our bound addresses exactly that, and the baseline comparison above makes the difference measurable.

Why not just run an Asimov sensitivity forecast? This is the alternative most likely to make the proposal redundant. If our converse and the Asimov forecast agree to within Monte Carlo error on every test source, then the converse adds a guarantee but little practical value. In that case we would present the contribution as the minimax allocation program alone, with the Asimov calculation as its inner step. The decisive check is whether the worst case over the credible region differs materially from the forecast at the best-fit point, especially for J0341+5258, whose cutoff is the textbook mimicry case.

Why not just wait for neutrinos? Neutrinos come only from hadronic interactions, but the file shows how rare useful associations are. The supernova coincidence in SN 2023uqf: An Interacting Supernova Coincident with a High-Energy Neutrino is a transient, while the 90 steady LHAASO sources lack individual associations. We include neutrinos as an additional channel in the bound, so the analysis states, for each source, the neutrino exposure at which that channel would dominate. That turns "wait" into a quantitative statement.

Isn't the caching connection a metaphor? In part it is, and we say so. We take the converse-versus-achievable gap methodology and the warning that bounds computed one instrument at a time are loose. We do not take any network-coding structure. The proposal stands or falls on the astrophysics experiments, not on the analogy.

Decisive Experiments

The first test is validity. On synthetic sources injected across the parameter ranges of all four case studies, the empirical error rate of the likelihood-ratio pipeline must never beat the converse; a violation would indicate a bug or a modeling mismatch. The second test is discrimination. The bound must rate IC 443 C0 as separable at current LHAASO exposure, consistent with the reported 95% lower limit of 300 TeV on the proton energy. It must rate C1 and J0341+5258 as hard. A bound that fails this sanity ordering is rejected. The third test is allocation. For J2108+5157, we compare the exposure the published allocation needs to reach $\delta = 0.05$ with the exposure the optimized allocation needs, and we check whether the optimum concentrates in one band at small budgets, as the small-cache analogy suggests. The fourth test is triage. We apply the bound to the ultra-high-energy sources in the first LHAASO catalog and report how many are resolvable with photons within a decade of feasible exposure, how many are resolvable only with neutrinos, and how many are unresolvable under each nested model family. Throughout, the reported metrics are the exposure ratio between the pipeline and the converse, the error-rate curves as a function of exposure, and the gap between the minimax and Asimov forecasts.