1 Introduction

Distant active galaxies, blazars, are among the strongest sources in the very-high-energy (VHE; above \(\sim 100\) GeV) gamma-ray band. They were detected even with the first modest instruments, despite the predicted [1, 2] attenuation of the flux: energetic gamma rays from distant sources interact with soft photons constituting the extragalactic background light (EBL) and produce \(e^{+}e^{-}\) pairs. Though direct observations of EBL suffer from uncertainties, lower limits on the EBL are firm [3, 4] and allow one to take the absorption into account. Gamma-ray spectra of some distant blazars, deabsorbed with these models, were found to be too hard compared to those of similar nearby objects. This problem was called “the infrared/TeV crisis” [5] in 2000. Several solutions have been proposed, see below, though there is still no generally accepted solution to the issue. Modern imaging atmospheric Cherenkov telescopes (IACTs) enlarged the amount of blazars detected in VHE to several dozens, opening the way to analyzing statistical samples. The anomalous behavior of a VHE blazar has been identified [6, 7] as hardening, that is an upward change of the spectral slope, in the spectrum deabsorbed with the ultimate lower-limit EBL. For blazars located at different distances from the observer D, the absorption on EBL becomes important at different energies \(E_{0}(D)\), and the hardenings are observed precisely at these energies \(E_{0}\), indicating an incorrect account of the absorption. This was termed “anomalous transparency of the Universe”. However, most recent studies, based on larger samples of blazars and better measured distances to them, indicate that the overall significance of the anomalous transparency seen in VHE blazars is modest [8,9,10].Footnote 1 Spectra of many newly discovered blazars are consistent with the pair-production attenuation for low-EBL models, but several bright objects observed previously continue to demonstrate the anomaly. In addition, new sources with anomalous hardenings have been found, see Ref. [8] for the list and references.

On the same timescale of decades, another puzzling effect has been observed and widely discussed, the directional correlation of some of ultra-high-energy (UHE; above \(\sim 10^{18}\) eV) cosmic-ray air showers with BL Lac type objects, a subclass of blazars. The correlation was found [15, 16] for the published set of cosmic-ray events with the primary energy \(E>10^{19}\) eV detected by the High Resolution Fly’s Eye (HiRes) fluorescence air-shower detector in the stereoscopic mode [17]. Given the deflection of charged cosmic-ray particles in astrophysical magnetic fields, the observed directional coincidence implies neutral primaries. However, assuming standard physics, no neutral particle with that high energy can reach us from the distances at which BL Lacs are located [18] (except for neutrinos; see e.g. Ref. [19] for the discussion of a possible BL Lac – UHE cosmic rays – neutrino connection). Subsequently, the HiRes collaboration has confirmed [20] the observation and has extended it to lower energies, \(E > rsim 10^{18}\) eV (see also Ref. [21] for an independent analysis of the same \(E>10^{19}\) eV data by a different method, confirming the effect with a stronger estimated significance). The angular resolution of the HiRes experiment in the stereo mode, \(0.6^{\circ }\), remains unsurpassed, and the correlation has not been tested with data of modern fluorescence air-shower detectors yet.

Theoretical approaches to the explanation of the anomalous transparency exploit either the suppression of the pair production or the assumption that the observed photons do not come from the source but are born much closer to the observer. The first option is possible only in models with the Lorentz-invariance violation, see Ref. [22] for a recent review. However, for the required parameters, the Lorentz-invariance violation would suppress also the development of air showers in the atmosphere and therefore make the VHE photons invisible for Cherenkov telescopes [23, 24], contrary to observations (see however Ref. [25] for a model overcoming the limit). The second option may be realized in two approaches, “cascade” and “conservation”. Cascades can develop in the cosmic background fields and radiation, starting either from a VHE photon [26] or from an accompanying UHE proton emitted by the same source [27] (see also Refs. [28,29,30,31,32,33]); what we detect at the Earth may be secondary particles produced nearby. Conservation means that the photon converts near the source to some particle, which does not produce pairs on EBL, then this particle travels unattenuated and reconverts back to a photon close to us. A viable mechanism involves oscillations [34] of photons to hypothetical axion-like particles (ALPs) in external magnetic fields [35,36,37,38]. Amazingly, the very same ALP-based mechanism can [39] explain in a consistent way the correlations of UHE showers with BL Lacs, which otherwise remain misterious.

