222 2023 ACML 2023

# TLMCM Network for Medical Image Hierarchical Multi-Label Classification

Meng Wu∗<EMAIL_ADDRESS>
Siyan Luo∗<EMAIL_ADDRESS>
Qiyu Wu∗<EMAIL_ADDRESS>
College of Computing Georgia Tech  Wenbin Ouyang<EMAIL_ADDRESS>
Redmond WA  US

###### Abstract

Medical Image Hierarchical Multi-Label Classification (MI-HMC) is of paramount
importance in modern healthcare, presenting two significant challenges: data
imbalance and hierarchy constraint. Existing solutions involve complex model
architecture design or domain-specific preprocessing, demanding considerable
expertise or effort in implementation. To address these limitations, this
paper proposes Transfer Learning with Maximum Constraint Module (TLMCM)
network for the MI-HMC task. The TLMCM network offers a novel approach to
overcome the aforementioned challenges, outperforming existing methods based
on the $AU\overline{(PRC)}$(Area Under the Average Precision and Recall Curve)
metric. In addition, this research proposes two novel accuracy metrics,
$EMR$(Exact Match Ratio) and $HammingAccuracy$, which have not been
extensively explored in the context of the MI-HMC task. Experimental results
demonstrate that the TLMCM network achieves high multi-label prediction
accuracy($80\%$-$90\%$) for MI-HMC tasks, making it a valuable contribution to
healthcare domain applications.

###### keywords:

hierarchical multi-label classification; medical image; transfer learning

††editors: Berrin Yanıkoğlu and Wray Buntine**footnotetext: These authors
contributed equally to this work.

##  1 Introduction

Hierarchical Multi-label Classification (HMC) is a classification task that
involves hierarchically organized classes. In the domain of healthcare, the
Medical Image Hierarchical Multi-label Classification (MI-HMC) is important
for efficient image interpretation, retrieval, and diagnosis Cai et al.
(2020); Kim et al. (2022). The MI-HMC problem naturally arises in the medical
industry and academia, given that X-ray images Chen et al. (2018), and
microscope images Dimitrovski et al. (2011) can incorporate tree-structured
sub-categories. However, MI-HMC faces two key challenges: data imbalance and
hierarchy constraint Giunchiglia and Lukasiewicz (2020). Existing solutions
involve complex model architectures Wehrmann et al. (2018a); Noor et al.
(2022) or domain-specific preprocessing Dimitrovski et al. (2012); Quan et al.
(2013); Pelka et al. (2018).

In prior research, the emphasis has predominantly leaned towards generic
solutions, often overlooking the specific intricacies of MI-HMC tasks. In our
study, we introduce a novel approach, the Transfer Learning with Maximum
Constraint Module (TLMCM) network, which squarely tackles the challenges
inherent to the MI-HMC domain.

The TLMCM network combines a pretrained deep learning CNN model with a Maximum
Constraint Module (MCM) as proposed by Giunchiglia and Lukasiewicz (2020). It
effectively addresses the issue of data imbalance by harnessing the power of
transfer learning techniques, which have previously demonstrated their
efficacy on small image datasets. The MCM method we employ is meticulously
designed to ensure the satisfaction of the ”hierarchy constraint” in multi-
label prediction results, and it boasts a straightforward implementation. One
of the key advantages of the TLMCM network is that it obviates the need for
extensive image preprocessing or domain-specific knowledge for feature
extraction prior to model training.

For generic HMC tasks, Area Under Precision-Recall Curve
($AU\overline{(PRC)}$) is the typical evaluation metric Giunchiglia and
Lukasiewicz (2020); Wehrmann et al. (2018a). In specific MI-HMC tasks, where
each prediction follows a distinct path in a hierarchical label structure, we
introduce two new accuracy metrics: $EMR$ and $HammingAccuracy$ Sorower
(2010), for a comprehensive evaluation. We thoroughly assessed the TLMCM
network using these three metrics on two MI-HMC tasks with X-ray image
datasets (ImageCLEF09A and ImageCLEF09D) Thomas and B. (2009). Our experiments
demonstrate the superior performance of the TLMCM network compared to the
current state-of-the-art methods Giunchiglia and Lukasiewicz (2020). Moreover,
it achieves exceptionally high accuracy in multi-label predictions across both
tasks, highlighting the practical significance of this research.

The key contributions of this work are: 1) the proposal of the compact and
highly effective TLMCM network, which adeptly addresses common MI-HMC
challenges and outperforms state-of-the-art methods in our experimental tasks;
2) the introduction of two novel evaluation metrics, $EMR$ and
$HammingAccuracy$, facilitating intuitive accuracy assessment in the MI-HMC
domain, an area where such metrics have been largely unexplored.

##  2 Related Work

