#  $\gamma$-ray and ultra-high energy neutrino background suppression due to
solar radiation

Shyam Balaji<EMAIL_ADDRESS>Laboratoire de Physique Théorique et
Hautes Energies (LPTHE),
UMR 7589 CNRS & Sorbonne Université, 4 Place Jussieu, F-75252, Paris, France

###### Abstract

The Sun emits copious amounts of photons and neutrinos in an approximately
spatially isotropic distribution. Diffuse $\gamma$-rays and ultra-high energy
(UHE) neutrinos from extragalactic sources may subsequently interact and
annihilate with the emitted solar photons and neutrinos respectively. This
will in turn induce an anisotropy in the cosmic ray (CR) background due to
attenuation of the $\gamma$-ray and UHE neutrino flux by the solar radiation.
Measuring this reduction, therefore, presents a simple and powerful
astrophysical probe of electroweak interactions. In this letter we compute
such anisotropies, which at the Earth (Sun) can be at least $\simeq 5\times
10^{-3}\,(1)\%$ and $\simeq 1\times 10^{-16}\,(2\times 10^{-14})\%$ for TeV
scale $\gamma$-rays and PeV scale UHE neutrinos respectively. We briefly
discuss observational prospects for experiments such as the Fermi Gamma-Ray
Space Telescope Large Area Telescope (Fermi LAT), High-Altitude Water
Cherenkov (HAWC) detector, The Large High Altitude Air Shower Observatory
(LHAASO), Cherenkov Telescope Array (CTA) and IceCube. The potential for
measuring $\gamma$-ray attenuation at orbital locations of other active
satellites such as the Parker Solar Probe and James Webb Space Telescope
(JWST) is also explored.

##  I Introduction

The extragalactic background is a superposition of all radiation sources, both
individual and diffuse, from the edge of the Milky Way to the edge of the
observable universe, and is thus expected to encode a wide range of phenomena
Lamastra  _et al._ (2017); Finke  _et al._ (2022). It is broadly comprised of
electromagnetic radiation and neutrinos which have a characteristic energy
density and spectrum. Contributions are guaranteed from established
extragalactic $\gamma$-ray source classes such as active-galactic-nuclei
(AGN), star-forming galaxies, and $\gamma$-ray bursts Owen  _et al._ (2022).
It provides a non-thermal perspective on the cosmos, which is also explored by
the cosmic radio background, extragalactic cosmic rays (CRs), and neutrinos.

The electromagnetic component often referred to as the extragalactic
background light (EBL) is the total integrated flux of all photon emission
over cosmic time Cooray (2016); Singh  _et al._ (2021); Yan-kun and Hou-dun
(2022). This EBL is dominated energetically by thermal relic radiation from
the last scattering surface observed as the cosmic microwave background (CMB).
Different physical processes characterize the EBL in each waveband: starlight
in the optical, thermal dust emission in the infrared, and X-ray emission from
AGN Mattila and Väisänen (2019).

Similarly, for neutrinos, the high energy frontier is expected to be
especially rich, with neutrinos from baryonic accelerators ($\gamma$-ray
bursts, AGN, etc.) extending up to about $\simeq 100$ GeVLunardini  _et al._
(2013). At even higher energies, the ultra-high energy (UHE) regime will
exhibit cosmogenic neutrinos and may even reveal the presence of topological
defects, which could emit neutrinos via a variety of energy loss channels
Lunardini  _et al._ (2013). For sources far beyond the gamma ray horizon,
neutrinos may be the only probe because, even at the highest energies, they
propagate freely up to cosmological distances. The observation of UHE
particles such as photons, ions, and neutrinos provides critical information
on astrophysical systems as well as the mechanisms of charged particle
acceleration in these systems.

Since there is significant contamination from foregrounds, direct measurements
of the EBL and neutrino background are difficult, necessitating the use of
indirect observational or theoretical determinations to obtain an estimate of
emitter populations Caddy  _et al._ (2022). Exotic contributions, such as
those resulting from a possible connection between dark matter and Standard
Model (SM) particles, may be present in addition to astrophysical emissions.
This possibility was recently considered in Ref. Bernal  _et al._ (2022). Here
the axion, a pseudo-Nambu-Goldstone boson initially proposed to solve the
strong-CP problem—and axion-like particles (ALPs) were considered as a dark
matter candidate. The ALP can decay into two photons based on the ALP-photon
coupling and can contribute to the EBL. $\gamma$-ray attenuation is sensitive
to multi-eV ALP decays through their contribution to the EBL Kalashev  _et
al._ (2019); Korochkin  _et al._ (2020a, b). Hence, additionally suppression
of the $\gamma$-ray background due to the Sun as discussed in this work, could
also affect constraints on dark matter candidates such as ALPs in the event of
significantly improved flux resolution.

The interaction between the CMB and the cosmic neutrino backgrounds with
$\gamma$-rays and UHE neutrinos and the subsequent CR anisotropies have been
studied in detail D’Olivo  _et al._ (2006); Ruffini  _et al._ (2016);
Franceschini (2021); Nikishov (1961); Fazio and Stecker (1970). Here, we will
focus on a qualitatively different phenomena, computing instead the local
anisotropy in the $\gamma$-ray and UHE neutrino background due to photon and
neutrino emission from the Sun. A simple attempt at estimating the extinction
of $\gamma$-rays due to sunlight was made in Ref. Loeb (2022). However the
blackbody energy spectrum of the Sun was not included and the optical depth
was estimated locally instead of being integrated over the entire region of
the solar system where the sunlight and $\gamma$-rays are interacting.
Additionally, the optical depth as a function of $\gamma$-ray energy or the
observation angle from Earth relative to the Sun was not studied nor was the
feasibility of probing the effect with $\gamma$-ray telescopes.

Here, we will include these effects and also consider the neutrino analogue
whereby solar neutrinos annihilate with UHE antineutrinos or vice versa. We
discuss the prospects for measuring the predicted $\gamma$-ray anisotropies
with both space and ground-based experiments such as the Fermi Gamma-Ray Space
Telescope Large Area Telescope (Fermi LAT), Cherenkov Telescope Array (CTA),
the Large High Altitude Air Shower Observatory (LHAASO) as well as the High-
Altitude Water Cherenkov (HAWC) experiment. We then discuss the possibility of
measuring UHE neutrino anisotropies with the IceCube experiment. We also
predict the expected attenuation at the Parker Solar Probe and James Webb
Space Telescope (JWST) orbits and review the possibility of measuring EBL
suppression due to the Sun at these locations in the future. Complete
understanding of these anisotropies within the SM will enable constraints on
beyond the SM models containing new states that could cause attenuation of the
EBL or UHE neutrino background. In this letter, we will first outline the
photon-photon and neutrino-antineutrino annihilation cross sections, then
compute the optical depths and finally discuss experimental consequences. We
will use natural units (where $\hbar=c=k_{B}=1$).

##  II Annihilation processes

### Cross sections

We will first consider the cross section for two photons annihilating into an
electron-positron pair. For a $\gamma$-ray with energy $E_{\gamma}$, the
annihilation cross section for the process $\gamma\gamma\rightarrow
e^{+}e^{-}$ Breit and Wheeler (1934); Gould and Schréder (1967); Ruffini  _et
al._ (2010) with a solar photon $\gamma_{\odot}$ of energy
$E_{\gamma_{\odot}}$ is given by

$\displaystyle\sigma_{\gamma\gamma}(\beta)=$
$\displaystyle\frac{3\sigma_{\textrm{T}}}{16}(1-\beta^{2})\times$
$\displaystyle\times\left[2\beta(\beta^{2}-2)+(3-\beta^{4})\log\left(\frac{1+\beta}{1-\beta}\right)\right],$
(1)

