Redshift Upper Limits for Blazars as Certified Infeasibility

Some of the brightest gamma-ray sources in the sky are blazars, galaxies whose jets point almost straight at us. For many of them we do not know how far away they are, because the jet's glare hides the spectral lines that would normally give a distance. Astronomers get around this by noticing that the universe dims very-high-energy gamma rays in a known, distance-dependent way: the photons collide with the faint starlight that fills intergalactic space and turn into electron-positron pairs. If you assume too large a distance and undo that dimming, the reconstructed spectrum at the source turns upward with energy, which jets are not thought to produce. The largest distance that still gives a physically allowed spectrum is reported as an upper limit. Our proposal is to treat this "largest allowed distance" as what it formally is: the edge of the feasible set of a convex optimization problem. Once the problem is stated this way, three things follow. The limit comes with a certificate of infeasibility rather than a by-eye slope comparison. The optimizer's dual variables show which energy bins and which physical assumption force the infeasibility. And a single tolerance knob, which trades how tight the limit is against how often it wrongly excludes the true distance, can be tuned with care borrowed from certified machine-learning robustness.

In two sentences: we write the redshift upper limit as the point where a convex program over intrinsic spectra, fitted directly to detector counts, stops having a solution, and we calibrate the threshold by simulation so the limit has known coverage. We then choose the program's one tolerance parameter to give the tightest limits that keep that coverage under realistic departures from a simple power law. The tolerance is chosen per source, using only statistics that do not depend on the hypothesized redshift.

Core Claim

The existing method is a grid over redshift. At each value, the very-high-energy (VHE, above 100 GeV) flux points are corrected by $e^{\tau(E,z)}$, a power law is fitted, and its index is compared with the index measured by the Fermi Large Area Telescope at lower, unabsorbed energies. This procedure produced $z<0.68$ for 3C 66A in Observations of the Blazar 3C 66A with the Magic Telescopes in Stereoscopic Mode and a 2σ limit of $z<0.81$ for PKS 1424+240 in MAGIC long-term study of the distant TeV blazar PKS 1424+240. Those papers motivate this work: they show the method is scientifically central. They also show its weak points. The flux points come from regularized unfolding, a smoothing step that inverts the detector's energy blurring and can reshape the spectrum near threshold. The comparison assumes a power-law intrinsic shape. EBL-model choice shifts the answer (EBL is the extragalactic background light, the intergalactic starlight that absorbs the gamma rays). The resulting limits have no stated frequentist coverage under any of these departures.

We claim that a shape-constrained likelihood test, run directly on detector counts and calibrated by simulation, gives redshift upper limits whose coverage holds at the nominal level when the intrinsic spectrum curves. We claim it does so with median tightness comparable to the power-law grid in cases where the power law is correct. Its dual variables also separate the three causes that the PKS 1424+240 study could not disentangle: an over-large redshift, an unsuitable EBL template, or an emission model that is too simple, the last showing up there as the demand for Doppler factors of roughly 70 to 130.

The Convex Program

Let $f_k \ge 0$ be the observed (absorbed) flux in true-energy bin $k$ with central energy $E_k$. Let $R$ be the detector response matrix mapping true flux to expected counts $\mu = Rf$ in reconstructed-energy bins, with observed counts $n$. Let $\Gamma$ be the Fermi photon index. The physical requirement that the de-absorbed spectrum is no harder than the Fermi spectrum means that $f_k\,e^{\tau(E_k,z)}E_k^{\Gamma}$ cannot increase with $k$. We relax this with a tolerance $\eta \ge 0$ that allows the intrinsic index to harden by at most $\eta$. The statistic is

$$\Lambda_\eta(z) = \min_{f\ge 0}\Big\{\textstyle\sum_j (\mu_j - n_j\log\mu_j) \;:\; f_{k}e^{\tau_k(z)}E_k^{\Gamma-\eta} \le f_{k-1}e^{\tau_{k-1}(z)}E_{k-1}^{\Gamma-\eta}\ \forall k\Big\} \;-\; \min_{f\ge 0}\textstyle\sum_j(\mu_j - n_j\log\mu_j),$$

