Suppression of accidental backgrounds with deep neural networks in the
  PandaX-II experiment
The PandaX dark matter detection project searches for dark matter particles
using the technology of dual phase xenon time projection chamber. The low
expected rate of the signal events makes the control of backgrounds crucial for
the experiment success. In addition to reducing external and internal
backgrounds during the construction and operation of the detector, special
techniques are employed to suppress the background events during the data
analysis. In this article, we demonstrate the use of deep neural
networks(DNNs)for suppressing the accidental backgrounds, as an alternative to
the boosted-decision-tree method used in previous analysis of PandaX-II. A new
data preparation approach is proposed to enhance the stability of the machine
learning algorithms to be run and ultimately the sensitivity of the final data
analysis.
Nasir Shaheed, Xun Chen, Meng Wang
# Suppression of accidental backgrounds with deep neural networks in the PandaX-II experiment

###### Abstract

The PandaX dark matter detection project searches for dark matter particles using the technology of dual phase xenon time projection chamber. The low expected rate of the signal events makes the control of backgrounds crucial for the experiment success. In addition to reducing external and internal backgrounds during the construction and operation of the detector, special techniques are employed to suppress the background events during the data analysis. In this article, we demonstrate the use of deep neural networks (DNNs) for suppressing the accidental backgrounds, as an alternative to the boosted-decision-tree method used in previous analysis of PandaX-II. A new data preparation approach is proposed to enhance the stability of the machine learning algorithms to be run and ultimately the sensitivity of the final data analysis.
## 1 Introduction

The nature of dark matter in our universe remains one of the most fundamental unresolved questions in physics. The weakly interacting massive particles (WIMPs) proposed by various theories beyond the Standard Model of particle physics, are considered as a leading candidate for dark matter [1]. In recent decades, numerous experiments have been conducted to detect direct collisions between WIMPs and ordinary matter in deep underground laboratories, resulting in the suppression of the available parameter space for WIMPs [2; 3]. Among these projects are the PandaX-II [4] and PandaX-4T [5] experiments, located at the China Jinping Laboratory (CJPL) [6; 7; 8], which utilize the technology of a dual-phase xenon time projection chamber (TPC) [9]. Recently, the PandaX-4T experiment has established a more stringent constraint on the spin-independent interactions between WIMPs and nucleons than previous generations of the same type of experiments [10].

Background control is a crucial aspect of experiments searching for dark matter due to the extremely low rate of the signal particles. The main sources of background are gamma or neutron collisions inside the TPC, which originate from known radioactive sources in the detector material or dissolved sources within the xenon. The PandaX collaboration has made significant efforts to reduce backgrounds from laboratory, detector materials, and the xenon recirculating pipelines [11; 12; 13; 14]. Nevertheless, accidental background still plays a significant role and must be taken into account during data analysis.

The PandaX-II experiment successfully utilized the boosted-decision-tree (BDT) method, a machine learning technique, to suppress accidental background [15]. With the advancement of deep learning technologies, such as deep neural networks (DNNs), these have become valuable tools in various studies of particle physics in recent years [16; 17; 18]. In particular, in the field of deep underground experiments, DNNs have been widely used to discriminate signals from backgrounds [19; 20; 21], reconstruct the energy and position of events [22; 23], and improve the speed of data fitting [24].

In this article, we conduct a study on using DNNs to suppress accidental background in the PandaX-II experiment. In Section 2, we provide a brief overview of the detection principle and
accidental backgrounds in PandaX-II. We then discuss data preparation in Section 3. In Section 4, we present the testing of various DNN architectures for accidental background suppression, as well as a new data preparation method to improve stability. Finally, we summarize our findings and provide an outlook in Section 5.

## 2 Accidental background in PandaX-II

The central components of the PandaX-II and PandaX-4T detectors are the dual phase xenon TPCs. They have a similar structure. A TPC has a cylindrical sensitive volume enclosed by polytetrafluoroethylene (PTFE) reflection panels. A cathode mesh at the TPC's base and a gate grid electrode beneath the liquid xenon surface create the drift field. The gate, in conjunction with the anode mesh above the liquid level, generates an extraction field which extracts electrons from the liquid xenon into the gas xenon. Two arrays of photomultiplier tubes (PMTs) are placed above and below the TPC to detect the scintillation photons generated within the TPC. For more detailed information on the PandaX detectors, refer to references [4] and [10].