where
$\sigma_{T}=\frac{8\pi}{3}\left(\frac{\alpha}{m_{e}}\right)^{2}=6.652\times
10^{-25}\textrm{cm}^{2}$ is the Thomson scattering cross section, $\alpha$ is
the fine structure constant, $m_{e}$ is the electron mass and a dimensionless
kinematic factor is defined $\beta=\sqrt{1-E_{\textrm{th}}/E_{\gamma}}$. Where
the threshold energy for electron-positron pair production is given by

$\displaystyle
E_{\textrm{th}}=\frac{2m_{e}^{2}}{E_{\gamma_{\odot}}(1-\cos\theta)}.$ (2)

In this expression $\theta$ refers to the scattering angle between the
$\gamma$-ray and the solar photon. The threshold energy of the incident
$\gamma$-ray for this process to occur when annihilating with a photon of
energy $E_{\gamma\odot}\simeq 0.5$ eV (like the effective temperature of the
Sun) is at least $\simeq 0.5$ TeV. Observing the bottom panel of Fig. 1, we
see that the scattering angle between the photons at which the cross section
is maximised is highly dependent on the incident energy of the high energy
$\gamma$-ray. Note that we will not consider higher order processes such as
$\gamma\gamma\rightarrow e^{+}e^{-}e^{+}e^{-}$ since at high energy, the cross
section approaches a relatively constant $6.5\,\mu b$ Brown  _et al._ (1973)
which is much lower than the leading order process unless $E_{\gamma}\gtrsim
10^{8}$ TeV. Annihilation of photons into other final states such as
$\mu^{+}\mu^{-}$ or $\pi^{+}\pi^{-}$ are subdominant at the scales of interest
in this work.

For the neutrino channel, the resonant neutrino-antineutrino annihilation into
a fermion-antifermion, $\nu\bar{\nu}\rightarrow Z^{0}\rightarrow f\bar{f}$
occurs via the $s$-channel. It has Breit-Wigner shape and can be written
D’Olivo  _et al._ (2006); Lunardini  _et al._ (2013)

$\displaystyle\sigma_{\nu\bar{\nu}}^{R}(p,k)=\frac{G_{F}\Gamma
m_{Z}}{2\sqrt{2}k^{2}pE_{\nu\odot}}\int_{s_{-}}^{s_{+}}\frac{s(s-2m_{\nu}^{2})}{(s-m_{Z}^{2})^{2}+\xi
s^{2}}ds,$ (3)

where the Fermi constant is $G_{F}=1.16637\times 10^{-5}\textrm{GeV}^{-2}$
Zyla  _et al._ (2020). The light neutrino mass is set to $m_{\nu}=0.08$eV and
we define a dimensionless ratio $\xi=\Gamma^{2}/m_{Z}^{2}$, where
$\Gamma=2.495$GeV is the decay width of the $Z$ boson with mass
$m_{Z}=91.1876$GeV Zyla  _et al._ (2020). The UHE neutrino has 4-momentum
$k^{\mu}=(E_{\nu},\mathbf{k})$ while the solar neutrinos have
$p^{\mu}=(E_{\nu\odot},\mathbf{p})$, hence it follows from the usual
relativistic energy-momentum relation that $k=\sqrt{E_{\nu}^{2}-m_{\nu}^{2}}$
and $p=\sqrt{E_{\nu\odot}^{2}-m_{\nu}^{2}}$. The centre-of-mass energy is
$s=(p^{\mu}+k^{\mu})^{2}\simeq
2m_{\nu}^{2}+2\mathbf{k}\cdot(E_{\nu\odot}\pm\mathbf{p})$ since $E_{\nu}\simeq
k$ at high energy. Also, we have $\mathbf{k}\cdot\mathbf{p}=pk\cos\theta$.
Hence the integration limits in Eq. (3) are defined
$s_{\pm}=2m_{\nu}^{2}+2k(E_{\nu\odot}\pm p)$ corresponding to $\theta=0$ and
$\theta=\pi$ respectively.

Figure 1: In the top panel we show annihilation cross sections in units of
$\mu$b (microbarns) for $\gamma\gamma$ (cyan) and resonant $\nu\bar{\nu}$
(blue) as function of the incident $\gamma$-ray or ultra-high energy neutrino
respectively. We take $E_{\gamma\odot}=0.5$eV and $E_{\nu\odot}=0.53$ MeV
since these are typical energies for photons and neutrinos being emitted by
the Sun. In the bottom panel we show the dependence of the annihilation cross
section in b (barns) on the incident angle between the scattering photons for
two energies $E_{\gamma}=1,\,10$ TeV while fixing $E_{\gamma\odot}=0.5$ eV.

We plot the resulting cross sections for photon-photon and resonant neutrino-
antineutino annihilation as a function of the incident cosmic ray particle
energy in Fig. 1. We fix $E_{\gamma\odot}=0.5$ eV and $E_{\nu\odot}=0.53$ MeV
respectively since these are the typical energies of photons and neutrinos
being emitted from the Sun. The maximal cross section of
$\sigma_{\gamma\gamma}\simeq 1.7\times 10^{5}\,\mu$b for $\gamma\gamma$ occurs
at $E_{\gamma}\simeq 1$ TeV while for $\nu\bar{\nu}$ it occurs at
$E_{\nu}\simeq 4\times 10^{3}$ TeV at $\sigma_{\nu\bar{\nu}}^{R}\simeq
4.8\times 10^{-2}\mu$b.

There are also non-resonant contributions, which include several other
channels with final states such as
$\nu\nu\rightarrow\nu\bar{\nu},l\bar{l},WW,ZZ$ and $Zh$ Roulet (1993);
Barenboim  _et al._ (2005), which we can approximate in total as in Ref.
Ruffini  _et al._ (2016) with

$\displaystyle\sigma_{\nu\bar{\nu}}^{NR}\simeq\frac{\sigma^{he}_{\nu\bar{\nu}}}{1+E_{r}/E},$
(4)

where $E_{r}=\frac{m_{Z}^{2}}{2m_{\nu}}$ and
$\sigma^{he}_{\nu\bar{\nu}}=8.3\times 10^{-4}\,\mu b$. This is significantly
smaller than the resonant contribution below $E_{\textrm{th}}$ so we can
safely omit these contributions when considering UHE neutrino scattering in
the regime of interest.

### Optical depth

The radiation spectrum of the Sun can be approximated as a blackbody. The peak
wavelength is around $500$ nm. In natural units, we get the differential
luminosity per unit energy to be Caputo  _et al._ (2022)

$\displaystyle\frac{dL_{\odot}}{dE_{\gamma_{\odot}}}=4\pi
R_{\odot}^{2}\frac{1}{2}\frac{4\pi}{(2\pi)^{3}}\frac{E_{\gamma_{\odot}}^{3}}{e^{\frac{E_{\gamma_{\odot}}}{T_{\textrm{eff}}}}-1},$
(5)

where the prefactor of $1/2$ is to count only out going modes of the blackbody
spectrum and the factors that follow to the right include the boson phase
space and Bose-Einstein occupation number, $T_{\textrm{eff}}=5780$ K is the
effective blackbody temperature of the Sun Lide (2007) and $R_{\odot}$ is the
solar radius. We can show a visual representation of the Sun-Earth-EBL(UHE
$\nu$) system in Fig. 2. There are non-thermal sources of electromagnetic
radiation from the Sun, such as X-rays and $\gamma$-rays from solar flares,
X-rays and radio waves from coronal mass ejections, Sun spots and solar
prominences. However, since the spectrum is dominated in intensity by
sunlight, we will focus on this moving forward. From here we can easily
compute the differential photon number density per unit energy of the Sun at a
distance $r$ from the solar core with

