††institutetext: Neutrino Division, Fermi National Accelerator Laboratory,
Wilson Street and Kirk Road, Batavia, Illinois, 60510 U.S.A.

# Photon detection probability prediction
using one-dimensional generative neural network

Wei Mu111Corresponding author. Alexander I. Himmel  and Bryan Ramson
<EMAIL_ADDRESS>
###### Abstract

Photon detection is important for liquid argon detectors for direct dark
matter searches or neutrino property measurements. Precise simulation of
photon transport is widely used to understand the probability of photon
detection in liquid argon detectors. Traditional photon transport simulation,
which tracks every photon using the Geant4 simulation toolkit, is a major
computational challenge for kilo-tonne-scale liquid argon detectors and GeV-
level energy depositions. In this work, we propose a one-dimensional
generative model which efficiently generates features using an
$\mathrm{OuterProduct}$-layer. This model bypasses photon transport simulation
and predicts the number of photons detected by particular photon detectors at
the same level of detail as the Geant4 simulation. The application to
simulating photon detection systems in kilo-tonne-scale liquid argon detectors
demonstrates this novel generative model is able to reproduce Geant4
simulation with good accuracy and 20 to 50 times faster. This generative model
can be used to quickly predict photon detection probability in huge liquid
argon detectors like ProtoDUNE or DUNE.

##  1 Introduction

Liquid argon (LAr) is a popular detector medium for direct dark matter
searches calvo2017commissioning ; aalseth2018darkside ; benetti2008first  and
neutrino property measurements abi2020first ; bettini1991icarus ;
acciarri2017design . Its excellent scintillation properties have been employed
by dark matter search experiments for energy reconstruction and background
rejection. LAr scintillation light detection will advance the physics goals of
neutrino experiments by improving detector calorimetric and position
resolution, enabling the study of astrophysical neutrinos and enhancing the
physics reach of oscillation analyses. In order to take the advantage of
information provided by LAr scintillation light, photon detection probability
in LAr detectors must be well understood.

Traditionally, photon detection probability is explored by simulating the
transport of photons in detectors using Geant4 agostinelli2003geant4 .
However, such simulation is extremely challenging for experiments using huge
LAr detectors that record GeV-level energy depositions due to limited
computing resources. Modern machine learning techniques have enabled new ways
to emulate the results from full Geant4 simulation and a generative model is
one of the most promising approaches for learning the true distribution from
training samples so as to generate new data points with variation Alonso-
Monsalve:2018aqs . However, while generative models based on deep neural
networks (DNN) have shown great promise in generating accurate predictions,
they can be too slow when deployed without GPUs, motivating the development of
a novel generative model which can efficiently predict photon detection
probabilities at lower computational cost.

In this paper, we demonstrate that a one-dimensional generative neural network
(1D Genn) is capable of bypassing photon transport simulation and rapidly
predicting precise photon detection probabilities based only on the
scintillation vertex. We first discuss common features of photon detection
systems for LAr detectors and propose a general architecture for the Genn in
Section 2. Subsequently, we apply and train Genn models for photon detection
systems of two large scale LAr detectors. In Section 3, we evaluate the
performance of the Genn-based photon detection probability predictions, in
comparison to full Geant4 simulations, on a number of metrics including: the
capability to smoothly interpolate, the precision of the prediction, and the
speed of inference on CPUs. In addition, we evaluate the scalability of the
Genn model to both higher precision and to larger systems. Finally, we
summarize our work and discuss the potential generalization of the Genn model
in Section 4.

##  2 1D generative model

Aiming at building a fast and precise generative model for photon detection
probability prediction, we extract common features from photon detection
systems of LAr detectors, propose a novel network architecture that is able to
conditionally generate the photon detection probabilities based on the
scintillation vertex, and instantiate the model for two large scale LAr
detectors.

###  2.1 Model architecture

