Searching for long faint astronomical high energy transients: a data driven approach

HERMES (High Energy Rapid Modular Ensemble of Satellites) pathfinder is an in-orbit demonstration consisting of a constellation of six 3U nano-satellites hosting simple but innovative detectors for the monitoring of cosmic high-energy transients. The main objective of HERMES Pathfinder is to prove that accurate position of high-energy cosmic transients can be obtained using miniaturized hardware. The transient position is obtained by studying the delay time of arrival of the signal to different detectors hosted by nano-satellites on low Earth orbits. To this purpose, the goal is to achive an overall accuracy of a fraction of a micro-second. In this context, we need to develop novel tools to fully exploit the future scientific data output of HERMES Pathfinder. In this paper, we introduce a new framework to assess the background count rate of a space-born, high energy detector; a key step towards the identification of faint astrophysical transients. We employ a Neural Network (NN) to estimate the background lightcurves on different timescales. Subsequently, we employ a fast change-point and anomaly detection technique to isolate observation segments where statistically significant excesses in the observed count rate relative to the background estimate exist. We test the new software on archival data from the NASA Fermi Gamma-ray Burst Monitor (GBM), which has a collecting area and background level of the same order of magnitude to those of HERMES Pathfinder. The NN performances are discussed and analyzed over period of both high and low solar activity. We were able to confirm events in the Fermi/GBM catalog and found events, not present in Fermi/GBM database, that could be attributed to Solar Flares, Terrestrial Gamma-ray Flashes, Gamma-Ray Bursts, Galactic X-ray flash. Seven of these are selected and analyzed further, providing an estimate of localisation and a tentative classification.


