Many of the most interesting very-high-energy gamma-ray sources hide their own emission. Examples include quasar flares, microquasars orbiting bright stars, and young supernovae. Around each of them, dense clouds of optical and ultraviolet light destroy the most energetic gamma rays: when a gamma ray collides with a lower-energy photon, the pair turns into an electron and a positron. This is photon-photon absorption. It leaves a spectrum that falls off steeply exactly in the 50 to 200 GeV band, which is also where ground-based Cherenkov telescopes start to see anything at all. These telescopes image the faint flash of light produced when a particle hits the atmosphere, and cosmic-ray showers (the background) outnumber gamma-ray showers (the signal) by a factor of $10^3$ to $10^4$. The classifiers that separate the two are tuned on simulated gamma rays with smooth, unabsorbed power-law spectra. For an absorbed source, nearly every surviving photon lands in the lowest-energy, smallest-image regime. That is the regime the classifier was least optimized for, and it is also where its many correlated input features mostly carry noise.
We propose to select the classifier's input features and decision threshold by directly optimizing expected sensitivity under an absorbed-spectrum hypothesis, rather than by overall accuracy on a generic spectrum. The underlying claim is borrowed from anomaly detection. There, the feature directions that separate rare signals from background are often low-variance ones that a variance-driven or generically trained model underweights (Gula and Bertoldo). We expect the same near the Cherenkov threshold. To test this cleanly, we build absorbed "sources" out of real Crab Nebula gamma rays by thinning them in energy with a known attenuation law. This lets us measure whether any analysis choice actually recovers more signal, without relying only on simulations.
Core Claim
For a source whose spectrum is multiplied by $e^{-\tau(E)}$, with $\tau(E)$ the energy-dependent optical depth, the analysis that minimizes the flux upper limit uses a smaller and different feature subset than the analysis that maximizes overall area under the ROC curve. It also uses a different decision threshold. The operational objective is an absorption-weighted quality factor:
$$Q_\tau(S,c)=\frac{\int \epsilon_\gamma(E;S,c)\,\Phi_0(E)\,e^{-\tau(E)}\,dE\;\big/\;\int \Phi_0(E)\,e^{-\tau(E)}\,dE}{\sqrt{\epsilon_h(S,c)}}$$
Here $S$ is the selected feature subset and $c$ the cut on the classifier's output score. $\epsilon_\gamma(E;S,c)$ is the gamma-ray acceptance at true energy $E$, $\Phi_0(E)$ is the intrinsic power law, and $\epsilon_h$ is the fraction of background showers accepted. This is the usual quality factor with the signal efficiency averaged over the absorbed spectrum, and expected background-limited upper limits scale roughly as $1/Q_\tau$. The claim would be false if a classifier that is simply retrained on reweighted simulations, using all features, reaches the same $Q_\tau$. We treat that as the main threat, not as a straw man.
Relation to Prior Work
The motivation comes from MAGIC analyses of absorbed sources. Anderhub et al. found that the 3C 454.3 flares require a cutoff near 20 to 30 GeV. Aleksić et al. set upper limits on Cygnus X-3 from 70 hours of data. Abe et al. note that absorption by the supernova photosphere weakens their SN 2024bch constraints. All three ran a fixed background-rejection step and then fit absorption models after the fact. None asked whether the rejection step itself was well matched to the absorbed spectrum.
The method we start from is the Random Forest analysis of Albert et al.. It combines correlated image-shape parameters (length, width, size, concentration) into a "hadronness" score and reports 26% energy resolution at 100 GeV. It handles correlations better than one-dimensional cuts but never selects among its inputs.
The CNN-GNN study supplies a stronger learned competitor and a telling observation. It combines image convolutional networks with graph networks over the telescope array. Its permutation importance analysis shows that a handful of inputs dominate performance, but that work does not prune and tests only at one zenith angle.
The selection method comes from Gula and Bertoldo. Their greedy forward and backward component selection, scored on the target metric, reached 100% AUROC with fewer than ten components on some MVTec-AD categories while PCA failed. We keep their greedy search and replace AUROC with $Q_\tau$. That substitution also removes the limitation of their method that matters most here, its need for labeled anomalies: we have labeled simulated gamma rays and real background data.
Two other redundancy tools constrain our design choices. Zou and Adams use a determinantal point process, a prior that makes chosen elements repel one another when they are similar. It is cheap at our scale of a few dozen features, so we use it as an alternative way to pick diverse subsets. Zheng et al. compress features through an information bottleneck, but it assumes Gaussian latent variables. Shower-parameter distributions near threshold are skewed, so we include the bottleneck only as a secondary comparison.
Research Program
We first define a family of absorption hypotheses. It covers exponential cutoffs of the form $e^{-(E/E_c)^k}$ with $E_c$ from 20 to 300 GeV. It also includes optical depths computed from blackbody target fields standing in for a companion star or a supernova photosphere, along with a broad-line-region-like field.
For each hypothesis, we reweight simulated gamma rays by the absorbed spectrum. We then run greedy feature selection, in both forward and backward directions, over two feature pools. The first pool is the image-shape parameters and their energy- and zenith-normalized variants. The second is the intermediate channels of a CNN-GNN model. At each step we retrain the classifier and jointly choose the cut that maximizes $Q_\tau$.
The analysis then asks two questions. First, how do the selected subsets change with $E_c$? Our prediction is that as the cutoff moves down, the subsets shrink toward a few width- and concentration-type features that remain informative for small images. Second, is the benefit robust once we move from simulation to real data? A smaller feature set should be less exposed to features that the simulation models poorly, such as those affected by night-sky light fluctuations.
Baselines
The naive reference point is the standard analysis. A Random Forest, as in Albert et al., is trained on all image-shape parameters with a generic power-law gamma spectrum, and the hadronness cut is optimized per energy bin, as MAGIC analyses do. Every other method must beat this to be worth adopting.
The strongest competitor on this specific question is the same full-feature Random Forest retrained on simulations reweighted to each absorbed hypothesis, with its cut tuned on $Q_\tau$. It fixes the spectrum mismatch without any feature selection, so it isolates whether selection adds anything. It gets the same training events, the same hyperparameter search budget, and the same validation split as our method.
The strongest learned competitor is the Strong CNN-GNN from the CNN-GNN study. It is retrained under the same reweighting. On their simulated H.E.S.S. data, that paper reports only that the model had higher AUC than the Fast CNN-GNN and the Hillas GNN baseline, plus an additional 9% reduction in false positive rate at threshold 0.5 relative to the Fast CNN-GNN. No absolute AUC appears in the file, and we found no reported result on Lacuna for gamma/hadron performance under absorbed spectra.
For scale on quality factors, the only reported value in the file is $Q = 11.3$ at about 10 TeV for the SWGO lateral-distribution variable of Nellen et al.. That comes from a different instrument and energy range, so it is context and not a target.
Two ablations isolate our key ingredient. One runs greedy selection scored on unweighted AUC, which shows whether the absorption weighting in the objective matters. The other replaces greedy selection with PCA and with determinantal-point-process subset selection at matched subset sizes, which shows whether scoring on the target metric beats variance-based or diversity-based compression.
Beating the reweighted full-feature Random Forest means a gain in $Q_\tau$, with bootstrap confidence intervals, for cutoffs below about 100 GeV. It also requires no loss at high cutoffs, where the absorbed spectrum approaches the generic one.
Why not just…?
Why not just reweight the simulations and retrain on all features? This may be enough. Random Forests are fairly tolerant of redundant inputs, and Albert et al. report stability even with 1% signal contamination in the training background. That is why this is our primary baseline and not a footnote. Selection has two possible advantages: less variance when few simulated events survive near threshold, and less exposure to mismodeled features on real data. Both are measurable in the Crab-injection test below. If reweighting alone matches our method there, we will report that as the result: reweighting is necessary and selection is not.
Why not just optimize hadronness cuts per energy bin, as is standard? Cuts chosen per bin do adapt to energy. But the classifier underneath them was trained on the generic spectrum, so its trees spent their splits separating large, easy images. Also, a 26% energy resolution at 100 GeV means that bins near threshold mix true energies across the steep absorption turnover. The unweighted-AUC ablation, combined with per-bin cuts, measures how much of the gap this standard practice already closes.
Why not just use the end-to-end CNN-GNN and let it learn what matters? It may extract more information from small images. However, its own authors show that importance concentrates in a few inputs, and they never test beyond simulation at fixed zenith. Our method applies selection to that model's own channels. So the comparison is not a choice between handcrafted features and deep learning; it asks whether pruning helps either one under an absorbed spectrum.
Proposed Experiments
The first experiment uses simulations: the simulated H.E.S.S. dataset described in the CNN-GNN study, with 150,000 events split evenly between gammas and protons at 20° zenith. We compute $Q_\tau$ curves against the cutoff energy $E_c$ for every method above, along with the selected feature subsets and expected 95% upper limits on the flux normalization. MAGIC-style simulations and background data from Albert et al. serve as a second instrument if collaboration access allows. Their public availability is not established in our file.
The decisive check uses real data. We take gamma-ray events from Crab Nebula observations, estimated statistically as on-source minus off-source counts. We thin them in reconstructed energy with probability $e^{-\tau(E)}$ and inject them at controlled rates into real off-source background. Each trained analysis must then recover the injected signal. The key comparison is the size of the drop from simulated $Q_\tau$ to injected-real $Q_\tau$: selected subsets should lose less than full feature sets. Because the thinning uses reconstructed energy rather than true energy, we will propagate the known energy resolution as a systematic uncertainty.
A final consistency test reanalyzes the published 3C 454.3 and Cygnus X-3 datasets under their fitted absorption hypotheses. The test passes if the tightened upper limits stay consistent with the published values (Anderhub et al., Aleksić et al.), including the $0.78\times10^{-11}$ erg cm$^{-2}$ s$^{-1}$ limit at about 83 GeV. If they instead show a systematic shift, that would indicate a background leak.
References
- Gaussian Image Anomaly Detection with Greedy Eigencomponent Selection
- MAGIC upper limits to the VHE gamma-ray flux of 3C 454.3 in high emission state
- MAGIC CONSTRAINTS ON γ-RAY EMISSION FROM CYGNUS X-3
- Constraining the TeV gamma-ray emission of SN 2024bch, a possible type IIn-L from a red supergiant progenitor
- Implementation of the Random Forest method for the Imaging Atmospheric Cherenkov Telescope MAGIC
- Convolution and Graph-based Deep Learning Approaches for Gamma/Hadron Separation in Imaging Atmospheric Cherenkov Telescopes
- Priors for Diversity in Generative Latent Variable Models
- Label Information Bottleneck for Label Enhancement
- $S_b$ for gamma/hadron separation in SWGO