Current Hierarchical Multi-Label Classification (HMC) methods use local,
global, or hybrid approaches. Local methods build separate classifiers for
each node, while global methods use one classifier for the full hierarchy.
Hybrids combine both Wehrmann et al. (2018b). Recent work shows directly
incorporating hierarchical information in model improves performance
Giunchiglia and Lukasiewicz (2020). For medical images, Hierarchical Medical
Image Classification uses stacked deep learning models Kowsari et al. (2020),
and deep Hierarchical Multi-Label Classification targets chest x-ray diagnosis
Chen et al. (2018). Other work focuses on specific diseases Gour and Khanna
(2020) or body parts Hou et al. (2021).

##  3 Methodology

We integrate the Maximum Constraint Module(MCM) as proposed in Giunchiglia and
Lukasiewicz (2020), with the transfer learning process of a pretrained
Convolutionnal Neural Network model ResNet50 He et al. (2015) as the backbone.
We make careful and essential adaptations to the architecture of ResNet50, for
the purpose of addressing the unique challenges posed by the MI-HMC task, and
further augmenting the model’s capabilities in handling hierarchical multi-
label classification.

###  3.1 MCM Method

A generic HMC task must respect the hierarchy constraint, i.e. for each label
that is predicted to be true, all the ancestor labels as pre-defined in the
hierarchy structure must also be predicted to be true Giunchiglia and
Lukasiewicz (2020). In this regard, we adopted the two key concepts proposed
in Giunchiglia and Lukasiewicz (2020): Max Constraint Module (MCM) and Maximum
Constraint Loss (MCLoss).

Formally, for a generic HMC task with a set $S$ of $n$ labels in total, given
a label $A$, let $D_{A}$ be the set of all labels which are the descendants of
the label $A$ in the hierarchical structure, and a machine learning model $h$
predicts the label $A$ to be true with the probability of $h_{A}$, we then
impose the MCM module on top of the output of the model $h$, such that the
output of MCM for label $A$ is:

$\operatorname{MCM}_{A}=\max_{B\in\mathcal{D}_{A}}\left(h_{B}\right)$ (1)

In addition, we can also guide the training process by incorporating the MCM
constraint into the loss function of the underlying model $h$. Formally, let
$y_{A}$ and $y_{B}$ be the ground truth value of label $A$ and $B$, the loss
for label A is

$\begin{split}\operatorname{MCLoss}_{A}=&-y_{A}\ln\left(\max_{B\in\mathcal{D}_{A}}\left(y_{B}h_{B}\right)\right)\\\
&-\left(1-y_{A}\right)\ln\left(1-\mathbf{MCM}_{A}\right)\end{split}$ (2)

Then the final loss function is defined as

$\mathrm{MCLoss}=\sum_{A\in\mathcal{S}}\mathrm{MCLoss}_{A}$ (3)

According to Giunchiglia and Lukasiewicz (2020), the novel $\mathrm{MCLoss}$
function could bring benefits to the gradient backpropagation to achieve a
lower loss than the standard binary cross-entropy loss function.

###  3.2 Transfer Learning

For the backbone model, we retain the ResNet50 convolution blocks unchanged
and focus on adapting the last fully-connected linear layer. In particular, we
replace the original last layer with two fully-connected linear layers with a
ReLU activation in between and a Sigmoid after. The hidden dimension is set to
256, and the output dimension is equal to the total number of labels. The
Sigmoid layer converts the output scores into probabilities, as required by
the MCM module.

The modified ResNet50 output is then fed into the MCM to predict the
probability of truth for each label. We use the adapted loss function,
$\mathrm{MCLoss}$, as defined in Equation (3). The output are the
probabilities for each label to be true. In the specific task of MI-HMC, since
the label structure is mono-hierarchical(fully explained in the dataset
description section 4.1), we just make our prediction that all labels
corresponding to the maximum probability of the MCM output are predicted to be
true. The whole architecture design is shown in Figure 1.

There are two common approaches to transfer learning: (1)freezing the
convolution module as the fixed feature extractor, and only training the
linear classifier(ResNet50 as Fix Feature Extractor, hereafter referred to as
RNFFE); (2) fine-tuning the convolution module with the pre-trained weights of
the convolution module as well as the linear classifier module(ResNet50 Fine-
Tuning, hereafter referred to as RNFT). In the experiment section 4.3, we will
explore whether RNFFE or RNFT is more suitable for the MI-HMC task.

Figure 1: TLMCM network architecture. The predicted labels are represented as
dark blue solid circles, while the other non-predicted labels are shown as
hollow circles.

##  4 Experiments

###  4.1 Datasets

The main dataset that we used for this research is the 2009 ImageCLEF edition
of the IRMA X-ray dataset Thomas and B. (2009). Each image in the dataset was
classified based on the IRMA code Lehmann et al. (2003). A classification code
may consist of three or four digits, representing a mono-hierarchical
classification structure for the corresponding medical image. A mono-
hierarchical label means that the classification hierarchy is a tree
structure, thus each child node can only have one parent node.

