* Sain et al. (2022) Mangal Sain, Oloviddin Normurodov, Chen Hong, and Kueh Hui. 2022\.  A Survey on the Security in Cyber Physical System with Multi-Factor Authentication. 1–8.  https://doi.org/10.23919/ICACT53585.2022.9728892
  * Saxon and Feamster (2022) James Saxon and Nick Feamster. 2022.  GPS-based geolocation of consumer IP addresses. In _International Conference on Passive and Active Network Measurement_. Springer, 122–151.
  * Shamshad et al. (2021) Salman Shamshad, Muhammad Faizan Ayub, Khalid Mahmood, Saru Kumari, Shehzad Chaudhry, and Chien-Ming Chen. 2021.  An enhanced scheme for mutual authentication for healthcare services.  _Digital Communications and Networks_ 8 (07 2021).  https://doi.org/10.1016/j.dcan.2021.07.002
  * Sharma and Kalra (2018) Geeta Sharma and Sheetal Kalra. 2018.  A Lightweight User Authentication Scheme for Cloud-IoT Based Healthcare Services.  _Iranian Journal of Science and Technology, Transactions of Electrical Engineering_ 43 (10 2018), 1–18.  https://doi.org/10.1007/s40998-018-0146-5
  * Singapore Statutes Online (nd) Singapore Statutes Online. n.d..  PERSONAL DATA PROTECTION ACT 2012 (2020 REVISED EDITION).  https://sso.agc.gov.sg/Act/PDPA2012.
  * Solomon (2023) Enoch Solomon. 2023\.  Face anti-spoofing and deep learning based unsupervised image recognition systems.  (2023).
  * Solomon and Cios (2023a) Enoch Solomon and Krzysztof J Cios. 2023a.  FASS: Face anti-spoofing system using image quality features and deep learning.  _Electronics_ 12, 10 (2023), 2199.
  * Solomon and Cios (2023b) Enoch Solomon and Krzysztof J Cios. 2023b.  Hdlhc: Hybrid face anti-spoofing method concatenating deep learning and hand-crafted features. In _2023 IEEE 6th International Conference On Electronic Information And Communication Technology (ICEICT)_. IEEE, 470–474.
  * Solomon and Woubie (2024) Enoch Solomon and Abraham Woubie. 2024.  Federated Learning Method for Preserving Privacy in Face Recognition System.  _arXiv preprint arXiv:2403.05344_ (2024).
  * Solomon et al. (2022) Enoch Solomon, Abraham Woubie, and Krzysztof J Cios. 2022\.  UFace: An Unsupervised Deep Learning Face Verification System.  _Electronics_ 11, 23 (2022), 3909.
  * Solomon et al. (2023a) Enoch Solomon, Abraham Woubie, and Eyael Solomon Emiru. 2023a.  Face Image Recognition Using Deep learning Through Autoencoder Pre-Training. In _2023 International Conference on Modeling, Simulation & Intelligent Computing (MoSICom)_. IEEE, 597–602.
  * Solomon et al. (2023b) Enoch Solomon, Abraham Woubie, and Eyael Solomon Emiru. 2023b.  Nearest Neighbor Based Unsupervised Deep Learning Image Recognition Method. In _2023 International Conference on Modeling, Simulation & Intelligent Computing (MoSICom)_. IEEE, 592–596.
  * Solomon et al. (2023c) Enoch Solomon, Abraham Woubie, and Eyael Solomon Emiru. 2023c.  Self-supervised Deep Learning Based End-to-End Face Verification Method using Siamese Network. In _2023 IEEE International Conference on Service Operations and Logistics, and Informatics (SOLI)_. IEEE, 1–6.
  * Team ([n. d.]) Google Team. [n. d.].  https://support.google.com/accounts/answer/1066447
  * Uysal and Akgün (2023) Ertan Uysal and Mete Akgün. 2023.  P/Key: PUF based second factor authentication.  _PloS one_ 18 (2023), e0280181.  https://doi.org/10.1371/journal.pone.0280181
  * Wang and Wang (2022) Qingxuan Wang and Ding Wang. 2022.  Understanding Failures in Security Proofs of Multi-Factor Authentication for Mobile Devices.  _IEEE Transactions on Information Forensics and Security_ 1 (11 2022), 1–15.  https://doi.org/10.1109/TIFS.2022.3227753
  * Wang et al. (2022) Xiong Wang, Yuan Teng, Yaping Chi, and Hongbo Hu. 2022\.  A Robust and Anonymous Three-Factor Authentication Scheme Based ECC for Smart Home Environments.  _Symmetry_ 14 (11 2022), 2394.  https://doi.org/10.3390/sym14112394
  * Wikimedia Foundation (2023) Wikimedia Foundation. 2023\.  Mutual authentication.  https://en.wikipedia.org/wiki/Mutual_authentication.
  * Williamson and Curran (2021) Joseph Williamson and Kevin Curran. 2021.  Best Practice in Multi-factor Authentication.  _Semiconductor Science and Information Devices_ 3 (05 2021).  https://doi.org/10.30564/ssid.v3i1.3152
  * Wong et al. (2023) Ann Yi Wong, Eyasu Getahun Chekole, Martín Ochoa, and Jianying Zhou. 2023.  On the security of containers: Threat modeling, attack analysis, and mitigation strategies.  _Computers & Security_ 128 (2023), 103140.
  * Xiang and Zheng (2020) Anhao Xiang and Jun Zheng. 2020.  A Situation-Aware Scheme for Efficient Device Authentication in Smart Grid-Enabled Home Area Networks.  (06 2020).  https://doi.org/10.3390/electronics9060989
  * Xiaoying et al. (2019) Jia Xiaoying, Debiao He, Neeraj Kumar, and Kim-Kwang Raymond Choo. 2019.  Authenticated key agreement scheme for fog-driven IoT healthcare system.  _Wireless Networks_ 25 (11 2019).  https://doi.org/10.1007/s11276-018-1759-3
  * Xie et al. (2022) Bailin Xie, Qi Li, and Hao Qian. 2022.  _Weak Password Scanning System for Penetration Testing_.  120–130.  https://doi.org/10.1007/978-3-030-94029-4_9
  * Yi and Wen (2023) Jinghai Yi and Yunhua Wen. 2023.  An Improved Data Backup Scheme Based on Multi-Factor Authentication. In _2023 IEEE 9th Intl Conference on Big Data Security on Cloud (BigDataSecurity), IEEE Intl Conference on High Performance and Smart Computing, (HPSC) and IEEE Intl Conference on Intelligent Data and Security (IDS)_. 187–197.  https://doi.org/10.1109/BigDataSecurity-HPSC-IDS58521.2023.00041
  * Zahednejad et al. (2023) Behnam Zahednejad, Huang Teng, Saeed Kosari, and Ren Xiaojun. 2023\.  A Lightweight, Secure Big Data-Based Authentication and Key-Agreement Scheme for IoT with Revocability.  _International Journal of Intelligent Systems_ 2023 (04 2023), 1–19.  https://doi.org/10.1155/2023/9731239
  * Zhang et al. (2022) Yan Zhang, Bing Li, Jiaxin Wu, Bo Liu, Rui Chen, and Jinke Chang. 2022.  Efficient and Privacy-Preserving Blockchain-Based Multifactor Device Authentication Protocol for Cross-Domain IIoT.  _IEEE Internet of Things Journal_ PP (05 2022), 1–1.  https://doi.org/10.1109/JIOT.2022.3176192

##  Appendix A Supplementary Figures

Figure A.1. Snapshot of the MFA protocol in (Sadhukhan et al., 2020) where
$ID_{u}$ is transmitted in plain Figure A.2. Snapshot of the checks performed
to mutually authenticate user and Gateway in (Kim et al., 2023) Figure A.3.
Snapshot of the authentication phase in (Lee et al., 2021) whereby $UID_{u}$
is used to protect the actual identity Figure A.4. Snapshot on the
distribution of shared secret parameter $S_{i}^{1}$ in (Kim et al., 2023)
Figure A.5. Snapshot of the checks performed to mutually authenticate user,
HGW and smart device in (Oh et al., 2021)(part 1) Figure A.6. Snapshot of the
authentication and key agreement phase in (Sadhukhan et al., 2020) Figure A.7.
Snapshot of the authentication phase demonstrating key leakage resiliency in
(Kwon et al., 2021) Figure A.8. Snapshot of the authentication phase in (R. et
al., 2020) showing authentication factors’ independence Figure A.9. Snapshot
of the checks performed to mutually authenticate user, HGW and smart device in
(Oh et al., 2021)(part 2)


# Machine Learning-Based Diabetes Detection Using Photoplethysmography Signal
Features

Filipe A. C. Oliveira
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Felipe M. Dias
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Marcelo A. F. Toledo
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Diego A. C. Cardenas
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Douglas A. Almeida
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Estela Ribeiro
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Jose E. Krieger
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
&Marco A. Gutierrez
Heart Institute (InCor)
Clinics Hospital University of
Sao Paulo Medical School
Sao Paulo - SP - Brazil
<EMAIL_ADDRESS>
###### Abstract