Common photon detection systems of LAr detectors consist of a series of photon
detectors distributed in arrays and deployed on the “walls” of the detector.
Photons, emitted from a vertex where a particle deposits energy illuminate
specific photon detectors and form a hit pattern on the photon detection
system. The number of total detected photons, being correlated to the
deposited energy of the particle, can be used as a calorimetric energy
measurement and improve the detector energy resolution. The distribution of
the illuminated photon detectors, which depends on the location of the
scintillation vertex, can be used to locate the two-dimensional (2D) position
of the interaction point. The Geant4 toolkit uses a Monte-Carlo (MC) method to
simulate photon transport inside a detector and produce the number of photons
detected by particular photon detectors, which predicts the photon detection
probability of the detector. As this MC-based method is challenging for huge
LAr detectors and GeV-level energy depositions, the prediction from the full
Geant4 simulation might be emulated, in a more efficient way, by generative
models, which directly map the energy deposition, with specific amount and
position, to the hit pattern on the photon detection system.

Recently, generative models using DNN have shown the ability to randomly
produce new high resolution images that mimic the details of true images.
However, DNN inference on CPUs is slow. Millions of simulated events with
billions of hit pattern images are required for physics analyses, suggesting
significant computing resources. Given that modern LAr detectors will deploy
thousands of photon detectors and the photon detection systems of LAr
detectors will generate hit pattern images consisting of only thousands of
pixels, it could be a fairly costly and time consuming process which is far
less than the images processed by common generative models. In addition, the
images to be generated strongly depend on the location of the scintillation
vertex, which makes it possible to fill in features to an image in a more
efficient way. This motivated us to explore whether generative models based on
shallow neural networks with novel architectures could reproduce the features
of the photon detection systems of LAr detectors.

Considering a LAr detector in a three-dimensional (3D) Cartesian coordinate
system, a photon detector array is deployed perpendicular to the $x$-axis,
where photon detectors are aligned in an $m\times n$ array along the $y$-axis
and $z$-axis. Assuming a certain number of photons are emitted from a
scintillation vertex ($x_{\rm s},y_{\rm s},z_{\rm s}$), it is a reasonable
intuition that the number of detected photons by particular photon detectors
depends on the coordinate $x_{\rm s}$ and the distribution of the illuminated
photon detectors along row or column in the $yz$-plane is determined by the
coordinate $y_{\rm s}$ or $z_{\rm s}$ .

According to the common photon detection system design, we propose a general
Genn architecture with three input layers, named ${pos_{x}}$, ${pos_{y}}$, and
${pos_{z}}$, each having one neuron corresponding to the coordinate of the
scintillation vertex, $x_{\rm s}$, $y_{\rm s}$ , and $z_{\rm s}$. The Genn has
one output layer, named ${vis_{\rm full}}$, with number of neurons equal to
the number of photon detectors. There are three first hidden layers,
connecting to the three input layers respectively. The hidden layer connected
to ${pos_{x}}$, named ${vis_{\rm int}}$, has one neuron as a factor to
normalize the number of total detected photons. The hidden layer connected to
${pos_{y}}$ or ${pos_{z}}$, named ${vis_{\rm col}}$ or ${vis_{\rm row}}$, has
$n$ or $m$ neurons, being used to predict the photon detection probabilities
by detectors in each column or row. The outer product of ${vis_{\rm col}}$ and
${vis_{\rm row}}$, composing an $\mathrm{OuterProduct}$-layer and named
${vis_{\rm tmp}}$, represents the distribution of the photons in the photon
detector array. The multiplication of ${vis_{\rm int}}$ and ${vis_{\rm tmp}}$,
forming a $\mathrm{Multiply}$-layer named ${vis_{\rm arr}}$, reflects the
features of the hit pattern on the photon detector array and predicts the
photon detection probability of each detector corresponding to a particular
scintillation vertex. In practice, the number of neurons on ${vis_{\rm col}}$
and ${vis_{\rm row}}$ ($n$ or $m$) can be tuned and optional layers can be
introduced, such as Normalization layers, to get optimal network architecture
(see Section 3.4). The general Genn architecture we proposed is illustrated in
Figure 1.

Figure 1: General Genn architecture. ${pos_{y}}$-layer and ${pos_{z}}$-layer
are used to predict the photon distribution on the photon detection system,
while ${pos_{x}}$-layer is a normalization factor for the number of total
detected photons. $\mathrm{OuterProduct}$ layer expands the dimension of the
inputs.

Unlike common generative models, which use the upsample (UpSampling2D) layer
or the transpose convolutional (Conv2DTranspose) layer for the input dimension
expansion, the model proposed in this work uses a $\mathrm{OuterProduct}$
layer to produce features and expand the dimension of inputs, which
significantly reduces the inference time on CPU. This model starts with a 3D
position, passes 1D data from layer to layer, and finally gives rise to a
prediction in a 1D data structure on the output layer. We will discuss the
advantage of the 1D data structure in Section 2.2.