In this study, our focus was directed toward evaluating the effectiveness of
our model on two specific classification codes: anatomical (A) of 110 labels,
and directional (D) of 36 labels. The dataset consists of 14410 images in
total, and we split it into the train/validation/test set with the ratio of
70:15:15. This dataset choice of the (A) and (D) codes also allowed for a
direct comparison with the baseline results***The ImageCLEF07 datasets from
their research are an older version no longer available. However, the
ImageCLEF09 datasets share the same chracteristics..

###  4.2 Evaluation Metrics

Area Under the average Precision and Recall Curve($AU\overline{(PRC)}$)
Giunchiglia and Lukasiewicz (2020); Sorower (2010) is most commonly used in
multi-label classification and tasks, and is also the metric that we used to
compare with the state-of-the-art baseline results. Additionally, Exact Match
Ratio($EMR$) Sorower (2010) is a strict accuracy metric in that the prediction
is considered correct only when the set of labels of prediction exactly
matches the corresponding set of labels of ground truth. Formally, the $EMR$
is computed as follows:

$EMR=\frac{1}{n}\sum_{i=1}^{n}I\left(Y_{i}=Z_{i}\right)$ (4)

where, $I$ is the indicator function, $n$ is total number of all labels,
$Y_{i}$ is the set of ground true labels for sample $i$, and $Z_{i}$ is the
set of predicted labels for sample $i$.

From the application perspective of the MI-HMC task, if a prediction is
partially correct, it still deserves some credit. In this respect, we utilize
the multi-label classification $HammingAccuracy$ Sorower (2010), which is
defined as the following with the same meaning as all notations defined in Eq.
4:

$HammingAccuracy=\frac{1}{n}\sum_{i=1}^{n}\frac{\left|Y_{i}\cap
Z_{i}\right|}{\left|Y_{i}\cup Z_{i}\right|}$ (5)

###  4.3 Experiment setup

We performed experiments with both RNFFE and RNFT on the MI-HMC tasks of
ImageCLEF09A and ImageCLEF09D. We maintained the same learning rate of $5e-6$,
weight decay of $1e-6$, batch size of 32 and the total number of epoches of
120 for each task. The ReLU activation was used for the linear classifier and
no dropout was applied. Then we trained the model with the Adam optimizer.

The training was completed on the Google Cloud Platform(GCP) virtual machine.
We used the regular configuration of the “n1-standard-4” machine type, and 1
NVIDIA T4 GPU. We finished 4 training sessions(2 tasks, 2 approaches) in 10
hours, which is reasonably computationally efficient. The code is at
https://github.com/flowing-time/IMAGE-HMC.

###  4.4 Results and discussions

The $AU\overline{(PRC)}$, $EMR$, and $hammingAccuracy$ for the tasks of
ImageCLEF09A and ImageCLEF09D are summarized in Table 1. On both tasks, the
transfer learning approach RNFT shows a significantly higher
$AU\overline{(PRC)}$ score than the baseline results of C-HMCNN(h) in
Giunchiglia and Lukasiewicz (2020) and some other recent models with good
performance(e.g. Wehrmann et al. (2018a), Pelka et al. (2018)).

Task | Metric |  RNFFE |  RNFT |  Giunchiglia (2020) |  Wehrmann (2018) |  Pelka (2018)
---|---|---|---|---|---|---
| $AU\overline{(PRC)}$ | 0.858 | 0.984 | 0.956 | 0.950 | N/A
ImageCLEF09A | $EMR$ | 0.449 | 0.789 | N/A | N/A | 0.603
| $Hamming$ | 0.642 | 0.890 | N/A | N/A | N/A
| $AU\overline{(PRC)}$ | 0.928 | 0.984 | 0.927 | 0.920 | N/A
ImageCLEF09D | $EMR$ | 0.451 | 0.880 | N/A | N/A | 0.791
| $Hamming$ | 0.636 | 0.917 | N/A | N/A | N/A
Table 1: Test datasets result in summarization. The best results are in bold.

To the best of our knowledge, the $EMR$ and $hammingAccuracy$ metrics have not
been commonly reported on the previous HMC tasks. Nevertheless, our TLMCM
network shows 80% - 90% prediction accuracy on the MI-HMC task and
demonstrated its great value in real-world healthcare applications.

Figure 2: Learning curves from from the left to right: loss,
$AU\overline{(PRC)}$, $EMR$, $Hamming$