Diabetes is a prevalent chronic condition that compromises the health of
millions of people worldwide. Minimally invasive methods are needed to prevent
and control diabetes but most devices for measuring glucose levels are
invasive and not amenable for continuous monitoring. Here, we present an
alternative method to overcome these shortcomings based on non-invasive
optical photoplethysmography (PPG) for detecting diabetes. We classify non-
Diabetic and Diabetic patients using the PPG signal and metadata for training
Logistic Regression (LR) and eXtreme Gradient Boosting (XGBoost) algorithms.
We used PPG signals from a publicly available dataset. To prevent overfitting,
we divided the data into five folds for cross-validation. By ensuring that
patients in the training set are not in the testing set, the model’s
performance can be evaluated on unseen subjects’ data, providing a more
accurate assessment of its generalization. Our model achieved an F1-Score and
AUC of $58.8\pm 20.0\%$ and $79.2\pm 15.0\%$ for LR and $51.7\pm 16.5\%$ and
$73.6\pm 17.0\%$ for XGBoost, respectively. Feature analysis suggested that
PPG morphological features contains diabetes-related information alongside
metadata. Our findings are within the same range reported in the literature,
indicating that machine learning methods are promising for developing remote,
non-invasive, and continuous measurement devices for detecting and preventing
diabetes.

_Keywords_ Photoplethysmography $\cdot$ Wearable devices $\cdot$ Diabetes.

##  1 Introduction

Diabetes is a chronic disease characterized by insufficient insulin release by
the pancreas or lack of tissue response, leading to higher blood glucose
levels (BGL) DeFronzo et al. (1992). When undetected or untreated, this higher
glucose concentration may lead to several vascular illnesses, such as kidney
and heart diseases. Diabetes management includes the prevention of such
illnesses by constant BGL self-monitoring Kirk and Stegner (2010).

Several devices for assessing the patient’s BGL are either invasive based on
fasting plasma glucose test, which requires a blood sample collection by a
healthcare professional, or minimally invasive through finger prick blood test
and continuous glucose monitors (CGM) for self-monitoring at home. However,
all these methods require skin perforation, and only the CGM provides
continuous measurements. Due to the high cost, discomfort, and risk provided
by CGM, frequent BGL monitoring is not implemented at large. A non-invasive
approach to detect diabetes would be valuable for the identification of early
stages of diabetes in healthy and pre-Diabetic subjects, contributing to
global efforts in preventing this disease and instrumental to assist monitor
therapy interventions LaMonte et al. (2005).

The Photoplethysmography (PPG) is one of the non-invasive approaches that has
been studied for the detection of diabetes and pre-diabetes Zanelli et al.
(2022). The PPG is an optical technique for measuring changes in blood volume
in the microvascular bed of tissues. This technique typically involves
emitting light on the tissue and measuring changes in light absorption,
reflection, or scattering to determine changes in blood volume Mejía-Mejía et
al. (2022). Moreover, the quantification of certain molecules in the blood can
be performed by employing light of particular molecules’ peak absorption
frequencies Mukkamala et al. (2022). The canonical case is oximetry (SpO2).
Besides that, PPG waveform can be used to measure other important
cardiovascular and respiratory parameters, such as heart rate (HR),
respiration rate, and blood pressure Nitzan and Ovadia-Blechman (2022).

PPG can be applied as an indirect measure of a subject’s hemodynamics
information, conveying information pertaining to the condition of the blood
vessel, such as the arterial stiffness, which is found to be elevated in
individuals with diabetes Pilt et al. (2013). Some works suggest that Diabetic
subjects have less prominent dicrotic notch Spigulis et al. (2002), even
though they used a reduced number of subjects in their analysis. Other work
show that the area under a PPG pulse is reduced when the level of HbA1c
(glycated hemoglobin) level increase Usman et al. (2011). The HbA1c provides
an estimation of a person’s average blood glucose levels over the past two to
three months and is used for diabetes diagnostic and management.

An advantage of PPG-based methods for assessing BGL is that they can provide
continuous non-invasive measurements. These are not only important for
monitoring, but also for detecting diabetes in its early stages of
development. In Reddy. et al. (2017), they applied an SVM method for
predicting diabetes using features related to heart rate variability (HRV) and
PPG morphology, using a fingertip pulse oximeter private dataset. In
Hettiarachchi and Chitraranjan (2019), they proposed to predict diabetes based
on morphological features extracted from PPG signals from a public dataset
Liang et al. (2018) using a Linear Discriminant Analysis method. In Moreno et
al. (2017), they proposed a method for screening patients for diabetes by
extracting features from the signal of a pulse oximeter. The features served
as input for different classification algorithms, such as random forest and
gradient boosting. Srinivasan and Foroozan (2021) made an analysis in the
frequency domain using a convolutional neural network (CNN) with 30 seconds
PPG scalograms and metadata over a large dataset. More recently, Zanelli et
al. (2023) proposed a transfer learning approach to detect diabetes through
1-second raw PPG signals.

In this work, we presented a method to classify non-Diabetic and Diabetic
patients using a set of features extracted from PPG signals and metadata for
training machine learning models using Logistic Regression (LR) Tolles and
Meurer (2016) and eXtreme Gradient Boosting (XGBoost) Chen and Guestrin
(2016a) algorithms. We aimed to correlate the PPG signals morphological
characteristics and the subject’s diabetes status adjusted by the individual’s
metadata information. The method proposed in this paper utilizes shorter PPG
signals, each segment lasting 2.1 seconds. This approach enables easy
integration into various wearable devices, while also potentially offering
benefits such as reduced computational costs and processing times.

##  2 Materials and Methods

In this section, the description of the publicly available dataset used to
classify the PPG signals into non-Diabetic or Diabetic patients is presented
and also the data selection criteria. Next, we describe the proposed
methodology for Diabetes classification, based on signal preprocessing and
feature extraction of PPG signals, and the use of two algorithms for the
classification step. Fig. 1 shows the proposed methodology for the
classification between non-Diabetic and Diabetic groups.

Figure 1: The proposed methodology for the classification of patients into
Diabetes or non-Diabetes groups.

###  2.1 Data Selection

We used a publicly available dataset provided by a study that contains
physiological information and PPG data from 219 patients of Guilin People’s
Hospital in China Liang et al. (2018). The PPG signal was collected from the
fingertip using the transmission method in infrared wavelength (905 nm) at a
sample rate of 1 kHz. The PPG signal was collected from resting patients,
where three 2.1-second PPG segments were captured from each patient.

The dataset contains information about three different classes of diseases:
diabetes, hypertension, and cerebrovascular diseases, along with metadata
information such as age, weight, height, body mass index (BMI), arterial blood
pressure (ABP), and an unique patient ID number.

For this study, we divided the patients into two groups: non-Diabetic and
Diabetic patients. We kept 59 healthy subjects in the non-Diabetic group by
removing all patients with any stage of hypertension or cerebrovascular
disease, and all 38 patients diagnosed with diabetes were kept in the other
group. Due to segmentation errors and noisy signals, 11 subjects were excluded
from the analysis. Table 1 show a description of the data used in this study.

Table 1: Summary of the data used. Class | Subjects | Male | Cycles | Age | Height | Weight | HR | BMI
---|---|---|---|---|---|---|---|---
Non-Diabetic | $54$ | $22$ | $281$ | $45\pm 16$ | $161\pm 8$ | $56\pm 11$ | $73\pm 11$ | $22\pm 4$
Diabetic | $32$ | $14$ | $172$ | $59\pm 12$ | $160\pm 8$ | $62\pm 12$ | $74\pm 11$ | $24\pm 4$
Total | $86$ | $36$ | $453$ | $50\pm 16$ | $161\pm 8$ | $59\pm 11$ | $74\pm 11$ | $23\pm 4$

###  2.2 Preprocessing

To remove high-frequency artifacts in the PPG, we preprocessed each signal
segment with a 6th-order Butterworth low-pass filter with a cutoff frequency
of 16 Hz. During the acquisition of PPG signals, different artifacts may cause
baseline oscillations. To address this issue, we applied the Fitting-based
Sliding Window (FSW) algorithm instead of a high-pass-filter to remove the
baseline, as the high-pass filter may eliminate important low-frequency
characteristics present in the signal Zhang et al. (2020).

The FSW algorithm involves a sliding window that identifies the local minimums
between each cycle (heartbeat) in the signal segments and uses them to fit the
baseline. The fitted line was subtracted from the signal, removing the
baseline fluctuations while preserving low-frequency characteristics. The
valleys between the cycles were also used to segment the PPG cycles in each
signal segment. The FSW algorithm details are described in Zhang et al.
(2020).

We performed a visual inspection on the cycles extracted from PPG signals of
all patients in the study. During this process, six Diabetic and five non-
Diabetic patients were removed from the experiment due to segmentation flaws
or presence of very noisy signals.

###  2.3 Feature extraction

Each PPG cycle segmented by the FSW served as input for the feature extraction
algorithm. We used the same features presented in Costa et al. (2023),
resulting in 104 features. The features were computed from each signal cycle
(heartbeat) and its corresponding first and second derivatives. The features
included a variety of values such as pulse width, area, intervals, peak-to-
peak interval, and systolic amplitude. A detailed description of the features
used here can be found in Costa et al. (2023), Chowdhury et al. (2020), El-
Hajj and Kyriacou (2021), and Lin et al. (2020).