This general Genn model has been applied to photon detection systems of
ProtoDUNE-like abi2017single ; abi2020first ; dune2021design  and DUNE-like
geometries abi2020deep . Two photon detection arrays are deployed on two
“walls” in ProtoDUNE-like geometry. In each array, two different types of
photon detectors are used. 30 bar-like light collectors are aligned in
$3\times 10$ array machado2016arapuca , where one bar is segmented into 16
silicon photomultipliers, as showed in Figure 2 on the left. Therefore, in
each array, there are 29 bar-like and 16 segmented photon detectors. In total,
90 photon detectors are deployed in this geometry. The active volume sits
between the photon detection systems, with an opaque wall halfway between
them, so each wall detects the photons emitted on its side of the geometry. In
the DUNE-like geometry (a segment of a DUNE detector), 480 photon detectors
are deployed on a single “wall” in the middle of the volume, forming a
$yz$-plane. The photon detectors are rectangular and aligned with the
$y$-direction forming 20 wide-spaced rows, each of which has 24 photon
detectors placed end-to-end, as shown in Figure 2 on the right. This photon
detection system sits in the middle of the active volume, and so is able to
detect photons emitted from both sides.

Figure 2: Photon detection systems in ProtoDUNE-like (left) and DUNE-like
geometries (right). The grey rectangles are the photon detectors.

We instantiate 1D Genn models for above two photon detection systems. The
networks have been implemented in the framework of Keras222Keras:
https://keras.io/ on top of TensorFlow333TensorFlow:
https://www.tensorflow.org/, and the source code for the two instantiated
models is available on GitHub444Source Code:
https://github.com/Healthborn/genn.

###  2.2 Loss function

Neural networks are generally trained using the gradient descent algorithm,
which requires a loss-function to calculate model error and update model
parameters using the back propagation algorithm. Common generative models
generate 2D images, which makes it challenging to choose an optimal loss-
function for model training since there is no consensus as to which measure
best captures the feature difference between two 2D images. This motivates the
generative model to be trained in the generative adversarial network (Gan)
framework goodfellow2014generative ; mirza2014conditional , where a
discriminator network is used to evaluate the output from the generative
model. The Gan framework has led to success in many applications, but
objective and quantitative evaluation of Gan generative model remains an open
question. So far, there is no general agreement upon algorithms to find the
Nash-equilibrium between the discriminator and the generative model, and it
relies on human eyes to determine performance of the generative model, which
results in an unstable training procedure. We solve this problem by training
the Genn models with a clearly defined loss-function instead of within the Gan
framework.

It is natural to assume generative models would learn features from 2D images
in the similar way as human brain. However, neural networks might view data in
a different way and learn features from flattened 2D images: even non-
spatially-representative 1D-vectors. In this case, the problem to be solved by
generative models can be considered a multiple regression prediction problem,
and the 1D data structure allows more straightforward similarity metrics
santini1999similarity ; goldberger2003efficient ; gretton2012kernel .

The most commonly used metric for a multiple regression problem,
${mean~{}squared~{}error}$ (MSE) or $mean~{}absolute~{}error$ (MAE), tends to
produce ${regression~{}to~{}the~{}mean}$ situation, therefore, we design a
loss-function based on physics performance. As the value of each element of
the 1D-vector predicted by the Genn model is photon detection probability, the
Kullback–Leibler (KL) divergence ($D_{\rm KL}$) provides a good starting
point, which is defined as:

$D_{\rm KL}(P||Q)=\sum_{x}P(x)\log\frac{P(x)}{Q(x)},$ (1)

where $P(x)$ corresponds to the “test” distribution, and $Q(x)$ the “true”
distribution. However, the KL-divergence has a problematic property that
$D_{\rm KL}$ dislikes regions where $Q(x)$ has non-null value and $P(x)$ has
null value, which is an excellent feature in certain situations but not good
for this application. Also, because $D_{\rm KL}$ is value-weighted by the
probability $P(x)$, the $D_{\rm KL}$-loss-function leads to a selection bias
where the error measured by low-value elements is underrated.

Motivated by one of the variations of KL-divergence: Jensen–Shannon (JS)
divergence, we propose a loss-function using a variational KL-divergence
$D_{\rm vKL}$, defined as:

$D_{\rm
vKL}(P||Q)=\bigg{|}\sum_{x}\Big{(}P(x)-Q(x)\Big{)}\log\frac{P(x)}{Q(x)}\bigg{|},$
(2)

where $x$ stands for the sequence number of photon detectors, $P(x)$ the
“test” 1D-vector from Genn model prediction, and $Q(x)$ the “true” 1D-vector
from Geant4 simulation. The $D_{\rm vKL}$-loss-function is symmetric and well
behaved no matter whether either $P(x)$ or $Q(x)$ is small or not. Because
$D_{\rm vKL}$ is value-weighted by the difference between $P(x)$ and $Q(x)$,
it guarantees the model to converge to the optima. The training of sample Genn
models using the $D_{\rm vKL}$-loss-function proves $D_{\rm vKL}$ successfully
captures properties of this problem.

###  2.3 Training

We train the two Genn models using samples from Geant4 simulation. We first
generate 1,000,000 light sources, uniformly distributed within the detectors’
active volume, at vertices ($pos_{x}$, $pos_{y}$, $pos_{z}$). From each
vertex, 1,000,000 photons are emitted. Those photons are transported inside
the active volume and a certain number of photons are detected by particular
photon detectors. For each scintillation vertex, we get an “image” of the hit
pattern on the photon detectors, which is organized as a 1D-vector. We produce
the images by simulating the photon transport in ProtoDUNE-like and DUNE-like
geometries using the LArSoft toolkit snider2017larsoft  which uses Geant4.
Combining the scintillation vertex and the image, we build the training
samples in the structure:
(${}^{\prime}x^{\prime}:~{}pos_{x},~{}^{\prime}y^{\prime}:~{}pos_{y},~{}^{\prime}z^{\prime}:~{}pos_{z},~{}^{\prime}image^{\prime}:~{}image$).
We emphasize that the sequence for elements in the 1D-vector for $image$ is
plainly organized by the sequence number of the photon detectors instead of
flattening the human-friendly spatial-representative image.

We train the Genn models with a batch size of 4096, using the Adam optimizer
kingma2014adam  on the Wilson Cluster555Wilson Cluster:
https://computing.fnal.gov/wilsoncluster/ at Fermilab with two NVIDIA Tesla
K40 GPUs. In order to help the model converge quickly and stably, we use a
learning rate scheduler to reduce the learning rate during training. The
learning rate is initialized as: $lr=0.0002$, and decays following:
$lr=lr\times 0.997^{\rm epoch}$. In order to help the model get out of
potential saddle points, we reset the learning rate to its initial value every
1000 epochs. The training procedure is monitored with the metric “mean
absolute error of the validation sample” to avoid overtraining. The training
procedure stops automatically when the monitored metric “validation sample
loss” stops improving after 500 epochs, which was typically less than 10,000
epochs and within 8 hours.

##  3 Performance evaluation

Once the networks were trained, we evaluated the Genn models’ feature-learning
capability and benchmarked their performance within the LArSoft framework.

###  3.1 Feature-learning capability

A photon detector observes more photons when a light source is closer to it.
Hence, the probability of photon being detected by the particular photon
detector, or the so-called “visibility”, is higher. Consequently, the
“visibility” of a photon detector reaches a peak when the light source moves
towards it and reduces when that moves away. In addition, both the Genn
prediction and Geant4 simulation are expected to see a smooth variation in the
total amount of light detected by particular photon detectors when the light
source passes by.

In order to verify the models have learned desired characteristics, we compose
three groups of light sources in LArSoft, which are inside detectors’ active
volume and distributed uniformly along $x$, $y$, and $z$ direction
respectively, and predict the “visibility” using Genn and Geant4. For each
group, we study the visibilities on three photon detectors. The position of
the photon detectors and the light sources are shown in Table 1. The
“visibilities”, produced by Genn and Geant4, are plotted in Figure 3 for
comparison.