where both minimizations use $\mu = Rf$ and $\tau_k(z)=\tau(E_k,z)$. The Poisson negative log-likelihood is convex in $f$ because $\mu$ is linear in $f$. The shape constraints are linear in $f$ for fixed $z$, $\Gamma$, $\eta$. So $\Lambda_\eta(z)$ is a convex program solved exactly at each $z$, with no unfolding step anywhere. The upper limit is $z_{\rm UL} = \sup\{z : \Lambda_\eta(z) \le c_\alpha\}$.

The threshold $c_\alpha$ cannot be taken from a chi-square table, because inequality constraints make the null distribution a mixture of chi-squares with unknown weights. We therefore calibrate $c_\alpha$ by simulating counts at the boundary redshift. Uncertainty in $\Gamma$ is handled by evaluating at the hard edge of its confidence interval, which makes the limit conservative. EBL-model dependence is handled by reporting the maximum $z_{\rm UL}$ across the Franceschini, Domínguez and Saldaña-López templates named in the 3C 66A study.

Where the Three Directions Enter

The control literature supplies the treatment of infeasibility. Optimal-decay control barrier functions add a single penalized scalar that measures how far a safety constraint must be relaxed to restore feasibility. Our $\Lambda_\eta(z)$ plays the same role: it is the likelihood price of forcing feasibility, and it grows smoothly instead of failing as a binary test. Resilient Control: Compromising to Adapt shows that dual variables identify which constraints are hardest to satisfy. We reuse that reading to attribute infeasibility to specific energy bins, to the Fermi-index constraint, or to the EBL template, by comparing duals across templates. Pointwise feasibility under Gaussian-process uncertainty supplies the cautionary lesson: widening uncertainty margins can empty the feasible set. Here that means an over-generous treatment of $\Gamma$ errors combined with too small an $\eta$ can make every $z$ infeasible. We report that event as a diagnostic rather than as a limit.

The certified-robustness literature supplies the tuning logic for $\eta$. In randomized smoothing, a classifier is made provably robust by averaging its predictions over Gaussian noise of scale $\sigma$. Cohen et al. show that a single global $\sigma$ forces a trade between clean accuracy and certified radius. Our $\eta$ is the analogue. A small $\eta$ gives tight limits that lose coverage when the true spectrum hardens slightly, for example through Klein-Nishina effects or a second emission zone. A large $\eta$ restores coverage but loosens the limit.

Dual Randomized Smoothing shows that choosing $\sigma$ per input keeps the guarantee only if the choice is locally constant, that is, it does not move under the perturbations being certified against. We transfer this condition. $\eta$ may depend on exposure, background level and Fermi-index precision. It may not depend on anything that varies with the hypothesized $z$ or with the VHE spectral shape being tested, since that would reuse the test data and void coverage. We differ from Dual RS in two ways: we select the parameter by constrained optimization (tightest limit subject to coverage) rather than by regression on targets, and the guarantee is frequentist coverage of a physical parameter rather than a classifier's radius.

Research Program

We first build a simulator. Intrinsic spectra are drawn from a library containing power laws, log-parabolas, power laws with exponential cutoffs, and two-component spectra with mild high-energy hardening. Each is absorbed by an EBL template at a known $z$ and folded through a Gaussian energy-dispersion response with effective area and background chosen to reproduce the published significances and exposures of the MAGIC campaigns. The file gives no public instrument-response files, so this response is a stated modelling choice, not a calibrated MAGIC response.

On this simulator we calibrate $c_\alpha$. We then solve for the tolerance policy: within each bin of z-independent observing conditions, choose the smallest $\eta$ whose coverage stays at or above $1-\alpha$ across the shape library. Finally, we run the program on the published campaigns. Raw MAGIC event lists are not generally public, so the real-data tests use published flux points with their covariance, approximating the forward fold with a diagonal response. We flag this as a weaker test than the simulations.

Baselines

