{'fraction_non_alphanumeric': 0.023207757113336513, 'fraction_numerical': 0.011285964075663646, 'mean_word_length': 4.793738489871086, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, '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}}
Machine learning approach to pulse shape discrimination in liquid noble gas detectors

Study of the event classification in liquid noble gas detectors is presented. The discrimination between different events usually done by prompt light fraction. To tackle this task we adopt the neural net classifier and use pulse shape as an input feature. The main difficulty comes from low-energy events that are difficult to separate. This is important because these events provide a background for dark matter searches. We find that neural networks are suitable for this task.


Introduction
Machine learning algorithms proved to be a powerfull and useful techniques for high energy physics [1]. Different experiments have already found out the benefits of its implementation on different stages of analysis or simulations. It is expected of machine learning to initialize the leap of efficiency in the scientific research.
Here we attempt to implement machine learning algorithms for event classification in liquid noble gas detectors. Discrimination between nuclear and electron recoils in the detector is an important task both for background estimation and dark matter searches.
Paper organized as follows: in Section II we give a brief description of the NEST package, its default detector XENON10 and data samples, in Section III we describe the tools used to implement the machine learning algorithms, Section IV is dedicated to the neural net performance and in Section V we conclude.

Data simulation
Data were simulated with NEST package [2]. NEST (Noble Element Simulation Technique) is tool for simulation of the scintillation, ionization, and electroluminescence processes in noble elements. Performance of NEST has been validated against a list of experimental results. It is ready-to-use package, which requires a minimum input parameters to run a simulation. One should provide it with type and number of events, energy distribution, initial position and drift field. NEST has a plenty of event types, divided on two principal classes: nuclear recoil (NR) and electron recoil (ER). Those classes are common for liquid noble detectors. The default detector implemented for simulation is XENON10.
The XENON10 detector [3] is a two-phase time projection chamber (TPC) containing 25 kg of liquid xenon (LXe). Sketch of its work is shown in figure 1. The energy of incoming particle collision with xenon atoms are stored within the liquide xenon volume and detected by  The data were simulated with default XENON10 configuration (drift field equals to 730 V/cm, events distributed randomly in detector etc.). All technical parameters can be found in NEST package description. Data samples consist of NR and ER events. Nuclear recoils are represented by calibration source 241 Am-9 Be and standard NR simulation in energy range 0÷100 keV. Electron recoils are made from electrons with energies of 9.4 keV and 32.1 keV from the decay of Kr-83m calibration source, see figure 2. As an input feature for neural net we take a vector of 23 points of integrated S1 pulse shape, figure 3. A total of 3880 events were simulated.    The energy range deliberately choosen to be so that S1 lies between 0÷350 photoelectrons. Usually there is no problem to separate NR from ER at high energies. But in the low energy region this events starts to overlap.

Neural net setup
Neural network is a mathematical model based on the principle of organization and functioning of biological neural networks. We use back-propagation algorithm, in which the signal passes through the entire network in the forward direction by calculating the output value, and then the signal moves in the opposite direction, adjusting the output weights of each layer [4].
We choose Multi Layer Perceptron(MLP) as an appropriate algorithm to achieve the event discrimination. The efficiency of this choice is confirmed by succesful use in particle physics [5]. MLP is a feedforward neural network which make use of backpropagation due to learning. It is implemented from python scikit-learn package [6].
Scikit-learn package MLP classifier has mostly the default setup, two hidden layers with 100 and 20 neurons correspondingly, maximum of 2000 iterations. Classifier uses the LBFGS (LimitedBroyden-Fletcher-Goldfarb-Shanno) solver (an algorithm in the family of quasi-Newton methods) for weight optimization which performs better for relatively small datasets. Tolerance for optimization is 10 −4 . Activation function for a hidden layer is set to be a logistic sigmoid.

MLP performance
The main goal is to distiguish between NR and ER events using S1 pulse shape. The data is divided into two datasets, training and test, in a ratio of 7 to 3. For each dataset there are labels indicating the belonging to the class. MLP is an algorithm that uses supervised learning. The neural network is trained on a training sample using known beforehand class labels (NR or ER). After that, a test sample is fed to the neural network to predict the class of the events. As an ouptup we get a list of predicted labels. Test sample consists of 1150 events, see figure 4. Now we can compare the test labels with predicted ones to estimate the neural network performance, see table 1. The result of the classification is presented in figure 5.  The relatively large classification error is due to the smallness of the dataset and the number of layers of the neural network. Increasing the number of layers will improve the quality of discrimination, but will also affect network performance: the more layers a classifier has, the slower it works.

Conclusion
It is inevitable that machine learning enters analysis in different areas of physics. The big players in the field, such as Google or Yandex, provides us with many ready-to-use software packages with built-in implementations of neural networks, gradient boosting and other algorithms. Adoptation of these packages for proper use in the analysis for sure will benefit the experiment in whole. This work demonstrates the real possibility to distinguish between general classes of events in liquid noble gas detectors. Separation was done using simple multi layer perceptron. We argue that use of neural networks in two-phase time projection chambers will contribute to its performance.