$\displaystyle\frac{dn_{\gamma_{\odot}}}{dE_{\gamma_{\odot}}}=\frac{1}{4\pi
r^{2}E_{\gamma\odot}}\frac{dL_{\odot}}{dE_{\gamma_{\odot}}}.$ (6)

Note that there is an additional factor of $c$ in the denominator which is
omitted since $c=1$ in natural units.

Figure 2: Representation of coordinate system showing radial variable $r$
where the extragalactic background photons and neutrinos interact with solar
photons $\gamma_{\odot}$ and neutrinos $\nu_{\odot}$. $r^{\prime}$ is the
position at which we want to compute observable optical depth.

From here we may now turn our attention to calculating the optical depth
associated with a CR photon travelling an arbitrary distance through a
background of sunlight. The differential optical depth per unit energy is
given

$\displaystyle\frac{d\tau_{\gamma}}{dE_{\gamma_{\odot}}}=\int_{r^{\prime}}^{\infty}\frac{dn_{\gamma_{\odot}}}{dE_{\gamma_{\odot}}}\sigma_{\gamma\gamma}(E_{\gamma},E_{\gamma_{\odot}},\theta)dr,$
(7)

where we use (II) for $\sigma_{\gamma\gamma}$ and $r^{\prime}$ is the radial
position at which we want to determine the $\gamma$-ray optical depth.
Integrating over the solar photon energy to obtain the optical depth

$\displaystyle\tau_{\gamma}=\int_{E_{\textrm{th}}}^{\infty}\frac{d\tau}{dE_{\gamma_{\odot}}}dE_{\gamma_{\odot}}.$
(8)

We may also integrate the optical depth along the line-of-sight to obtain the
dependence of the attenuation and the angle $\Theta$, where $\Theta=0$ is in
the direction pointing directly towards the Sun from Earth (where the
$\gamma$-ray background would be collinear with sunlight) and $\Theta=\pm\pi$
is pointing directly away from the Sun (where $\gamma$-rays would annihilate
head on with sunlight). Note that $\theta$ is the scattering angle between
incident photons, but $\Theta$ is the elongation angle at which observations
from Earth would be performed. We may now plot the resulting optical depth due
to the annihilation process as shown in Fig. 3 as a function of $E_{\gamma}$
for a fixed angle of $\theta=\pm\pi$ (head-on collision) as well as the
optical depth as a function of elongation angle relative to the Sun $\Theta$
for three representative energies $E_{\gamma}=[0.5,1,10]$ TeV. For
observational purposes, (i) lower $E_{\gamma}$ values and (ii) larger angles
of $|\Theta|$ (pointing away from the Sun) are more relevant since the (i)
flux uncertainties associated with $\gamma$-rays in this regime are lower and
(ii) TeV photons from the solar corona at small $\Theta$ would be a very large
background, potentially obscuring the observation of $\gamma$-ray attenuation.
For this reason, we will conservatively focus our discussion on attenuation
for $E_{\gamma}$ around a TeV at $\Theta=\pm\pi$. We also note that at small
$|\Theta|$, there will be a large component of $\gamma$-rays resulting from a
spatially extended component of the solar emission due to the inverse Compton
scattering of CR electrons off solar photons Abdo  _et al._ (2011), this would
make small effects like the one considered here difficult to resolve. However,
it should also be noted that such a contribution is focused within a few
degrees of the Sun and becomes insignifcant for elongation angles
$|\Theta|\gtrsim 20^{\circ}$ Abdo  _et al._ (2011). We show the optical depth
at the solar surface and at Earth (for $\Theta=\pm\pi$) in cyan and blue in
the upper panel of Fig. 3 respectively. The maximal optical depth is around
the threshold energy for the respective scattering angle. In the first case,
the $\gamma$-ray photons must traverse through the sunlight till the surface
of the Sun and in the second, the $\gamma$-ray must travel through a much
lower number density of solar photons from beyond the Earth and Sun towards
the Earth’s surface. Unsurprisingly, of the two scenarios shown, the optical
depth is maximised at the solar surface at around $\tau_{\gamma}=1.1\%$ since
the $\gamma$-rays interact with a much larger number density of photons in
this region. At Earth, the optical depth is around $\tau_{\gamma}=5.1\times
10^{-3}\%$ for $E_{\gamma}=0.5$ TeV at angles of $\Theta=\pm\pi$ as shown in
the bottom panel of Fig. 3. In Ref. Loeb (2022), the optical depth is
estimated at 7% at the solar surface and $3.3\times 10^{-2}\%$ at the Earth.
In both cases, the estimate is noticeably different than what we obtain here.
This is unsurprising since the energy distribution and radial dependence of
the solar photons was not included or integrated over like here. We note that
at elongation angles more focused around the Sun such as $\Theta=\pm\pi/4$,
the optical depth os observed from Earth is unsurprisingly larger, by around a
factor of 2 (relative to $\Theta=\pm\pi$) at $12\times 10^{-3}\%$ for
$E_{\gamma}=0.5$ TeV. This is due to the larger density of solar photons the
EBL $\gamma$-rays can interact with while travelling to Earth. However, as
mentioned earlier, we will focus on the minimal optical depth at
$\Theta=\pm\pi$ to be conservative in the remaining discussion. We also note
that the $\gamma$-rays at 1 TeV have a very slightly larger optical depth than
at 0.5 TeV for smaller elongation angles because of the threshold energy
requirements set by the incident $\gamma$-ray energy and shape of the thermal
spectrum of the Sun. For incident 10 TeV $\gamma$-rays, the attenuation is
appreciably lower because as mentioned above, the maximal optical depth occurs
around the threshold energy, and the number density of solar photons that
satisfy the threshold energy corresponding to an incident $\gamma$-ray of 10
TeV is much lower (lying in the low energy tail of the thermal spectrum rather
than around the peak). The attenuation is the same for positive and negative
$\Theta$ simply due to spherical symmetry of the process as observed at Earth.

Figure 3: In the top panel we show the percentage optical depth $\tau$ shown
as a function of incident $\gamma$-ray energy in TeV. We show two scenarios,
one is at the solar surface $r^{\prime}=R_{\odot}$ (cyan) and the other is at
Earth $r^{\prime}=1$ AU for elongation angle $\Theta=\pm\pi$ (blue). In both
cases we take a scattering angle of $\theta=\pi$. In the bottom panel, we show
percentage optical depth at Earth as a function of elongation angle $\Theta$
for three representative $\gamma$-ray energies, $E_{\gamma}=0.5$ TeV (cyan),
$E_{\gamma}=1$ TeV (blue) and $E_{\gamma}=10$ TeV (purple).

For UHE neutrino annihilation, we first require the solar neutrino luminosity
which can be approximated $L_{\nu\odot}=0.023L_{\odot}$ where $L_{\odot}\simeq
4\times 10^{33}$ erg/s is the total luminosity of the Sun Ianni (2014). We can
approximate the neutrino number density at a distance $r$ with

$\displaystyle n_{\nu\odot}(r)=\frac{1}{4\pi
r^{2}}\frac{L_{\nu\odot}}{\bar{E}_{\nu\odot}},$ (9)

taking $\bar{E}_{\nu\odot}=0.53$ MeV as the average neutrino energy emitted by
the Sun Ianni (2014). Now we may compute the approximate optical depth
$\tau_{\nu}$, for a high energy neutrino incident upon a solar neutrino

$\displaystyle\tau_{\nu}=\int_{r^{\prime}}^{\infty}n_{\nu\odot}(r)\sigma_{\nu\bar{\nu}}dr,$
(10)

using the maximum resonant neutrino annihilation cross section (at 4 PeV from
Fig. 1 and Eq. (3)), we get $\tau_{\nu}=1\times 10^{-16}\%$ at Earth and
$2\times 10^{-14}\%$ at the solar surface.