Introduction
Gamma-Ray Bursts (GRBs) originate in extraordinarily energetic explosions taking place in distant galaxies.They appear as irregular pulses of X and γ-ray radiation in detectors of today work-horse satellites such as SWIFT, INTE-GRAL, Fermi, and Agile.The typical distribution of GRBs duration is bimodal; 'long bursts', lasting longer than 2s, are associated with black hole formation in collapsars, while 'short bursts', lasting less than 2s, are associated to mergers of binary neutron stars Woosley [1993], Berger [2014].
Present instrumentation dedicated to GRBs and cosmic transients has been launched during the 2010s.There is no guarantee that it will continue to operate beyond the mid-2020s.For this reason, several proposals to NASA and ESA have been already submitted to select the successors of these instruments.The High Energy Rapid Modular Ensemble of Satellites (HERMES) concept is to develop a constellation of nano-satellites to study high-energy transients Fiore et al. [2020], Fiore et al. [2021], thus providing a fast-track and affordable solution bridging the gap between current X-ray monitors and the next generation.A technological and scientific pathfinder (HERMES-TP, funded by ASI and HERMES-SP funded by the European Commission, HERMES pathfinder hereafter) is in preparation to prove the concept, that is the capability to detect and localize GRBs with miniaturized instrumentation hosted by nano-satellites.The first six HERMES Pathfinder spacecrafts are expected to be launched in low-Earth, near-equatorial orbit during 2024.A seventh payload unit identical to those hosted by HERMES Pathfinder is also hosted by the Australian SpiRIT satellite, to be launched during 2023.The HERMES Pathfinder and SpIRIT payload is a small yet innovative "siswich" detector providing broad-band energy coverage (few keV -1 MeV) and very good temporal resolution (a few hundreds ns) Fuschino et al. [2019], Evangelista et al. [2020], Fiore et al. [2022], Evangelista et al. [2022].
GRBs manifest as transient increases in the count rates of detectors.The activity of these phenomena appear as unexpected, and not explainable in terms of background or any other known sources.Any automated procedure for detecting GRBs is generally concerned with searching the time series of the observations for statistically significant excesses in photon counts, relative to a reference background estimate in the absence of γ/X-ray GRB related events.The on-orbit physical background observed by GRB monitor experiments is determined by factors inherent to the highly dynamical near-Earth radiation environment, to the spacecraft geographic position and attitude, as well as the spacecraft geometry, and the detector's pointing, design and response.Given the difficulty intrinsic to a real-time modelling of the expected scientific background, algorithms dedicated to the 'online' search of GRBs often resort to extrapolate the background from recent observations.For example, the trigger algorithms running on-board NASA Fermi/GBM assess a background estimate from an average of the photon count rate observed over the previous 17 s excluding the most recent 4 s of observations Meegan et al. [2009]; similar moving average approaches were used by Compton-BATSE Paciesas et al. [1999] and BeppoSAX-GRBM Feroci et al. [1997].
In 'offline' analysis, archival data are searched for GRB events that the online and on-board algorithms may have missed.Examples of this approach can be found in Kommers [1999], which uses the BATSE catalog, or in Kocevski et al. [2018] and Hui et al. [2017] where they search for faint, short GRBs at times compatible with known gravitational wave events.In Biltzinger et al. [2020] for example, an estimate is assessed starting from detailed models of the background expected for GBM, such as the detector response, the cosmic γ-ray background, the solar activity, the geomagnetic environment, the Earth albedo and the visibility of X and γ point sources.The background description so achieved has been shown to reproduce very well the observations of Fermi/GBM and could potentially allow for the identification of otherwise hard to detect GRBs such as long-weak events with slow raising times.However, having been specifically tailored for the observations of Fermi/GBM, this technique is not immediately applicable to other experiments.In Sadeh [2019] a Recurrent Neural Network (RNN LeCun et al. [2015]) is used to predict the background and, on top of it, classify or detect anomalies in the observations of a count-rate detector.To recognize a GRB event, this RNN is trained onto existing catalogues of burst observations.We believe such an approach could inherit the detection biases of standard strategies for GRB detection, ultimately leading to missing events which already defied previous searches.
In Section 2 we introduce our approach to estimate the scientific background of a gamma-ray burst monitor experiment using a Neural Network (NN).In particular, we employ a Feed Forward Neural Network (Bishop et al. [1995]) to estimate the count-rates expected from background sources over the 12 NaI detectors of Fermi/GBM, in different energy bands and at regular time intervals.Our model is designed to learn the dynamics of the background over a timescale of months, enabling the detection of long-GRBs or even ultralong-GRBs Gendre et al. [2019], as shown in an example in Section A. Moreover, employing a robust loss function in the training phase, we are able to deal with outliers in count-rate observations, such as transients due to astronomical events or brief period of detector inactivity C. The choice of applying our framework to archival data from Fermi was motivated by the facts that (1) the HERMES Pathfinder spacecrafts are expected to be launched in a low inclination orbit with altitude 500 − 550 km, an orbit where the background and its variations are expected to be smaller than those of Fermi/GBM Meegan et al. [2009]; and (2) the Fermi/GBM and HERMES Pathfinder detectors both rely onto scintillators and have similar effective areas Bissaldi et al. [2009], Campana et al. [2020], Dilillo et al. [2022] resulting in background count-rates of the same order of magnitude.To estimate the background observed by Fermi/GBM, we leverage on a large ensemble of information, including features both intrinsic to the satellite and its orbital setting such as the satellite attitude and geographic location in time, the Sun visibility and so on.This idea is consistent with Fitzpatrick et al. [2012], which describes a method that estimates the background at the period of interest by using rates from adjacent days when the satellite has similar geographical footprint.To retrieve these information's we use the Fermi/GBM Data Tools Goldstein et al. [2021] software package, an Application Programming Interface (API) allowing to download, analyse and visualise GBM data.Being completely data-driven, we believe our approach to be in principle applicable to any GRB monitor experiment for which a similar dataset is available.
The background estimates produced by the NN are compared with the observations by mean of an efficient change-point detection technique called FOCuS-Poisson Ward et al. [2022], aiming at the automatic identification of statistically significant astrophysical transients.We tested the combination of the NN background estimates and FOCuS-Poisson trigger on real Fermi/GBM data.We were able to confirm known events, but we also find events with no counterpart in the Fermi/GBM trigger catalog1 [Von Kienlin et al., 2020], yet with features resembling astronomical transients such as GRBs and solar flares and other galactic high-energy sources.
The paper is organised as follows.In Section 2 we present the background estimation in a supervised Machine Learning settings, the architecture of the NN and the FOCuS-Poisson change-point detection technique.In Section 3 we describe the data used and the pre-processing steps to build the dataset.In Section 4 we report the performance of the NN estimator and the result of the application of the trigger algorithm.A comparison between the background estimated in a period of solar maxima and in a solar minima is described in the Appendix C. In Section 5 we discuss the results of our search for undiscovered astrophysical transients.We identify 110 events with no counterpart in GBM trigger catalog over a period of about 9 months.We report on a subset of seven events providing lightcurves, localization and classification.Finally, in Section 6 we draw our conclusions and discuss future prospects.

Methodology
The background assessment problem is expressed as a supervised Machine Learning estimator, with the variables inherent to the satellite and its orbital position as inputs and the count-rate observed by each detector in three different energy bands as outputs.The background estimates so obtained are compared against the actual observations using FOCuS-Poisson.The significance of the excess in the count observations relative to the background model is quantified in units of standard deviations and recorded as a time series.Finally, these records are searched for intervals in the observation where the excess significance exceeds a threshold over one or more detector-energy band combinations.