The metadata (sex, age, height, weight, heart rate, and BMI) was used as
features in the classification algorithm along with the PPG signal features.
However, the data related to blood pressure was not included due to its strong
relation to hypertensive and pre-hypertensive patients. This could create a
potential bias in the classification algorithm as high blood pressure could be
falsely associated with the presence of Diabetes, since most Diabetic patients
included in the experiment have a degree of hypertension.

This feature extraction step resulted in $453$ sets of features that were used
to perform the detection of Diabetes on PPG signals, being $6$ features in
each set related to the medadata information and $104$ related to features
extracted from the PPG signal cycles.

###  2.4 Classification

We employed two well-known algorithms commonly used in machine learning
classification tasks, the Logistic Regression Stoltzfus (2011) and the XGBoost
Chen and Guestrin (2016b) algorithms. XGBoost is known for its high accuracy,
ability to handle complex data, and scalability, but it’s less interpretable.
Logistic Regression, on the other hand, is a simpler model with better
interpretability, but may not perform as well in complex datasets.

$L_{1}$ penalty and LIBLINEAR solver were used as hyperparameters for the LR
algorithm. For the XGBoost algorithm we used the tree booster with learning
rate of $0.1$ and maximum tree depth of $30$. The weights for each class were
adjusted according to the number of samples representing each class for both
classifiers.

The performance of the LR and the XGBoost models was evaluated using
statistical metrics: Accuracy ($Acc$), Sensitivity ($Se$), Specificity ($Sp$),
F1-score, Positive Predictive Value ($PPV$), and the Area Under the ROC Curve
($AUC$).

The “Diabetes” column of the dataset was used as the label, considering one
for Diabetics and zero for non-Diabetics. The classification was performed and
evaluated using a 5-fold cross-validation strategy, which involves splitting
the dataset into five equal parts or folds. In each iteration, four of the
folds are used for training and one fold is used for testing. This process is
repeated five times with each fold serving as the testing set once. The
performance of the classifiers (LR and XGBoost) is then averaged across the
five iterations.

Features sets obtained from PPG cycles were split in each fold patient-wise.
This way, features extracted from signals of the same patient are placed in
training folds or testing fold, never in both. By allocating each patient in
training and testing sets by their IDs, we avoided the classification bias
caused by mixing information of the same patient in both training and testing
folds in each iteration Costa et al. (2023) de Chazal et al. (2004).

The overall performance of the classifiers is obtained by evaluating the mean
and standard deviation of all statistical metrics obtained in each iteration.
Moreover, we used the sklearn.inspection.permutation_importance algorithm to
determine feature importance for both classifiers. Since we have a 5-fold
strategy, the mean feature importance for all 5-folds was computed.

##  3 Results

This study used data from 86 subjects, with 453 cycles extracted using the FSW
method. Out of these cycles, 172 belong to Diabetic patients. A total of 110
features were used as input for the classifiers, with 104 of these being
morphological features extracted from each PPG cycle and the remaining 6
features comprising metadata of the patients.

The goal of the study was to classify non-Diabetic and Diabetic patients by
using LR and XGBoost classifiers on features extracted from PPG cycles. The
5-fold cross-validation strategy permitted the evaluation of the classifiers’
performance on multiple iterations and reduced the impact of any random
fluctuations in the data.

Table 2 summarizes the overall performance of the proposed methods for the
binary classification between Diabetic/non-Diabetic. The metrics are presented
as the mean and standard deviation of the five iterations of the cross-
validation strategy. In addition, Figs. 2 and 3 show the AUC for the LR and
XGBoost methods, respectively.

Table 2: Comparison of the performance results of our two proposed algorithms for Diabetic/Non-Diabetic classification. Metrics | Logistic Regression | XGBoost
---|---|---
Se | $66.4\pm 26.6\%$ | $56.3\pm 22.1\%$
Spe | $75.1\pm 18.9\%$ | $70.5\pm 16.0\%$
F1-score | $58.9\pm 20.0\%$ | $51.7\pm 16.5\%$
Acc | $70.0\pm 12.2\%$ | $64.5\pm 9.8\%$
PPV | $61.1\pm 24.1\%$ | $54.0\pm 21.3\%$
AUC | $79.2\pm 15.0\%$ | $73.6\pm 17.0\%$

Table 2 shows the classification metrics of this study, which achieved
F1-Score and AUC of $58.8\pm 20.0\%$ and $79.2\pm 15.0\%$ for LR and $51.7\pm
16.5\%$ and $73.6\pm 17.0\%$ for XGBoost, respectively. The best achieved AUC
with LR model is comparable to the AUC of $79\pm 15\%$, reported in
Hettiarachchi and Chitraranjan (2019), which used the same dataset for
diabetes detection.

Figure 2: Receiver Operating Curve (ROC) and AUC for each fold of the Logistic
Regression method. Figure 3: Receiver Operating Curve (ROC) and AUC for each
fold of the XGBoost method.

Additionally, we present the feature importance measures, displaying the 7
most significant features for the two proposed models’ ability to predict the
outcomes. The importance and name of each feature is shown in Fig. 4 for
Logistic Regression and in Fig. 5 for XGBoost. Based on the feature importance
results obtained from both algorithms, we have compiled a summary of the six
most significant PPG features in Table 3. We have excluded from this table the
features associated with metadata, namely age, weight, height, and BMI, as
they are self-explanatory.

Figure 4: Importance of the 7 most significant features for Logistic Regression. The values represent the the mean of the five folds. Figure 5: Importance of the 7 most significant features for XGBoost. The values represent the the mean of the five folds. Table 3: Description of the six most significant PPG signal features of the experiment. Name |  Description
---|---
der_1_PI |  Intensity of the 1st inflection point in the 1st derivative of the PPG cycle
AS |  Slope of the systolic portion in the PPG cycle (from the beginning of the cycle to the systolic peak)
der_1_AS |  Slope of the line up to the 1st inflection point (from the beginning of the 1st derivative to the 1st inflection point)
DID |  Difference in intensity between the systolic peak and the end of the PPG cycle
AID |  Difference in intensity between the beginning of the PPG cycle and the systolic peak
PI |  Intensity of the systolic peak in the PPG cycle normalized by the average value (baseline)

##  4 Discussion

In this study, we proposed a method aimed at aiding in the diagnosis of
diabetes based on PPG signals. This is an exploratory study that correlates
the morphological features extracted from PPG signals with metadata
information from the subjects.

We show that it is possible to achieve results comparable to the state-of-the-
art using a limited dataset, with features extracted from single heartbeats
(cycles) of the PPG signals. Table 4 displays a comparison of works that
propose to detect diabetes through PPG signals. Hettiarachchi and Chitraranjan
(2019) used the same dataset as our study; however, they used features
extracted from the whole 2.1 s segment available, reducing the input size of
their models. Moreno et al. (2017), on the other hand, used a private dataset
with one-minute long segments registered from 1,170 subjects and achieved
results in the same range as ours (AUC 69.4%, Se 65% Spe 64%) using different
machine learning techniques. Zanelli et al. (2023), the most recent work on
this topic, used 1 s segments of PPG raw signals from 100 subjects to predict
diabetes. Even though they proposed a transfer learning strategy, heir best-
performing model was the one without transfer learning, combining age and sex
metadata information.

Different from the works on Table 4, Nirala et al. (2019) achieved Acc 97.87%,
Se 98.78% and Spe 96.61%, using data from 141 subjects. However, they randomly
partitioned the data into k-equal folds on a k-fold strategy, implicating that
they mixed the same subject data on the training and test partitions. Gupta et
al. (2022) also did the same approach, not clearly specifying the dataset
division. Previous research has shown that utilizing the same subject for both
the training and test sets can yield better outcomes, as data leakage may
occur due to the high interdependence among intra-subject heartbeats de Chazal
et al. (2004); Costa et al. (2023). Reddy. et al. (2017), on the other hand,
achieved Acc 89%, Se 90% and Spe 88%, using data from 100 subjects.
Nevertheless, they didn’t make it clear if during partition of the data on the
k-fold strategy they ensure that the same subject signals wasn’t on both
training and test sets.

Table 4: Comparison of the performance results of our two proposed algorithms
for Diabetes detection through PPG signal and the related state-of-the-art
works.