##  III Results and Discussion

Considering the Fermi LAT experiment Ackermann  _et al._ (2015), we see that
the highest energy bin is $580$-$820$GeV. The reported intensity for this bin
is $\simeq(9.7\pm 6.0)\times
10^{-12}\,\textrm{cm}^{-2}\textrm{s}^{-1}\textrm{sr}^{-1}$. If we consider
that the intensity will be similar at $1$ TeV, then we may multiply by the
operating time of 1239 days, the angular coverage of 2.4 sr and an effective
area of 8000 $\textrm{cm}^{2}$ Ackermann  _et al._ (2015) to get $20$
$\gamma$-ray events. Multiplied with the optical depth at Earth from Section
II, we get a reduction of $\simeq 3\times 10^{-4}$ events. This is
substantially below unity, so unless there is a factor of $\simeq 10^{4}$
improvement in event count, its unlikely that Fermi LAT will be able to
register any reduction in events. Furthermore, Fermi LAT has a flux
uncertainty of $\gtrsim 60\%$ for $\gamma$-rays at such high energy this makes
small effects of attenuation difficult to discern. The CTA is expected to
become the largest and most sensitive observatory for very-high-energy
$\gamma$-rays in the energy range from 20 GeV to more than 300 TeV. CTA will
be capable of detecting $\gamma$-rays from extremely faint sources with
unprecedented precision energy and angular resolution. CTA South is projected
to have a peak differential energy flux sensitivity of around
$E_{\gamma}^{2}\frac{d\Phi}{dE_{\gamma}}\simeq
10^{-13}\,\textrm{erg}\,\textrm{cm}^{-2}\textrm{s}^{-1}$ with an energy
resolution of about 5% and angular resolution of about $0.05^{\circ}$ for 1
TeV photons Maier  _et al._ (2020). For $E_{\gamma}=1$ TeV and over a $4\pi$
angle, this corresponds to a differential flux sensitivity of $\simeq 5\times
10^{-15}\,\textrm{cm}^{-2}\,\textrm{s}^{-1}\,\textrm{sr}^{-1}$. This is
$\gtrsim 3$ orders of magnitude better flux resolution than Fermi LAT. This
suggests that one could hope for $\simeq 3\times 10^{-2}\%$ $\gamma$-ray flux
resolution at TeV scale. This would perhaps be the most promising way to test
attenuation of $\gamma$-rays due to sunlight, which as we calculated earlier,
is of the order of $10^{-3}$% at Earth. Therefore, CTA seems a hopeful
candidate for achieving such a goal, however in this case, there could be
systematic uncertainties associated with resolving such a tiny effect. This is
because Imaging Air Cherenkov Telescopes (IACTs) like CTA have a narrow field
of view and local systematics like atmospheric conditions. By combining
different subsets of telescopes and pointing directions, CTA will be able to
cover a large fraction of the Galactic plane with varying sensitivity and
resolution. This could be effective for studying $\gamma$-ray attenuation at
elongation angles away from the Sun. But, CTA will still be limited at probing
elongation angles close to the Sun, as it will only record data at night.

The High Altitude Water Cherenkov Observatory (HAWC), completed in early 2015,
has been used to observe the Crab Nebula at high significance across nearly
the full spectrum of energies to which HAWC is sensitive. HAWC’s sensitivity
improves with the $\gamma$-ray energy. For $E_{\gamma}\gtrsim 1$ TeV the
sensitivity is driven by the best background rejection and angular resolution
ever achieved for a wide-field ground array. The total uncertainty at 1 TeV
for HAWC in this measurement according to Ref. Abeysekara  _et al._ (2017)
appears to be around $\gtrsim 50$% in total flux at 1 TeV. In the more recent
Crab Nebula measurement Ref. Abeysekara  _et al._ (2019a) by HAWC, the flux
uncertainty is significantly improved at TeV scale, the flux is measured to be
$(3.73\pm 0.07)\times 10^{-11}$ and $(3.63\pm 0.08)\times
10^{-11}\,\textrm{TeV}\,\textrm{cm}^{-2}\,\textrm{s}^{-1}$ respectively,
depending on the energy resolution method used. This corresponds to a
remarkable flux uncertainty of only $\simeq 2$%.

LHAASO, can measure the energy and arrival direction of the $\gamma$-rays with
high sensitivity and large effective area, and use them to probe the
properties of the EBL, and thereby the solar attenuation effect described in
this work. LHAASO has a larger effective area and a higher sensitivity for
very-high-energy $\gamma$-rays than HAWC, especially in the multi-TeV and PeV
range Cao  _et al._ (2023a). However, in both air shower detectors HAWC and
LHAASO Cao  _et al._ (2023b), their comparable flux resolution must improve
significantly to probe solar attenuation of $\gamma$-rays at TeV scale.

More recently, an all-sky measurement of the anisotropy induced by cosmic rays
travelling through our local interstellar medium and the interaction between
the interstellar and heliospheric magnetic fields was performed Abeysekara
_et al._ (2019b). The analysis was based on data collected by the HAWC and
IceCube observatories in the northern and southern hemispheres at the same
median primary particle energy of 10 TeV. In their sky maps, they determined
the horizontal anisotropies to be $\simeq 10^{-2}\%$. The vertical direction
of the anisotropy was also determined to be of the same order. However it is
important to note that this is for all cosmic rays, including charged cosmic
rays, not only $\gamma$-rays like we are interested here. In Ref. Abeysekara
_et al._ (2018), they report an anisotropy of $8\times 10^{-2}$% at 2 TeV and
to $14\times 10^{-2}$% at around 30 TeV, from cosmic rays once again. They
state that TeV cosmic-ray anisotropy is primarily dipolar with amplitude
$\simeq 0.1$%, but also contains smaller scale structure with strength
$10^{-2}$%. Improvements can be made with larger instantaneous sky coverage
and longer uninterrupted observation periods. This would enable reduction in
statistical uncertainties below the signal strength and to resolve features
with large angular extent. To probe the solar attenuation of $\gamma$-rays, it
is necessary to obtain anisotropy maps and flux resolution of $\gamma$-rays at
the same level of sensitivity as for cosmic rays described above. This would
require significant improvement in experimental design and analysis. Such
improvements in sensitivity would be a significant step forward in
understanding the effects of sunlight on $\gamma$-ray propagation.

In Ref. Loeb (2022), $\gamma$-ray attenutation is compared with the dipole
anisotropy measured by the Cosmic Background Explorer (COBE). This variation
of $\simeq 0.12\%$ results from the Earth’s orbital motion about the Solar
system barycenter and strikingly lies between the EBL optical depths evaluated
at the solar surface and Earth respectively Kogut  _et al._ (1993). However,
its also important to note that the CMB dipole anisotropy is at a
significantly different energy scale and is not impacted by the same
statistical and systematic uncertainties of the $\gamma$-ray sky at TeV scale.

The radial position of the Parker Solar Probe which orbits very close to the
Sun’s corona is around $9.86R_{\odot}$ from the solar centre Wiedenbeck  _et
al._ (2018). Supposing EBL measurements could be performed in this orbit,
excellent extraction of $\gamma$-ray suppression could be discerned. In the
case of an orbit with similar radial position to the JWST, which is situated
at the L2 Lagrange point, we would get a smaller EBL optical depth
$\tau_{\gamma}\simeq 4.9\times 10^{-3}\%$ at $E_{\gamma}=1$ TeV at
$\Theta=\pm\pi$. This is almost the same as on Earth, but if $\gamma$-rays are
recorded at L2, the Earth’s umbra would not interfere with the sunlight
$\gamma$-ray interactions, which could provide a marginal improvement in the
measurement.