Background estimation
We define X as the input variables, see col_sat_pos and col_det_pos in Section 3, and Y as the output variables, see col_range in Section 3. We suppose that a function f (X) exists which predict Y given X, that is the solution that minimize where L is the loss function that quantify the error in the predictions.The model's goal is to estimate a quantity F (x) such that f (x) ≈ F (x) Hastie et al. [2009].Here we are dealing with a multi-output regression: where k is the number of features into the model and m the number of outputs.The model employed is a feed forward neural network with 3 hidden dense layers (Figure 1).Each hidden layer is followed by a batch normalization layer Ioffe and Szegedy [2015] and a dropout layer Srivastava et al. [2014].The NN is implemented in Tensorflow Abadi et al. [2015].The input layer has dimension k = 60.Each of the first two hidden layers is composed of 2048 neurons, while the third hidden layer hosts 1024 neurons.The last (output) layer has m = 36 neurons.Each of the output neurons is associated with a particular detector-energy combination.The probability parameter for the drouputs is 0.02.The optimizer used is Nadam Ruder [2016] with learning rate η varying (1) We run the fitting for 64 epochs with a batch size of 2048.
In a pre-processing step, the input training dataset is standardised and filtered.Data filtering takes place in two steps in which the following data subsets are removed: • data collected while Fermi is transiting through the high radiation environment of the South Atlantic Anomaly (SAA).
• data acquired at times in which an event of the Fermi/GBM trigger catalog occurred.
This latter choice isn't strictly necessary, yet it is useful to better understand the neural network performances over known events.The splitting procedure divides the dataset in 75% train, 25% test; 30% of the training set is further kept as validation set.The resulting splitting is: 52% train, 23% validation and 25% test.The instances inside these sets are not sequential but rather taken randomly.
The purpose of our framework is to evaluate the effectiveness of our model on a known dataset, hence the choice of a loss function L which is robust against outliers is critical.The Mean Square Error loss function (MSE) is: (2) MSE is very sensitive to the discrepancy between the prediction and the target value, thus it is a bad choice when outliers are present in the training dataset.We remark that the filtering of catalog events is not enough to guarantee the optimization of the background estimator when using MSE.Indeed, anomalous events, which are not present in the GBM catalog, may be over-fitted when minimizing MSE; these events are the actual targets of our search.
The Mean Absolute Error (MAE) loss function is less sensitive to residuals: In respect to MSE, MAE will result in better neural network performances when anomalous events are included in the training dataset.In the settings of multi-output regression, the overall loss L is define as the MAE average of the NN outputs:

Trigger algorithm
An efficient change-point and anomaly detection algorithm called FOCuS-Poisson (Functional Online CUSUM) Ward et al. [2022] is employed to find anomalous transients in Fermi CSPEC data relative to the NN estimates of the background.
The FOCuS-Poisson algorithm is executed sequentially over the time series of the observed count data and the background estimates, separately for each combination of detectors and energy range.For a given detector-energy range combination with label i and a given time step t, FOCuS-Poisson outputs an estimate of the maximum significance in the observed count excess relative to the background, m t .This value is computed over an optimal time interval ending at t and starting at a past time-step t − d.Crucially, the interval length d is not predetermined but rather assessed and optimized by the algorithm itself, conditionally on the observations.The significance values m (i) t are recorded, in units of standard deviations, in a table with dimensions M × N , where M equals the length of the input time series and N equals the number of detector-energy range combination.From these table, candidate transients are extrapolated in two steps.The first step is to identify vertical table slices (rows segments) where a trigger condition is verified.The second step is to cluster together segments whose start and end times are closer than a pre-defined value (nominally 600 s).The user controls the search's output through three parameters.For the trigger condition to be verified it is required that the significance values exceed a threshold parameter T over a minimum number detectors and energy ranges.Additionally, the user can limit the choice of the best interval to those whose length does not exceed a value d max or whose average intensity, given as a multiplicative factor of the observed counts in relation to the integral of background values, is greater than a minimum µ min .

Data
The Fermi/GBM daily CSPEC data products were used for both the testing and the training of the neural network and for searching astrophysical transient events with FOCuS-Poisson.These data are photon counts with duration 4.096 s, binned over 128 logarithmically spaced energy channels spanning from ≈ 8 keV to ≈ 900 keV Meegan et al. [2009].The time resolution provided by CSPEC data is high enough to investigate long and ultra-long GRBs, yet it is too low to reliably identify short GRBs and other transients with characteristic duration shorter than a few seconds.This is unfortunate, yet justified for our use-case.Indeed, the variability of background over time intervals of duration comparable to the duration of short GRBs is negligible, hence our method provides little benefits relative to simpler approaches such as moving average or exponential smoothing.On the other hand, an accurate description of the background become essential when searching for long, faint events, in particular events whose duration is comparable to that of the Fermi orbit.We consider data from all of the Fermi/GBM's twelve NaI detectors.Each detector is identified according to the standard GBM nomenclature (ten detectors labelled with integers ranging from 0 to 9, two detectors are identified by the letters a and b).In our analysis we disregard the Fermi/GBM bismuth-germanate detectors.These instruments are in fact sensible to energies much greater than the energies typically involved with GRBs prompt emission and are mainly used for the detection and observation of phenomena different from GRBs, such as Terrestrial Gamma-Ray Flashes (TGF) Von Kienlin et al. [2020].To build the target variables Y , the input CSPEC data from each detector are binned anew, this time over three coarser energy ranges (28-50 keV, 50-300 keV and 300-500 keV, see Table 1).The resulting dataset is arranged in a table with 36 columns, one for each of the 36 detector-energy combinations.
Beside the CSPEC data product, the neural network is trained using information on the satellite geographical location and the detectors pointing direction, as well as a number of auxiliary features such as the Earth occultation status and the visibility of the Sun for each detector at a given time.These informations are gathered from the Fermi/GBM POSHIST data products.A detail of the orbital and detectors features used in the training of the NN is given in