For a better understanding of fine-turning approaches in our methodology, we
plotted the learning curves of both approaches for the ImageCLEF09A task in
Figure 2. The logarithmic scale is used for the loss(1st colummn), while
linear scale is used for the metrics(2nd, 3rd, 4th column). It is clearly
shown that significantly lower training and validation loss can be achieved by
the RNFT approach than RNFFE. In the 2nd column, we can see RNFT quickly
attains the plateau of the highest $AU\overline{(PRC)}$ score, for both the
training and validation set. The 3rd and 4th columns show the prediction
accuracy($EMR$ and $HammingAccuracy$) over the training iterations and the
RNFT approach is again the winner.

Overall, the experiments show that for the MI-HMC task, our TLMCM network is
highly effective, and the transfer learning approach of fine-tuning with
pretrained weights(RNFT) should be the prioritized choice, as it does not only
perform best in all three metrics but also achieves the best result with the
fewest training iterations.

##  5 Conclusion

We proposed a novel TLMCM network for hierarchical multi-label classification
on radiological medical images. To the best of our knowledge, TLMCM network is
the first method to incorporate the Maximum Constraint Module (MCM) approach
and transfer learning in medical image classification, eliminating the
requirement for domain-specific knowledge in medical image pre-training. Our
architecture outperformed current state-of-the-art models on the benchmark
tasks of ImageCLEF09A, ImageCLEF09D. Furthermore, we introduced the metrics of
$EMR$ and $HammingAccuracy$ for evaluating the performance of TLMCM network in
the context of the MI-HMC problem. As part of our future work, our proposed
architecture can be extended to larger medical image datasets that have deeper
levels of hierarchy. Additionally, we plan to evaluate the TLMCM network on
HMC image datasets in other domains such as object recognition, fashion and
clothing, extending its application beyond radiological medical images to
explore its potential in diverse fields.

## References

  * Cai et al. (2020) Lei Cai, Jingyang Gao, and Di Zhao.  A review of the application of deep learning in medical image classification and segmentation.  _Annals of Translational Medicine_ , 8, 2020.
  * Chen et al. (2018) Haomin Chen, Shun Miao, Daguang Xu, Gregory Hager, and Adam P. Harrison.  Deep hierarchical multi-label classification of chest x-ray images.  In _International Conference on Medical Imaging with Deep Learning_ , 2018.
  * Dimitrovski et al. (2011) Ivica Dimitrovski, Dragi Kocev, and Suzana Loskovska.  Hierarchical annotation of medical images.  _Journal of Foo_ , 44(10):2436–2449, 2011.
  * Dimitrovski et al. (2012) Ivica Dimitrovski, Dragi Kocev, Suzana Loskovska, and Saeroski.  Hierarchical classification of diatom images using ensembles of predictive clustering trees.  _Ecol. Informatics_ , 7:19–29, 2012.
  * Giunchiglia and Lukasiewicz (2020) Eleonora Giunchiglia and Thomas Lukasiewicz.  Coherent hierarchical multi-label classification networks.  In _Proceedings of the 34th International Conference on Neural Information Processing Systems_ , NIPS’20, Red Hook, NY, USA, 2020.
  * Gour and Khanna (2020) Neha Gour and Pritee Khanna.  Multi-class multi-label ophthalmological disease detection using transfer learning based convolutional neural network.  _Biomedical Signal Processing and Control_ , 66:102329, 2020\.
  * He et al. (2015) Kaiming He, X. Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  _2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ , pages 770–778, 2015.
  * Hou et al. (2021) Benjamin Hou, G. Kaissis, Ronald M. Summers, and Bernhard Kainz.  Ratchet: Medical transformer for chest x-ray diagnosis and reporting.  In _International Conference on Medical Image Computing and Computer-Assisted Intervention_ , 2021.
  * Kim et al. (2022) Hee E. Kim, Alejandro Cosa-Linan, Nandhini Santhanam, Mahboubeh Jannesari, Máté Elod Maros, and Thomas Ganslandt.  Transfer learning for medical image classification: a literature review.  _BMC Medical Imaging_ , 22, 2022.
  * Kowsari et al. (2020) Kamran Kowsari, Rasoul Sali, Lubaina Ehsan, William Adorno, Asad Ali, Sean R. Moore, Beatrice C. Amadi, Paul Kelly, Sana Syed, and Donald Brown.  Hmic: Hierarchical medical image classification, a deep learning approach.  _Information (Basel)_ , 11, 2020.
  * Lehmann et al. (2003) Thomas Martin Lehmann, Henning Schubert, Daniel Keysers, Michael Kohnen, and Berthold B. Wein.  The irma code for unique classification of medical images.  In _SPIE Medical Imaging_ , 2003.
  * Noor et al. (2022) Khondaker Tasrif Noor, Antonio Robles-Kelly, and Brano Kusy.  A capsule network for hierarchical multi-label image classification.  In _International Workshop on Structural and Syntactic Pattern Recognition_ , 2022.
  * Pelka et al. (2018) Obioma Pelka, Felix Nensa, and Christoph M. Friedrich.  Annotation of enhanced radiographs for medical image retrieval with deep convolutional neural networks.  _PLOS One_ , 13(11), 2018.
  * Quan et al. (2013) Zou Quan, Chen Weicheng, Huang Yong, Liu Xiangrong, and Jiang Yi.  Identifying multi-functional enzyme by hierarchical multi-label classifier.  _Journal of Computational and Theoretical Nanoscience_ , 10(4):1038-1043, 2013.
  * Sorower (2010) Mohammad S Sorower.  A literature survey on algorithms for multi-label learning, 2010.
  * Thomas and B. (2009) Deserno Thomas and Ott B.  15.363 irma bilder in 193 kategorien für imageclefmed 2009 = 15,363 irma images of 193 categories for imageclefmed 2009.  Available at https://publications.rwth-aachen.de/record/667225, 2009\.
  * Wehrmann et al. (2018a) Jonatas Wehrmann, Ricardo Cerri, and Rodrigo Barros.  Hierarchical multi-label classification networks.  In _International conference on machine learning_ , pages 5075–5084. PMLR, 2018a.
  * Wehrmann et al. (2018b) Jonatas Wehrmann, Ricardo Cerri, and Rodrigo Barros.  Hierarchical multi-label classification networks.  In Jennifer Dy and Andreas Krause, editors, _Proceedings of the 35th International Conference on Machine Learning_ , volume 80 of _Proceedings of Machine Learning Research_ , pages 5075–5084. PMLR, 10–15 Jul 2018b.  URL https://proceedings.mlr.press/v80/wehrmann18a.html.