The naive reference is the published practice itself. At each grid redshift, a power law is fitted to the de-absorbed, unfolded flux points, and $z$ is declared excluded once the intrinsic index is harder than the Fermi index beyond its quoted uncertainty, as done for 3C 66A and PKS 1424+240. It is run on exactly the same simulated counts, unfolded with a standard Tikhonov-type regularizer, which penalizes rough spectra, at the strength chosen by the usual criterion. No coverage or false-exclusion rate is reported for it; we found no reported result on Lacuna for the coverage of gamma-ray redshift upper limits. The only reference values are the published limits themselves: $z<0.81$ (2σ) for PKS 1424+240, $z<0.68$ for 3C 66A, and for 1ES 0647+250 a reconstructed $z=0.45\pm0.05$ with a 95% limit $z<0.81$ against a host-galaxy $z=0.41$ in the decade-long 1ES 0647+250 study.

The strongest existing competitor is the combined HE/VHE fit that yields point estimates with intervals, such as $z = 0.34 \pm 0.08_{\rm stat} \pm 0.05_{\rm syst}$ for 1ES 0033+595 and $z=0.34\pm0.15$ for H1722+119. We implement it at its strongest. Rather than fitting unfolded points, we fit a log-parabola intrinsic model with free curvature and free $z$ directly to forward-folded counts, and take a profile-likelihood interval. It receives the same simulated data, the same EBL templates, and the same compute budget for threshold calibration, so it is also simulation-calibrated rather than relying on Wilks' asymptotic chi-square theorem.

Beating it means two things. On the misspecified part of the library, empirical coverage must be at or above $1-\alpha$ where the competitor's falls below it. On the power-law part, median $z_{\rm UL}-z_{\rm true}$ must not be worse by more than the Monte Carlo error of the comparison.

Three ablations isolate the ingredients. Running the unfolded-points baseline across a sweep of regularization strengths measures how much of any coverage failure comes from unfolding rather than from the power-law assumption. Fixing $\eta=0$ isolates the tolerance. Replacing the per-condition $\eta$ policy with the single best global $\eta$ isolates adaptivity, mirroring the global-versus-input-dependent comparison in Dual RS.

Why not just…?

Why not just keep the power-law grid search? For bright, power-law sources it may already be adequate, and if our simulations show its coverage holds across the shape library, that is a useful negative result. The concern is specific. Under-regularized unfolding can produce a noise spike that looks like hardening and excludes the true $z$. Over-regularization smooths away the EBL cutoff. The regularization sweep ablation measures both failure modes directly, and the grid search is only displaced if it shows a coverage deficit.

Why not just fit a forward-folded parametric model with free curvature? This is the real threat. It removes unfolding just as we do, and if the true spectra lie within the log-parabola family it should be as good or better. Our method differs only in being nonparametric within the physical shape constraint. The experiment settles it on library members outside that family, such as two-component and cutoff spectra. If the parametric fit holds coverage there too, our remaining contribution is the dual-variable attribution and the infeasibility certificate, and we will say so.

Why not just inflate the Fermi index error, or add a generic slack penalty? Inflating the error is exactly a global $\eta$, which is one of our ablations. Generic penalty slacks in control produce either cliff-edge failures or over-conservatism, as Resilient Control argues. The analogous risk here is limits that are uniformly loose for well-measured sources. The adaptive-versus-global comparison measures whether per-condition tuning buys tightness at fixed coverage.

Decisive Checks

The method fails if its simulation-calibrated coverage falls below $1-\alpha$ on any library family. It also fails if, on real sources, it excludes the host-galaxy $z=0.41$ for 1ES 0647+250, or returns a limit below the spectroscopic lower bound $z\ge0.6035$ for PKS 1424+240 reported in the MAGIC study. The attribution claim is tested by injecting a known misspecification, either a wrong EBL template or an added hard component, into simulations. We then check whether the dual variables point to the injected cause more often than chance across repeated draws. Finally, if the method proves useful, the most important number for the field is a stated coverage for the limits it produces, which no study in this file reports.