For UHE neutrinos, in order to obtain optimistically large optical depths of
$\tau_{\nu}=1\times 10^{-16}\%$ at Earth and $\tau_{\nu}=2\times 10^{-14}\%$
at the solar surface, we require energies of $E_{\nu}=4$ PeV. It is unlikely
that such anisotropies will be probed with experiments such as IceCube which
only have $\mathcal{O}(1)$ event observations at PeV scale which is far too
small to study such an anisotropy Aartsen  _et al._ (2018).

##  IV Conclusion

We consider suppression of diffuse extragalactic $\gamma$-rays and ultra-high-
energy (UHE) neutrinos due to annihilation upon interactions with large
numbers of photons and neutrinos emitted locally by the Sun. The annihilation
induces anisotropies in the extragalactic background light (EBL) at around a
TeV with optical depths ofat least $\tau_{\gamma}\simeq 1\%$ and
$\tau_{\gamma}\simeq 5\times 10^{-3}\%$ at the surface of the Sun and at Earth
respectively. Such anisotropies are a direct prediction of Quantum
Electrodynamics interactions and can only be probed with future $\gamma$-ray
experiments such as Fermi LAT, HAWC, LHAASO and CTA, only if there is a
significant improvement in the ability to measure flux and anisotropy
resolution as well as reduction in systematic uncertainties.

HAWC has measured dipole anisotropies of $\simeq 10^{-2}\%$ due to cosmic rays
travelling through the interstellar medium. We obtain an optical depth of
$\simeq 2\times 10^{-3}$ % at Earth with elongation angle $\pm\pi$. At
energies much higher, the annihilation cross section falls off appreciably as
does the EBL flux. Measurements of the TeV EBL suppression at comparable
elongation angles can be larger around the Parker Solar Probe orbit $\simeq
3.2\times 10^{-2}\%$, while for telescopes at L2 such as the JWST, the
anisotropy is smaller around $1.5\times 10^{-3}\%$. New experiments at these
locations in the Solar System with $\gamma$-ray sensitivity could also probe
EBL reduction. Experiments like HAWC and LHAASO would need to obtain
sensitivities comparable to cosmic rays for the much smaller subset of
$\gamma$-rays for this effect to be resolved. On the otherhand, CTA is
expected to obtain flux resolution better than $0.1$% for TeV $\gamma$-rays.
This makes it an optimistic candidate to test the attenuation described in
this work based on flux resolution, at elongation angles away from the Sun.
However, even in this case, systematic uncertainties would need to be
controlled to make the effect discernable. Hence we conclude that the
comparisons in Ref. Loeb (2022) of the $\gamma$-ray anisotropy with the CMB
dipole anisotropy are overly idealized given the much greater experimental
challenges associated with resolving the EBL at TeV scale described in the
main body of this work.

In the case of ultra-high energy (UHE) neutrinos interacting with the solar
neutrinos of average energy $0.53$ MeV, we get much smaller optical depths.
This is due to the smallness of the resonant and non-resonant contributions to
the neutrino-antineutrino annihilation cross section. Even the most optimistic
scenario can produce anisotropies of $2\times 10^{-14}\%$ and $1\times
10^{-16}\%$ for a PeV scale UHE neutrino scattering off 0.53 MeV solar
neutrinos at the solar surface and at Earth respectively. Since experiments
such as IceCube have only obtained a few PeV neutrino events, probing such a
small anisotropy seems highly unrealistic with current experiments.

The result for diffuse $\gamma$-rays presents a theoretical opportunity to
study fundamental photon-photon interactions between isotropic background
photons and thermal photons produced by the Sun in our neighbourhood of the
universe. Although it seems unrealistic to probe such an attenuation with
current telescopes, this result is an important SM effect and can be amplified
with beyond the SM contributions in future works. We do not study the effects
on non-diffuse background contributions in detail, but the calculated optical
depths may easily be applied to these scenarios as well.

##  V Acknowledgements

SB is supported by funding from the European Union’s Horizon 2020 research and
innovation programme under grant agreement No. 101002846 (ERC CoG
“CosmoChart”) as well as support from the Initiative Physique des Infinis
(IPI), a research training program of the Idex SUPER at Sorbonne Université.
SB would like to thank Maura E. Ramirez-Quezada, Yongchao Zhang and an
anonymous referee for helpful discussions and feedback on the draft.

##  VI Appendix

The closed form solution for the resonant neutrino-antineutrino annihilation
cross section in Eq.(3) is given by

$\displaystyle\sigma_{\nu\bar{\nu}}^{R}$
$\displaystyle(p,k)=\frac{2\sqrt{2}G_{F}\Gamma
m_{Z}}{2kE_{\nu\odot}}\left\\{\frac{1}{1+\xi}+\frac{m_{Z}^{2}}{4pk(1+\xi)^{2}}\log\left(\frac{f_{+}}{f_{-}}\right)\right.$
$\displaystyle+\left.\frac{1-\xi}{(1+\xi)^{2}}\frac{m_{Z}^{3}}{4pk\Gamma}\left[\tan^{-1}(g_{+})-\tan^{-1}(g_{-})\right]\right\\}$
(11)

where $\xi=\Gamma^{2}/m_{Z}^{2}$ and

$\displaystyle f_{\pm}$ $\displaystyle=4k^{2}(1+\xi)(E_{\nu\odot}\pm
p)^{2}-4m_{Z}^{2}k(E_{\nu\odot}\pm p)+m_{Z}^{4}$ $\displaystyle g_{\pm}$
$\displaystyle=\frac{2k(1+\xi)(E_{\nu\odot}\pm p)-m_{Z}^{2}}{\Gamma m_{Z}}$
(12)