Table 1:  3D-position of the photon detectors (PDs) being studied. Three groups of light sources are produced and uniformly distributed along $x$, $y$, and $z$ direction.  ProtoDUNE-like | DUNE-like |
---|---|---
PD# | Position |  | PD# | Position
10 | 363, 568, 347 |  | 100 |  0.05, 591, 781
14 | 363, 331, 347 |  | 107 |  0.05, 155, 781
17 | 363, 94, 347 |  | 344 | -0.05, -280, 781
05 | 363, 272, 579 |  | 005 |  0.05, 280, 1357
29-44 |  363, 272, 428$\sim$265 |  | 095 |  0.05, 280, 843
24 | 363, 272, 115 |  | 185 |  0.05, 280, 3169
Position of Light Sources
-400$\sim$400, 420$\pm$10, 345$\pm$10 |  |  -400$\sim$400, 300$\pm$10, 780$\pm$10
150$\pm$10, 0$\sim$600, 345$\pm$10 |  |  150$\pm$10, -600$\sim$600, 780$\pm$10
150$\pm$10, 420$\pm$10, 0$\sim$700 |  |  150$\pm$10, 300$\pm$10, 0$\sim$1400
Figure 3: Feature-learning capability. In each figure, the $x$ axis is the
position of the light sources along specific directions: $x$, $y$, and $z$
direction, while the $y$ axis shows the photon detection probabilities
(visibility), on particular photon detectors (PDs). The top two rows show the
visibilities in ProtoDUNE-like geometry while the bottom two are for the DUNE-
like geometry. The visibilities from Genn prediction are plotted on the first
and third rows and those from Geant4 simulation are on the second and forth
rows. Note: positions of particular PDs and light sources are showed in Table.
1.

Figure 3 shows the “visibilities” of the photon detectors change smoothly when
the light source “moves”, which matches the general trends of what is produced
from full Geant4 simulation. This test indicates that the Genn models are able
to learn features from the dataset and interpolate smoothly, instead of only
memorizing the training samples. Figure 3 indicates Genn model can generalize
what it has learned and predict probabilities of photon detected by particular
photon detectors with precision similar to Geant4’s.

###  3.2 Prediction precision

We evaluate the precision of the Genn prediction in the LArSoft framework.
After being trained, the models and weights are frozen to computable graphs
which are loaded by the TensorFlow C++ API. We simulate the transport of
samples representative of the physics of interest to neutrino experiments in
Geant4, where we use 200 MeV monoenergetic muons starting from a specific
position in the ProtoDUNE-like geometry and supernova neutrinos uniformly
distributed in the DUNE-like geometry, and record the points of energy
depositions (scintillation vertices). We construct light sources at each
scintillation vertex, where the number of photons emitted is calculated based
on the deposited energy. Finally, we use Genn models to predict and Geant4
simulation to produce photon detection probabilities with respect to
individual light sources. We then compare the performance of Genn prediction
to Geant4 simulation at the same level of detail.

The number of total detected photons, used for event energy reconstruction, is
critical information we want to extract from the photon detection system. We
obtain the number of total detected photons from a scintillation vertex by
summing up the number of detected photons on each photon detector, and
calculate the relative difference between the two approaches for each vertex.
The distribution of these relative differences is shown in Figure 4, along
with a Gaussian fit to the peak.

Figure 4: Discrepancy of total detected photons per scintillation vertex.
Left: discrepancies variation along the $x$-axis. Right: overall
discrepancies, where the red dashed line is a Gaussian fit. Comparison for
ProtoDUNE-like geometry is on the top and DUNE-like geometry on the bottom.

It shows that the Genn model for the ProtoDUNE-like geometry reproduces the
total number of photons detected from each scintillation vertex with a
resolution of 3.3%, and a mean 0.4% less than the Geant4 simulation, while the
model for DUNE-like geometry has a resolution of 3.6% and on average produces
1.6% fewer photons. The fraction of scintillation vertices whose deviation is
larger than 10% is 8.95% in ProtoDUNE-like geometry and 7.69% in DUNE-like
geometry. It indicates the 1-neuron $vis_{\rm int}$-layer is able to
accurately normalize the number of total detected photons.

Besides the number of total detected photons, we need the model to predict the
photon distribution on photon detectors, which is valuable for position
reconstruction of the scintillation vertex. Figure 5 shows the number of
photons detected by each photon detector for both the Geant4 simulation and
the Genn prediction. Both methods give similar photon distributions for both
photon detection systems. Although the photon detection system deployed in
ProtoDUNE-like geometry contains two different types of photon detectors, the
Genn model can learn features from training samples, and gives a reasonable
prediction, showing $\mathrm{OuterProduct}$-layer can be well trained with the
1D data structure, even in a complex case.