To aid in understanding the origin of accidental background, we provide a brief overview of the detection principle of the dual phase TPC in this article. For a more in-depth explanation, we refer the readers to Ref. [9]. The collisions between incoming particles and target xenon atoms in the dual phase xenon TPC may produce prompt scintillation photons (\(S1\)) and ionized electrons. The electrons drift along the drifting field in the TPC and are extracted into the gaseous region, where they produce delayed photons (\(S2\)) through the process of electroluminescence. The time difference between the \(S1\) and \(S2\) signals can be used to determine the \(z\)-position of the collision. Additionally, the ratio of \(S2/S1\) is an important discriminator between electron recoil (ER) and nuclear recoil (NR) events. NR events, which are the interactions of interest for detecting WIMPs and the neutron backgrounds, are characterized by a lower ratio of \(S2/S1\) compared to ER events due to the fact that a large fraction of recoil energy converts into heat and escapes detection. This allows for the discrimination of WIMPs from most of the background events.

In the PandaX-II and PandaX-4T experiments, the majority of backgrounds are caused by scattering events of gamma or neutron originating from radioactive isotopes in the detector materials and dissolved radioactive isotopes in liquid xenon, such as \({}^{222}\)Rn, \({}^{85}\)Kr, or \({}^{3}\)H. These backgrounds are controlled through techniques such as material screening and selection, and xenon distillation and purification. Another type of background, known as surface background, is generated by the \(\beta\)-decay of \({}^{210}\)Pb on the inner surface of the TPC, which affects the \(S2\) signal and is concentrated near the edges. This background can be modeled using a data-driven method and estimated.

Accidental background refers to events where \(S1\) and \(S2\) signals are not from the same collision events. Identifying and controlling these backgrounds can be challenging, but they are crucial for achieving a robust understanding of the signals in the detector. The \(S1\) or \(S2\)-like signals are not correlated with any other recorded signals from the same source are referred to be "isolated". During event reconstruction, unrelated isolated \(S1\) and \(S2\) signals may appear in the same drift window, resulting in accidental backgrounds. In Ref. [15], the possible origins of isolated signals are analyzed in detail. We present a brief overview of them here. The isolated \(S1\) signals may originate from regular scattering events, but the corresponding \(S2\) signals are not produced or recorded. They could also be single electron signals that were misidentified as \(S1\)s. Additionally,
overlapped dark noises from different photo-multiplier tubes (PMTs) may form \(S1\)-like signals. The isolated \(S2\) signals are produced by the electroluminescent process of electrons in the gas region, similar to regular \(S2\) signals. They can be regular \(S2\) signals without corresponding \(S1\) signals recorded, or overlap with \(S1\) signals in such a way that only the \(S2\) signals are recognized. Additionally, stagnant electrons created by large energy depositions may be randomly released into the gas region, resulting in \(S2\)-like signals directly.

Ref. [15] estimated the average rates of isolated \(S1\) and \(S2\) signals, \(\bar{r}_{1}\) and \(\bar{r}_{2}\), using several data-driven methods, and obtained consistent results. The total number of accidental background events was calculated using the equation:

\[n_{\mbox{acc}}=\bar{r}_{1}\cdot\bar{r}_{2}\cdot\Delta t_{w}\cdot T\cdot\epsilon, \tag{1}\]

where \(\Delta t_{w}\) is the time window defined by the fiducial volume cut, \(T\) is the duration of the science data run, and \(\epsilon\) is the efficiency of data quality cuts. The final number of accidental background events in PandaX-II is non-trivial, particularly in the region beneath the reference median line of NR events in the plot of \(\log(S2/S1)\) versus \(S1\) from neutron calibration, where the statistics for regular ER backgrounds are low. Fig. 1 shows the signal distributions of the NR and ER calibration events and the accidental background in PandaX-II Run 11 data set [25] for reader's reference. Backgrounds in this region can obscure or mimic the true WIMP signals. Suppressing this type of background events is crucial for the sensitivity of the WIMP search.

In the PandaX-II experiment, the BDT algorithm was employed to effectively reduce the number of accidental background events [15]. This technique utilizes a set of characteristics specific to the signals to differentiate between accidental background and NR events. Given the importance of events below the NR median line in the search for WIMPs, only samples in that region were used in the BDT training process. The optimized BDT cuts achieved a powerful capability to identify