The ALP-photon mixing requires magnetic fields, while the cascades get distorted by the fields so that secondary charged particles, and hence photons born in their interactions, no longer point to the original source of the high-energy emission. Therefore, the two scenarios predict opposite patterns of anisotropy in the distribution of the effect strength over the sky: in the cascade case, anomalies are expected to follow low-field regions, while in the ALP case, regions of higher field are favoured. It has been pointed out that the VHE anomalies may be explained by the ALP-gamma conversion in the Galactic magnetic field and the corresponding anisotropy might be related to the Galactic plane [36]. For UHE photons, the conversion in the Galaxy is suppressed, but local extragalactic structures, small-scale filaments, provide for the required conditions; conversion of VHE photons in the filament field is also possible for certain ALP parameters [39].

Several attempts to find deviations from isotropy in the anomalous transparency have been made. Ref. [40], based on the Fermi-LAT data, studied the correlation between VHE candidate sources and the line-of-sight “voidedness” parameter, reporting a weak indication that sources with hard spectra are seen through voids in the large-scale structure. Their analysis did not select the sources with anomalous spectra and probed the matter distribution in the distant Universe at \(z>0.05\), complementary to the Local supercluster we study here.

In Ref. [36], the distribution in the sky of a few distant VHE blazars, known at that time, was compared to the maps of the photon-ALP conversion probability calculated with three models of the Galactic magnetic field. Visually, a possible correlation with the high-probability regions was pointed out for one [41] of the field models. Subsequently, in Ref. [14], a similar study has been repeated with the same field model and an enlarged sample of VHE blazars, qualitatively confirming the trend. However, the model [41] of the field is outdated and the test is not perfect because it does not distinguish truly anomalous objects. More recent magnetic-field models predict [42, 43] different patterns of the conversion probability in the Milky Way, so the anisotropy seen in Refs. [14, 36], if real, is not related to the Galaxy. In Ref. [39], it has been demonstrated that the cosmic rays correlating to BL Lac type objects do not follow the HiRes exposure, but no particular pattern was tested.

In the present work, we revisit the question of anisotropy in the anomalous transparency for both VHE and UHE cases and concentrate on the pattern associated with the local filament.

2 Analysis and results

2.1 Method

We use the weighted density of galaxies along the line of sight as a tracer of the local large-scale structure. The method was used extensively in the studies of cosmic-ray anisotropies at UHE, see e.g. Refs. [44,45,46]. The starting point is a flux-limited catalog of galaxies for which we use the 2MASS Redshift Survey (2MRS), Refs. [47, 48]. Weights [49, 50] are chosen in such a way that the incompleteness of the catalog is compensated.

The 2MRS catalog traces the large-scale structure up to distances of 250 Mpc. Photons of different energies have different mean free paths with respect to the pair production, varying from a few Mpc for \(10^{19}\) eV UHE gamma rays to a few Gpc for the most distant VHE sources observed at \(\sim 100\) GeV. In the frameworks of the ALP scenario, nearby regions with magnetic field serve as secondary sources for reconverted photons. The flux from these secondary sources should be therefore suppressed by the inverse distance squared, so we introduce the \(1/D_{L}^{2}\) weight, where \(D_{L}\) is the luminosity distance to a particular galaxy. This means that nearby galaxies contribute more, so the weighted density is higher for the directions parallel to the local filament in which the Milky Way galaxy resides, a \(\sim \)Mpc thick sausage extending from the Virgo cluster to the Fornax cluster, see e.g. Ref. [51].

The weighted density f(lb) is determined as a function of the direction in the sky given by the Galactic coordinates (lb) as described in Appendix A; larger values of f therefore trace the local large-scale structure. We stress that the local filament extends to \(\sim 20\) Mpc from us while nearest blazars are \(\sim 150\) Mpc away, hence their distribution is completely independent of the local structure traced by f. Following Ref. [44], we calculate two sets of values, \({\mathcal {S}}=\{f(l_{i},b_{i})\}_\mathrm{S}\) for the set S of directions which are associated with the anomalous transparency effects, and \({\mathcal {B}}=\{f(l_{i},b_{i})\}_\mathrm{B}\) for the control sample B of directions in the sky. The two sets of numbers, \({\mathcal {S}}\) and \({\mathcal {B}}\), are then compared by means of the Kolmogorov-Smirnov test which gives the probability that they are derived from one and the same distribution.

This method requires to fix the angular smoothing scale when the function f(lb) is calculated, see Appendix A. While in cosmic-ray studies the scale was determined by expected deflections of charged particles in cosmic magnetic fields, here we do not have such a guidance. While we are interested in the interpretation involving the filament’s magnetic fields, they are poorly measured and we do not know to which extent the number density of galaxies traces the field. Hence we choose to treat the smoothing as a free parameter of the model, see Appendix A, and account for this freedom in a standard statistical approach [52] described in Appendix C.