Results
In this section we present the results of the background estimator and the trigger algorithm application.The open source code implementation is available on github.com/rcrupi/DeepGRB.

Background estimator performance
To show the effectiveness of this approach, a NN is trained over 7 months of data from January to July 2019.An excerpt of the resulting background estimation is presented in Figure 3 for one detector-range combination.The MAE values are reported in Table 4.The energy range bins are the same as those used in Section 3 and are defined in Table 1.
In Appendix A, the NN background prediction over a dataset comprising GRB091024 are compared to the results of an established physical Fermi/GBM background model Biltzinger et al. [2020].
In Figure 4 we plot the NN predictions against the corresponding observed value, in particular we filtered out the data points 150 s before and after the SAA. Figure 4 depicts a light-curve with background counts greater than those observed, we discuss this phenomenon later in this Section 5.
The events of interest for this research should be found when the observed count rates exceed the NN prediction, that are the points below the bisector (see Figure 4) for detectors-range combination.Figure 2: Fermi/GBM NaI-4 detector photon count rates (crosses) in the energy range 50 -300 keV versus the respective prediction from the Neural Network (red solid lines).The lower panel shows the residuals between the two quantities, with a black solid line denoting the reference of null residual.Data span 1400 s and one SAA crossing.Three data events appear to be anomalously low, possibly due to lengthy instrument switch-on and switch-off procedures.may result in a temporary increase of the observed count rates and, taking place at random times and directions, are not predictable from features intrinsic to the Fermi spacecraft motion and attitude, which are the actual inputs of the NN.
The three time periods chosen for the application of the trigger algorithm spans 1 November 2010 to 19 February 2011, 1 January 2014 to 28 February 2014, 1 March 2019 to 9 July 2019.For the sake of brevity, we will refer to these epochs as the '2010', the '2014' and the '2019' periods.These periods are chosen to test the framework under a variety of conditions, including solar activity intensities and potential detector degradation.
A separate NN is trained and tested for each of these periods to account for variations in background count rates over long time scales (years), which may be caused by factors such as the two previously mentioned.We report the performance metrics in Table 5.
Additional details on the neural network's performance during times of both high and low solar activity are provided in Appendix C.

Transients detection
With reference to the technique described in Section 2.2, the following detection parameters were used to obtain the results discussed in this section.The trigger condition was defined to resolve whenever at least one detector observed enough counts for the significance level to exceed a threshold T = 3σ over the range of energy spanning 50 keV and 300 keV.To measure the consistency of the entire event it is computed the Standard Score z: where µ is the mean and σ the standard deviation of the distribution X .Since we are dealing with count rates that follows the Poisson distribution, with sufficiently high count rates we can consider µ ≈ σ 2 .Then the Standard Score can be approximated to: where N is the observed count rates integrated over an interval spanning the event's start time and end time2 and over each triggered detectors.Analogously for B but the total count rates comes from the background estimated by the NN.Standard Score is determined independently for each energy range S r0 , S r1 and S r2 .The overall consistency for the event is defined as: The FOCuS-Poisson algorithm was executed with the parameters d max and µ min set to the values 120.4 s and 1.2 s, respectively.The choice of these parameters was driven by a trade-off between the need to find most astrophysical transients in our dataset both known and potentially unknown and the need to minimize the rate of false detection.
The transient search was performed over three distinct time periods, as defined in the previous section.In the period spanning March 2019 and July 2019 a total of 100 events were identified.Of these, 75 events match the trigger time of events already in the Fermi/GBM Trigger Catalog Von Kienlin et al.
[2020], one event is due to artifacts in the dataset, while the nature of the remaining 24 events is uncertain.These results, along other from the remaining test periods, have been summarized in Table 6.Over the same period, the Fermi/GBM Burst Catalog Von Kienlin et al. [2020] reports on 96 known GRBs.Of these bursts, 15 are missing a counterpart in our dataset due to the clipping of data 150 s before and after a SAA transit.Of the remaining 76 bursts, 68 have T 90 duration larger than the bin-length resolution of our dataset (4.096 s).We were able to correctly identify 60 of these bursts (88%).Finally, we detected 5 out of 13 (34%) GRBs with T 90 duration inferior to the the bin-lenght resolution of our dataset.These results are summarized in Figure 5 and Table 7, the latter also reporting on results from other periods.7: Total number of Fermi/GRBs in the Fermi/GBM Burst Catalog, number of events with missing (no data) counterparts in our dataset due to SAA data clipping (see Section 4.2), fraction of detected bursts with duration greater than the bin-length time resolution of the tested dataset, fraction of detected bursts with duration smaller than the bin-length time resolution of the tested dataset.Each table row corresponds to a different time period.