Reference | F1-score | AUC | Accuracy | Sensitivity | Specificity | Dataset | Method
---|---|---|---|---|---|---|---
Moreno et al. (2017) | – | 70.0 | – | 80.0 | 48.0 | Private (s = 1,170) | RF and GB - PPG features and metadata
Reddy. et al. (2017) | – | – | 89.0 | 90.0 | 88.0 | Private (s = 100) | SVM - PPG features
Hettiarachchi and Chitraranjan (2019) | 71.0 $\pm$ 15.0 | 79.0 $\pm$ 15.0 | 71.0 | – | – |  Liang et al. (2018) (s = 64) | LDA - PPG features and metadata
Hettiarachchi and Chitraranjan (2019) | 69.0 $\pm$ 10.0 | 74.0 $\pm$ 17.0 | 79.0 | – | – |  Liang et al. (2018) (s = 64) | SVM - PPG features and metadata
Nirala et al. (2019) | 98.18 | 97.69 | 97.87 | 98.78 | 96.61 | Private (s = 141) | SVM - 37 PPG features
Avram et al. (2020) | – | 76.6 | – | 75.0 | 65.4 | Private (s = 55,433) | CNN - PPG raw signal and metadata
Srinivasan and Foroozan (2021) | – | 83.0 | 76.34 | 76.66 | 76.11 | MIMIC III (s = 808) | 2D CNN - PPG scalogram and metadata
Gupta et al. (2022) | 99.0 | – | 98.52 | 99.0 | 96.0 |  Liang et al. (2018) (s = 219) | RF - PPG features
Zanelli et al. (2023) | 46.15 | 56.50 | – | 75.0 | 76.0 | Private (s = 100) | CNN - PPG raw signal, age and sex
Zanelli et al. (2023) | 30.77 | 61.0 | – | 50.0 | 72.0 | Private (s = 100) | CNN and Transfer Learning - PPG raw signal, age and sex
Our method: XGBoost | 51.7 $\pm$ 16.5 | 73.6 $\pm$ 17.0 | 64.5 $\pm$ 9.8 | 56.3 $\pm$ 22.1 | 70.5 $\pm$ 16.0 |  Liang et al. (2018) (s = 86) | XGBoost - 104 PPG features and 6 metadata
Our method: LR | 58.9 $\pm$ 20.0 | 79.2 $\pm$ 15.0 | 70.0 $\pm$ 12.2 | 66.4 $\pm$ 26.6 | 75.1 $\pm$ 18.9 |  Liang et al. (2018) (s = 86) | LR - 104 PPG features and 6 metadata

Nirala et al. (2019) suggest in their work that the absence of a dicrotic
notch on PPG waves can be observed in Diabetic subjects. Zanelli et al. (2023)
also compares a waveform from a Diabetic and a non-Diabetic subjects,
highlighting the absence of a dicrotic notch in the former. However, they
imply that these differences are not always readily apparent. On the contrary,
Srinivasan and Foroozan (2021) indicates that despite using a much larger
dataset than the aforementioned studies, it is not possible to observe this
dicrotic notch difference between the two groups. Our work aligns with
Srinivasan’s findings. In Figure 6, we present the average heartbeat of both
Diabetic and non-Diabetic subjects in our dataset, demonstrating no
discernible difference in regarding the presence of dicrotic notch. Moreover,
the absence of dicrotic notch may be related to aging or other factors
MILLASSEAU et al. (2002).

Figure 6: Average heartbeat (red) for Diabetic and non-Diabetic groups. All
PPG cycles were normalized and aligned by the highest peak in the cycle.

Srinivasan and Foroozan (2021) suggest that their work outperformed the
studies based on PPG features due to this similarity of PPG wave morphology.
Even though Zanelli et al. (2023) also used a deep learning approach, they
used a much smaller input signal (1 s vs 30 s length). Moreover, Srinivasan’s
study implicate that frequency domain information may be important for
diabetes detection. Future works should be done in this regard.

Heart Rate Variability (HRV) is broadly used as a feature in diabetes
detection and BGL estimation studies Reddy. et al. (2017) Chu et al. (2021).
However, this feature may not be calculated with confidence in short segments
of data such as the available in our dataset. For this reason, the HRV was not
estimated for this experiment.

The small number of patients in the dataset raises concerns about potential
bias in the classifier’s performance. There is a possibility that the
classifier may learn to estimate other clinical parameters, such as blood
pressure or other clinical conditions, instead of focusing solely on Diabetes
classification. In addition, several studies involving Diabetes classification
do not explicitly consider the bias caused by mixing PPG signals from the same
patient in the training and testing steps Panwar et al. (2020), which may
result in better metrics due to overfitting. We addressed this issue by
adopting the 5-fold cross-validation strategy considering the patient’s
identification number while splitting the data.

Comparing the significance of each feature shown in Figs. 4 and 5, it is seen
that the Logistc Regression algorithm considered mostly the PPG-related
features as important for predicting diabetes. On the other hand, the XGBoost
algorithm made predictions considering almost exclusively the patient’s
metadata information. The better results provided by LR algorithm suggest that
the PPG cycles may indeed carry diabetes-related information. Both
classification algorithms consider as important two specific PPG features:
der_1_PI and AID. These features use information from the systolic wave
between its onset and peak, indicating a potential value of this portion of
the PPG wave for further analysis.

One of the reasons for the lack of studies using this dataset may be related
to its reduced number of patients and its short time signals, considering that
each patient has only six seconds of PPG signal divided into three non-
continuous segments. The visual analysis shows that most of the PPG segments
display incomplete cycles at the signal edges, which led to the disposal of
large portions of PPG data. This aspect may impair the performance of
segmentation algorithms, such as the FSW. Such impairment seen in this work
led to the exclusion of eleven patients from the experiment due to
segmentation errors and noisy signals. The FSW algorithm was first introduced
in Zhang et al. (2020) for removing the baseline and segmenting PPG signals.
However, when applied to signals with a small number of cycles, it tends to
discard the edges, resulting in a reduction of the data passed to the feature
extraction algorithm and, consequently, a lower number of computed features,
which negatively affects the performance and generalization of the
classifiers.

The clinical use of PPG-based diabetes detection algorithms demands higher
accuracy and reliability on different patients with varying medical
conditions. Therefore, in order to enhance the effectiveness and reliability
of the findings, ensuring their generalizability and applicability, future
studies on the detection of diabetes using wearable devices should be
conducted on a larger and more diverse dataset, including patients with
different medical conditions, ages, and ethnicities. Thus, we urge for the
need of publicly available well-annotated datasets on this theme in order to
improve the effectiveness of PPG-based diabetes detection algorithms and
facilitate its translation to clinical practice.

##  5 Conclusion

Our study proposed a method for diagnosing diabetes based on PPG signals,
utilizing morphological features extracted from single beats of the PPG
signals. We achieved comparable results to state-of-the-art studies using a
limited dataset. Comparison with other studies showed that our approach
yielded promising accuracy, sensitivity, and specificity values. However, the
small number of patients in our dataset and the short duration of the PPG
signals available for the analysis may have impacted our results.
Additionally, publicly available well-annotated datasets in this field are
needed for further advance research in this area.