2.2 Results for TeV hardenings

For the VHE blazars, we start with the data sets of Ref. [8]. There, a sample of blazars with known redshifts z was constructed starting from the TeVCat catalog [53] for the sources observed by Imaging Atmospheric Cherenkov Telescopes (IACTs; 66 sources) and from the 3FHL catalog [54] for those observed with Fermi LAT (307 sources at \(z>0.2\)).Footnote 2 Only 26 and 5 of them, respectively, were detected at considerable opacities, and 8 and 2 have hardenings (upward spectral breaks at the energy \(E_{0}(D)\) inconsistent with zero at 68% CL) in the spectra deabsorbed with the most recent EBL model [55]. These latter 10 objects, see Table 1 in Appendix B, are considered here as the signal sample \(S_{V}\) of objects demonstrating anomalies, while the control sample \({B}_{V}\) is constructed of 1000 randomly selected sets of 8 of 66 IACT and 2 of 307 Fermi-LAT sources. The distribution of objects from the VHE samples in the sky are shown in Fig. 1. The pre-trial Kolmogorov–Smirnov probability that the control and signal samples are derived from one and the same distribution is 0.013 and corresponds to the disk smoothing of \(4^\circ \) (see Appendix A for details and Fig. 6 in Appendix C for the dependence of the local p-value on the smoothing). The post-trial probability is 0.028.

Fig. 1
figure 1

Objects with anomalous hardenings in VHE (red circles) together with other objects from the TeVCat (black dots) and 3FHL (gray dots) samples in the celestial sphere (supergalactic coordinates)

2.3 Results for EeV correlations

We now turn to the UHE case. Here, we start with Ref. [15, 16] where a certain number of HiRes air showers with reconstructed primary energies above \(10^{19}\) eV were found to correlate with BL Lac type objects. Of 156 sources selected in previous studies, 11 were found to be within \(0.8^{\circ }\) from the shower arrival directions, while only 3 were expected assuming isotropy. This angle was determined from the angular resolution of the experiment, \(0.6^{\circ }\), by a Monte-Carlo simulation as maximizing the signal-to-noize ratio, assuming neutral primary particles from BL Lac’s. We consider these 11 directions as the signal sample \({S}_{U}\), see Table 2 from Appendix B, for the list. The control sample \({B}_{U}\) is given by arrival directions of all 271 HiRes air showers in the sample [17], see Fig. 2. The pre-trial Kolmogorov–Smirnov p value for these two samples is \(5.2 \times 10^{-4}\), achieved for the Gaussian smoothing at the \(2^{\circ }\) scale. The post-trial probability is \(1.1 \times 10^{-3}\).

Fig. 2
figure 2

Arrival directions of HiRes stereo UHE air showers correlated with BL Lac type objects (blue diamonds) together with directions of other showers in the sample (gray dots) in the celestial sphere (supergalactic coordinates)

Fig. 3
figure 3

Objects with anomalous hardenings in VHE (red circles), HiRes stereo UHE air showers correlated with BL Lac type objects (blue diamonds) and gamma-ray bursts detected in VHE (black triangles) together with the weighted galaxy distribution (density plot) in the celestial sphere (supergalactic coordinates)

Figure 3 shows the distribution of anomalous directions in the sky superimposed on the density plot of the projected weighted galaxy distribution. In both VHE and UHE cases, the signal sample follows the regions of higher weighted densities. We address the difference in statistical significance between the two samples below. The two results represent independent tests of the anomalous transparency at different energies. We compare now combined signal and background samples, so that the signal distribution \({S}_{V+U}\) consists of directions of all 21 anomalous sources while the control sample \({B}_{V+U}\) is obtained by taking 1000 random subsamples, each consisting of 8 of 66 TeVCat blazars, 2 of 307 3FHL blazars and 11 of 271 HiRes arrival directions. This results in the pre-trial \(p_{1}=5.2 \times 10^{-5}\), again achieved for the Gaussian smoothing at the \(2^{\circ }\) scale. The post-trial probability is \(p=7.5 \times 10^{-5}\). Were the statistics Gaussian, this would correspond to the significance of 4.0 standard deviations (post trial).

3 Discussion and conclusions