Discussion
According to Tables 4 the test set and train set MAE values are similar up to 1% indicating no over-fitting and strong generalization across energy range and detector.Table 5 shows that the neural network trained on data from the 2014 period has the highest (worst) MAE, which can be attributed to the presence of strong solar activity.This is understandable since, during an activity maximum, the background particle count rate is more unpredictable due to the influence of the Sun on the local radiation environment (see Figure 6b).Nonetheless, MeAE shows similar performance with the other two periods, thanks to its robustness against outliers.On the other hand, the 2019 period has the lowest MAE most likely due to low solar activity and low background variability.For more details on predictive robustness against high solar activity see Appendix C. Colors are used to identify the detection status within our search.In red the events unidentified with our method.Missing events (no data) are due to clipping of data 150 s before and after a SAA transit or portion of data that could not be preprocessed.
In Figure 4, most of the data points are distributed along the plot bisector y = x, indicating that most often the neural network estimate is in agreement with the actual observations.Above the bisector, more counts are expected than they are actually observed.From spot analysis of these datapoints it is apparent that overestimates in NN prediction often happen when Fermi enters or leaves the SAA, see for example Figure 2. A possible explanation of this behaviour can be rooted in the Fermi/GBM experimental apparatus.Fermi/GBM is composed of multiple photomultipliers.These instruments require high voltages to operate.A "ramp-up" of a photomultiplier to operational voltage takes place over a time span of several seconds.During this time, the photomultiplier amplification factor (the gain) is hindered resulting in lower than nominal count rates.The same effect takes place when "ramping-down" before turning a photomultiplier off.In the lower part of the bisector the observed counts rate exceed the counts estimated.The trigger algorithm's goal is to determine whether this exceeding amount is part of an event or simply a random fluctuation.
In periods of high solar activity, Fermi/GBM data include a large number of soft transient events of solar origin; thus, the soft (25 -50 keV) trigger conditions have been disabled on multiple occasions (e.g.see Table 4 in Bhat et al. [2016] for 2014).Likewise, we required that at least one detector must be over threshold in the energy band spanning 50 and 300 keV in order for the trigger condition to be satisfied.Still, Table 6 shows a higher number of total events for the 2014 period.The majority of these events are most likely associated to solar flares; indeed, 50 of the 81 events in the GBM trigger catalog for this period are solar flares, and the majority of the events we find with no counterpart in the Fermi/GBM trigger catalog are triggered over Sun facing detectors (n0, n1, n2, n3, n4, n5).False detections may be caused by artifacts in the background estimation.These are generally easy to identify; most of the time these artifacts take the form of sudden steps in the background estimate, simultaneously over all detector/range combination.One of these events is represented in Figure 6a.This behaviour is less frequently present in the other two periods analyzed, indicating that noisy background impacts on performance (see MAE) and therefore more false positive are detected.
To further investigate the detected and undetected GRBs, we plot the flux (total fluence divided by T90) vs T90 for our triggered events in Figure 5.The red points are events reported in the Fermi/GBM catalog but undetected by our method.The Fermi/GBM events with a duration less than our time binning (4.096s) are often undetected in our analysis because of the too coarse binning.We also miss a few longer events with low count rates.Reducing the time binning by using data with higher time resolution, such as CTIME or TTE, could be beneficial to capture shorter and fainter events.Despite the unfavorable adopted time binning of 4.096s, we recovered ≥ 75% of the GRBs with T 90 greater than 4.096s, see Table 7.
We also detect many events not present in the Fermi/GBM catalog, and we use the methodology outlined in Kommers [1999] to characterize these transients.More specifically, we classify events as: • Solar flare (SF) when the majority of the counts are in the low-energy range and the Sun is in the field of view of the triggered detectors.
• Terrestrial Gamma-ray Flash (TGF) when most of the counts are in the high-energy range and the event's source reaches the detector from the Earth's horizon.
• Gamma-ray burst (GRB) when most of the counts are in the 50 − 300keV energy range, and the source direction is not occulted by the Earth and is distant from both the Sun and the galactic plane.
• Galactic X-ray flash (GF) when the source direction is compatible with that of the galactic plane.
• Uncertain (UNC) in all other cases.
To determine the source direction, we employ a simple method based on the evaluation of the pointing and the relative photon count rate of the detectors.Further details can be found in Appendix B.
Two classes of transient events are discussed further in this section: events already classified as GRBs in the Fermi/GBM trigger catalog; events not present in the Fermi/GBM catalog but classified by us as candidate GRBs.We report In Table 8 six more events that have no catalog counterpart, suggesting one or more of the previously mentioned categories.All these events are a cherry pick selection of the unknown events in Table 10.

GRB 190320A
At 01:14:16 UTC on March 20, 2019, the long GRB 190320052 triggered the Fermi/GBM on board trigger algorithm across detectors n6 and n9.The estimated T 90 duration is 43 s, with the highest emission component in the 50-300 keV band.In our analysis, the detectors n6, n7, n8, n9 and na all exceeded a 3.0 σ significance threshold during the period event (Figure 7) with a resulting consistency greater than 10 on energy range r1 and 5.74 on r2.The background estimate is comparable to a second order polynomial fitting in the soft energy range and first order polynomial fitting in the 50-300 keV energy range.
Figure 7: The Fermi/GBM catalog GRB190320, as detected by our method.Photon counts from each triggered detector are plotted with step lines, across three energy bands spanning 28 − 50 keV, 50 − 300 keV and 300 − 500 keV (Table 1), with a resolution of 4.096 s.The neural network's prediction of background count rates is represented by solid lines.Different detectors are identified using different colors.The GRB start and end MET time, as reported in the Fermi/GBM burst catalog, is represented by a grey shaded area.A red shaded area limits FOCuS-Poisson's best guess of the transient duration.Times are expressed in units of seconds according Fermi's standard mission elapsed time (MET).