## References

  * DeFronzo et al. [1992] Ralph A DeFronzo, Riccardd C Bonadonna, and Eleuterio Ferrannini.  Pathogenesis of NIDDM: A Balanced Overview.  _Diabetes Care_ , 15(3):318–368, 03 1992.  doi:10.2337/diacare.15.3.318.
  * Kirk and Stegner [2010] Julienne K. Kirk and Jane Stegner.  Self-monitoring of blood glucose: Practical aspects.  _Journal of Diabetes Science and Technology_ , 4(2):435–439, 2010.  doi:10.1177/193229681000400225.
  * LaMonte et al. [2005] Michael J. LaMonte, Steven N. Blair, and Timothy S. Church.  Physical activity and diabetes prevention.  _Journal of Applied Physiology_ , 99(3):1205–1213, 2005.  ISSN 8750-7587, 1522-1601.  doi:10.1152/japplphysiol.00193.2005.
  * Zanelli et al. [2022] Serena Zanelli, Mehdi Ammi, Magid Hallab, and Mounim A. El Yacoubi.  Diabetes detection and management through photoplethysmographic and electrocardiographic signals analysis: A systematic review.  _Sensors_ , 22(13):4890, 2022.  ISSN 1424-8220.  doi:10.3390/s22134890.
  * Mejía-Mejía et al. [2022] Elisa Mejía-Mejía, John Allen, Karthik Budidha, Chadi El-Hajj, Panicos A. Kyriacou, and Peter H. Charlton.  4 - photoplethysmography signal processing and synthesis.  In John Allen and Panicos Kyriacou, editors, _Photoplethysmography_ , pages 69–146. Academic Press, 2022.  ISBN 978-0-12-823374-0.  doi:10.1016/B978-0-12-823374-0.00015-3.
  * Mukkamala et al. [2022] Ramakrishna Mukkamala, Jin-Oh Hahn, and Anand Chandrasekhar.  11 - photoplethysmography in noninvasive blood pressure monitoring.  In John Allen and Panicos Kyriacou, editors, _Photoplethysmography_ , pages 359–400. Academic Press, 2022.  ISBN 978-0-12-823374-0.  doi:10.1016/B978-0-12-823374-0.00010-4.
  * Nitzan and Ovadia-Blechman [2022] Meir Nitzan and Zehava Ovadia-Blechman.  9 - physical and physiological interpretations of the ppg signal.  In John Allen and Panicos Kyriacou, editors, _Photoplethysmography_ , pages 319–340. Academic Press, 2022.  ISBN 978-0-12-823374-0.  doi:10.1016/B978-0-12-823374-0.00009-8.
  * Pilt et al. [2013] Kristjan Pilt, Rain Ferenets, Kalju Meigas, Lars-Goran Lindberg, Kristina Temitski, and Margus Viigimaa.  New photoplethysmographic signal analysis algorithm for arterial stiffness estimation.  _The Scientific World Journal_ , 2013:1–9, 2013.  doi:http://dx.doi.org/10.1155/2013/169035.
  * Spigulis et al. [2002] Janis Spigulis, Indulis Kukulis, Eva Fridenberga, and Girts Venckus.  Potential of advanced photoplethysmography sensing for noninvasive vascular diagnostics and early screening.  In Gerald E. Cohn, editor, _Clinical Diagnostic Systems: Technologies and Instrumentation_ , volume 4625, pages 38 – 43. International Society for Optics and Photonics, SPIE, 2002.  doi:10.1117/12.469789.
  * Usman et al. [2011] Sahnius Usman, MMBI Reaz, and MABM Ali.  Repeated measurement analysis of the area under the curve of photoplethysmogram among diabetic patients.  _Life Sci. J_ , 10:532–539, 2011.
  * Reddy. et al. [2017] V. Ramu Reddy., Anirban Dutta Choudhury., Srinivasan Jayaraman., Naveen Kumar Thokala., Parijat Deshpande., and Venkatesh Kaliaperumal.  Perdmcs: Weighted fusion of ppg signal features for robust and efficient diabetes mellitus classification.  In _Proceedings of the 10th International Joint Conference on Biomedical Engineering Systems and Technologies - SmartMedDev_ , pages 553–560. SciTePress, 2017.  ISBN 978-989-758-213-4.  doi:10.5220/0006297205530560.
  * Hettiarachchi and Chitraranjan [2019] Chirath Hettiarachchi and Charith Chitraranjan.  A machine learning approach to predict diabetes using short recorded photoplethysmography and physiological characteristics.  In _Artificial Intelligence in Medicine_ , volume 11526, pages 322–327. Springer International Publishing, 2019.  ISBN 978-3-030-21641-2 978-3-030-21642-9.  doi:10.1007/978-3-030-21642-9_41.
  * Liang et al. [2018] Yongbo Liang, Zhengcheng Chen, Guiyong Liu, and Mohamed Elgendi.  A new, short-recorded photoplethysmogram dataset for blood pressure monitoring in china.  _Scientific Data_ , 8:180020, 2018.
  * Moreno et al. [2017] Enrique Monte Moreno, Maria Jose Anyo Lujan, Montse Torrres Rusinol, Paqui Juarez Fernandez, Pilar Nunez Manrique, Cristina Aragon Trivino, Magda Pedrosa Miquel, Marife Alvarez Rodriguez, and M. Jose Gonzalez Burguillos.  Type 2 diabetes screening test by means of a pulse oximeter.  _IEEE Transactions on Bio-Medical Engineering_ , 64(2):341–351, 2017.  ISSN 1558-2531 0018-9294.  doi:10.1109/TBME.2016.2554661.
  * Srinivasan and Foroozan [2021] Venkatesh Bharadwaj Srinivasan and Foroohar Foroozan.  Deep learning based non-invasive diabetes predictor using photoplethysmography signals.  In _2021 29th European Signal Processing Conference (EUSIPCO)_ , pages 1256–1260, 2021.  doi:10.23919/EUSIPCO54536.2021.9616351.
  * Zanelli et al. [2023] Serena Zanelli, Mounim A. El Yacoubi, Magid Hallab, and Mehdi Ammi.  Type 2 diabetes detection with light cnn from single raw ppg wave.  _IEEE Access_ , 11:57652–57665, 2023.  doi:10.1109/ACCESS.2023.3274484.
  * Tolles and Meurer [2016] Juliana Tolles and William J. Meurer.  Logistic Regression: Relating Patient Characteristics to Outcomes.  _JAMA_ , 316(5):533–534, 08 2016.  ISSN 0098-7484.  doi:10.1001/jama.2016.7653.
  * Chen and Guestrin [2016a] Tianqi Chen and Carlos Guestrin.  Xgboost: A scalable tree boosting system.  In _Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , KDD ’16, page 785–794. Association for Computing Machinery, 2016a.  ISBN 9781450342322.  doi:10.1145/2939672.2939785.
  * Zhang et al. [2020] Gaobo Zhang, Zhen Mei, Yuan Zhang, Xuesheng Ma, Benny Lo, Dongyi Chen, and Yuanting Zhang.  A noninvasive blood glucose monitoring system based on smartphone ppg signal processing and machine learning.  _IEEE Transactions on Industrial Informatics_ , 16(11):7209–7218, 2020.  doi:10.1109/TII.2020.2975222.
  * Costa et al. [2023] Thiago Bulhões Da Silva Costa, Felipe Meneguitti Dias, Diego Armando Cardona Cardenas, Marcelo Arruda Fiuza De Toledo, Daniel Mário De Lima, Jose Eduardo Krieger, and Marco Antonio Gutierrez.  Blood pressure estimation from photoplethysmography by considering intra- and inter-subject variabilities: Guidelines for a fair assessment.  _IEEE Access_ , 11:57934–57950, 2023.  doi:10.1109/ACCESS.2023.3284458.
  * Chowdhury et al. [2020] Moajjem Hossain Chowdhury, Md Nazmul Islam Shuzan, Muhammad E.H. Chowdhury, Zaid B. Mahbub, M. Monir Uddin, Amith Khandakar, and Mamun Bin Ibne Reaz.  Estimating blood pressure from the photoplethysmogram signal and demographic features using machine learning techniques.  _Sensors_ , 20(11), 2020.  ISSN 1424-8220.  doi:10.3390/s20113127.
  * El-Hajj and Kyriacou [2021] C El-Hajj and P.A Kyriacou.  Cuffless blood pressure estimation from ppg signals and its derivatives using deep learning models.  _Biomedical Signal Processing and Control_ , 70:102984, 2021\.  ISSN 1746-8094.  doi:https://doi.org/10.1016/j.bspc.2021.102984.
  * Lin et al. [2020] Wan-Hua Lin, Xiangxin Li, Yuanheng Li, Guanglin Li, and Fei Chen.  Investigating the physiological mechanisms of the photoplethysmogram features for blood pressure estimation.  _Physiological Measurement_ , 41(4):044003, may 2020.  doi:10.1088/1361-6579/ab7d78.
  * Stoltzfus [2011] Jill C. Stoltzfus.  Logistic regression: A brief primer.  _Academic Emergency Medicine_ , 18(10):1099–1104, 2011.  doi:https://doi.org/10.1111/j.1553-2712.2011.01185.x.
  * Chen and Guestrin [2016b] Tianqi Chen and Carlos Guestrin.  XGBoost.  In _Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_. ACM, aug 2016b.  doi:10.1145/2939672.2939785.
  * de Chazal et al. [2004] Philip de Chazal, M. O’Dwyer, and R.B. Reilly.  Automatic classification of heartbeats using ecg morphology and heartbeat interval features.  _IEEE Transactions on Biomedical Engineering_ , 51(7):1196–1206, 2004.  doi:10.1109/TBME.2004.827359.
  * Nirala et al. [2019] Neelamshobha Nirala, R. Periyasamy, Bikesh Kumar Singh, and Awanish Kumar.  Detection of type-2 diabetes using characteristics of toe photoplethysmogram by applying support vector machine.  _Biocybernetics and Biomedical Engineering_ , 39(1):38–51, 2019.  ISSN 0208-5216.  doi:https://doi.org/10.1016/j.bbe.2018.09.007.
  * Gupta et al. [2022] Shresth Gupta, Anurag Singh, Abhishek Sharma, and Rajesh Kumar Tripathy.  dsvri: A ppg-based novel feature for early diagnosis of type-ii diabetes mellitus.  _IEEE Sensors Letters_ , 6(9):1–4, 2022.  doi:10.1109/LSENS.2022.3203609.
  * Avram et al. [2020] Robert Avram, Jeffrey E Olgin, Peter Kuhar, J Weston Hughes, Gregory M Marcus, Mark J Pletcher, Kirstin Aschbacher, and Geoffrey H Tison.  A digital biomarker of diabetes from smartphone-based vascular signals.  _Nature medicine_ , 26(10):1576—1582, October 2020.  doi:10.1038/s41591-020-1010-5.
  * MILLASSEAU et al. [2002] S.C. MILLASSEAU, R.P. KELLY, J.M. RITTER, and P.J. CHOWIENCZYK.  Determination of age-related increases in large artery stiffness by digital pulse contour analysis.  _Clinical Science_ , 103(4):371–377, 08 2002\.  doi:10.1042/cs1030371.
  * Chu et al. [2021] Justin Chu, Wen-Tse Yang, Tung-Han Hsieh, and Fu-Liang Yang.  One-minute finger pulsation measurement for diabetes rapid screening with 1.3% to 13% false-negative prediction rate.  _Biomedical Statistics and Informatics_ , 6(1):6, 2021.  ISSN 2578-871X.  doi:10.11648/j.bsi.20210601.12.
  * Panwar et al. [2020] Madhuri Panwar, Arvind Gautam, Rashi Dutt, and Amit Acharyya.  CardioNet: Deep learning framework for prediction of CVD risk factors.  In _2020 IEEE International Symposium on Circuits and Systems (ISCAS)_ , pages 1–5. IEEE, 2020.  ISBN 978-1-72813-320-1.  doi:10.1109/ISCAS45731.2020.9180636.


# A Curriculum-Training-Based Strategy for Distributing Collocation Points
during Physics-Informed Neural Network Training