We see that, for both samples, the sources whose observation gave the base for claims of the anomalous transparency are seen along the local filament, through the regions of higher matter density, and probably higher magnetic fields. We tested explicitly that our results do not depend on the maximal distance cut in the catalog, so they are indeed dominated by the Local supercluster. Including only galaxies within the spheres of 20, 30, 50, 75, 100, 150 and 250 Mpc and repeating the statistical procedure, we obtained roughly the same statistical significance. While the resulting pre-trial p-value develops a shallow minimum around 30 Mpc, this gain in significance is almost precisely compensated by the extra distance-cut trial correction.

Fig. 4
figure 4

A sketch (not to scale) of the explanation of the observed anisotropy involving ALP-photon mixing in filaments. The Milky Way (MW) is in the local filament connecting the Virgo (V) and Fornax (F) clusters. Blazars also sit in their local filaments. For sources with the line of sight transversal to their filaments (TT and TL), the photons have no time to convert to ALPs close to the source. If the line of sight goes along the blazar filament (LT and LL), a part of the high-energy photons convert to ALPs there, but only for those coming along our filament, LL, they have enough time to reconvert back to photons close to the Milky Way

This correlation with the local matter distribution fits the predictions of the model of ALP-photon mixing [39]: a part of emitted photons convert to ALPs in the magnetic field of the filament containing the source and reconvert back to photons in the filament containing the observer. The maximal-mixing conditions [39] depend on the ALP mass m, the ALP-photon coupling g, the photon energy E, the magnetic field B and the size of the field-filled region L. The observed anisotropy suggests that the conversion happens in the directions along the filament and not in the transverse direction, as it is graphically shown in Fig. 4, which illustrates the interpretation of our main result in terms of the photon-axion mixing,Footnote 3 so 0.5 Mpc\(\lesssim L \lesssim \)20 Mpc. The magnetic field in filaments [56] is poorly known. Computer simulations [57] indicate that \(B\sim 10^{-8}\) G in cluster outskirts. It is quite nontrivial to satisfy the maximal-mixing conditions for very different energies, \(E\sim 10^{12}\) eV (VHE) and \(E\sim 10^{19}\) eV (UHE), simultaneously, especially given that the ALP-photon mixing is suppressed by quantum-electrodynamics effects for large values of the product EB, see Ref. [39] for details. Remarkably, these conditions are indeed satisfied, for both energy bands, in the local filament for \(g\sim \text{(a } \text{ few) } \times 10^{-11}\) GeV\(^{-1}\) and \(m\sim \text{(a } \text{ few) } \times 10^{-9}\) eV. It is hardly possible to estimate ALP parameters more precisely before a firm magnetic-field model is constructed. This parameter range is allowed (see e.g. Ref. [38]) by present experimental and astrophysical limits.Footnote 4 It narrows the range previously invoked for the explanation of the anomalous transparency of the Universe, see e.g. Ref [14]. At the same time, it is within the reach of experiments of the near future, including solar axion telescopes TASTE [59] and IAXO [60], as well as the laboratory experiment ALPS-IIc [61].

Because of small fields of view of IACTs, no survey of a significant part of the sky is available at TeV energies. Of the three lists we used for construction of control samples, the 3FHL catalog and the list of HiRes stereo events represent complete samples (that is, follow a known sky coverage). However, the TeVCat sample is constructed on the base of individual observations while non-detections are normally not published and the sky coverage cannot be quantitatively determined. Hence, it is not complete in this sense and may be biased. For the present analysis, however, this possible bias is conservative. Indeed, the anomalous blazars are defined in our VHE sample as those whose deabsorbed spectra harden right at the energy where the deabsorption correction becomes essential. We assume that the true intrinsic spectra of blazars are either power-law or concave since no physical reason for convexity at these energies is known. Suppose now that there is a region in the sky in which direction the Universe is anomalously transparent at high energies, that is the standard deabsorption results in too high fluxes at high energies (hardenings). Then those spectra which are power-law would be reconstructed with upward breaks; they join our signal sample \(S_{V}\). Intrinsically concave spectra would not exhibit hardening after deabsorption, but these objects would look brighter than physically similar sources observed in other directions in the sky. These stronger high-energy fluxes would make them more probable to enter the sample which consists of detected objects only. Interestingly, this is right what we observe: in Fig. 1, objects from the TeVCat sample without anomalies, represented by black dots, also have a tendency to concentrate towards directions with larger values of f(lb). In this context it is interesting to note that all three gamma-ray bursts detected at VHE and listed in TeVCat are also seen in the direction of the local filament, see Fig. 3 (we did not study whether they exhibit any kind of anomalies in their spectra). While the tendency is much weaker for the objects without hardenings than the effect we find for \(S_{V}\), it explains the conservative character of the TeVCat selection bias: the control sample contains many “signal” objects. We believe that this is the reason for the p value for \(S_{V}\) to be considerably larger than that for \(S_{U}\).