# Development of Indigenous Pulse-Shape Discrimination Algorithm for Organic
Scintillation detectors.

Annesha Karmakar, G. Anil Kumar* , Bhavika, V. Anand, Anikesh Pal Annesha
Karmakar is with Nuclear Engineering and Technology Program, Department of
Mechanical Engineering, Indian Institute of Technology-Kanpur, India in
collaboration with Radiation Detectors and Spectroscopy Laboratory, Department
of Physics, Indian Institute of Technology Roorkee, India. (e-mail:
annesha@iitk.ac.in). G. Anil Kumar is with Radiation Detectors and
Spectroscopy Laboratory, Department of Physics, Indian Institute of Technology
Roorkee, India. (e-mail<EMAIL_ADDRESS>). Anikesh Pal is with
Department of Mechanical Engineering, Indian Institute of Technology-Kanpur
India. (e-mail: pala@iitk.ac.in).

###### Abstract

The use of programmable hardware devices is imperative for digital based pulse
shape discrimination (PSD) to differentiate between various types of
radiation. This work reports the development of a PSD algorithm based on tail
area and total area, eliminating the need for programmable hardware. The
pulses were collected using BC501 detector and Pu-Be source from a digitizer
in the oscilloscope mode. The algorithm performs crucial functions such as
pulse normalization, shaping, identification and removal of multiple peaks and
threshold determination. The algorithm provides neutron and $\gamma$-ray
counts, scatter plot, and FoM. In order to test the efficacy of our proposed
algorithm, pulses were collected from a different source-detector setup
comprising BC501A detector and an Am-Be source from a digitizer in the
oscilloscope mode and Charge Integration (CI) mode. The results obtained from
our proposed algorithm and CI method clearly indicates a good agreement in
terms of number of neutrons and $\gamma$-rays and Figure-of-Merit (FoM), thus
providing cost-effective alternative method for neutron and $\gamma$-ray
discrimination, offering flexibility and accuracy without specialized
hardware.

###### Index Terms:

PSD, TtoT, BC501, BC501A, FoM, Neutron monitors, Nuclear Security and
Safeguards.

##  I Introduction

Digital pulse shape discrimination (PSD) is a widely used technique in nuclear
physics, radiation detection, and signal processing. It analyzes the shape or
pattern of signals to discriminate between different types of radiation.
Digital PSD examines waveform attributes such as rise time, fall time, and
width to categorize pulses. This approach provides more reliable and precise
recognition than analog methods, allowing for improved discrimination between
radiation signals. Many investigations have been conducted on the subject of
classical digital techniques of PSD. The studies emphasized the use of
programmable hardware modules for implementing these digital PSD techniques.
Additionally, charge integration was highlighted as a commonly used method in
PSD for differentiating radiation pulses, such as gamma rays and neutron
pulses, based on their shapes and charge distributions. Several references
support the use of digital PSD techniques with programmable modules for
radiation discrimination [1, 2, 3, 4, 5].