Marcus Münzer
Institute of Informatics
Ludwig Maximilians University Munich
Munich, D-80538, Germany
<EMAIL_ADDRESS>
&Chris Bard
Geospace Physics Lab
NASA Goddard Space Flight Center
Greenbelt, MD, United States
<EMAIL_ADDRESS>
Alternative Email<EMAIL_ADDRESS>
###### Abstract

Physics-informed Neural Networks (PINNs) often have, in their loss functions,
terms based on physical equations and derivatives. In order to evaluate these
terms, the output solution is sampled using a distribution of collocation
points. However, density-based strategies, in which the number of collocation
points over the domain increases throughout the training period, do not scale
well to multiple spatial dimensions. To remedy this issue, we present here a
curriculum-training-based method for lightweight collocation point
distributions during network training. We apply this method to a PINN which
recovers a full two-dimensional magnetohydrodynamic (MHD) solution from a
partial sample taken from a baseline MHD simulation. We find that the
curriculum collocation point strategy leads to a significant decrease in
training time and simultaneously enhances the quality of the reconstructed
solution.

##  1 Introduction

Solving partial differential equations (PDEs) is a fundamental task in space
physics. Although numerical algorithms have tremendously improved over the
years [Weinan et al., (2021)], providing solutions over a full space-time
domain often requires large-scale, computationally-intensive simulations. As
an alternative to such simulations, machine learning (ML) techniques have
become popular in recent years, fusing physics and data (e.g., soft proton
predictions [Kronberg et al., (2021)], solar flare forecasts [Nishizuka et
al., (2021)], or space weather forecasts [Camporeale, (2019)]). However, most
of these approaches rely on huge datasets which appropriately cover the
relevant domain. This approach cannot work for domains with a sparsity
problem, e.g., spacecraft missions in planetary magnetospheres in which the
amount of data recorded is very tiny compared to the amount of data inherent
in the global system.

One way to address this sparsity problem is to numerically solve the physical
equations over the full domain given specific initial and boundary conditions.
However, such global simulations can be quite costly, requiring many thousands
of computer core hours. Additionally, they are not yet sophisticated enough to
assimilate data and modify their solutions appropriately to match
observations. As an alternative, PINNs can alleviate the sparsity problem by
combining data observations and physical constraints in their loss functions
to reconstruct global contexts around local data samples (e.g. the one-
dimensional magnetohydrodynamics reconstructions in [Bard and Dorelli,
(2021)]). This has the potential to provide a lightweight alternative to
global simulations, but only if the PINN is able to train quickly.

In order to generate physically-valid solutions, PINNs ensure that their
output solutions correctly correspond to their inherent physical equations
[Raissi et al., (2019); Karniadakis et al., (2021)]. These calculations
require so-called "collocation points" distributed through the domain at which
the solution and its derivatives are evaluated and tested against the physical
equations. The simplest strategy for distributing collocation points is to
randomly scatter them throughout the domain and increase the density of points
as network training progresses. Other strategies include evolutionary
sampling, which gradationally aggregates points in areas of high PDE loss
residuals [Daw et al., (2022)], or the importance method, which samples
collocation points according to a distribution proportional to the loss
function [Nabian et al., (2021)]. Currently, one of the major obstacles in
developing a PINN-based solver for three-dimensional reconstruction of space
plasmas is the poor scaling to multiple dimensions. The previously mentioned
density-based strategy requires increasingly significant computational
resources as the dimensionality goes up [Bard and Dorelli, (2021)]. In this
paper, we present two novel curriculum-training-based approaches using
lightweight collocation point distributions that better scale to multiple
dimensions. We apply these methods to a PINN which recovers a full two-
dimensional MHD solution from a partial sample of simulated spacecraft
observations. We find that the new strategy leads to a significant decrease in
training time and simultaneously enhances the quality of the reconstructed
solution.

##  2 Model Setup

We use a PINN designed to reconstruct two-dimensional MHD solutions given
partial linear samples of the original solution, mimicking the reconstruction
of space environments from satellite data. This extends the one-dimensional
network of [Bard and Dorelli, (2021)] to two dimensions. The rebuild of
higher-dimensional plasma space-time is interpreted as a regression problem of
form

$\displaystyle\mathbf{U}^{st}\approx
f([\mathbf{x};\mathbf{y};\mathbf{t}]\mid\mathbf{\theta})\coloneqq\mathbf{U}_{net}(x,y,t)$
(1)

where $\mathbf{U}^{st}$ is the full MHD solution, $\mathbf{x}$ and
$\mathbf{y}$ are the spatial positions, and $\mathbf{t}$ is time. $[~{};~{}]$
denotes concatenation and $\theta$ are model parameters that are to be found
through training. The approximated solution $\mathbf{U}_{net}$ follows both a
physical constraint

$\displaystyle\frac{\partial\mathbf{U}_{net}}{\partial
t}+F(\mathbf{U}_{net},\frac{\partial\mathbf{U}_{net}}{\partial
x})+G(\mathbf{U}_{net},\frac{\partial\mathbf{U}_{net}}{\partial y})=0$ (2)

and a boundary data constraint

$\displaystyle\mathbf{U}_{net}(x_{i},y_{i},t_{i})=\mathbf{U}^{st}_{i},\;i=1\dots
N_{d}$ (3)

for $N_{d}$ coordinates of $(x,y,t)$ in space-time. $F$ and $G$ are the two-
dimensional MHD fluxes (see Appendix A.2 for further details).

In order to mimic satellite observations in space, every experiment builds on
four randomly chosen linear trajectories that are constrained to cover the
full time range but only a small part of the spatial domain. We emulate sparse
craft measurements by sampling a portion of approximately $10^{-6}$ points per
trajectory in comparison to the full space-time grid. As recent PINNs
primarily incorporate dense neural networks [Chiu et al., (2022), e.g. Hennigh
et al., (2020)], we implement our PINN as a Multi-Layer Perceptron Regressor
[Rosenblatt, (1958); Mcculloch and Pitts, (1943)]. Its weights are trained by
the ADAM optimizer [Kingma and Ba, (2014)] while respecting a predefined
learning rate schedule [You et al., (2019)] to improve the convergence curve
of the model [Bard and Dorelli, (2021)]. Hyperparameters are tuned using the
Tree-structured Parzen Estimator Approach [Bergstra et al., (2011)] and trials
get pruned by applying median pruning. We enforce five startup runs during
which the pruning is disabled.

The loss function is defined as $L_{PINN}=(L_{data}+\lambda
L_{phys})/(1+\lambda)$ where $L_{data},L_{phys}$ represent the data and
physical loss, and $\lambda$ is a trade-off parameter balancing these two. The
physical loss is evaluated at collocation points distributed within the
reconstruction domain. Previous work reconstructing plasma solutions around
spacecraft trajectories [Bard and Dorelli, (2021)] used density-based
collocation point sampling in which the density of collocation points in
space-time increases over the training interval. However, this does not scale
well to higher spatial dimensions; in fact, the density-based run time can be
expressed as $\mathcal{O}(n_{T}+n_{C}^{d+1})$ [Mala and Ali, (2022)], where
$n_{T}$ is the number of data points and $n_{C}$ is the number of collocation
points required to satisfy a specific collocation density in each of the $d$
spatial dimensions and one time dimension. Increasing the density has a larger
effect on runtime with increasing dimensionality.

Hence, the collocation point sampling method needs to be independent of the
problem dimensionality for the PINN to scale well. Thus, we define the set of
sampled collocation points per epoch as a constant matching the number of
spacecraft observations, which results in a linear runtime of
$\mathcal{O}(n_{T}+n_{C})\cong\mathcal{O}(n_{T})$. This provides a significant
speedup in comparison to density-based collocation point sampling, but we must
be intentional in how we distribute the points.

##  3 Curriculum Strategies

The beginnings of curriculum learning in the field of ML can at least be
backtraced to [Elman, (1993)]. Inspired by human education, it is based on the
idea of guiding a learning process by increasing the difficulty level of tasks
over time [Bengio et al., (2009); Soviany et al., (2021)]. Originally, this is
done by feeding a model easy-to-learn data first, and then gradually
transitioning to more complex data concepts [Bengio et al., (2009)].
Curriculum training has already demonstrated its potential to improve various
machine learning models for different applications, for instance MLPs for
healthcare prediction [El-Bouri et al., (2020)], CNNs for computer vision
[Jafarpour et al., (2021)], RNNs for language modeling [Shi et al., (2014)],
and even PINNs for solving one-dimensional MHD problems [Krishnapriyan et al.,
(2021)]. Here, we propose two novel curriculum strategies for our PINN
training.

(a) Cuboid sampling step 0 (b) Cuboid sampling step 1 (c) Cuboid sampling step
2 (d) Cylinder sampling step 0 (e) Cylinder sampling step 1 (f) Cylinder
sampling step 2

Figure 1: Evolution of collocation point distributions for the Cuboid and
Cylinder Curriculum methods over several training epochs.