Using the 1D data structure also allows us to calculate some statistical
metrics, such as Chi-square distance, Euclidean distance, JS divergence, and
MAE, for similarity measures. It also allows us to quantitatively compare the
performance between different emulation or simulation approaches, but this is
beyond the scope of this paper.

Figure 5: Distribution of the detected photons on photon detection system.
Top: the sum of detected photons on photon detectors from 200 MeV
monoenergetic muon events starting from one specific position in the
ProtoDUNE-like geometry. The response is much lower around photon detector #40
is caused by the fact that those photon detectors are the segmented ones which
are much smaller than the bar-like light collectors. Bottom: the sum of
detected photons on photon detectors from supernova neutrinos uniformly
distributed in the DUNE-like geometry.

###  3.3 Inference performance

One of the goals for the Genn model is to predict the photon detection
probabilities at high speed using a CPU. To measure the computing performance
of Genn models, we use the method mentioned in Section. 3.2 to build light
sources along the track of ionizing particles: 200-MeV monoenergetic muons,
2-GeV monoenergetic electrons, and supernova neutrinos. We load those light
sources in LArSoft to run Genn prediction and Geant4 simulation for
benchmarking. In Table 2, we present the CPU time per event, per image, and
per photon to compare the computing performance between the two approaches.
Thanks to the $\mathrm{OuterProduct}$-layer and the $\mathrm{Multiply}$-layer,
the Genn model introduced in this paper is lightweight, and the Genn
prediction speed is 20 to 50 times faster than Geant4 simulation while keeping
same level of detail and precision.

Table 2: CPU time for Geant4 simulation and Genn prediction. Events used for the test: 200 MeV monoenergetic $\mu$, 2 GeV monoenergetic $e^{-}$, and Supernova $\nu_{e}$. All benchmarks for CPU time are performed on DUNEGPVM at Fermilab where 2.4 GHz 4-core Intel® Core${}^{\text{TM}}$ Processor (Broadwell) are deployed. |  |  Geant4 Simulation |  |  Genn Prediction
---|---|---|---|---
|  | (s/event) | (ms/image) |  ($\mu$s/photon) |  | (s/event) | (ms/image) |  ($\mu$s/photon)
ProtoDUNE-like | $\mu$ |  3.3$\pm$0.5 |  3.71$\pm$0.51 |  34.32$\pm$4.72 |  |  0.14$\pm$0.04 |  0.15$\pm$0.04 |  1.43$\pm$0.40
$e^{-}$ |  61.1$\pm$0.5 |  3.24$\pm$0.03 |  44.54$\pm$0.39 |  |  2.83$\pm$0.10 |  0.15$\pm$0.01 |  2.06$\pm$0.08
DUNE-like | $\nu_{e}$ |  127.4$\pm$2.9 |  10.12$\pm$0.23 |  85.05$\pm$1.92 |  |  2.65$\pm$0.15 |  0.21$\pm$0.01 |  1.77$\pm$0.10
$e^{-}$ |  103.6$\pm$2.9 |  6.76$\pm$0.19 |  75.62$\pm$2.13 |  |  2.74$\pm$0.09 |  0.18$\pm$0.01 |  2.00$\pm$0.07

The important information we extract from the test is: Genn prediction run
time only depends on the complexity of the models, while Geant4 simulation run
time increases significantly with detector volume. The total CPU time for an
event will be determined by the number of photons and detector volume for
Geant4 simulation, and only by the number of energy deposition vertices along
the particle’s track for Genn prediction. Since the granularity of the energy
depositions along the track can be adjusted, the Genn prediction can be
accelerated even further at the expense of less detail on the particle tracks.

Another key advantage of the Genn model is that the model inference requires
relatively little memory. The samples for ProtoDUNE-like and DUNE-like
geometries show the required memory for the model inference is around 15% of
the Geant4 simulation. Further, this memory use is not directly correlated to
the volume of the detectors, unlike using lookup libraries where the available
memory on the machine limits the potential granularity (and hence precision).

###  3.4 Scalability

While the Genn model already looks promising, it is possible to add more
“optional” layers for higher precision, with a trade-off that the inference
time increases. We conduct an empirical study to quantify both inference time
and precision at different levels of network complexity. In particular, we
construct Genn models at four levels of complexity by introducing 1 to 4
additional dense layers. The comparison of the precision and inference
performance between the four Genn models is showed in Figure 6. Our
observation indicates a balance between the inference speed and precision must
be found when choosing the depth of the network.