## References

  * Lamastra  _et al._ (2017) A. Lamastra, N. Menci, F. Fiore, L. A. Antonelli, S. Colafrancesco, D. Guetta, and A. Stamerra, Astron. Astrophys. 607, A18 (2017), arXiv:1709.03497 [astro-ph.HE] .
  * Finke  _et al._ (2022) J. D. Finke, M. Ajello, A. Dominguez, A. Desai, D. H. Hartmann, V. S. Paliya, and A. Saldana-Lopez, (2022), arXiv:2210.01157 [astro-ph.GA] .
  * Owen  _et al._ (2022) E. R. Owen, A. K. H. Kong, and K.-G. Lee, Monthly Notices of the Royal Astronomical Society 513, 2335 (2022).
  * Cooray (2016) A. Cooray, Royal Society Open Science 3, 150555 (2016), arXiv:1602.03512 [astro-ph.CO] .
  * Singh  _et al._ (2021) K. K. Singh, K. K. Yadav, and P. J. Meintjes, Astrophys. Space Sci. 366, 51 (2021), arXiv:2105.14293 [astro-ph.CO] .
  * Yan-kun and Hou-dun (2022) Q. Yan-kun and Z. Hou-dun, Chin. Astron. Astrophys. 46, 42 (2022).
  * Mattila and Väisänen (2019) K. Mattila and P. Väisänen, Contemp. Phys. 60, 23 (2019), arXiv:1905.08825 [astro-ph.GA] .
  * Lunardini  _et al._ (2013) C. Lunardini, E. Sabancilar, and L. Yang, JCAP 08, 014 (2013), arXiv:1306.1808 [astro-ph.HE] .
  * Caddy  _et al._ (2022) S. E. Caddy, L. R. Spitler, and S. C. Ellis, arXiv preprint arXiv:2205.16002 (2022).
  * Bernal  _et al._ (2022) J. L. Bernal, A. Caputo, G. Sato-Polito, J. Mirocha, and M. Kamionkowski, (2022), arXiv:2208.13794 [astro-ph.CO] .
  * Kalashev  _et al._ (2019) O. E. Kalashev, A. Kusenko, and E. Vitagliano, Phys. Rev. D 99, 023002 (2019), arXiv:1808.05613 [hep-ph] .
  * Korochkin  _et al._ (2020a) A. Korochkin, A. Neronov, and D. Semikoz, Astron. Astrophys. 633, A74 (2020a), arXiv:1906.12168 [astro-ph.HE] .
  * Korochkin  _et al._ (2020b) A. Korochkin, A. Neronov, and D. Semikoz, JCAP 03, 064 (2020b), arXiv:1911.13291 [hep-ph] .
  * D’Olivo  _et al._ (2006) J. C. D’Olivo, L. Nellen, S. Sahu, and V. Van Elewyck, Astropart. Phys. 25, 47 (2006), arXiv:astro-ph/0507333 .
  * Ruffini  _et al._ (2016) R. Ruffini, G. V. Vereshchagin, and S. S. Xue, Astrophys. Space Sci. 361, 82 (2016), arXiv:1503.07749 [astro-ph.HE] .
  * Franceschini (2021) A. Franceschini, Universe 7, 146 (2021).
  * Nikishov (1961) A. Nikishov, Zhur. Eksptl’. i Teoret. Fiz. 41 (1961).
  * Fazio and Stecker (1970) G. G. Fazio and F. W. Stecker, Nature 226, 135 (1970).
  * Loeb (2022) A. Loeb, Res. Notes AAS 6, 148 (2022), arXiv:2207.00671 [hep-ph] .
  * Breit and Wheeler (1934) G. Breit and J. A. Wheeler, Phys. Rev. 46, 1087 (1934).
  * Gould and Schréder (1967) R. J. Gould and G. P. Schréder, Phys. Rev. 155, 1404 (1967).
  * Ruffini  _et al._ (2010) R. Ruffini, G. Vereshchagin, and S.-S. Xue, Phys. Rept. 487, 1 (2010), arXiv:0910.0974 [astro-ph.HE] .
  * Brown  _et al._ (1973) R. Brown, K. Mikaelian, and R. Gould, Astrophysical Letters 14, 203 (1973).
  * Zyla  _et al._ (2020) P. A. Zyla _et al._ (Particle Data Group), PTEP 2020, 083C01 (2020).
  * Roulet (1993) E. Roulet, Phys. Rev. D 47, 5247 (1993).
  * Barenboim  _et al._ (2005) G. Barenboim, O. Mena Requejo, and C. Quigg, Phys. Rev. D 71, 083002 (2005), arXiv:hep-ph/0412122 .
  * Caputo  _et al._ (2022) A. Caputo, G. Raffelt, and E. Vitagliano, Phys. Rev. D 105, 035022 (2022), arXiv:2109.03244 [hep-ph] .
  * Lide (2007) D. Lide,  _CRC Handbook of Chemistry and Physics, 88th Edition_ (Taylor & Francis, 2007).
  * Abdo  _et al._ (2011) A. A. Abdo _et al._ (Fermi-LAT), Astrophys. J. 734, 116 (2011), arXiv:1104.2093 [astro-ph.HE] .
  * Ianni (2014) A. Ianni, Phys. Dark Univ. 4, 44 (2014).
  * Ackermann  _et al._ (2015) M. Ackermann _et al._ (Fermi-LAT), Astrophys. J. 799, 86 (2015), arXiv:1410.3696 [astro-ph.HE] .
  * Maier  _et al._ (2020) G. Maier, L. Arrabito, K. Bernlöhr, J. Bregeon, P. Cumani, T. Hassan, J. Hinton, and A. Moralejo (CTA Consortium), PoS ICRC2019, 733 (2020), arXiv:1907.08171 [astro-ph.IM] .
  * Abeysekara  _et al._ (2017) A. U. Abeysekara _et al._ , Astrophys. J. 843, 39 (2017), arXiv:1701.01778 [astro-ph.HE] .
  * Abeysekara  _et al._ (2019a) A. U. Abeysekara _et al._ (HAWC), Astrophys. J. 881, 134 (2019a), arXiv:1905.12518 [astro-ph.HE] .
  * Cao  _et al._ (2023a) Z. Cao _et al._ (LHAASO), (2023a), arXiv:2305.05372 [astro-ph.HE] .
  * Cao  _et al._ (2023b) Z. Cao _et al._ (LHAASO), (2023b), arXiv:2305.17030 [astro-ph.HE] .
  * Abeysekara  _et al._ (2019b) A. U. Abeysekara _et al._ (HAWC, IceCube), Astrophys. J. 871, 96 (2019b), arXiv:1812.05682 [astro-ph.HE] .
  * Abeysekara  _et al._ (2018) A. U. Abeysekara _et al._ , Astrophys. J. 865, 57 (2018), arXiv:1805.01847 [astro-ph.HE] .
  * Kogut  _et al._ (1993) A. Kogut _et al._ , Astrophys. J. 419, 1 (1993), arXiv:astro-ph/9312056 .
  * Wiedenbeck  _et al._ (2018) M. E. Wiedenbeck _et al._ , PoS ICRC2017, 016 (2018).
  * Aartsen  _et al._ (2018) M. G. Aartsen _et al._ (IceCube), Phys. Rev. D 98, 062003 (2018), arXiv:1807.01820 [astro-ph.HE] .


# Bioacoustic Event Detection with prototypical networks and data augmentation

###### Abstract

This report presents deep learning and data augmentation techniques used by a
system entered into the Few-Shot Bioacoustic Event Detection for the DCASE2021
Challenge. The remit was to develop a few-shot learning system for animal
(mammal and bird) vocalisations. Participants were tasked with developing a
method that can extract information from five exemplar vocalisations, or
shots, of mammals or birds and detect and classify sounds in field recordings.
In the system described in this report, prototypical networks are used to
learn a metric space, from which classification is performed by computing the
distance of a query point to class prototypes, classifying based on shortest
distance. We describe the architecture of this network, feature extraction
methods, and data augmentation performed on the given dataset and compare our
work to the challenge’s baseline networks.

Index Terms—  Few-shot Learning, Prototypical Networks, Data Augmentation,
SED, Activity Detection

##  1 Introduction

Few-shot learning has emerged as a promising tool for sound event detection,
and is particularly relevant for bioacoustics applications. Few-shot learning
systems must generalise to new classes unseen during training, given only a
few labelled instances of each class. This makes them highly suitable to tasks
such as the monitoring of animal populations through their vocalisations,
where the data for a dedicated classifier may be costly to annotate, and may
lose some generalisation.

In the DCASE 2021 Few-shot Bioacoustic Event Detection challenge, participants
are asked to provide the onset and offset times of events in a given audio
file, given 5 labelled examples of the class of interest. Four separate data
sets are provided for training, with a further two for validation. The
training set comprises of 14 hours, 20 minutes and contains 19 separate
classes, and 4686 events. These classes include bird species, hyenas, and
meerkats. The validation set contains 5 hours of audio, 4 classes and 310
events. There is no overlap between these two development sets. Further
details are provided in [1] and [2]. Evaluation Data contains only the first 5
positive events for each file, with the aim to use the system to predict all
other positive events [3].

Prototypical networks can be applied to a few-shot learning problem such as
the task proposed in the challenge. They are considered a model based approach
to the problem of few-shot learning by Wang et al [4], which aims to reduce to
constrain the hypothesis space using prior knowledge. This is achieved by
learning a non-linear mapping between inputs and a metric/embedding space.
Class support points should then be sufficiently separated from each other and
a prototype representation of the classes constructed [5]. This prototype is
constructed as the mean of the support set (which are the labelled instances
of the new unseen data to be classified). Classification of each query point
is done by finding its nearest class prototype according to some distance
function $\mathit{d_{\phi}}(\mathbf{x},\mathbf{x^{\prime}})$, typically the
distance function employed is Euclidean distance.