In order to avoid the dependence on programmable hardware for PSD, the present
work aims to develop a PSD algorithm based on tail area and total area of the
pulse. This algorithm performs all the necessary functions namely,
normalisation of discrete pulses, shaping and smoothing, identifying and
removing multiple peaks in a given record length, determining the start of
tail area and optimal threshold, displaying the number of neutrons and
$\gamma$-rays along with the scatter plot and FoM. These pulses were collected
using BC501 detector and Pu-Be source from a digitizer in the oscilloscope
mode only. To assess algorithm efficacy, the algorithm was applied on a
different BC501A detector and Am-Be source from digitizer in the oscilloscope
mode. The discriminating capabilities and Figure-of-Merit (FoM) acquired from
our proposed PSD algorithm are compared with the results obtained from the
digitizer’s built in CI method.

##  II Experiments

###  II-A Measurement for parent experiment

The experimental setup involves a 5-Ci Pu-Be source positioned at a distance
of 5 cm from the front face of a liquid scintillator BC501 (manufactured by
Saint Gobain crystals) [6] with a radius of 7.5 cm and a length of 12.5 cm.
The source produces neutrons (up to 11 MeV), and $\gamma$-rays (up to 6 MeV)
due to ($\alpha$,n) reactions [7, 8] as shown in equation 1 below.

$\alpha+^{9}Be->n+^{12}C+5.7MeV\ $ (1)

To record the pulses of neutrons and $\gamma$-rays, the output of the photo-
multiplier tube (PMT) of the detector is connected to a 1 GHz CEAN DT-5751
desktop digitizer [9]. A total of 57934 pulses were collected in the
oscilloscope mode of the digitizer and saved in $.dat$ file format. This
experiment which is labeled as ‘Parent Experiment’ was conducted at the
Radiation Measurement Laboratory, Indian Institute of Technology Kanpur,
India.

###  II-B Measurement for test experiment

The experimental setup involves a 1.3 $\mu$Ci Cf-252 source was placed at a
distance of 12 cm from a $3^{\prime\prime}\times 3^{\prime\prime}$ BC501A
detector. Discrete pulses were acquired for 45 mins from a 1 GHz, DT5751
digitizer in oscilloscope mode. A total number of 46323 pulses were collected
and store in ‘.dat’ format. Further, the digitizer calculated the PSD based on
the CI method giving us both the number of neutrons and $\gamma$-rays and also
the FoM for the same pulses. This experiment, labeled as ‘Test experiment’ and
was conducted at Radiation Detectors and Spectroscopy Laboratory, Indian
Institute of Technology Roorkee, India.

##  III Methodology of Tail-to-Total Area Algorithm

PSD is important for accurately identifying radiation types, improving
measurement accuracy, and enhancing detector performance. By leveraging the
unique pulse shapes of different radiation types, PSD techniques contribute to
a wide range of applications in radiation detection, measurement, and safety.
The algorithm operates on discrete pulses obtained from a digital
oscilloscope, which are stored in a ‘.dat file’ for input. The algorithm’s
methodology is outlined through the following steps:

###  III-A Analysing discrete pulses

The waveforms obtained from the digitizer are shown in figure 1. The pulses
acquired from the digitizer are in form of data points (discrete pulse). These
waveforms are similar in terms of rise time but are different in terms of
amplitude and fall time.

Figure 1: Sample pulses observed in oscilloscope mode of digitizer

We identify the baseline of the pulses and subtract it from the data points of
the waveforms to obtain normalised discrete pulses. Additionally clipped
pulses are removed from the entire dataset.

###  III-B Shaping and smoothing the pulse

The normalised pulses so obtained have been shaped and smoothed using the
Savitzky-Golay function [10] which can be represented mathematically by
equation 2. Here, B is the filter operator, f is the original spectrum with
value $f[m]$, m = -2, -1, 0, 1, 2,….. and b is the filter function and the
brackets describe its discrete nature. As the pulses obtained are of finite
nature, this function is the summation over finite intervals $|n|\leq N$.

$Bf[m]=\sum_{n=-\infty}^{\infty}b[n]f[m+n]\quad\textrm{for}\quad n\in N\ $ (2)

After smoothing, the discrete pulses and smoothed pulses are superimposed to
determine the start of the tail area as shown in Figure 2 as an example for a
single pulse.

Figure 2: Superimposition of discrete and smoothed pulse to determine tail
area

###  III-C Pulse Pile-up handling

To eliminate the pulse pile-up, the record length, also known as the window of
each pulse, is verified using a loop for each pulse. The window is chosen as a
typical practice based on observation in the oscilloscope mode of the
digitizer, where the entire pulse is covered. The pulse was determined to be
over-lapping or a pile-up when two or more peaks were observed within a
particular window. To handle all overlapping pulses in the entire dataset, a
loop was declared that ranged the entire length of the data set with an
interval of window length and a conditional statement that said if the number
of peaks was more than one, delete the data points from the entire dataset and
move to the next window length; otherwise, consider the pulse.