First, we define a sampling method whereby the initial collocation point
distribution is a cuboid covering the full space domain but only in a very
small time range starting at $t_{0}$. As training progresses, the cuboid
gradually extends along the time axis, eventually encompassing the full
reconstruction domain. In this way, the model first builds up an accurate
reconstruction of the time-dependent behavior at initial times and then
expands this knowledge throughout the training (an example is shown in Figure
1). Analogously, the model could also be supported in its training by
stretching out the cuboid to the full (x, t) domain and extending along y, or
to the full (y, t) domain and extending along x. This is referred to as the
cuboid curriculum method.

Alternatively, we hypothesize that regions closer to the sparse training data
points are easier to reconstruct than ones further away in space-time. To take
advantage of this, we distribute collocation points in small-radius spheres
around the labeled training data and then stepwise increase the radii of these
bubbles until they cover the whole space-time domain. For our specific use-
case here (Sec. 2), the data points are arranged linearly in space;
consequently, the collocation points are located in a cylinder with increasing
radius (e.g. Figure 1) around the linear spacecraft trajectories. This
strategy is referred to as the cylinder curriculum method, though it can be
generalized to a bubble method.

##  4 Results

We test the curriculum training methods on three different datasets. First, an
MHD reconnection benchmark from [Birn et al., (2001)] (name: GEM) of the
following resolution: $-25.60\leq x<25.60$ with $\Delta x=0.04$, $-7.68\leq
y<7.68$ with $\Delta y=0.04$, and $0\leq t\leq 90$ with $\Delta t=0.45$;
resulting in a mesh of $1280\times 384\times 201$ (correspondingly
$98,795,520\approx 10^{8}$ points in total). Second, we use a 2D Riemann
Problem based on Case 3 from [Liska and Wendroff, (2003)] (name: LW3). Since
this is technically a hydrodynamic benchmark, we artificially inflate its
plasma state vectors by adding the magnetic variables $B$ and setting them to
zero. We run the base simulation until $t=0.35$ with an output every $\Delta
t=5\times 10^{-3}$. The spatial dimensions are resolved as $0\leq x<1$ with
$\Delta x\approx 5\times 10^{-4}$, and $0\leq y<1$ with $\Delta y\approx
5\times 10^{-4}$; leading to a grid of $2048\times 2048\times 71$ and a total
of $297,795,584\approx 3\times 10^{9}$ voxels. Finally, we explore an MHD
vortex [Orszag and Tang, (1979)] designed to study turbulence (name: OT). It
is represented as a mesh of $1024\times 1024\times 50$ (consequently
$98,795,520\approx 10^{8}$ overall points) where $0\leq x<1$ with $\Delta
x\approx 10^{-2}$, $0\leq y<1$ with $\Delta y\approx 10^{-3}$, and $0\leq t<1$
with $\Delta t=0.02$.

Figure 2: PINN convergence epoch for the GEM data (left axes), the LW3 data
(center axes), and the OT test data (right axes).

In addition to the cuboid and cylinder curriculum methods, we test a baseline
strategy of randomly distributing the collocation points throughout the full
space-time domain, also resampling them every epoch. We train the models for a
maximum of 5,000 epochs, with the curriculum training covering the initial
$30\%$ (1500 epochs) of the training period. We extend the collocation point
distribution five (15) times for the cuboid (cylinder) method, or every 300
(100) epochs until full coverage. This was experimentally chosen to ensure
high accuracy. 50 experiments were run for each dataset and curriculum method.
Each trial took about six minutes on an Nvidia Tesla V100 GPU at the Compute
Cloud of the Leibniz Supercomputing Centre (45 computing hours total).

Figures 2 and 3 show the mean squared error and the training speed as measured
by the average number of epochs to convergence. We find that the curriculum-
trained networks converged faster and to a lower error than the random-
collocation-trained network. On average, the curriculum networks took $\approx
35\%$ fewer epochs to converge, though the cuboid+GEM model took approximately
the same amount of epochs as the random+GEM model. Thus, the cylinder (or
bubble) method performed slightly better overall than the cuboid method,
albeit this depends on the scenario. Finally, the reconstruction accuracy
increased: the cuboid and cylinder curriculum methods achieved an improvement
of up to $\approx 72\%$, and $\approx 32\%$ on average.

Figure 3: PINN mean squared error for the GEM data (left axes; purple), the
LW3 data (center axes), and the OT test data (right axes).

##  5 Discussion and Conclusion

We find that the curriculum training method for distributing collocation
points significantly enhances PINN MHD reconstructions, simultaneously
boosting accuracy and reducing time to convergence. However, we note that our
results depend on the scenario and the models’ initializations. Although the
experiments here are robust, it is not guaranteed that our findings are
universally applicable to every plasma environment. We note that
hyperparameters, including the number of collocation points and the rate of
expansion for the distribution, greatly influence the results. Future work may
look for heuristics to fully exploit these strategies, possibly taking
advantage of local loss errors [Nabian et al., (2021)]. Alternatively, the
methods can be applied to 3D simulations. We envision an even more powerful
runtime supremacy here, though this remains to be tested.

## References

  * Bard and Dorelli, (2021) Bard, C. and Dorelli, J. (2021).  Neural network reconstruction of plasma space-time.  Frontiers in Astronomy and Space Sciences, 8:146–160.
  * Bengio et al., (2009) Bengio, Y., Louradour, J., Collobert, R., and Weston, J. (2009).  Curriculum learning.  In Proceedings of the 26th Annual International Conference on Machine Learning, ICML ’09, page 41–48, New York, NY, USA. Association for Computing Machinery.
  * Bergstra et al., (2011) Bergstra, J., Bardenet, R., Bengio, Y., and Kégl, B. (2011).  Algorithms for hyper-parameter optimization.  In Shawe-Taylor, J., Zemel, R., Bartlett, P., Pereira, F., and Weinberger, K. Q., editors, Advances in Neural Information Processing Systems, volume 24. Curran Associates, Inc.
  * Birn et al., (2001) Birn, J., Drake, J. F., Shay, M. A., Rogers, B. N., Denton, R. E., Hesse, M., Kuznetsova, M., Ma, Z. W., Bhattacharjee, A., Otto, A., and Pritchett, P. L. (2001).  Geospace environmental modeling (gem) magnetic reconnection challenge.  jgr, 106(A3):3715–3720.
  * Camporeale, (2019) Camporeale, E. (2019).  The challenge of machine learning in space weather nowcasting and forecasting.
  * Chiu et al., (2022) Chiu, P.-H., Wong, J. C., Ooi, C., Dao, M. H., and Ong, Y.-S. (2022).  CAN-PINN: A fast physics-informed neural network based on coupled-automatic–numerical differentiation method.  Computer Methods in Applied Mechanics and Engineering, 395:114909.
  * Daw et al., (2022) Daw, A., Bu, J., Wang, S., Perdikaris, P., and Karpatne, A. (2022).  Rethinking the importance of sampling in physics-informed neural networks.
  * El-Bouri et al., (2020) El-Bouri, R., Eyre, D., Watkinson, P., Zhu, T., and Clifton, D. (2020).  Student-teacher curriculum learning via reinforcement learning: Predicting hospital inpatient admission location.
  * Elman, (1993) Elman, J. L. (1993).  Learning and development in neural networks: the importance of starting small.  Cognition, 48(1):71–99.
  * Hennigh et al., (2020) Hennigh, O., Narasimhan, S., Nabian, M. A., Subramaniam, A., Tangsali, K., Rietmann, M., Ferrandis, J. d. A., Byeon, W., Fang, Z., and Choudhry, S. (2020).  Nvidia simnet tm: an ai-accelerated multi-physics simulation framework.
  * Jafarpour et al., (2021) Jafarpour, B., Pogrebnyakov, N., and Sepehr, D. (2021).  Active curriculum learning.  In InterNLP 2021. First Workshop on Interactive Learning for Natural Language Processing, pages 40–45, United States. Association for Computational Linguistics.  First Workshop on Interactive Learning for Natural Language Processing. InterNLP 2021 ; Conference date: 05-08-2021 Through 05-08-2021.
  * Karniadakis et al., (2021) Karniadakis, G. E., Kevrekidis, I. G., Lu, L., Perdikaris, P., Wang, S., and Yang, L. (2021).  Physics-informed machine learning.  Nature Reviews Physics, 3(6).
  * Kingma and Ba, (2014) Kingma, D. P. and Ba, J. (2014).  Adam: A method for stochastic optimization.
  * Krishnapriyan et al., (2021) Krishnapriyan, A., Gholami, A., Zhe, S., Kirby, R., and Mahoney, M. (2021).  Characterizing possible failure modes in physics-informed neural networks.
  * Kronberg et al., (2021) Kronberg, E. A., Hannan, T., Huthmacher, J., Münzer, M., Peste, F., Zhou, Z., Berrendorf, M., Faerman, E., Gastaldello, F., Ghizzardi, S., Escoubet, P., Haaland, S., Smirnov, A., Sivadas, N., Allen, R. C., Tiengo, A., and Ilie, R. (2021).  Prediction of soft proton intensities in the near-earth space using machine learning.  The Astrophysical Journal, 921(1):76.
  * Liska and Wendroff, (2003) Liska, R. and Wendroff, B. (2003).  Comparison of several difference schemes on 1d and 2d test problems for the euler equations.  SIAM Journal on Scientific Computing, 25(3):995–1017.
  * Mala and Ali, (2022) Mala, F. and Ali, R. (2022).  The big-o of mathematics and computer science.  6:1–3.
  * Mcculloch and Pitts, (1943) Mcculloch, W. and Pitts, W. (1943).  A logical calculus of ideas immanent in nervous activity.  Bulletin of Mathematical Biophysics, 5:127–147.
  * Michoski et al., (2020) Michoski, C., Milosavljevic, M., Oliver, T., and Hatch, D. (2020).  Solving differential equations using deep neural networks.  Neurocomputing, 399.
  * Münzer, (2022) Münzer, M. (2022).  marcus-muenzer/Neural-Network-Reconstruction-of- higher-dimensional-Plasma-Space-Time: Release Version V1.0 (github, zenodo).
  * (21) Münzer, M. and Bard, C. (2022a).  Gem plasma space-time (zenodo).
  * (22) Münzer, M. and Bard, C. (2022b).  Lw3 plasma space-time (zenodo).
  * (23) Münzer, M. and Bard, C. (2022c).  Ot plasma space-time (zenodo).
  * Nabian et al., (2021) Nabian, M. A., Gladstone, R. J., and Meidani, H. (2021).  Efficient training of physics-informed neural networks via importance sampling.  Computer-Aided Civil and Infrastructure Engineering, 36(8):962–977.
  * Nishizuka et al., (2021) Nishizuka, N., Kubo, Y., Sugiura, K., Den, M., and Ishii, M. (2021).  Operational solar flare prediction model using deep flare net.
  * Orszag and Tang, (1979) Orszag, S. A. and Tang, C. M. (1979).  Small-scale structure of two-dimensional magnetohydrodynamic turbulence.  Journal of Fluid Mechanics, 90:129–143.
  * Raissi et al., (2019) Raissi, M., Perdikaris, P., and Karniadakis, G. (2019).  Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations.  Journal of Computational Physics, 378:686–707.
  * Rosenblatt, (1958) Rosenblatt, F. (1958).  The perceptron: a probabilistic model for information storage and organization in the brain.  Psychological review, 65(6):386.
  * Shi et al., (2014) Shi, Y., Larson, M., and Jonker, C. (2014).  Recurrent neural network language model adaptation with curriculum learning.  Computer Speech and Language, 33.
  * Soviany et al., (2021) Soviany, P., Ionescu, R. T., Rota, P., and Sebe, N. (2021).  Curriculum learning: A survey.
  * Weinan et al., (2021) Weinan, E., Jiequn, H., and Arnulf, J. (2021).  Algorithms for solving high dimensional PDEs: from nonlinear monte carlo to machine learning.  Nonlinearity, 35(1):278–310.
  * You et al., (2019) You, K., Long, M., Wang, J., and Jordan, M. I. (2019).  How does learning rate decay help modern neural networks?