In this regard, prototypical networks are similar to clustering algorithms and
nearest neighbour classification in particular, where the prototype
representations of each class are the neighbours to the query point. The
efficiency and simplicity in these networks makes them an appealing approach
to the problem posed in this challenge.

##  2 Implementation Details

As mentioned in both Section 1 and the challenge description, few-shot
learning is a novel task. Several methods have emerged as solutions to the
task, such as matching networks, however we felt prototypical networks offered
the most promising approach to the problem. As such, we propose in this
section a modified version of the baseline Prototypical Network, implementing
a modified network architecture, as well as data augmentation to supplement
training data and validation data.

###  2.1 Data Preparation

All audio files in both the development and evaluation sets are first
resampled to a sampling rate of 22050Hz and normalised prior to their
transformation into Mel spectrograms. We do not apply any band pass filtering
to the audio signals due to the variety of species in the available datasets.
Future work could apply a custom filter to each dataset based on the typical
frequency ranges present, but as this network is designed to generalise to
new, unseen classes, we decided against implementing this for this submission.
Each audio file is transformed to a Mel spectrogram, with 128 Mel bins, an FFT
size of 1024 samples and a hop of 256 samples. This is the same configuration
present in the baseline system.

We also preform Per-Channel Energy Normalisation (PCEN) on the spectrograms
(proposed as method of improving robustness to channel distortion in keyword
spotting tasks [6]), in order to both reduce noise in the spectrogram and
provide normalisation, gain control and compression the file. PCEN has been
proposed as an alternative logarithmic scaling of the Mel spectrograms [7].
PCEN does reduce the noise present in the spectrogram, but non-stationary
sources of noise still pose an issue and can contaminate features. In our
experiments, we tested our systems using both log-Mel spectrograms and PCEN
Mel spectrograms.

###  2.2 Data Augmentation

Figure 1: Example spectrograms on a 10s clip from the JD subset, (1) Log-Mel
Spectrogram, (2) PCEN Front-end, (3) Time warping by 20%, (4) Mixture of time
and frequency masking. PCEN representations when converted to an image, are
more difficult to see than log scaled spectrograms, therefore we have decided
to present the augmentations using log-scaled spectrograms.

To increase the model performance and create an embedding space that can
generalise to loss of information, temporal/frequency shift and new classes,
we apply various data augmentation techniques to the resulting spectrogram
representations. These data augmentations are based upon work in [8] and [9].
These augmentations are achieved using pyTorch’s Audio toolset, Torchaudio,
which uses the methods specified in [8].

  * •

Time stretching \- We apply a time stretch to each spectrogram, both
shortening and lengthening of the spectrogram without any change in pitch
info. This translates to a warping along the horizontal axis of the
spectrogram according to a specified factor. In our system we have chosen a
stretching factor of 5%, corresponding to two augmented spectrograms at
effectively 0.95x and 1.05x the playback speed of the original audio file.

  * •

Time masking \- Time masking is applied such that $T$ consecutive time steps
are masked, with all frequency information set to 0 within that interval. The
interval is randomly chosen from a uniform distribution, as per Torchaudios
implementation. Due to the considerable length of each file in the data set,
this is applied to each 10s chunk of audio, before being reconstructed prior
to dataset construction.

  * •

Frequency masking \- Frequency masking performs a similar augmentation on the
vertical, or frequency axis of the spectrogram. Again this is applied in
chunks of 10s so as to increase the variability in augmented data.

Examples of these augmentations, and the PCEN front-end, are seen in Figure 1.
Note, that while we show both time masking and frequency masking in the one
spectrogram to save space, we did not perform this augmentation on the data
itself.

These augmentations create more data to train and validate the model during
development. After augmentation, the validation and evaluation data is
transformed into the appropriate dataset form, comprising of positive data
points to construct the positive class prototype, negative data points to
construct the negative class prototype, and all remaining data to be query
points. To prevent class imbalance when training, Random Over Sampling is
employed. This is necessary as there is a severe skew in the class
distribution of the data, with the majority of occurrences belonging to the
negative class.

###  2.3 Model Architecture

The submitted model architecture is similar to that proposed in the baseline,
we have modified the encoder to a less deep model, only using 3 ConvBlocks in
place of the 4 in the baseline. Each layer grouping is made up of a Conv2D
layer, Batch Normalisation, a ReLU activation layer, and followed by a 2D Max
Pooling layer, with pool-size (2, 2). Table 1 details the resulting
architecture and the ConvBlock sub-block.

Table 1: Architecture of ConvBlock layer and Encoder Architecture
ConvBlock Architecture
---
Sub-Layer 1 | Conv2D
Sub-Layer 2 | BatchNorm
Sub-Layer 3 | ReLU
Sub-Layer 4 | MaxPool2D((2,2))
Encoder Architecture
Layer 1 | ConvBlock | 128
Layer 2 | ConvBlock | 128
Layer 3 | ConvBlock | 128
Layer 4 | Flatten |

###  2.4 Training

Training of the prototypical network involves minimisation of the negative
log-probability of a point to its true class, achieved using the Stochastic
Gradient Descent (SGD) algorithm with an initial learning rate of $0.01$ and a
momentum factor of $0.85$. Learning rate is scheduled to halve when a plateau
is reached, with a patience of 5 epochs and a threshold of 0.01. In our
experiments this provided the best environment for training. All our models
are trained using 150 epochs, however the best performing model had minimum
loss at epoch 126. As we are using additional augmented data, training time
can be increased without risk of over-fitting to the training data.

Training is performed in episodic batches using a custom episodic batch
sampling function, easily added to the pyTorch framework. Each episode is
randomly generated from the available data, creating a randomised support and
query set. Prototypes are computed from the support samples and loss on query
points is calculated as per Equation 1.

$\displaystyle J\leftarrow J+$
$\displaystyle\frac{1}{N_{C}N_{Q}}\big{[}\mathit{d}(\mathit{f_{\phi}}(\mathbf{x}),\mathbf{c}_{k})+\log\sum_{k^{\prime}}e^{-\mathit{d}(\mathit{f_{\phi}}(\mathbf{x}),\mathbf{c}_{k^{\prime}})}\big{]}$
(1) Where, $\displaystyle\mathit{d}(\cdot)\rightarrow\text{ Euclidean distance
function}$ $\displaystyle\mathit{f_{\phi}}\rightarrow\text{ embedding of query
set}$ $\displaystyle\mathbf{c}_{k}\rightarrow\text{ class prototype for class
}k$ $\displaystyle N_{C},N_{Q}\rightarrow\text{ number of classes and query
points}$

In Figure 2 we have provided the average validation loss during training of a
model trained on Mel spectrograms using log-scaling and no augmentation, Mel
spectrograms using log-scaling and data augmentation, and finally Mel
spectrograms using PCEN and data augmentation. Models using augmented features
take longer to train than those which do not, and the usage of PCEN further
increases the time necessary for the model to converge on a minimum. Although
models using augmented data and PCEN do not achieve lower loss than the
original data using log-Mel spectrograms, as seen in Section 3 this does not
lead to worse results, in fact they do perform better on this task.

Figure 2: Average validation loss for system with log-Mel spectrograms,
augmentation, and PCEN + augmentation.

###  2.5 Evaluation & Post-Processing

Evaluation of the model involves calculating the probability of whether a
query point belongs to the positive class, achieved by taking the softmax of
the distances between query points and the two class prototypes as in Equation
2.

$\displaystyle\mathit{p_{i}}(y=c_{k}|\mathbf{x})$
$\displaystyle=\frac{\exp(-\mathit{d}(\mathit{f_{\phi}}(\mathbf{x}),c_{k}))}{\sum_{k^{\prime}}\exp(-\mathit{d}(\mathit{f_{\phi}}(\mathbf{x}),c_{k^{\prime}}))}$
(2)