StartInput (Raw data, Record length) 1.Baseline subtraction, 2.Eliminating
clipped pulse, 3.Shaping and smoothing of discrete pulse Identify multiple
peaks in a given record length (Number of Peaks is represented by NP) NP $>1$
Remove the pulse from entire dataset Keep Pulse Determine start of tail.
Compute tail and total area. Select Optimal threshold criteria R R$>0.5$
Neutrons, Count the number of neutrons ($N_{N}$) $\gamma$-rays, Count the
number of $\gamma$-rays ($N_{\gamma}$) Display $N_{N}$ and $N_{\gamma}$,
Scatter plot and FoM StopYesNoYesNo Figure 3: Flowchart for TtoT-based PSD
algorithm.

###  III-D Determining discriminating threshold

A multi-step approach is required to calculate the discriminating threshold.
First, the maximum amplitude must be determined. To do so, for each record
length, the local maxima of the normalised pulse is calculated using the ‘max’
function in Python. These values are stored as the maximum amplitude of the
pulses. Second, the beginning of tail position should be determined. It is
observed that the point of intersection of smoothed and discrete pulse is the
start of the tail location. An array was defined to retain the intersection
values for the whole set of 57934 pulses in order to store the values of the
start of tail for the entire set of pulses. It was found that the smoothed and
shaped pulse intersects the un-smoothed (discrete pulses) at 70% of its
maximum amplitude ‘on average’, so the start of the tail area was chosen to be
70% of the maximum amplitude of the un-smoothed discrete pulse [11]. Finally,
the tail and total area of the smoothed pulse are computed and the ratio is
compared between two adjacent pulses. The discernible distinction in the ratio
between the tail area and total area of the waveforms is utilized in the
discrimination of neutrons and $\gamma$-rays through the implementation of the
Tail-to-Total area (TtoT) algorithm using Python programming code. $R$
represents the ratio of tail-to-total area calculated for each measured pulses
for a given acquisition time also known as window or record length. The
computed feature $R$, serves as a metric for discriminating between pulses
originating from neutrons and $\gamma$-rays. It was noted that the optimal
discrimination is achieved by establishing the threshold value at 0.53, which
is determined in accordance with $R$. Any value $R$ greater than 0.53
qualifies as a neutron, whereas anything less qualifies as a $\gamma$-ray. The
pulses falling in on the discriminating threshold are removed as these pulses
cannot be classified as either neutrons or $\gamma$-rays. The flowchart of our
proposed TtoT-based PSD algorithm is shown in figure 3.

(a) Parent Experiment

(b) Test Experiment

Figure 4:  Scatter plot using Tail-to-Total Area (TtoT) method. The clusters
above are neutrons and below are $\gamma$\- rays.

(a) Parent Experiment

(b) Test Experiment

Figure 5:  TtoT tagged neutrons and $\gamma$\- rays.

##  IV Results and Discussion

Figure 4a shows a scatter plot of neutrons and $\gamma$-rays from the BC501A
detector (Parent experiment) obtained using the TtoT algorithm, demonstrating
good qualitative discrimination between neutrons and $\gamma$-rays. Due to the
digital capabilities of our proposed technique, the output window conveniently
displays the count of neutrons and $\gamma$-rays. Accordingly, the total count
of neutrons and $\gamma$-rays was determined to be 33374 and 23803,
respectively. Due to the limitations inherent to the experimental facility at
IIT Kanpur, uncertainties arise regarding the precise accuracy of the neutron
and $\gamma$-ray counts in the current methodology.

In light of this, a comparative analysis is conducted between the performance
of TtoT algorithm and CI method on an experimental data (‘test experiment’)
which provided number of neutrons and $\gamma$-rays, described in section 2.
Figure 4b shows the scatter plot representing the qualitative discrimination
achieved between neutrons and $\gamma$-rays in the ‘test’ experiment. Here,
the total number of pulses considered are 46323 , with 15741 and 30055
identified as neutrons and $\gamma$-rays respectively, using our proposed TtoT
method. The numbers of neutrons and $\gamma$-rays obtained from the CI method
for the same are 15741 and 30852, respectively. The results obtained are
summarised in table I. It is noteworthy to highlight that the TtoT-based PSD
algorithm demonstrates a level of accuracy nearly equivalent to the built-in
CI method within the digitizer for ‘test’ experiment.

Figure-of-Merit (FoM) is used to quantify the classification performance of
neutrons and $\gamma$ rays from a PSD approach. The figure of merit (FoM),
given by the equation 3, where the ‘$\triangle$’ depicts the spacing between
centroids of the neutron and $\gamma$-ray peaks. The full-widths at half-
maximum for neutrons and $\gamma$-rays are shown by $FWHM_{n}$ and
$FWHM_{\gamma}$, respectively.