Figure 1: The signal distributions of NR and ER calibration events (scatter points) on top of the expected accidental background events (background histogram) in Run 11. The reference NR median line is plotted.
accidental background while maintaining high efficiency for NR and ER signal events. For instance, the number of expected accidental events below the NR median in PandaX-II Run 11 was reduced from 2.93 to 0.77, while the efficiency for NR signal events in the same region is 90.7%. The successful implementation of the BDT technique in PandaX-II motivated us to investigate the use of advanced deep learning techniques for suppressing accidental background.

## 3 Data preparation

In order to implement DNNs for the purpose of suppressing accidental background in the PandaX-II experiment, the data preparation is crucial. The data samples used in this study are sourced from the PandaX-II Run 11 dataset [25], which were also used in the previous study with BDT. This allows for consistency in the input variables and allows for a direct comparison of the performance of the two methods.

The PandaX experiments take data by digitizing the output voltage of the PMTs into waveforms. In PandaX-II, the digitized samples within the \([-500,500]\)\(\mu\)s window of a global trigger are kept [26]. The raw data are processed following the same procedure: 1) the region over a given threshold in each recorded waveform segment is marked as "hit"; 2) hits with tight time correlation are clustered into "signal"; 3) for each signal, related properties are calculated, and the signal is tagged. The data is converted to collections of events with signals in the end of data processing, with properties calculated. The important properties of an event include:

* number of S1 signals,
* number of S2 signals,
* start time of the event,
* time difference of each signal to the start of the event,
* index of the maximum \(S1\) before the maximum \(S2\),
* index of the maximum \(S2\),
* summation of extra signals except for the paired maximum \(S1\) and maximum \(S2\),
* energy of the event by combining the paired \(S1\) and \(S2\).

In the search for WIMPs, events featuring a primary \(S1\) and \(S2\) signal are selected for analysis. The horizontal location of an event is determined using various techniques based on the top pattern of the \(S2\) signal, while the vertical position is determined by the temporal separation of the paired \(S1\) and \(S2\) signals. These signals are then corrected according to their position. The final data used for analysis includes key characteristics of each signal, which are calculated from the waveform and summarized in Table 1.

The aim of this study is to distinguish between accidental background events below NR median and physical scattering events, therefore, two types of data samples are necessary. Samples of accidental background were generated by randomly pairing isolated \(S1\) and \(S2\) signals identified in the dark matter search data. Since the region below the NR median has sufficient statistics only
in the neutron calibration run, the physical scattering event samples are extracted from the neutron calibration runs. Additionally, the DNNs are anticipated to classify the greatest number of physical events above the NR median correctly, especially the ER events. Therefore, a third dataset is acquired from the related ER calibration runs. The events that have been chosen, which fall within the defined fiducial volume, have met all the established criteria during the PandaX-II data analysis process and fall within the signal window, including a charge of \(S1\) within a range of 3 and 45 PE, and a raw charge of \(S2\) greater than 100 PE, with a corrected \(S2\) charge smaller than 10,000 PE. For the accidental background, only the events below NR median are selected. The generated data set of accidental background contains 43,719 events, and the full NR data set contains 10,881 events.

The data samples are structured in the ROOT format, a widely used tool in high energy physics experiments [27]. The variables are organized as branches within the TTree structure, allowing for easy implementation of a cut to select NR events below the NR median line during data loading.

In order to train the DNN, 80% of the input data are used, 10% of the data are set aside for validation, and the remaining 10% for testing purposes. This split of the data allows for a thorough evaluation of the performance of the DNN and enables the identification of any potential issues during the training process.

## 4 Deep neural networks

The task of identifying accidental background events can be approached as a binary classification problem. Since the number of features in the event data is limited, a Multi-Layer Perceptron

\begin{table}
\begin{tabular}{c l} Name & Description \\ \hline \hline qS1 & raw charge of \(S1\), in the unit of photoelectron (PE) \\ qS2 & raw charge of \(S2\) \\ qS1c & position corrected charge of \(S1\) \\ qS2c & position corrected charge of \(S2\) \\ wS1 & width of the \(S1\) \\ wS2 & width of the \(S2\) \\ wtenS2 & full width of one-tenth maximum of the \(S2\) \\ S1TBA & asymmetry between the charge collected by the top (\(q_{T}\)) and bottom (\(q_{B}\)) array for \(S1\), defined as \((q_{T}-q_{B})/(q_{T}+q_{B})\) \\ S2TBA & asymmetry between the charge collected by the top and bottom array for \(S2\) \\ S2SY1 & the ratio of charge before the maximum height to the total charge for \(S2\), in the raw waveform \\ S2SY2 & the ratio of charge before the maximum height to the total charge for \(S2\), in the smeared waveform \\ S1NPeaks & number of local maximums in \(S1\) \\ S1LargestBCQ & ratio of the largest charge detected by one bottom PMT to the total charge of \(S1\) \\ \hline \end{tabular}
\end{table}
Table 1: Important properties of the signals used in data analysis.
(MLP) [28], a special type of artificial neural networks, is an appropriate deep learning model for this task.