$\mathit{\mathbf{p}}$ is the set of probabilities for each iteration (Equation
3). Five iterations of this operation are performed, after which the average
of the probabilities is taken. The chosen class is the one with the highest
mean probability over all iterations as per Equation 4. Thresholding of
probabilities is set to 0.5, although this could be tuned depending on
application, and whether recall or precision is valued more.

$\displaystyle\mathit{\mathbf{p}}=\\{\mathit{p_{1}},...,\mathit{p_{i}}\\}$ (3)
$\displaystyle\mathit{P_{\phi}}(y=c_{k}|\mathbf{x})=E\big{[}\mathit{\mathbf{p}}\big{]}$
(4)

For a given file, this results in a classification of each segment as either
positive or negative. To prevent abrupt transitions where the classifier may
have incorrectly classified a segment in the middle of a vocalisation, median
filtering with a window length of 5 samples is applied. Edge detection is
performed using a 1D edge detection kernel, convoluted with the classification
results at the output of the median filtering stage (Equations 5 and 6) to
determine the points where onset the onset and offset of an event occurred.
The output of this convolution contains the value $1$ at the index of onset,
and $-1$ at the index of offset.

$\displaystyle k[n]=[1,-1]\text{, edge detection kernel}$ (5)
$\displaystyle(y\ast k)[n]=y[n]-y[n-1]$ (6)

Onset and offset times may then be calculated and written to a CSV file. These
onset and offset times are further post-processed using a method proposed by
the baseline, where any positive instances that are shorter than 60% the
length of the shortest positive labelled instance, are dropped from the final
results. Evaluation of results with and without this post-processing step show
that it reduces the amount of false positive events with little change in the
amount of true positives registered. Results of experimentation with the
minimum allowed event length vary by file, and may warrant future
investigation.

##  3 Results

Performance is evaluated on the validation data, provided in the development
set released as part of the challenge. We utilise the evaluation method
provided by the challenge organisers, which creates a confusion matrix for
each file, and calculates precision, recall, and the F-measure.

Given the similarity of our system to that of the baseline, we decided to
reproduce the baseline prototypical methods results for comparison with ours.
Unfortunately, we could not replicate the results stated in the challenge,
achieving at most an F-measure of $30.437\%$.

In Table 2, we summarise the results on the validation data provided in the
development set on the baseline, and three progressive iterations of our
system (Log-Mel spectrogram, Log-Mel Spectrogram with augmentation, Mel
spectrogram with PCEN and augmentation).

The best performing model utilises both PCEN on the front-end, and data
augmentation to give our best result of $26.243\%$ on the F-measure metric.
Breakdown of results by each subset provided for validation can be seen in
Table 3.

Table 2: Table of results on validation set. Model | F-Meas. (%) | Pre. | Rec.
---|---|---|---
Baseline Reproduction | 30.437 | 0.456 | 0.228
Log Mel Spectrograms | 16.565 | 0.108 | 0.355
Data Aug. | 20.517 | 0.143 | 0.360
Data Aug. + PCEN | 26.243 | 0.200 | 0.381
Table 3: Results by validation data subset. Data Sub-Set | F-Meas. (%) | Pre. | Rec.
---|---|---|---
PB | 22.222 | 0.201 | 0.249
HV | 32.039 | 0.199 | 0.825

##  4 Discussion

The model architecture we have chosen is similar to that of the baseline,
however we have applied various data augmentation methods to the training data
to increase model robustness.

Our aim of improving on the baseline results has not been met, as our
F-measure is $\approx 4.2\%$ below that of our reproduced baseline. We have
made significant improvements to recall, our system is capable of recognising
$38\%$ of calls in the validation set, but this has come at the cost of
precision, as we have many false positives in our predictions. Future work to
improve this may focus on the post processing applied to the data after
initial inference. We may also employ deeper models in the future, as there is
the possibility that the learned embedding space does not separate the two
classes well enough, with suppor points not being sufficiently far away from
each other.

Improvement was mostly gained through the usage of PCEN over the more
traditional approach of log-scaling the Mel spectrogram, lending evidence to
the claim in [7] that PCEN can significantly outperform log-Mel scaling when
used on noisy data, with no significant increase in computational complexity.
Our methods of data augmentation also improved on our initial log-Mel
spectrogram model, and was further improved by the addition of PCEN. Other
methods of data augmentation (such as additional noise from other files,
piece-wise frequency stretching, etc.), and augmentation of support points for
evaluation should also be investigated. Interestingly, although the average
validation loss of models trained using data augmentation was greater than
that of the log-Mel spectrograms, their performance when evaluating the
validation set was greater. We also found that they could be trained for
longer, reaching a minimum less quickly than the original log-based features
without augmentation or PCEN.

To conclude, our results of our system show that few-shot learning for
bioacoustics applications with prototypical networks is still a novel and
challenging task which is in its infancy, but one which can rapidly improve
going forward.

##  5 Acknowledgements

The authors would like to thank the organisers of this challenge, for
proposing an interesting and novel problem which is relevant to our own
research. We also want to thank the ADAPT Centre for the usage of their
’Boole’ cluster when developing this system. The ADAPT Centre for Digital
Content Technology is funded under the SFI Research Centres Programme (Grant
13/RC/2106) and is co-funded under the European Regional Development Fund.

## References

  * [1] V. Morfi, D. Stowell, V. Lostanlen, A. Strandburg-Peshkin, L. Gill, H. Pamula, D. Benvent, I. Nolasco, S. Singh, S. Sridhar, and et al., Feb 2021. [Online]. Available: http://dcase.community/challenge2021/task-few-shot-bioacoustic-event-detection
  * [2] ——, “Dcase 2021 task 5: Few-shot bioacoustic event detection development set,” Feb 2021. [Online]. Available: https://zenodo.org/record/4543504
  * [3] ——, “Dcase 2021 task 5: Few-shot bioacoustic event detection evaluation set,” May 2021. [Online]. Available: https://zenodo.org/record/4864755
  * [4] Y. Wang, Q. Yao, J. T. Kwok, and L. M. Ni, “Generalizing from a few examples: A survey on few-shot learning,” _ACM Computing Surveys_ , vol. 53, no. 3, pp. 1–34, 2020.
  * [5] J. Snell, K. Swersky, and R. Zemel, “Prototypical networks for few-shot learning,” in _Advances in Neural Information Processing Systems_ , vol. 2017-December, 2017, pp. 4078–4088.
  * [6] Y. Wang, P. Getreuer, T. Hughes, R. F. Lyon, and R. A. Saurous, “Trainable frontend for robust and far-field keyword spotting,” in _Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Conference on_. IEEE, 2017, pp. 5670–5674.
  * [7] V. Lostanlen, J. Salamon, A. Farnsworth, S. Kelling, and J. P. Bello, “Robust sound event detection in bioacoustic sensor networks,” _PLOS ONE_ , vol. 14, no. 10, pp. 1–31, 10 2019. [Online]. Available: https://doi.org/10.1371/journal.pone.0214168
  * [8] D. S. Park, W. Chan, Y. Zhang, C.-C. Chiu, B. Zoph, E. D. Cubuk, and Q. V. Le, “Specaugment: A simple data augmentation method for automatic speech recognition,” _Interspeech 2019_ , Sep 2019. [Online]. Available: http://dx.doi.org/10.21437/Interspeech.2019-2680
  * [9] M. Lasseck, “Acoustic bird detection with deep convolutional neural networks,” _Proceedings of the Detection and Classification of Acoustic Scenes and Events 2018 Workshop_ , 2018. [Online]. Available: http://dcase.community/documents/challenge2018/technical˙reports/DCASE2018˙Lasseck˙76.pdf