##  Appendix A Appendix

###  A.1 Reproducing Experiments

The experiments are based on the code of [Münzer, (2022)].
We use the following datasets: GEM [Münzer and Bard, 2022a ], LW3 [Münzer and
Bard, 2022b ], and OT [Münzer and Bard, 2022c ].

###  A.2 MHD Equations

The three-dimensional magnetohydrodynamic equations (using primitive
variables) are:

$\displaystyle\frac{\partial\rho}{\partial t}+\nabla\cdot(\rho\vec{v})=0$ (4)
$\displaystyle\rho\frac{\partial\vec{v}}{\partial
t}+\rho\vec{v}\cdot\nabla\vec{v}=-\nabla
P+(\nabla\times\vec{B})\times\vec{B}+{\color[rgb]{1,0,0}\rho\nu\nabla^{2}\vec{v}}$
(5) $\displaystyle\frac{\partial P}{\partial t}+\vec{v}\cdot\nabla P+\gamma
P\nabla\cdot\vec{v}=0$ (6) $\displaystyle\frac{\partial\vec{B}}{\partial
t}=\nabla\times\left(\vec{v}\times\vec{B}\right)+{\color[rgb]{1,0,0}\eta\nabla^{2}\vec{B}}$
(7) $\displaystyle\nabla\cdot\vec{B}=0$ (8)

We note that the ideal MHD equations do not contain the terms in red, which
are the effects of viscosity ($\nu\nabla^{2}\vec{v}$) and resistivity
($\eta\nabla^{2}\vec{B}$). The simulations used to generate the test problems
in this paper (LW3, GEM, OT) did not include these terms. However, based on
results from [Michoski et al., (2020)] and [Bard and Dorelli, (2021)], we add
these terms to the PINN loss function in order to smooth out and better
reconstruct the final solution near discontinuities (e.g., shock fronts). We
clarify that the PINN cannot reproduce a discontinuous solution; however,
adding viscosity and resistivity terms helps reproduce a steep, smooth
solution where there is a discontinuity in the original simulation.

For the 2D PINN used in this paper, we convert these equations to two spatial
dimensions by assuming $\partial/\partial z=\partial^{2}/\partial z^{2}=0$.
The full set of equations, expanded out to individual derivatives, is:

$\displaystyle\frac{\partial\rho}{\partial t}+\frac{\partial(\rho
v_{x})}{\partial x}+\frac{\partial(\rho v_{y})}{\partial y}=0$
$\displaystyle\rho\frac{\partial v_{x}}{\partial t}+\rho v_{x}\frac{\partial
v_{x}}{\partial x}+\rho v_{y}\frac{\partial v_{x}}{\partial y}+\frac{\partial
P}{\partial x}+B_{z}\frac{\partial B_{z}}{\partial
x}+B_{y}\left(\frac{\partial B_{y}}{\partial x}-\frac{\partial B_{x}}{\partial
y}\right)-\rho\nu\left(\frac{\partial^{2}v_{x}}{\partial
x^{2}}+\frac{\partial^{2}v_{x}}{\partial y^{2}}\right)=0$
$\displaystyle\rho\frac{\partial v_{y}}{\partial t}+\rho v_{x}\frac{\partial
v_{y}}{\partial x}+\rho v_{y}\frac{\partial v_{y}}{\partial y}+\frac{\partial
P}{\partial y}-B_{x}\left(\frac{\partial B_{y}}{\partial x}-\frac{\partial
B_{x}}{\partial y}\right)+B_{z}\frac{\partial B_{z}}{\partial
y}-\rho\nu\left(\frac{\partial^{2}v_{y}}{\partial
x^{2}}+\frac{\partial^{2}v_{y}}{\partial y^{2}}\right)=0$
$\displaystyle\rho\frac{\partial v_{z}}{\partial t}+\rho v_{x}\frac{\partial
v_{z}}{\partial x}+\rho v_{y}\frac{\partial v_{z}}{\partial
y}-B_{y}\frac{\partial B_{z}}{\partial y}-B_{x}\frac{\partial B_{z}}{\partial
x}-\rho\nu\left(\frac{\partial^{2}v_{z}}{\partial
x^{2}}+\frac{\partial^{2}v_{z}}{\partial y^{2}}\right)=0$
$\displaystyle\frac{\partial P}{\partial t}+v_{x}\frac{\partial P}{\partial
x}+v_{y}\frac{\partial P}{\partial y}+\gamma P\left(\frac{\partial
v_{x}}{\partial x}+\frac{\partial v_{y}}{\partial y}\right)=0$
$\displaystyle\frac{\partial B_{x}}{\partial t}-\frac{\partial}{\partial
y}\left(v_{x}B_{y}-v_{y}B_{x}\right)-\eta\left(\frac{\partial^{2}B_{x}}{\partial
x^{2}}+\frac{\partial^{2}B_{x}}{\partial y^{2}}\right)=0$
$\displaystyle\frac{\partial B_{y}}{\partial t}+\frac{\partial}{\partial
x}\left(v_{x}B_{y}-v_{y}B_{x}\right)-\eta\left(\frac{\partial^{2}B_{y}}{\partial
x^{2}}+\frac{\partial^{2}B_{y}}{\partial y^{2}}\right)=0$
$\displaystyle\frac{\partial B_{z}}{\partial t}-\frac{\partial}{\partial
x}\left(v_{z}B_{x}-v_{x}B_{z}\right)+\frac{\partial}{\partial
y}\left(v_{y}B_{z}-v_{z}B_{y}\right)-\eta\left(\frac{\partial^{2}B_{z}}{\partial
x^{2}}+\frac{\partial^{2}B_{z}}{\partial y^{2}}\right)=0$
$\displaystyle\frac{\partial B_{x}}{\partial x}+\frac{\partial B_{y}}{\partial
y}=0$

The values for $\nu$ and $\eta$ are set by hyperparameter optimization with
respect to the overall training loss. The final values suggested by the
optimization are: $\nu=1.24*10^{-4}$ and $\eta=1.88*10^{-3}$ (GEM);
$\nu=1.58*10^{-3}$ and $\eta=6.87*10^{-3}$ (LW3); $\nu=2.76*10^{-3}$ and
$\eta=5.59*10^{-3}$ (OT). We note that [Bard and Dorelli, (2021)] tested the
effect of changing $\nu$ on the reconstructed solution for a 1D MHD shock
tube; that study found that the best value for $\nu$ depends on the problem.
This motivated us to use hyperparameter optimization for choosing appropriate
values.