Future tests of the observed effect at VHE are expected to overcome this conservative bias. This may be cured when a more complete sample of VHE blazars, including non-detections, will be available, for instance, from the Cherenkov Telescope Array [62]. Another option is to develop a more sensitive method for the Fermi-LAT data. This instrument has a small effective area, as compared to IACTs, and presently only five blazars are significantly detected by LAT at the energies where the absorption is important [8]. Other statistical methods than used here should be applied in order to benefit from the Fermi-LAT full sky coverage. In future, the sensitivity in the Fermi-LAT band might be improved with low-threshold high-altitude IACTs [63], e.g. ALEGRO [64].

Similarly to the VHE case, the list of BL Lacs used in Refs. [17, 20] is not complete: they were selected from serendipituous studies. While it is hard to account for this incompleteness, it can hardly have any relation to the local filament.

Further tests of the BL Lac/UHE-shower correlations are necessary before a study of the anisotropy of the effect can be performed with new data. Poor angular resolution of modern UHE cosmic-ray experimentsFootnote 5 makes it hard to test the correlation found in the HiRes data, though this may be partly compensated by large statistics. Corresponding estimates are given in Ref. [65], assuming that the particles which caused air showers correlated with BL Lacs are similar to the bulk of the cosmic-ray particles with respect to their detection. Though the actual angular resolution of modern experiments differs from the one assumed at that time, notably for the hybrid mode, these numbers can be easily corrected. Unfortunately, the exceptional character of air showers induced by primary photons (or by any other hypothetical unusual particles – standard cosmic rays cannot correlate with distant BL Lacs) makes this approximation only partially relevant, while moving beyond the approximation requires internal information about experiments.

Indeed, the correlation was found in the data of a fluorescent detector (FD) working in the stereo mode. In principle, it should be tested with similar data. But Auger does not have the FD stereo reconstruction at all, while TA has quite low angular resolution in stereo: new FD telescopes are at larger distances from each other, compared to HiRes. When surface detectors (SD) are involved, one should take into account their different responses to unusual air showers (which are implied by the HiRes observation: neutral particles are required). When a correlation study is performed, potentially unusual events are compared to the bulk of cosmic rays. If the energy assigned to a primary photon by means of the bulk reconstruction is underestimated by a factor of x, then the background for the correlation studies would be \(x^{\alpha }\) times larger, where \(\alpha \sim 2\) is the index of the power-law integral spectrum. A correct account of this effect, which is in addition direction-dependent, requires the use of detailed information about experiments which is not publicly available.

The only attempt to test the HiRes BL Lac correlations with independent data was reported by Auger at a conference in 2007 [66]. The Auger SD data were examined and no correlations with southern-sky BL Lacs were found. This analysis, in addition to the low statistics used, faces the SD problem discussed above. For instance, for photon-induced showers, the low response of water tanks leads to underestimation of the energies of primary photons, \(x > rsim 3\) [67, 68]; see Ref. [39] for a discussion. Large-statistics tests of the BL Lac correlations with the TA data are a necessary prerequisite for further studies of the effect reported here at UHE.

An important implication of the ALP explanation of the UHE correlations is that the correlated air showers are initiated by primary photons. Ref. [65] determines the fraction of the correlated events in a HiRes-like data set as 1.5–3.5% (at 95% CL). This translates into the flux \(F_\mathrm{BL} > rsim 5 \times 10^{-3}\) km\(^{-2}\) yr\(^{-1}\) sr\(^{-1}\) for the HiRes field of view. We note that these values of \(F_\mathrm{BL}\) are of the same order as current published 95% CL limits on the isotropic gamma-ray flux from Auger, \(F_{\gamma }<7\times 10^{-3}\) km\(^{-2}\) yr\(^{-1}\) sr\(^{-1}\) [69], and TA, \(F_{\gamma }<3.6\times 10^{-3}\) km\(^{-2}\) yr\(^{-1}\) sr\(^{-1}\) for \(E>10^{19}\) eV [70], and, taken at a face value, are in tension with the Auger limit of \(F_{\gamma }\lesssim 2.2\times 10^{-3}\) km\(^{-2}\) yr\(^{-1}\) sr\(^{-1}\) reported at a conference in 2019 [71]. However, \(F_\mathrm{BL}\) is a different quantity than \(F_{\gamma }\) which assumes isotropic diffuse flux, so a dedicated study is required to test the filament hypothesis. While independent from the anisotropy result presented in this paper, further searches for UHE photons would be important for its interpretation.