Event 190420939
Figure 8 shows an event not present in the GBM trigger catalog, similar to GRB190320052 but with higher low-energy count rate.The event has been triggered by detectors n6, n7, n8, na and nb in the low energy band with a consistency greater than 10.Two detectors provided a trigger in the 50-300 keV energy band, with a consistency of 8.4.
We can see from the localization estimate in Figure 9 that the event is far from the galactic plane, the Sun, and the Earth's horizon.With all of this information, this event could be a long soft GRB.The localization algorithm used is described in detail in Section B.

Interesting events
We list in Table 8 a selection of interesting events, including the one already discussed, which are not present in the GBM catalog and which deserve further analysis.Appendix D present plots associated to these events.Events 1 and 2 are classified as Solar Flares because their location is close to the Sun and the majority of the detectors triggered are in the energy range r0.Because event 3 is far from the Sun yet close to the galactic plane and the Earth's horizon, it might be a Galactic X-ray flash or a Terrestrial Gamma-ray Flash.Event 4 and 6 are categorized as GRBs for the same reasons as event 5, however because they are near the galactic plane, event 6 might be a Galactic X-ray burst.Finally, in event 7, nine detectors with roughly equal intensities are triggered, suggesting that this event is likely due to Local Particles.This is further validated by the satellite's position at high geomagnetic latitude (Figure 22), which is highly correlated with the localization of charged particle events Von Kienlin et al. [2020]; as a result, the event is classified as uncertain.
The complete catalog of unknown and known events for the three time periods analyzed can be found in Appendix in Tables 10 and 11, respectively.The events are reported with the trigger time, duration, the triggered detectors, the Standard Score for each energy range, and a significance classification.Unknown events were assigned tentative transient classes using the methodology described in this section.Table 8: List of interesting events.We report the ID, the start time in MET and UTC, the end time in MET, the detectors triggered during the event, the localisation expressed in right ascension and declination, the proposed transient class and the consistency of the event .

Conclusion
A novel method for high-energy, transient event detection is presented, integrating the precise estimation of a NN with an efficient trigger algorithm.The method has been designed to be applied to HERMES Pathfinder data, but it can be extended to analyze data from other space-based, high-energy missions and we have presented here an application using Fermi/GBM data.The first step is to estimate the background count rate with a NN using satellite data that may be used to build a physical background model.The accuracy of the background estimate is measured using Mean Absolute Error and Median Absolute Error.An experiment is carried out to assess the robustness of the background estimator during the periods of solar maxima (2014) and solar minima (2020), demonstrating that the background estimation is stable enough to have comparable performance in both periods.Because HERMES Pathfinder will be deployed near the next solar maximum, a scenario of expected count rates is provided in Appendix.The background is then used by FOCuS-Poisson, an evolution of the CUSUM algorithm, to efficiently detect the transient events.This method is tested using three periods of Fermi/GBM data binned in time for 4s.We provide statistics on known and unknown transients in the GBM catalog.We show that with our method we are able to recover known events longer than 4s, and to selected events not included in the Fermi/GBM catalog.Seven of the unknown events are discussed in details.Future work will aim to improve neural network prediction, such as employing a Recurrent Neural Network to provide a smoother signal or reducing time binning to detect shorter events.Also, provide explainability methods to allow the user to explain a specific prediction or debug the NN.

A Background estimate for GRB 091024
To demonstrate the potential of the background estimator in the presence of a long event, a background estimation is performed in a period containing the ultra-long GRB 091024 Gruber et al. [2011], for which a similar evaluation is provided in Biltzinger et al. [2020].
In Figure 10 are shown detectors n0, n6 and n8 in the three energy band specified in Table 1.The data and background estimation of a Neural Network trained and tested during a three-month period, from September 1 to November 30, 2009, are presented in black and red, respectively.The dataset consists of 1.63 million of samples and the hyperparameters are the same used in Section 2.1 except for the learning rate .
The event emerges clearly from the residuals of all the detectors in range r1 and r2, in detector n0 and range r2 it is still visible a peak probably belonging to the end of it.In detector n6 range r0, in the first part of the time series before the peaks of the event, the background estimation underestimates the foreground (data observed).This could be due to a too short period of training dataset, a non optimal parameter settings of the NN, a different event such as Local Particles or, more interestingly, the first part of the GRB, where photon counts were too low to be detected due to background variability.
Figure 10: Observed and background estimate count rates around the event GRB 091024.From left to right the plots refer respectively to range r0, r1, r2, from top to bottom the plots refer respectively to detectors n0, n6, n8.This figure can be compared with Figure 18 in Biltzinger et al. [2020].