The basic idea of the artificial neural network is to construct a function \(N\) with many parameters, which maps the input features \(\mathbf{X}\) to the prediction \(\mathbf{y}\), or \(\mathbf{y}=N(\mathbf{X})\). Within the network, there are many layers of computation units called neurons, which accepts inputs from neurons from other layers and generate outputs to neurons in the following layers. By minimizing a given loss function of \(l(\mathbf{y},\mathbf{Y})\), which takes the prediction \(\mathbf{y}\) and the label \(\mathbf{Y}\) of data as inputs, the parameters of \(N\) are able to be adjusted. This process is generally referred to as "training" the function \(N\). The training process is done by backpropagation of errors, where the errors are propagated back through the layers of the network to update the parameters of the function. A trained function is able to fit the training data well and can be used to make predictions by feeding new data.

The MLP contains multiple layers of neurons fully connected in a feedforward manner. The input layer takes in the input features \(\mathbf{X}\), and the output layer produces the prediction \(\mathbf{y}\). In between the input and output layers, there are one or more hidden layers that help to extract complex features from the input data. Once the MLP is trained, it can be used to predict by feeding new data into the input layer.

In this study, we implemented the MLP models with TensorFlow 2.5 [29]. The event properties listed in Table. 1 are used as input features of the MLP. The input data have been rescaled with the min-max normalization. The activation function used in the output layer of the MLP is the "sigmoid" function, which maps the output to a value within the range of \([0,1]\). The value can be utilized to determine if an event is physical or non-physical according to an optimal cut value. The cut is obtained by maximizing the significance \(S\), the metric used in the previous study, which is defined as

\[S=\frac{\epsilon_{s}n_{s}}{\sqrt{\epsilon_{s}n_{s}+\epsilon_{b}n_{b}}}, \tag{1}\]

where \(n_{s}\) and \(n_{b}\) are the numbers of NR and accidental background events, respectively, and the \(\epsilon\)s are the corresponding efficiencies obtained with a certain cut value. To conform with the methodology in the previous study [15], the values of \(n_{s}\) and \(n_{b}\) are approximated to be equal and used accordingly. Fig. 2 presents an example of the determination of the significance.

The first objective of this study is to determine the optimal structure of the hidden layers, including the number of layers and the number of neurons in each layer. Thus we conducted a scan across different layer combinations to find the maximum value of \(S\). During the scan, the learning rate was fixed at 0.001, the loss function was binary cross entropy, and the optimizer used was Adam [30]. To make a fair comparison with the previous study of the BDT method, the training data contains only the events below the NR median, following the same strategy.

In the training process of each MLP model, a maximum of 1,500 epochs was set to ensure the model's convergence and to prevent overfitting. The training stopped when the validation loss function reached its minimum value with a patience of 20. The network parameters with the lowest validation loss value were then saved and used to calculate the significance. To obtain reliable results, each model was trained from scratch 100 times and the average significance was calculated.

The results of the tested MLP structures, including the average significance and the average number of epochs required to reach the best parameters, are summarized in Table 2 and visualized in Figure 3. It was observed that as the number of neurons in the network increased, the training
process completed earlier, and the significance is higher. Additionally, it is observed that all the deep learning models have achieved a higher significance compared to the 26.2 value obtained by the BDT method reported in Ref. [15]. The differences in average significances among the various models are relatively small.

The BDT method has a unique attribute in that it demonstrates strong differentiation capabilities for events below the NR median, while maintaining a high level of efficiency for ER events that are dominant above the NR median line in dark matter searches. It is crucial to assess if the MLPs possess this characteristic. Unfortunately, the results indicate that the MLPs show inconsistent performance for ER event recognition, with most models displaying low efficiency for ER events, rendering the associated network parameters unsuitable for use in data analysis. Examples of the ER efficiencies as function of \(qS1\) for three given MLP models are presented in Fig. 4.

Figure 3: The average significances and epochs of the scanned networks.