Figure 6: Precision ($y$ axis on the left), inference time ($y$ axis on the
right), and neural network complexity.

As the Genn model prediction run time depends on the network complexity, we
benchmark the inference performance for photon detection systems with
different number of photon detectors. The metrics in Table 3 reveal the
inference time increases linearly with the number of photon detectors. The
Genn model still outperforms Geant4 simulation, at least, by a factor of 10
even when 1,920 photon detectors are deployed in DUNE-like geometry.

Table 3: Inference time (CPU) for difference photon detection systems. Geometry | ProtoDUNE-like | DUNE-like
---|---|---
Num. of PDs | 60 | 90 | 120 | 240 | 480 | 960 | 1920
Time (ms/image) |  0.11$\pm 0.02$ |  0.15$\pm 0.03$ |  0.14$\pm 0.01$ |  0.17$\pm 0.01$ |  0.21$\pm 0.01$ |  0.41$\pm 0.01$ |  0.87$\pm 0.01$

##  4 Conclusion and outlook

In this paper we present a novel generative model for photon detection
probability prediction. This Genn model uses an $\mathrm{OuterProduct}$-layer
to predict the photon distribution on photon detectors and a single-neuron
layer to normalize the photon intensity. This architecture realizes the
“deconvolution” from the scintillation vertex to the photon detection
probability and makes the model prediction precise and fast. We propose an
optimal loss-function using a variational KL-divergence function for the model
training, which is able to be generalized for common 1D generative models.

The model built for ProtoDUNE-like photon detection system demonstrates that
shallow neural networks are able to learn features from training samples
represented by 1D data structures, even for complex photon detection systems.
The sample for DUNE-like photon detection system indicates the Genn model
gives fast and precise prediction of photon detection probability using
limited memory, showing it can be a powerful new tool to bypass the full
Geant4 simulation in a production environment, especially for LAr detectors
with huge volumes, such as the DUNE far detector. The successful application
to the ProtoDUNE-like and DUNE-like geometries shows this general Genn
architecture is easy to generalize for different photon detection systems.

Our future attention will focus on incorporating the most recent cutting-edge
neural network architecture to improve the prediction precision and the
inference speed. We will also develop new photon simulation strategies when
using Genn models, guided by the physics goals for dark matter experiments or
neutrino experiments.

While our primary effort will be to keep improving this model application for
photon detection probability prediction in large scale LAr detector, this Genn
model and the $D_{\rm vKL}$-loss-function are quite general and may be applied
in other contexts where the training data can be represented as a 1D vector
and the Gan framework might not work efficiently zaheer2018gan .

###### Acknowledgements.

The authors thank S. Alonso Monsalve, E. Church, T. Junk, A. M. Szelc, L. H.
Whitehead, and T. Yang for helpful comments and discussion. This work is
supported by the U.S. Department of Energy through the Early Career Award
Program. This manuscript has been authored by Fermi Research Alliance, LLC
under Contract No. DE-AC02-07CH11359 with the U.S. DOE, Office of Science,
Office of High Energy Physics and prepared using the resources of the Fermi
National Accelerator Laboratory.