B Localization
For the standard reference for the localization of events found by GBM, look Goldstein et al. [2020].
In this work the localization is done by a simple geometric reasoning, but in future we hope to use more sophisticated algorithm of localization.To optimise the function loss it is employed a particle swarm optimiser4 .
Consider two vectors in the equatorial coordinates ψ d = (ra d , dec d ) and ψ s = (ra s , dec s ), respectively the pointing of a detector and the localization of the event source.The incidence intensity is modeled as the cosine between the angle cos(ψ d , ψ s ) is: )cos(ψ s,ra )cos(ψ s,dec )+ + sin(ψ d,ra )cos(ψ d,dec )sin(ψ s,ra )cos(ψ s,dec )+ + sin(ψ d,dec )sin(ψ s,dec ) If the angle of incidence is grater than π/2 than the incident intensity must be set to 0. Finally we have 8 The loss to optimise in Equation 9, where i is a particular detector in D detectors (in our case 12).The energy range chosen is the one with the biggest residuals among detectors/energy ranges, then the count rates corresponding to the timestamp of the maximum value is given to the loss 9 and minimized.
where ψ s and counts s are the unknown variables.

C Solar minima and maxima
Hermes Pathfinder will be launched in 2024 that is near the next solar maximum forecast in 2025 Oceanic and Administration [2019], Biesecker and Upton [2019].This analysis is interesting because reveals what background is expected and how the NN background estimation performs in the two periods.The most sensitive detector for the solar activity is the Sun-facing n5 Meegan et al. [2009].In this analysis are considered background binned in a GBM period orbits (about 96m) and 16 GBM period orbits, for range 0, the most sensitive for solar flares, in the year of the last solar minima, 2014, and the local minima, 2020.The Figures 12, 13, 15 and 11, 14 are obtained considering respectively years 2014 and 2020, a NN per each year is trained.One orbit time binning for 2020 11 and 2014 13 are not comparable due to the high values of the latter but if we zoom the estimated background part we see a comparable counts rate value 12.The same reasoning applies for 16 orbits in 2020 14 and 2014 15.In Table 9 are presented the performance of the background estimation for the year 2014 and 2020.If we use a more robust metric than MAE, such MeAE, we can conclude that the estimations have comparable performance, so the the training procedure of the NN is not influenced by a huge solar activity.
Some reference for the solar cycle prediction can be found in Hathaway et al. [1994], Upton and Hathaway [2018], Bhowmik and Nandy [2018].For evaluation purposes, the Median Absolute Error (MeAE) is a robust metric against the outliers.

D Interesting events
Figure 16: Lightcurve and localization for id 1.The Sun is located under the purple spot.We classify this event as SF.
Figure 17: Lightcurve and localization for id 2. The Sun is located under the purple spot.We classify this event as SF.
Figure 18: Lightcurve and localization for id 3.Because of its location near the galactic plane and the Earth's horizon, we could classify this event as TGF or GF.
Figure 19: Lightcurve and localization for id 4. We classify this event as a GRB.
Figure 20: Lightcurve and localization for id 5. We classify this event as a GRB.
Figure 21: Lightcurve and localization for id 6.We could classify this event as a GRB or, because of its proximity to the galactic plane, a GF.Table 10: Catalog of the unknown events for the three periods analysed.# is an incremental identifier for the events, ID is composed by the referring period and the identifier for its period (YYYY_ID).In catalog_triggers are reported "UNKNOWN: tentative transient class(es)".S r0 , S r1 , S r2 , are the consistency of the signal for the energy range r0, r1 and r2, respectively.For the tentative transient classes are considered Gamma-Ray Bursts (GRB), Solar Flares (SF) -where the localisation of the event is near the Sun and the trigger time aligns with the GOES X-ray satellite data lightcurve peaks -, Galactic X-ray flash (GF) -where the localisation of the event is near the Galactic Plane -, Terrestial Gamma Flashes (TGF) -where the localisation of the event is near the Earth's horizon -, Uncertain (UNC), Uncertain but resembling Local Particles (UNC(LP)).In the last column CE is reported the classification of the event, Robust (R) where more than 1 detector and more than 1 energy range is triggered, Solid (S) more than 1 detector but only 1 energy range is triggered, Probable (P) in all other cases.The events with a * in the ID are reported in table 8. Table 11: Catalog of the known events for the three periods analysed.# is an incremental identifier for the events, ID is composed by the referring period and the identifier for its period (YYYY_ID).In catalog_triggers are reported the name of the event in the Fermi/GBM trigger catalog.S r0 , S r1 , S r2 , are the consistency of the signal for the energy range r0, r1 and r2, respectively.In the last column CE is reported the classification of the event, Robust (R) where more than 1 detector and more than 1 energy range is triggered, Solid (S) more than 1 detector but only 1 energy range is triggered, Probable (P) in all other cases.

Figure 1 :
Figure 1: The architecture of a feed forward neural network.The input has dimension 60.The first two hidden layer have 2048 neurons, the third 1024.The output layer has dimension 36.

