{'fraction_non_alphanumeric': 0.025654816328725863, 'fraction_numerical': 0.015722763047024867, 'mean_word_length': 4.707561649442341, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deep Neural Networks for Energy and Position Reconstruction in EXO-200

We apply deep neural networks (DNN) to data from the EXO-200 experiment. In the studied cases, the DNN is able to reconstruct the relevant parameters - total energy and position - directly from raw digitized waveforms, with minimal exceptions. For the first time, the developed algorithms are evaluated on real detector calibration data. The accuracy of reconstruction either reaches or exceeds what was achieved by the conventional approaches developed by EXO-200 over the course of the experiment. Most existing DNN approaches to event reconstruction and classification in particle physics are trained on Monte Carlo simulated events. Such algorithms are inherently limited by the accuracy of the simulation. We describe a unique approach that, in an experiment such as EXO-200, allows to successfully perform certain reconstruction and analysis tasks by training the network on waveforms from experimental data, either reducing or eliminating the reliance on the Monte Carlo.


Introduction
Deep Neural Networks (DNNs) are a new class of machine learning algorithms that are gaining increasing attention in experimental high energy particle physics. DNNs are made up of multiple hierarchical neural layers, as compared to "shallow" neural networks, which have one hidden layer. Recent studies demonstrate the ability of DNNs to compete with or outperform more conventional approaches in detecting and localizing events in a complex detector [1], as well as discriminating signal events from background events [1][2][3][4][5]. In a typical application, one uses a Monte Carlo simulation (MC) to generate a large number of events for which the "truth" (i.e. the correct value of classification, or other desired quantity) is known. One then reconstructs the relevant parameters of the simulated events, such as energy and position, and trains the network with these quantities as inputs. The performance is evaluated on an independent set of MC events, not used during training. The performance of the algorithm is therefore contingent on the accuracy of both the MC and the reconstruction routines used to extract input for the network. The latter requirement already led previous investigations (Refs. [1,3,6]) to attempt to circumvent as much of the conventional reconstruction as possible, with Ref. [1] using almost raw waveforms (with only noise filtering and gain calibration applied) as input to DNNs. It can also be said that an algorithm trained on MC can only exploit those features of the data that were explicitly modeled in the MC.
In this work, we investigate the possibility to avoid certain conventional reconstruction steps and use DNNs to extract the energy and event position directly from the waveforms. We also consider the situation where information about a relevant parameter is accessible from distinct detection channels. This is the case in EXO-200, where both scintillation light and free, drifting electrons, which are produced by particles interacting in the detector, are recorded independently. We show that it is possible to use one of these two signal channels, from which the information can be more easily and accurately extracted, as a source of truth information for reconstruction of the other channel. This avoids reliance on the MC of the other channel, which in the case of EXO-200, can contain systematic errors leading to imperfect modeling of the data. In two out of the three considered cases, actual detector calibration data is available, and we use it to evaluate and validate the performance of the DNNs.
The paper is organized as follows. The second section provides a brief overview of the EXO-200 detector and the existing conventional event reconstruction chain, to the extent necessary to understand the following sections. The third section describes the DNN algorithm developed for energy reconstruction of a point charge deposited on an individual charge collection wire. A special case of induction signals on nearby collection wires is also discussed. The fourth section is dedicated to the DNN reconstruction of arbitrary charge deposits on all charge collection wires. The fifth section deals with data-driven DNN reconstruction of an event position using scintillation light in the detector. The results are summarized and discussed in the last section.

Basics of EXO-200: Detector, reconstruction, and simulation 2.1 The EXO-200 Detector
The details of the EXO-200 detector have been previously described elsewhere [7]. A brief description of the detector components relevant for these studies is included here for clarity.
The EXO-200 experiment is searching for neutrinoless double beta decay (0ν ββ), a theoretical nuclear decay that, if observed, would indicate that neutrinos are Majorana particles and could help constrain the absolute neutrino mass [8]. EXO-200 started taking data in Sep. 2011 and is still in operation. The current data is divided into two periods, defined as Phase I and Phase II, which are separated by a hiatus due to incidents at the host site. In addition, the start of Phase II was preceded by an electronics upgrade and a change to the electric field in the detector.
The EXO-200 detector consists of a cylindrical radiopure copper vessel filled with Liquid Xenon (LXe), enriched to 80.672 (14) % in the isotope 136 Xe. The detector is ∼44 cm long and ∼40 cm in diameter and includes two identical back-to-back time projection chambers (TPCs) that share a cathode located at the center of the detector.
Particles interacting with the LXe deposit energy by producing both scintillation light (178 nm) and electron-ion pairs (ionization). Electrons are drifted from their initial location toward the anode by a uniform bulk electric field. EXO-200 has operated at different bulk fields ranging from 20 V cm −1 to 615 V cm −1 . For simplicity, this study only focuses on data taken during Phase I with a drift field of 380 V cm −1 . [9] The charge signal (number of electrons) is detected at the anodes of each TPC by a pair of wire planes crossed at a 60°angle, each of which lies in front of an array of large-area avalanche photodiodes (APDs) that detect scintillation light. The frontmost wire plane in each pair (V-Wires) serves both as a shielding grid and to detect induced signals as electrons are drifted from the interaction location to the second wire plane (U-Wires) where charge is collected. Each wire plane includes 38 readout channels with 9 mm pitch resulting in 152 total charge channels. Each APD plane consists of 37 readout channels for a total of 74 APD channels (four APD channels have since been disconnected from the front-end electronics due to large leakage currents).
Calibration of the detector is periodically performed by positioning γ-ray sources at several locations around the detector. For this publication, three sources are used ( 60 Co, 228 Th, and 226 Ra) to span the energy range of interest for the double beta decay search. These sources can be repeatedly deployed to fixed locations in a copper guide tube that wraps around the outside of the LXe TPC. The positions used for calibration (see Figure 1) include two positions located around the edge of the cathode and separated by 90°(named S5 and S11) and two positions centered on the drift axis behind either anode plane (named S2 and S8).

Conventional reconstruction in a nutshell
For each trigger in the EXO-200 detector, the digitized raw waveforms from each of the 152 charge channels and 74 light channels are stored. Each waveform consists of 2048 samples taken at 1 MS/s with 1024 samples occurring before the trigger and 1024 samples after the trigger. The standard analysis described in previous studies uses a conventional event reconstruction ("EXOrecon") algorithm to process and analyze the raw waveforms to determine event level information such as energy and position. The conventional reconstruction comprises three stages, which are briefly described below. A more detailed discussion of the conventional reconstruction can be found in [10].
An initial signal finding stage identifies channels containing a signal above a given noise threshold. For this, a matched filter is applied to each channel using a predefined signal template to search for signals above the noise. A second iteration of signal finding is applied to the waveforms after reshaping the signals found by the matched filter. This is used to disentangle waveforms with closely-spaced signals, which the matched filter is ill-suited to find.
Following the signal finding stage is the parameter estimation stage, where each of the identified signals are analyzed to extract parameters relevant for the analysis. This is done by fitting each of the signals to their respective signal models. A χ 2 fit is used to extract both the amplitude and the timing of each signal. Additionally, every charge signal is classified as either "induction" or "collection", which attempts to determine whether the charge deposit terminated its track on the channel. This classification is done using additional information about the waveform, such as the pulse timing, pulse integral, nearest neighbor amplitude, and the χ 2 of the fit of the pulse to templates that describe the shape of induced and collected signals. A set of one dimensional (1D) cuts on these parameters is then applied to classify signals as induction or collection.
Finally, the set of signals and signal parameters for each event is combined to determine event topology and event energy. First, a "bundling" algorithm is applied to separately group U, V, and APD channels based on their timing and amplitude characteristics. A clustering algorithm is then used to group together the bundles of different channel types into the most likely configuration based on a set of probability density functions (PDFs). This results in "clusters," which roughly represent individual charge deposits in the detector. A cluster containing signals of all 3 types has a well defined 3D position and energy and is defined as a "3D cluster". The light and charge energy of an event can be estimated from the APD and U-Wire amplitudes respectively. The Z-position comes from the timing difference between the U-Signals and the APD signals and the U-and V-position from the energy weighted combination of the U-and V-Signal amplitudes.
Following event reconstruction, corrections are applied to the reconstructed parameters to account for known effects in the detector. First, each channel is corrected for its individual gain to normalize the response of each channel to the same energy deposit. These gains are measured using calibration data, and the correction accounts for known time dependencies. Next, a correction is applied to the charge energy to remove the effects of a finite electron lifetime in the detector. This removes the Z-dependent bias introduced from electrons in LXe capturing on electronegative impurities as they drift, which attenuates the detected charge signal exponentially with the drift time. During Phase I the APD channels experienced large time varying correlated noise that degraded energy resolution. To account for this, a denoising algorithm was applied to the light response to optimally estimate the light energy with knowledge of the correlated noise among APD channels and the position dependent light response [11]. Electronic upgrades prior to the start of Phase II significantly reduced this noise component and the need for denoising in Phase II. Finally, in order to improve the energy reconstruction and optimize the energy resolution, a linear combination of the light and charge energy is used to calculate a "rotated" energy of an event. The rotated energy has a better energy resolution than either charge or light alone due to the anti-correlation between the light and charge signals arising from the electron-ion recombination process in LXe [12].

Monte Carlo simulation
To understand the detector response to energy deposits in the detector volume, a Monte Carlo simulation is employed. A detailed description of the simulation package is found in [10], but a brief description of the details relevant to this paper are included below.
The simulation is divided into two independent components. First, using GEANT4 [13,14], the EXO-200 detector geometry is modeled and the physical interactions in the detector are implemented. GEANT4 returns a list of charge depositions within the detector volume from the relevant ionizing interactions. These depositions are sampled with cubic voxels with 0.2 µm edges.
The set of depositions is then passed into the second component of the simulation, where the electronic response of the system is modeled to produce waveforms similar to those recorded during data taking. For charge waveforms on the U/V planes, the signal generation step tracks each charge deposit through the detector using a 3D finite element simulation of the electric field to realistically model the path of the electrons. Diffusion is also included to correctly reproduce the observed channel multiplicity [15]. The effects of a finite electron lifetime are also optionally incorporated to model the Z-dependent response. At every time step during the drift, the charge induced on each readout channel by the drifting electrons is determined from the Shockley-Ramo theorem [16,17] which produces a signal in each affected channel. The signals are then shaped using the known transfer functions of the readout electronics for each channel and then digitized. To model the APD response, the current simulation uses a parameterized light response function to give the light yield on each APD plane based on the position of the energy deposit in the detector. The light response is then evenly distributed among all channels on the given plane and assumed to be a step function. The un-shaped signal is then transformed with the known transfer function. This does not include the effect of recombination fluctuations between the light and charge yield in LXe. For this reason, Finally, in order to make simulated waveforms more realistic, randomized noise waveforms recorded periodically during data taking are added to each of the simulated waveforms on both the charge and light channels. This creates MC waveforms for each channel with a noise spectrum similar to the true spectrum observed in data. The absolute noise varies for each channel, but on average the broadband noise observed on the U-Wire waveforms is ∼800 electrons (which at 380 V cm −1 corresponds to ∼16 keV). Figure 2 shows the average power spectral density of U-Wire noise traces.

Energy reconstruction of point-like charge deposition events
The energy resolution of EXO-200 is fundamental for separating potential 0ν ββ decay from background events. Reconstructing the deposited energy from the waveforms of the charge and light channels is limited by an irreducible error due to noise and statistical fluctuations. In the case of the charge channels, the induction signals on U-Wires can also contribute to the reconstruction errors, if not identified and corrected for. The irreducible error sets the limit to the best possible data analysis. The energy reconstruction from a single waveform is directly linked to this error and is thus a good estimator for possible improvements in an existing data analysis. In this study, we present a method of reconstructing the energy of a point-like charge deposition from the waveform of a single U-Wire using a DNN.
This study is split in three steps. First, a DNN is trained with MC data. Second, the accuracy of charge collection reconstruction is evaluated and the DNN performance is compared with the EXO-200 energy reconstruction algorithm (EXO-recon) on a different set from the same MC distribution. Lastly, the fraction of mis-reconstructed induction events is compared between the DNN and the EXO-recon.

Network architecture and training on Monte Carlo data
We have built a DNN that takes a waveform as input and predicts the energy of the charge deposition. To train the DNN, we used a supervised learning method. Supervised learning requires feeding not only the input to the DNN, but also comparing the network's output to the true value. However, the true energy of a waveform collected with EXO-200 is unknown a priori. Therefore, we used MC, where the true energy is known, to simulate waveforms on a single wire channel. As described in Section 2.3, the MC waveforms contain noise samples from actual EXO-200 data. The MC set used in this study contains ∼3 × 10 5 waveforms generated from point like charge deposits artificially generated with the detector MC. One third of the waveforms represent charge collection events on a single U-Wire where the point-like deposit terminates its track. These events have their energy distributed uniformly between 0 MeV and 3 MeV. The remaining waveforms represent induction signals on the two neighboring U-Wires, which do not collect charge but sense an induced signal produced by the drifting charge before it terminates its trajectory. Although some charge is induced on every U-Wire channel on the wire plane, the two neighboring channels are the most likely to have a signal above the noise due to their proximity to the collecting channel. These events are marked as induction signals and have zero true energy associated with them. Examples of charge collection and induction waveforms are shown in Figure 3. While a full EXO-200 waveform contains 2048 time entries, only the central 1000 entries -500 before and after the trigger -are retained for this study. This reduces the computational load while keeping sufficient data for the baseline and noise estimation. When training the DNN, we split the data into three independent sets. First, the training set, containing 80 % of all MC events, is used to train multiple different DNNs. Second, a validation set (10 % of all MC), is used to select the best DNN, based on its performance over this set. Third, a test set (10 % of all MC) is used for evaluating the performance of the selected DNN. This procedure guarantees that the DNN doesn't overfit either the training set or the validation set. Overfitting is defined here as the production of an analysis which corresponds too closely or exactly to a particular set of data, and may therefore fail to fit additional data or predict future observations reliably [18].
A DNN can be parametrized by many parameters such as the number of hidden layers, number of neurons per layer, activation functions, layer type, and regularization techniques. We trained many different network architectures containing only fully connected layers. The architecture of the DNN with the best performance is shown in Figure 4. It is built from 5 fully connected layers. A neuron i in a layer l connects with a certain weight vector w [l] [i] to all neurons in the following layer. The number of neurons per layer gradually decreases from 1000 (the number of samples per waveform) in the input layer, to 1 in the output layer, a scalar predicting the energy of the charge deposition. From layer to layer, the number of neurons decreases by a factor of about 4 to 256, then to 64, then to 16, then to 4, and then to 1. Except for the input layer, all layers use the rectifier linear unit (ReLU) as an activation function. This means that an output of a neuron in those layers is given by the following function of its input: where x is the weighted sum of the outputs of all neurons from a preceding layer that connect to this neuron.
To train the network we use mini-batch gradient descent to minimize the loss function L. In this approach, the gradient of the loss is computed using a subset of the training data, called a mini-batch, which is chosen randomly during each minimization step. Therefore, it takes more than one step to go through all the training data; the corresponding number of steps is called an epoch. We use an Adaptive Moment Estimation algorithm, or Adam [19]  at each step. The loss is defined as L = C + λ · R, where C is the mean square error, and R is the regularization term. The mean square error is defined as: where m, y j , and y j are the size of the mini-batch, the true energy, and the predicted energy of event j, respectively. The regularization parameter λ = 10 −3 defines the contribution of the regularization term (R) to the loss (L). Regularization was implemented using weight decay, also known as L2: where N, Lr, N l , and w [l] [i] are the number of weights in the entire DNN, the number of layers, the number of weights in the l th layer, and the weight vector i of layer l, respectively. The network is set up and trained using the TensorFlow framework [20]. The framework contains implementation of mini-batch gradient descent, Adam optimizer, and other relevant algorithms.

Figure 5:
The learning curve shows the decreasing loss during training of the DNN. Thus, the DNN is learning to predict the energy from a waveform.
Training was done in several steps, gradually increasing the mini-batch sizes and the number of training steps per mini-batch size. During the training process, the loss was computed for the training and validation sets (see Figure 5). The separation between the performance on the validation set and the training set, occurring at a training time of about 10 2 epochs, is a sign of overfitting. However, the loss on the validation set remains stable after 2 × 10 2 training epochs. To reduce overfitting, we tried to increase λ. However, with λ > 10 −3 , L was dominated by R, and the performance on C was penalized. To reduce the overfitting, substantially increasing the size of the training set could help, which was not done in this study.

Testing the network on Monte Carlo data
With the trained DNN, the energies of the waveforms in the test set were predicted. Figure 6 shows the true energy versus the predicted energy of both the DNN and EXO-recon. For energies below ∼50 keV (see zoom), the DNN can still partially predict the energy while EXO-recon begins to fail. Furthermore, the residuals of the energy predicted by the DNN show fewer outlier points. The distribution of the residuals (see Figure 7) is 10 % narrower for the DNN compared to EXO-recon. Hence, we conclude that the DNN performs slightly better on the MC test set than EXO-recon does. The width of the distributions closely corresponds to the average U-Wire noise (see Section 2.3), indicating that both algorithms approached a limit of performance.

Induction on collection wires
Upon further inspection of the reconstruction performance, a small fraction of events was found that have a zero true energy but a non-zero reconstructed energy. These are the cases when an induction signal is mistakenly reconstructed as a charge collection. In earlier EXO-200 analyses, mis-reconstructed induction signals led to a noticeable reduction of reconstruction efficiency [21]. The conventional reconstruction algorithm was then adapted to include a dedicated procedure to discriminate induction signals. This is done by applying a set of 1D cuts to parameters extracted from the found U-Wire signals, as mentioned in Section 2.2. The test MC set contains ∼3 × 10 4 simulated signals, with each collection signal accompanied by two induction signals on the neighboring U-Wires. In this MC set, EXO-recon initially identifies 113 collection signals on the set of waveforms associated with true induction signals. Of these 113 found signals 94 are correctly classified by the induction classification step described above. The remaining 19 signals remain mis-classified as collection signals as they fail at least one of the included cuts. This gives a mis-reconstruction rate of ∼17 %, where the mis-reconstruction rate is defined as the number of true induction signals mis-classified as collection, divided by the total number of signals initially found by EXO-recon on induction channels. The rate determined here agrees within the statistical uncertainty with the previously published value of ∼23 % [10].
We considered developing a standalone DNN specifically for binary classification of induction and collection signals prior to energy reconstruction. However, the DNN described in this section assigns very low values of reconstructed energy to induction signals, allowing one to discriminate them with an induction signal rejection threshold. The threshold could be set to zero or another value well below the average noise level (Section 2.2) and still perform competitively1. This implies that the network learned to sufficiently recognize induction signals as a by-product of the main task. To perform a direct comparison with the EXO-recon, we applied the DNN to the 113 (94 + 19) events mentioned above. We find that six of these events are assigned a non-zero reconstructed energy. Figure 8 shows the fraction of mis-reconstructed induction signals as a function of the 1This does not mean that a given induction signal was below the noise threshold. Rather, a detectable induction signal was recognized and assigned energy very close to zero (true value). threshold position for the DNN approach. The EXO-recon fraction is also shown for comparison. EXO-recon does not apply an energy cut to identify induction signals, so the fraction is not a function of threshold. The DNN approach slightly outperforms that of EXO-recon. This check only focused on signals which EXO-recon found and mis-classified initially. In addition there are in total 41 signals which are mis-classified by the DNN but not included in the above subset. Of these signals, 21 were found by EXO-recon during the induction matched filter stage of reconstruction and were correctly classified as induction. The remaining 20 signals are under the EXO-recon threshold and are not identified as either collection or induction. Since the DNN does not distinguish between induction and noise a direct comparison of these signals is difficult. To fully investigate the potential of the DNN to differentiate induction and collection signals one needs to create a neural network specifically for signal classification, which is not done in this study. Additionally, it is important to note that both algorithms use a simulated shape and amplitude distribution of induction signals. The accuracy of these algorithms when applied to experimental data will depend on the precision of the simulation, and any mis-modelings may result in a higher mis-reconstruction rate than seen in MC.

Charge-only energy reconstruction 4.1 Network topology and training
In this study, we investigate the energy reconstruction of events in the detector using all available charge collection wires. To do so, we combine the waveforms of all individual U-Wire channels to form an image. The pixel values of the resulting image correspond to the waveforms' amplitudes at a particular time. The study is performed with events regardless of the number of charge deposits and the multiplicity of the events. With the multiplicity, one can classify the events as single-site (SS) or multi-site (MS) events. Preprocessing consists of subtracting a channel-dependent baseline obtained by averaging the first 800 µs and applying a channel-dependent gain correction. In order to save computational resources, the waveform's first and last 512 entries are cropped. The resulting image of the event consists of 76 channels, each having 1024 time entries, is shown in Figure 9. The image is fed to a deep convolutional neural network consisting of six successive convolutional layers. The first convolutional layer consists of 16 kernels of size 5 (time-wise) × 3 (channel-wise) pixels. Kernel corresponds here to a neuron that at any moment is only connected to a part of the input image, called receptive field. The size of the receptive field is defined by the kernel's size. Each kernel is convolved (cross-correlated) with the input image. The result of the convolution is stored as a two-dimensional array called a feature map. The 16 feature maps from the first convolutional layer are fed as input to the second convolutional layer, which has 32 kernels of the same size as in the first convolutional layer. The following convolutional layers have kernel sizes of 3 (time-wise) × 3 (channel-wise) pixels. The number of kernels gradually increases to 64, 128, and 256 in the last two layers. After each convolutional layer, the dimensions of the feature maps are decreased by maximum pooling by a factor of 4 (time-wise) and a factor of 2 (channel-wise). This means that an output of one layer is divided into a set of non-overlapping rectangles, and for each such rectangle only the maximum pixel value is retained to produce a smaller input image for the next layer. Maximum pooling by a factor of 2 in both dimensions is used for the subsequent layers. The network's topology is shown in Figure 10. Zero padding, or surrounding the two-dimensional  input image with zeros, is applied to each layer. This allows the output to have the same dimension as the input. Following the convolutional layers are three fully connected layers consisting of 32, 8, and a final unit. The final unit represents the deposited energy of the image corresponding to that event. Throughout the network, the ReLU activation function is used. Initial values of trainable parameters are set using the Glorot algorithm [22]. The network is implemented and trained using the Keras framework [23]. The framework contains implementation of all relevant algorithms.
The neural network is trained with the Adam optimizer by minimizing the mean square error. An additional L2 regularization term weighted with 10 −2 is applied in each layer. MC events are generated using the standard EXO-200 MC framework discussed in Section 2.3. For training and validating the neural network, MC events from a gamma ray source positioned in the center of the detector are used. The gamma ray source produces an energy deposition that is uniform in energy. This is motivated by the initial but unsuccessful approach utilizing a 228 Th MC source for training, see Section 4.2. The noise on the wire channels is sampled from a real noise library (see Section 2.3). MC events that are not fully 3D reconstructed within the standard EXO-200 framework are rejected. Additionally, events that have charge deposits outside the fiducial volume [10] are rejected. The true energy is defined as the sum of all pixelated charge deposits in the MC. The network is trained on events with a total deposited energy larger than 500 keV. For training and validation, about 750 000 MC events from a flat energy distribution in batches of 16 samples are used, with 95 % used for training and the remaining 5 % for validation. Figure 11 shows the learning curve of the network over 100 epochs. Training set Validation set Figure 11: The learning curve shows a decreasing loss during training for both the training set and the validation set. Thus, the convolutional neural network is learning to predict the energy deposited on the charge collection wires.

Testing on Monte Carlo data
MC-based checks are performed for the exposure of the EXO-200 detector with gamma rays emitted from a radioactive 228 Th source at position S5. The correlation between the reconstructed energy from the neural network and the true MC energy is shown in Figure 12a. The energy reconstruction by the DNN works as expected. However, there is a small number of outlier events that are also present in the standard reconstruction (cf. Figure 12b). The residuals to the true energy of both methods do not show any energy-dependent features other than broadening. The correlation between the residuals of both reconstruction methods with respect to the true MC energy is shown in Figure 13. The positive correlation of these residuals indicates an impact due to the noise on the waveforms that affects the energy estimation of both methods in a similar way.
Comparing the reconstructed 228 Th energy spectra to the MC input spectrum, the spectral components, e.g. the full absorption peak at 2614.5 keV from the decay of 208 Tl and the single and double escape peaks, are reproduced by both reconstruction methods. Both methods yield a similar  energy resolution at the full absorption peak at 2.6 MeV (1.29(3) % for EXO-recon and 1.22(2) % for DNN) where a major contribution is electronics noise on the waveforms. The energy resolution of SS-only events at that peak is 1.15(3) % (EXO-recon) and 0.94(1) % (DNN) whereas for MS-only events it is 1.36(4) % (EXO-recon) and 1.38(2) % (DNN) at that peak. The energy axis is calibrated in a simplified way compared to the conventional EXO analysis. Here, we apply a calibration factor for both SS and MS events separately, matching the 208 Tl full absorption peak towards the nominal value of 2614.5 keV. The reconstructed charge energy spectra for both the neural network and the conventional reconstruction are shown in Figure 14 as well as the spectra for SS-only and MS-only events. The gray shaded spectra show the MC true energies. One noticeable difference between the neural network and the conventional reconstruction is the improved agreement in the region between the Compton shoulder and the full absorption peak. Two main processes contribute to this. First, the neural network is able to reconstruct smaller energy deposits that are below the reconstruction threshold of the conventional method. Second, collection signals superimposed by induction signals are partially flagged as pure induction signal by the conventional reconstruction whereas the neural network outperforms this by an improved capability to disentangle mixed signals.
Initially, in a manner analogous to testing, training was performed on MC events by gamma rays emitted from a radioactive 228 Th calibration source. Both training and validation results were promising. Testing the network's performance on MC events from a 228 Th calibration source whose energy spectrum was broadened with an arbitrary, artificial resolution of 3.5 % (guided by the charge-only energy resolution from EXO-200) revealed undesired issues. The reconstructed energy of events from the full absorption peak of the 208 Tl decay at around 2.6 MeV is shuffled toward the nominal value of the peak, shown in Figure 15 (green). Intuitively, this can be explained by the network's smaller loss contribution during training, when events from around the peak are reconstructed. Compared to events around this peak, the abundance of 208 Tl peak events is larger by orders of magnitude (c.f. Figure 14). Thus, on average, the contribution is smaller when reconstructing events toward the peak than away from it. This mimics a seemingly improved resolution at the 208 Tl peak. Hence, from this point onwards, a training spectrum uniform in energy was utilized to improve the network's capability of reconstructing events from different energy distributions. Using this training approach, the broadened spectrum is reconstructed correctly without introducing systematic effects as shown in Figure 15 (blue). selection introduced in Section 4.1. Additionally, events with multiple scintillation clusters (pile-up of light signals) are discarded to ensure that the charge signal is in the central 1024 µs window that is used in this study. The correlation between the reconstructed energy from the neural network and the conventional reconstruction is shown in Figure 16. The difference in reconstructed energy between both methods does not show any energy dependent features other than broadening.

Testing on calibration data
The time variation of the LXe purity affects the electron lifetime and thus the detector's response to a given initial energy deposit. During Phase I of EXO-200, a mean electron lifetime of 4.5 ms was achieved [10]. This value is used for generating MC events. However, the electron lifetime varies between different runs used for testing the network on real data. For consistency, the results discussed here are produced from runs with an electron lifetime of about 4.5 ms. However, we do The MC spectrum (gray) reconstructed by two different neural networks (top). The MC events are generated from a 228 Th calibration source whose energy spectrum is broadened with an arbitrary, artificial resolution of 3.5 %. One network was trained with a 228 Th MC source (green) and the other network (blue) was trained on a uniform energy spectrum. The energy residuals of the network trained on the 228 Th MC spectrum (shown in Figure 14a in gray) to the true MC energy is shown in the lower plot, where the color denotes the intensity on a logarithmic scale. The residuals indicate an anti-correlation that leads to an artificial improvement in resolution at the peak of the 208 Tl decay at 2.6 MeV. not see any loss in performance of the network on events with a very different electron lifetime.
The neural network yields competitive results compared to the conventional reconstruction, seen in Figure 17. The energy resolution at the 2.6 MeV full absorption peak of the 208 Tl decay is similar for both methods (3.93(4) % for EXO-recon and 3.84(3) % for DNN). The energy resolution of SS-only events at that peak is 3.53(7) % (EXO-recon) and 3.44(6) % (DNN) whereas for MS-only events it is 4.08(4) % (EXO-recon) and 4.02(3) % (DNN) at that peak. The energy axis is calibrated following the procedure introduced in Section 4.1 for the MC case.
The network's performance on events of the 228 Th calibration source when located at other positions is also evaluated. Even though the training is performed on a MC spectrum uniform in energy, the events are not uniformly distributed over the detector volume but are concentrated near the cathode for training and for source position S5. Thus, the position distribution of calibration events from position S5 is similar to the one from the MC gamma ray source. To test the network's performance on highly different event distributions, events from 228 Th runs at positions S2 and S8 are evaluated. These positions are centered on the drift axis behind either anode plane. The resulting energy spectra for the conventional reconstruction and the neural network are shown in   Figure 18. Again, the energy resolution at the 2.6 MeV peak from the 208 Tl decay is similar for the two methods. We conclude that the position distribution does not have a significant impact on the network's performance in reconstructing energy.
Due to the anti-correlation of ionization and scintillation in LXe, the energy resolution can be improved by combining both signatures. This is illustrated in Figure 19. For the purpose of comparing the network's performance with the conventional EXO reconstruction, we utilize the scintillation signal assessed by the conventional EXO reconstruction for both methods. To improve the energy resolution, denoising is applied to the scintillation channel as introduced in [11]. The optimal energy variable is found by determining the linear combination of charge and light signals that minimizes the energy resolution at the 208 Tl peak. This linear combination is applied to all events regardless of their energy [10]. This is done for SS and MS events separately. The resulting energy spectra are shown in Figure 20 and yield comparable results for both reconstruction methods  Figure 19: Anti-correlation between ionization and scintillation from a 228 Th calibration source. The ionization energy is reconstructed by the neural network (left) and by the conventional analysis (right) whereas the scintillation energy is given by the conventional analysis. The color denotes the intensity on a logarithmic scale. The prominent feature is the full absorption peak of 208 Tl.
ionization signatures was applied to events from a 226 Ra and a 60 Co calibration source at position S5. The corresponding spectra are shown in Figure 21. The scintillation and ionization channels are combined with the same optimum linear combination as for 228 Th. The neural network yields competitive results for all tested calibration sources with the shapes of the spectra being in good agreement with the conventional reconstruction.

Data driven scintillation light reconstruction
The previously discussed studies attempt to reconstruct the energy deposited by an event occurring in the detector through the amount of free electrons. To accomplish this task, deep neural networks are trained using MC simulations of such events. The accuracy and choice of simulated events will impact the performance of the reconstruction. The fact that EXO-200 registers interactions of ionizing radiation not only through the collection of electrons but also by detecting the scintillation light from re-combinations and excitation, allows for novel approaches of training deep neural networks that do not rely on MC simulations. Here we describe one such approach to reconstruct the position of an event from the distribution of scintillation light signals among the 74 APD channels using a deep neural network, which is trained on the information extracted from the collected ionization. The ability to reconstruct the event position from scintillation light is valuable where insufficient charge collection leads to missing information. This may happen when the position of an event is close to the Teflon reflector, and part or all of the ionization charge is lost and therefore below the detection threshold. This is also often the case for α-decay events which have a large light yield but small charge yield. In the conventional EXO-200 analysis such events shows the spectra for SS-only events and (c) shows spectra for MS-only events. The energy axis is calibrated as discussed in Section 4.1. The shapes of both spectra of the conventional analysis (red) and the one by the neural network (blue) agree and yield a similar resolution at the full absorption peak of the 208 Tl decay at 2.6 MeV. For SS-only events, the neural network performs noticeably better in the region between the Compton shoulder and the full absorption peak.
are excluded since for them no full 3D position can be reconstructed and they may have the wrong charge/light ratio.
In total, the EXO-200 detector contains 468 APDs, which are read out in groups of 7, resulting in 37 channels in each half of the TPC. They are arranged to cover a maximal area at the end caps of the cylindrical detector and are positioned behind the U-and V-Wires (for detailed description of the detector design see Ref. [7] and Section 2.   velocity, this enables a three dimensional position reconstruction with an accuracy of approximately σ 3D = 3 mm. The limitation of the position resolution is dominated by the 9 mm wire pitch between charge readout channels. When the electron cloud is large enough to be collected on more than one neighboring wire, an amplitude weighted position is used. Since we are using this position information with finite resolution to train the network, it also sets the best performance of the model. However, due to larger noise on the APD channels, their coarser segmentation compared to wire channels, and other physical limitations due to light absorption and reflection on different materials, the position resolution extracted from the scintillation light is expected to be worse. This further validates the use of charge information as truth labels and avoids the requirement to simulate light propagation and detection in the detector.

Training data preparation
The input data for the deep neural network consists of the raw waveforms of all 74 APD channels. The only pre-processing done is the subtraction of the baseline for each waveform determined from the first 680 samples, being the first third of the full waveform, on an event by event basis. Furthermore, we crop the waveforms to 350 samples which guarantees that, independent of whether the event was triggered on U/V-Wires or APDs, the scintillation signal is fully contained in the frame. All waveform signals are stacked vertically in the order of their assigned channel number to form an image of 350 × 74 pixels. Figure 22 (left panel) shows an example image where the event position is close to the anode plane of the first TPC half defined as positive Z. It illustrates how the position information is encoded in the image: the APDs in proximity to the event location collect the major part of the light and therefore have the largest signal amplitude. APDs far away from the event location have much smaller signal amplitudes.
This image is then fed to a convolutional neural network, which is described in detail below. The dataset used for this study consists of source calibration runs. During a calibration run, one of the four available radioactive sources ( 228 Th, 226 Ra, 60 Co, 137 Cs) is deployed to specific, well known locations outside of the TPC. Due to the relatively short interaction length of gamma rays in LXe, the event distribution is strongly biased towards the location of the source. We combine several runs from different source positions, taken over a period of 6 months, to acquire a sufficiently large training set. We use the event information extracted by the conventional EXO-200 reconstruction to apply event selection cuts -namely the number of scintillation clusters, the event multiplicity and charge energy -and retrieve the true labels. Note that this information could also be determined by means of DNNs such as the ones described above. However, in this study we do not demonstrate this linkage due to concurrent development of both DNN algorithms. We select events where only a single energy deposit (SS) occurred and only one prompt scintillation signal was found. We apply an energy threshold of 800 keV, as measured by charge, and cut events with high scintillation and low charge yield to exclude the detection of α-particles, which exhibit a signal pattern different from high energy electrons that occur after γ-detections or β-decays in the TPC. The remaining set of events is further reduced in order to create a data set with uniform position and energy distribution. This step turned out to be necessary in order to improve the model's ability to generalize on new, unseen data, in particular for event positions that occur at low frequency in the training data. From the original event distribution with P = (x, y, z, E) we build a 4 dimensional probability density function (PDF) using a Gaussian Kernel Density Estimation (KDE) [24]. We then loop through all events, draw a random number ρ ∈ U(0, 1) from a uniform distribution, and keep the event if where P min is location of lowest statistics and κ a margin factor allowing to trade off some uniformity for an increased number of events. Figure 23 shows the distribution of events in the training set after applying the described procedure. In total, ∼70 000 events are kept, from which 1024 events (1.5 %) are randomly selected and split into a validation set. The events which are removed by the described procedure are stored in separate files and can be used to evaluate the trained model.

Network architecture
For this study we construct a convolutional neural network that takes event images like the one illustrated in Figure 22 (left) as input and has three units in the output layer corresponding to the x-,y-and z-position of the event. Given the choice of selecting 350 samples per waveform and 74 waveforms in total containing the unique signature of the event position, a convolutional neural network seems most suitable to handle the 25 900 input features. The structure of the neural network is illustrated in Figure 24. The first convolutional layer has 16 kernels of size 5 × 5 with a stride of 1 followed by a maximum pooling layer of size 2(channel wise)×3(time-wise). This pattern is repeated in layer 2 while increasing the number of kernels to 32. In the following two layers, the number of kernels with the same size is increased to 64 and 128 respectively with max pooling layers of size 2(channel-wise)×4(time-wise) and 3(channel-wise)×3(time-wise) in between. After the last pooling layer, the structure is transformed into a one-dimensional array, yielding 2048 units, which are fed to a densely connected network reducing the size of units per layer to 1024, 256 and finally 3 in the output layer. It consists of ∼2.4 × 10 6 trainable parameters which are initialized using Glorot initializer. We use an Adam optimizer to minimize the loss function L = C + λ · R, where is the mean square deviation of the predicted and true position over all coordinates with m being the size of the mini batch. λ · R is the L2 regularization term where R is defined in Equation 3.3 adapted to the architecture described here. We have tuned the hyper-parameters such as the size of the neural network, learning rate (α = 2 × 10 −6 ) and regularization (λ = 5 × 10 −3 ) for best performance by testing the model during training on the validation dataset. After training the network for 200 epochs, the improvement in the loss is <0.6 mm 2 /epoch while the variance is sufficiently small as shown in Figure 25. The remaining bias does not improve with increased size of the network and can therefore be attributed to the finite position resolution and limited amount of events in the training data set. The loss may be further decreased by adding more data to the training set, but this is not demonstrated in this study. The value of the loss reaches 200 mm 2 after 200 epochs, which translates to an accuracy of σ 3D = 24.5 mm. We deem training to be complete at this point and evaluate the accuracy of the model on an independent set of data.

Testing of the trained DNN
The accuracy of the trained DNN is tested using various sets of independent data. We utilize the events that were discarded during the process of creating a training set with uniform event distribution. Each test set contains the events of only one source run with specific source type and location. Therefore, the event distribution is biased towards the location of the source and differs from that of the training set. Figure 26  defined as (predicted -true)/true. The total number of tested events is 13211 and the averaged distance between true and predicted event position in 3D space is d = 22.5 mm. The averaged distances in x-, y-and z-coordinates separately are: d x = 13.6 mm, d y = 11.3 mm, d z = 8.1 mm.
We have also evaluated the model on different source types, including 226 Ra and 60 Co, at various source positions and similar accuracies for the predicted event positions were determined. The result for a 228 Th run at S11 is shown in Figure 26 (b). In this case, the averaged distance between the predicted and true event position is 22.4 mm, while d x = 11.8 mm, d y = 12.7 mm and d z = 8.6 mm. For both 228 Th runs at S5 and S11 the discrepancy between predicted and true position is largest in the coordinate for which the event distribution is close to detector edges and the Teflon reflector (x-coordinate for S5 and y-coordinate for S11). This discrepancy is further and S11 (b). The non-zero mean in X-coordinate for S5 and Y-coordinate for S11 indicate the larger discrepancy when the event distribution is shifted towards the edge of the detector and close to the Teflon reflector.
illustrated in Figure 27 which shows the distribution of (predicted -true) event positions where the mean is non-zero in these cases. However, this shift is several times smaller than the standard deviation of these distributions. Possible explanations are the fact that events occurring near the Teflon reflector might get perturbed due to inhomogeneity in the drift field and charge loss. In such cases the true position deviates from the information retrieved from charge collection. Moreover, the proximity to the Teflon reflector causes more light to be reflected before detection by the APDs which complicates the reconstruction of the light distribution. In addition to the individual source runs, we have generated a test set consisting of events which are contained in a tight fiducial volume of 50 mm×50 mm×50 mm at position x = 100 mm, y = 0 mm and z = 100 mm with energies above 2400 keV. The event distribution of this data set is manually constructed and hence is completely independent of the training data. The data set contains 160 events. The true positions of these events are shown as green dots in Figure  distance is 13.0 mm, while the contributions from each coordinate are: d x = 8.3 mm, d y = 4.8 mm, d z = 6.2 mm. The smaller averaged distances as compared to the previous test sets is mainly attributed to the guaranteed large signal to noise ratio, due to the energy cut, and the distance of the selected events to the detector edges as described previously.

Conclusions
In this work, energy of events in EXO-200 was successfully reconstructed directly from charge collection waveforms using DNNs. We found that the energy resolution, as measured for a calibration gamma source, matches (or slightly exceeds) that of the conventional reconstruction. As was pointed out in Ref. [1], there exists a risk that a DNN trained on the MC events may perform well on an independent set of MC events and yet perform poorly on the actual data. We found that this indeed happened under certain conditions in our case. The way to mitigate this risk was found by adjusting the training procedure. The final accuracy of reconstruction was validated using actual detector data. We believe that data-driven validation is a necessary step for any DNN analysis.
The position of events in EXO-200 was also successfully reconstructed using raw APD waveforms that did not undergo the denoising procedure. Due to the absence of a detailed MC simulation of light propagation and collection in EXO-200, we used the event position obtained from U-and V-Wire signals to provide the truth input during the DNN training. The validation of the position reconstruction was also done with the calibration data.
The full EXO-200 dataset spans several years. In order to use the approaches developed here on the full dataset one needs to also apply corrections for time-dependent effects, e.g., for variation of the finite electron lifetime in the detector. The methods to derive such corrections rely on the same conventional reconstruction routines and are not believed to pose a substantially different challenge to the DNN approach. Nevertheless, the effort of determining the time dependent corrections with DNNs has not been attempted. So this work does not demonstrate a successful reconstruction of the full EXO-200 dataset, only of a set of randomly chosen calibration data runs. Reconstructing the full EXO-200 dataset; performing higher level analysis of EXO-200, such as event identification and classification; and further reduction of the reliance of the DNNs on MC during training are the natural avenues for future work.
Lastly, in addition to the performance advantages of the DNN approaches discussed here and in the referenced publications, one can also notice the following. The DNN approaches described here required surprisingly little time to set up and begin to perform competitively. Partly, this is because the DNN approaches take advantage of already existing free but professionally developed and maintained software libraries, like TensorFlow and Keras. With continued scrutiny and advances, it may become possible that the DNN based reconstruction and data analysis will be employed as first choice of the next generation experiments in neutrino, dark matter, and high energy physics.