## References

  * (1) J. Calvo, C. Cantini, P. Crivelli, M. Daniel, S. Di Luise, A. Gendotti, S. Horikawa, B. Montes, W. Mu, S. Murphy, et al., Commissioning of the ArDM experiment at the Canfranc underground laboratory: first steps towards a tonne-scale liquid argon time projection chamber for Dark Matter searches, Journal of Cosmology and Astroparticle Physics 2017 (2017), no. 03 003.
  * (2) C. E. Aalseth, F. Acerbi, P. Agnes, I. Albuquerque, T. Alexander, A. Alici, A. Alton, P. Antonioli, S. Arcelli, R. Ardito, et al., DarkSide-20k: A 20 tonne two-phase LAr TPC for direct dark matter detection at LNGS, The European Physical Journal Plus 133 (2018), no. 3 131.
  * (3) P. Benetti, R. Acciarri, F. Adamo, B. Baibussinov, M. Baldo-Ceolin, M. Belluco, F. Calaprice, E. Calligarich, M. Cambiaghi, F. Carbonara, et al., First results from a Dark Matter search with liquid Argon at 87 K in the Gran Sasso Underground Laboratory, Astroparticle Physics 28 (2008), no. 6 495–507.
  * (4) B. Abi, A. A. Abud, R. Acciarri, M. Acero, G. Adamov, M. Adamowski, D. Adams, P. Adrien, M. Adinolfi, Z. Ahmad, et al., First results on ProtoDUNE-SP liquid argon time projection chamber performance from a beam test at the CERN Neutrino Platform, Journal of Instrumentation 15 (2020), no. 12 P12004.
  * (5) A. Bettini, Z. Wang, F. Cavanna, P. Rossi, S. Suzuki, F. Gasparini, H. Wang, M. Zhou, F. Casagrande, B. Dainese, et al., The ICARUS liquid argon TPC: a complete imaging device for particle physics, Nucl. Instrum. Methods Phys. Res., A 315 (1991), no. LNGS-91-16 223–228.
  * (6) R. Acciarri, C. Adams, R. An, A. Aparicio, S. Aponte, J. Asaadi, M. Auger, N. Ayoub, L. Bagby, B. Baller, et al., Design and construction of the MicroBooNE detector, Journal of Instrumentation 12 (2017), no. 02 P02017.
  * (7) S. Agostinelli, J. Allison, K. a. Amako, J. Apostolakis, H. Araujo, P. Arce, M. Asai, D. Axen, S. Banerjee, G. . Barrand, et al., GEANT4—a simulation toolkit, Nuclear instruments and methods in physics research section A: Accelerators, Spectrometers, Detectors and Associated Equipment 506 (2003), no. 3 250–303.
  * (8) S. Alonso-Monsalve and L. H. Whitehead, Image-based model parameter optimization using Model-Assisted Generative Adversarial Networks, IEEE Trans. Neural Networks 31 (2020), no. 12 5645–5650, [arXiv:1812.00879].
  * (9) B. Abi, R. Acciarri, M. Acero, M. Adamowski, C. Adams, D. Adams, P. Adamson, M. Adinolfi, Z. Ahmad, C. Albright, et al., The single-phase ProtoDUNE technical design report, arXiv preprint arXiv:1706.07081 (2017).
  * (10) D. collaboration et al., Design, construction and operation of the ProtoDUNE-SP liquid argon TPC, arXiv preprint arXiv:2108.01902 (2021).
  * (11) B. Abi, R. Acciarri, M. A. Acero, G. Adamov, D. Adams, M. Adinolfi, Z. Ahmad, J. Ahmed, T. Alion, S. A. Monsalve, et al., Deep Underground Neutrino Experiment (DUNE), far detector technical design report, volume II DUNE physics, arXiv preprint arXiv:2002.03005 (2020).
  * (12) A. Machado and E. Segreto, ARAPUCA a new device for liquid argon scintillation light detection, Journal of Instrumentation 11 (2016), no. 02 C02004.
  * (13) I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, Generative adversarial networks, arXiv preprint arXiv:1406.2661 (2014).
  * (14) M. Mirza and S. Osindero, Conditional generative adversarial nets, arXiv preprint arXiv:1411.1784 (2014).
  * (15) S. Santini and R. Jain, Similarity measures, IEEE Transactions on pattern analysis and machine Intelligence 21 (1999), no. 9 871–883.
  * (16) J. Goldberger, S. Gordon, H. Greenspan, et al., An Efficient Image Similarity Measure Based on Approximations of KL-Divergence Between Two Gaussian Mixtures, in ICCV, vol. 3, pp. 487–493, 2003.
  * (17) A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola, A kernel two-sample test, The Journal of Machine Learning Research 13 (2012), no. 1 723–773.
  * (18) E. Snider and G. Petrillo, LArSoft: toolkit for simulation, reconstruction and analysis of liquid argon TPC neutrino detectors, in Journal of Physics: Conference Series, vol. 898.4, p. 042057, IOP Publishing, 2017.
  * (19) D. P. Kingma and J. Ba, Adam: A method for stochastic optimization, arXiv preprint arXiv:1412.6980 (2014).
  * (20) M. Zaheer, C.-L. Li, B. Póczos, and R. Salakhutdinov, GAN connoisseur: Can GANs learn simple 1D parametric distributions, 2018.