$FoM=\frac{\triangle}{FWHM_{n}+FWHM_{\gamma}}$ (3)

PSD | Total Number | Number of | Number of | FoM
---|---|---|---|---
Method | of Pulses | neutrons | $\gamma$-rays |
CI | 46323 | 15741 | 30852 | 1.12
TtoT | 46323 | 15741 | 30055 | 1.13
TABLE I: PSD Output Comparison for Test experiment: CI vs. TtoT Method

The discriminating capability of neutrons and $\gamma$-rays are projected on
the PSD parameter axis as illustrated in figure 5. We consider the ratio of
tail to total area, represented by R as the PSD parameter. After optimizing
the threshold and excluding the 757 events falling within the cutoff range,
the FoM for the ‘parent experiment’ was determined to be 1.02, as depicted in
Figure 5a. It is observed that the projected neutrons and $\gamma$-rays are
very well separated. The Figure of Merit (FoM) for the ‘test experiment’,
after optimizing the threshold, using our proposed TtoT-based PSD method is
1.13 (Figure 5b), excluding 797 events that fell within the cutoff. The FoM
for the same obtained from the CI method, is found to be 1.12. The results of
‘test’ experiment are summarized in tableI. It is observed that the TtoT
method is able to discriminate neutrons and $\gamma$-rays with similar
accuracy to that of the CI method.

##  V Conclusion

Our proposed TtoT algorithm demonstrates a commendable level of accuracy in
discriminating between neutrons and $\gamma$-rays, comparable to the
performance of the CI method implemented in the digitizer. Notably, our
algorithm achieves this accuracy without relying on a dedicated hardware
setup. By optimizing various parameters and employing the TtoT method, we
successfully differentiate between neutrons and $\gamma$-rays based on the
distribution of total area and tail area values for two different source
detector digitizer setup. This outcome highlights the potential of our
algorithm as an effective alternative that eliminates the need for specialized
hardware with the ability to handle both neutrons and $\gamma$-ray events
simultaneously, thus offering flexibility and cost-efficiency in neutron and
$\gamma$-ray discrimination applications.

## References

  * [1] I. A. Pawełczak, S. A. Ouedraogo, A. M. Glenn, R. E. Wurtz, and L. F. Nakae, “Studies of neutron-$\gamma$ pulse shape discrimination in EJ-309 liquid scintillator using charge integration method,” _Nuclear Instruments and Methods in Physics Research, Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , vol. 711, pp. 21–26, 2013.
  * [2] Z. Wang, J. Zeng, T. Zhu, Y. Wang, C. Yang, and R. Zhou, “Optimization of integration limit in the charge comparison method based on signal shape function,” _Nuclear Instruments and Methods in Physics Research, Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , vol. 760, pp. 5–9, 2014. [Online]. Available: http://dx.doi.org/10.1016/j.nima.2014.05.017
  * [3] M. J. Balmer, K. A. Gamage, and G. C. Taylor, “Comparative analysis of pulse shape discrimination methods in a 6Li loaded plastic scintillator,” _Nuclear Instruments and Methods in Physics Research, Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , vol. 788, pp. 146–153, jul 2015.
  * [4] M. Nakhostin, “A general-purpose digital pulse shape discrimination algorithm,” _IEEE Transactions on Nuclear Science_ , vol. 66, no. 5, pp. 838–845, 2019.
  * [5] E. Doucet, T. Brown, P. Chowdhury, C. J. Lister, C. Morse, P. C. Bender, and A. M. Rogers, “Machine learning n/$\gamma$ discrimination in CLYC scintillators,” _Nuclear Instruments and Methods in Physics Research, Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , vol. 954, no. September, 2020. [Online]. Available: https://doi.org/10.1016/j.nima.2018.09.036
  * [6] “BC501, BC501A and BC519 scintillation detectors data sheet, https://www.crystals.saint-gobain.com/sites/imdf.crystals.com/files/documents/bc501-501a-519-data-sheet.pdf, Accessed: 2020-02-09.”
  * [7] “The Lund/LBNL Nuclear Data Search, http://nucleardata.nuclear.lu.se/toi/index.asp/, Accessed: 2019-01-06.”
  * [8] G. F. Knoll, _Radiation detection and measurement; 4th ed._ New York, NY: Wiley, 2010. [Online]. Available: https://cds.cern.ch/record/1300754
  * [9] “PMT technical specification, https://www.caen.it/products/dt5751, Accessed: 2020-03-01.”
  * [10] M. U. A. Bromba and H. Ziegler, “Application hints for savitzky-golay digital smoothing filters,” _Analytical Chemistry_ , vol. 53, no. 11, pp. 1583–1586, 1981. [Online]. Available: https://doi.org/10.1021/ac00234a011
  * [11] Redus, “Digital Pulse Processors , Theory of Operation,” _Pulse_ , pp. 2–7, 2009.