Figure 2: The determination of the cut value as well as the significance \(S\). The distributions of the MLP output of input test events are plotted as backgrounds. The distributions are obtained from one of the best parameters for model 4C (see text below).
However, after a thorough examination of the results, some MLP parameter sets were found to have both high discrimination power and high efficiency for ER events. One parameter set of model labeled "4C" is found to have the highest ER efficiency. The significance of this model is 26.77. The efficiencies for the accidental background, NR calibration events and ER calibration events are presented in Fig. 4(a).

The selected model are applied on the PandaX-II Run 11 dark matter search data, resulting in 676 out of 708 candidate events having survived1. The updated efficiencies and data were used to drive the exclusion limit and sensitivity on the spin-independent WIMP-nucleon cross section at a WIMP mass of 40 GeV/c\({}^{2}\). The results are summarized in Table. 3, alongside the results obtained using the BDT method. By using the selected 4C model, the sensitivity is improved by 13% in comparison with that obtained by using the BDT method.

Footnote 1: the post-unblinding cuts in Ref. [25] is already applied

The application of regularization techniques was not successful in curing the unstable behavior. Adding L2 regularization to each hidden layer of Model 4C failed to discriminate between NR signal events and the accidental background events. The fluctuation in the ER efficiency curve remained even with the addition of dropout layers (dropout rate 0.2) after each hidden layer, as illustrated in Fig 3(d).

To enhance the stability of ER efficiencies in the MLP models, we adopted a novel strategy for selecting the training data. We still utilized the accidental background events below NR median,

\begin{table}
\begin{tabular}{l c c c} Label & Hidden Layers & Average Significance & Average stop epoch \\ \hline

[MISSING_PAGE_POST]

 & \(32\times 32\times 16\times 16\times 16\times 12\times 12\) & 26.83\(\pm\)0.15 & 101.7 \\ \hline \end{tabular}
\end{table}
Table 2: The average significances and epochs of the scanned networks. The numbers in the column “Hidden Layers” are neurons.
but included all the NR events. With the updated input data, we retrained the 4C and 4E models, each 100 times, and renamed them to 4Cu and 4Eu, respectively. All the trained models exhibit an ER efficiency close to 100%, with high significance. The efficiencies obtained using the 4Cu model with the highest significance is presented in Fig. 4(b). The average significances are \(26.82\pm 0.17\) and \(27.30\pm 0.13\) for the 4Cu and 4Eu models, respectively. The constraints and sensitivities from the 4Cu model with the highest significance are \(26.82\pm 0.17\) and \(27.30\pm 0.13\) for the 4Cu and 4Eu models, respectively. The constraints and sensitivities from the 4Cu model with the highest significance are \(26.82\pm 0.17\) and \(27.30\pm 0.13\) for the 4Eu and 4Eu models, respectively. The constraints and sensitivities from the 4Cu model with the highest significance are \(26.82\pm 0.17\) and \(27.
models with highest significances are presented in Table. 3. The limits and sensitivities have both seen an improvement in comparison with the old data selection strategy of DNN, suggesting that the revised approach to preparing the input data for deep neural networks has led to better results. Morever, model 4Cu shows a sensitivity improvement of 21.8% relative to the BDT method.

## 5 Summary

In this study, we explored the utilization of deep neural networks, particularly MLPs, for suppressing accidental background in the PandaX-II experiment. The results showed that increasing the number of neurons in the layers improved the discrimination between signal and background events. However, the traditional strategy of using only data below the NR median during training resulted in unstable ER efficiencies, making the DNNs challenging to use in data analysis. By incorporating NR data above the NR median in the training, stable ER efficiencies and high background suppression power were achieved. Compared to the BDT method, the MLPs trained with the updated data preparation strategy demonstrated improved sensitivity for dark matter search.

In the field of dark matter direct detection, the application of deep neural networks is not limited to signal and background discrimination. For instance, generative adversarial networks can be utilized to generate synthetic data that follows the same distribution as actual data, which can be employed in both simulation and analysis. We anticipate that machine learning techniques will continue to provide even greater benefits in underground experiments.

## Acknowledgment

This project is supported in part by a grant from the Ministry of Science and Technology of China (No. 2016YFA0400301), grants from National Science Foundation of China (Nos. 12090063, 12175139), and by Office of Science and Technology, Shanghai Municipal Government (grant No. 18JC1410200). We also thank the sponsorship from the Chinese Academy of Sciences Center for Excellence in Particle Physics (CCEPP). We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan Xp GPU used for this research.