Figure 3 :
Figure 3: The background estimation for the n4 detector, in the energy range 1, on one day orbit.The Fermi/GBM count rate observations are represented over time as a black line, whereas the neural network estimation is plotted as a red solid line.The lower panel shows the residuals between the two quantities, with a black solid line denoting the reference of null residual.

Figure 4 :
Figure 4: Fermi/GBM photons counts from NaI-8 detector in the energy range 50 -300 keV versus the respective prediction from the NN over the same combination of detector and energy range.Data spans from 1 January 2019 to 1 July 2019.

Figure 5 :
Figure5: GRB detection performances.Each dot represents a gamma-ray burst of the Fermi/GBM Burst Catalog discovered between March 1st and July 1st 2019 over the space spanned by the GRB's duration T 90 and flux, the latter computed as the ratio between the catalog's GRB fluence in band 10-1000 keV and T 90 ).Events in the shaded grey region have T 90 duration smaller than the bin-length time resolution of the dataset tested with the present framework (4.096 s, CSPEC data).Colors are used to identify the detection status within our search.In red the events unidentified with our method.Missing events (no data) are due to clipping of data 150 s before and after a SAA transit or portion of data that could not be preprocessed.

Figure 6 :
Figure 6: Photon counts from each triggered detector are plotted with step lines, across three energy bands spanning 28 − 50 keV, 50 − 300 keV and 300 − 500 keV (Table 1), with a resolution of 4.096 s.The neural network's prediction of background count rates is represented by solid lines.Different detectors are identified using different colors.A red shaded area limits FOCuS-Poisson's best guess of the transient duration.Times are expressed in units of seconds according to Fermi's standard mission elapsed time (MET).(a) Example of False Detection in which all the detector are triggered over an imprecision of the Neural Network estimation.(b) Example of a solar flare in the Fermi/GBM catalog detected by our approach.The event start and end MET time, as reported in the Fermi/GBM trigger catalog, is represented by a grey shaded area.

Figure 8 :
Figure 8: The 190420939 transient event with no direct counter part in the Fermi/GBM trigger catalog.The event was classified as a candidate gamma-ray burst, according to the discussion presented in Section 5.For the corresponding localization see Figure 9. Photon counts from each triggered detector are plotted with step lines, across three energy bands spanning 28 − 50 keV, 50 − 300 keV and 300 − 500 keV (Table 1), with a resolution of 4.096 s.The neural network's prediction of background count rates is represented by solid lines.Different detectors are identified using different colors.A red shaded area limits FOCuS-Poisson's best guess of the transient duration.Times are expressed in units of seconds according Fermi's standard mission elapsed time (MET).

Figure 11 :
Figure 11: The background estimation in year 2020 for detector n5 (Sun-facing) in the energy range r0.The count rates with a time bin of 4.096s are the averaged over 1 period orbit (96m).

Figure 12 :
Figure12: The background estimation in year 2014 for detector n5 (Sun-facing) in the energy range r0.The count rates with a time bin of 4.096s are the averaged over 1 period orbit (96m).A zoom-in is applied to avoid the outliers shown in Figure13.

Figure 13 :
Figure 13: The background estimation in year 2014 for detector n5 (Sun-facing) in the energy range r0.The solar activity in this year is tremendously high.The count rates with a time bin of 4.096s are the averaged over 1 period orbit (96m).

Figure 14 :
Figure 14: The background estimation in year 2020 for detector n5 (Sun-facing) in the energy range r0.The count rates with a time bin of 4.096s are the averaged over 16 period orbits (25.6h).

Figure 15 :
Figure 15: The background estimation in year 2014 for detector n5 (Sun-facing) in the energy range r0.The count rates with a time bin of 4.096s are the averaged over 16 period orbits (25.6h).

Figure 22 :
Figure 22: In the first two figures, the lightcurve and localization for id 7 are shown.The third one shows where the GBM satellite is located on Earth.Local Particles events like LOCLPAR1905205 and LOCLPAR1904085 have occurred in this region.We classify this event as uncertain.

Table 1 :
Energy ranges table.andTable3.To access both the CSPEC and POSHIST data products we use the Fermi Data Tools package, a python software API to the HEASARC Fermi archival database.The resulting input datasets X include a total of 60 different features, sampled with a step length of 4.096 s.

Table 2 :
A table of the 24 orbital features used to form the NN's input table.The features are obtained from the POSHIST files and processed by the library Fermi GBM Data Tools.

Table 4 :
The NN MAE loss function (within one standard deviation) per energy range, over the training and the testing datasets, averaged over the 12 Fermi's GBM NaI detectors.

Table 5 :
Mean Absolute Error (MAE) and Median Absolute Error (MeAE), on the test datasets, for each energy range and averaged for detectors within one standard deviation.

Table 6 :
Total number of transients identified, number of transients with counterparts in the Fermi/GBM Trigger Catalog and its median consistency; number of transients of uncertain origin with no counterparts in the Fermi/GBM Trigger Catalog and its median consistency; false detection.Each table row corresponds to a different time period.

Table 9 :
).For each year are presented the metrics averaged per detector and range.