HumekaFL: Automated Detection of Neonatal Asphyxia Using Federated Learning DOI: XXXXXXX.XXXXXXX Conference: Make sure to enter the correct conference title from your rights confirmation emai; July 8-11, 2024; IIIT-Delhi, India ISBN: 978-1-4503-XXXX-X/18/06 Pamely Zantou, Blessed Guda, Bereket Retta, Gladys Inabeza, Carlee Joe-Wong, Assane Gueye Abstract . Birth Apshyxia (BA) is a severe condition characterized by insufficient supply of oxygen to a newborn during the delivery. BA is one of the primary causes of neonatal death in the world. Although there has been a decline in neonatal deaths over the past two decades, the developing world, particularly sub-Saharan Africa, continues to experience the highest under-five (<5) mortality rates. While evidence-based methods are commonly used to detect BA in African healthcare settings, they can be subject to physician errors or delays in diagnosis, preventing timely interventions. Centralized Machine Learning (ML) methods demonstrated good performance in early detection of BA but require sensitive health data to leave their premises before training, which does not guarantee privacy and security. Healthcare institutions are therefore reluctant to adopt such solutions in Africa. To address this challenge, we suggest a federated learning (FL)-based software architecture, a distributed learning method that prioritizes privacy and security by design. We have developed a user-friendly and cost-effective mobile application embedding the FL pipeline for early detection of BA. Our Federated SVM model outperformed centralized SVM pipelines and Neural Networks (NN)-based methods in the existing literature. 1. ML-based Early Detection of BA Faces Deployment Challenges Early detection of BA and timely intervention can facilitate full recovery for infants with mild or moderate asphyxia. Conversely, delayed detection results in prolonged oxygen deprivation, leading to permanent injuries that may impact various organs such as the brain, heart, lungs, kidneys, and bowels or other organs. Research in the healthcare community has also established that a baby’s cry immediately after birth plays a crucial role in language acquisition ( Kheddache and Tadj 2019 ) . An infant crying vigorously after birth accounts for an APGAR (Appearance, Pulse, Grimace, Activity, and Respiration) score of 2 ( Kheddache and Tadj 2019 ) . Consequently, a weak or delayed cry can serve as an indicator of birth asphyxia. Moreover, babies’ cries have been used extensively to build technological solutions to detect BA. Ubenwa, developed by ( Onu et al. 2017 ) stands as a leading ML-powered diagnostic mobile application leveraging newborn cries for BA detection. Research addressing automated diagnosis of neonatal asphyxia has explored a range of methods and modalities. Automatic speech recognition (ASR) stands out as a widely used and successful approach. Various machine learning (ML) methods have been applied in ASR research for BA classification. Traditional ML classifiers like Support Vector Machine (SVM), K-Nearest Neighbor (KNN) and deep learning (DL) methods such as Convolutional Neural Network (CNN) or Graph Neural Networks (GNN) have demonstrated good performance on BA detection ( Ji et al. 2021 ) . While many research efforts focus on cry analysis and classification, only a few have been deployed in healthcare facilities to aid healthcare professionals in improving BA diagnosis, particularly in the developing world. For example, Ubenwa has been tested in hospitals in Nigeria and Canada but has yet to achieve widespread adoption and deployment across sub-Saharan Africa’s healthcare space. Three deployment challenges might impede the integration of ML-based solutions like Ubenwa into the sub-Saharan healthcare facilities: (1) Privacy and security concerns due to the high sensitivity of healthcare data which centralized methods of leveraging ML pipelines do not always ensure primarily because health data have to leave their premises. HumekaFL addresses this by leveraging a federated learning pipeline. (2) The lack of computing resources to train large ML models. HumekaFL solves this by using smaller models and harnessing the power of mobile devices. (3) The absence of user-friendly ML-based solutions which do not require prior knowledge to assist health professionals and verified parents or caregivers in identifying BA. To be addressed effectively, these problems require health professionals, policymakers and technologists to collaborate and provide sustainable and responsible solutions. We propose HumekaFL 1 1 1 This research is named HumekaFL, a blend of “Humeka”, which means “Breathe” in Kinyarwanda and ”FL”, an abbreviation for Federated Learning. Kinyarwanda is the national language spoken in Rwanda and in some neighboring countries in the East African region. Therefore, HumekaFL represents a federated learning solution geared toward helping infants breathe . , an affordable and user-friendly (requiring no prior training) software application that utilizes machine learning to detect BA. In doing so, we design an end-to-end system architecture that can be readily deployed by healthcare facilities and respects the privacy needs of their sensitive data. To meet these challenges, we use a federated learning (FL) architecture that does not require sensitive data to leave its premises. We thus address the three AI deployment challenges raised above: by running on commodity hardware and requiring no prior training, HumekaFL does not require specialized equipment or advanced skills. 2. Early Detection of BA Using Federated Learning System Architecture . HumekaFL leverages an ML pipeline that employs FL to detect BA. Federated learning (FL) is a distributed learning approach which enables training models across several clients devices using their local data while ensuring data privacy (Figure 2 ) ( McMahan et al. 2017 ) . HumekaFL uses a cross-silo and centralized federated learning architecture to train a model and make inference on local data. In particular, multiple local clients – they can be mobile devices, computers or more powerful computing devices like servers, available in health facilities – in a simulated environment, each collect data and train local models based on this data. The models are periodically aggregated at a central server, which then pushes the aggregated model or global model back to the clients for subsequent updates. Typically, stochastic gradient descent or one of its variants is used for the model updates. The global model is obtained using an aggregation algorithm such as Federated Averaging (FedAvg) algorithms ( McMahan et al. 2017 ) , FedProx ( Li et al. 2020 ) or any other model aggregation technique. Figure 1 . System architecture Data Pre-processing . HumekaFL uses the Baby Chillanto Dataset courtesy of the National Institute of Astrophysics and Optical Electronics, CONACYT, Mexico ( Reyes-Galaviz et al. 2008 ) to train its ML pipeline. It is a small dataset which comprises 1,049 recordings from healthy neonates, 870 cry recordings from deaf infants, and 340 cry recordings from infants affected by perinatal asphyxia. The database encompasses five distinct types of cry signals, including those from deaf infants, infants with asphyxia, normal cries, and cries indicative of pain. Each audio recording is one second (1s) in duration and sampled at frequencies ranging from 8kHz to 16kHz, utilizing 16-bit PCM encoding. We use Mel-Frequency Cepstral Coefficients (MFCCs) to extract features from the newborns’ cries. Forty (40) MFCCs were used to represent every 1000 ms cry clip from the Baby Chillanto database. The Baby Chillanto Infant Cry database is small in size. This can present a challenge for ML/DL pipelines that typically benefit from larger datasets to enhance learning speed and performance. Consequently, we augmented the data. In our data augmentation process, we chose to bootstrap the dataset using two techniques: tanh() distortion and room reverberation. As a result of this augmentation, our dataset now comprises 1521 normal data points and 1028 asphyxiated data points. Tanh() distortion adds a rounded soft clipping to the audio signal. The distortion amount is proportional to the loudness of the input and its gain. The tanh function is symmetric. After adding a distortion, the positive and negative parts of the signal are squashed. Tanh function without distortion: (1) \frac{sinh(x)}{cosh(x)}=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}} Tanh function with distortion G added: (2) \frac{e^{x*(a+G)}-e^{x*(b-G)}}{e^{x*G}-e^{x*-G}} Room reverberation consists in creating audio signals by simulating the reverberation of sound inside rooms. To perform room reverberation, we use Room Impulse Response (RIR). The RIR is cleaned up and used to extract the main impulse, normalize the signal power, then flip along the time axis. Finally, the signal is convolved with a RIR filter. The last step in pre-processing the training data is extracting the most relevant MFCCs through a Random Forest Classifier. While our model is fed with the MFCCs extracted from the audio clips during training, we also pre-process the audio recorded with our mobile application before performing inference. Our mobile application records 10s of babies cry and passes it to our model for inference. The recorded audio signal might be noisy since it can be recorded either from the hospital by health professionals or anywhere else noisy by mothers or caregivers. Before sending the newborn cry to the pipeline we first use Google WebRTC Voice Activity Detector (VAD) ( Google 2011 ) algorithm to capture part of the signal with human speech (the baby’s cry in our case). Afterward, a Butterworth band-pass filter is applied to the signal to remove noise and extract a clean signal ready to be passed to the on-device model for classification. This clean data can then be utilized to re-train and refine the model. Although the current pipeline doesn’t incorporate the collected data for model updates, in future work we plan to integrate this data for continuous improvement of the model. Figure 2 . HumekaFL Diagnostic Process Federated SVM (FedSVM) . To classify newborns’ cries in a federated setting, we first decide the ML model to employ in training our data on distributed clients. HumekaFL leverages Support Vector Machine (SVM) to train the Baby Chillanto Dataset on ten (10) virtual silos (hospitals). There are few important considerations justifying this choice: (1) the size of the training dataset, which is relatively small, (2) computation efficiency in a resource-constrained environment (number of trainable parameters, speed/time and memory), (3) compliance to Stochastic Gradient Descent (SGD) optimization algorithm and (4) overall performance on the cry classification task based on the existing literature ( Onu et al. 2017 ) . SVM is known for its ability to efficiently learn complex decision boundaries from small high-dimensional dataset such as the Baby Chillanto. Furthermore, SVM is also recognized to use a very small number of parameters and amount of memory to learn decision boundaries, unlike state-of-the-art neural networks requiring heavy computation resources to learn the right signal in making decision. SVM – unlike Decision Trees – can use SGD to optimize its objective function. This is paramount for the federated aggregation of clients’ model gradients on the orchestration server in FL. Finally, SVM has demonstrated good performance on newborns’ cry classification ( Ji et al. 2021 ; Onu et al. 2017 ) . HumekaFL’s FedSVM consists in several client-server communication rounds in the training phase. Each round consists in local trainings of a shared SVM model followed by a transmission of selected silo’s gradients to the server. Client-server communication is coordinated by the FedAvg algorithm. Local training of SVM model . HumekaFL trains on each silo a feature-label (cry - asphyxia status) pairs (x^{k},y^{k})\epsilon R^{D} x \{-1,1\} where k = 1, ….., N, a linear kernel SVM classifier h(x)=w^{T}x which finds the regularized empirical risk or the averaged loss function l(h(x),y) over the entire dataset ( 3 ) and minimize it ( 4 ). (3) F(w)=\frac{\lambda}{2}\|\mathbf{w}\|^{2}_{2}+\frac{1}{n}\sum^{n}_{i=1}l(w^{T}x_{i},y_{i}) (4) \widehat{w}=\underset{w}{\operatorname{argmin}}F(w) where \lambda is a parameter controlling the strength of the regularization and l(w^{T}x_{i},y_{i})=max(0,1-w^{T}xy) which is the Hinge loss function. To solve the optimization problem in ( 4 ), we use the Adam optimization algorithm ( Kingma and Ba 2014 ) . Global SVM model . During each client-server communication round in the training phase, FedAvg randomly selects a group of clients from the available pool S_{t} of clients. To create the global SVM model, the parameters of each chosen client are weighted and averaged, with the weighting factor being proportional to the volume of data each client possesses. This translates into w_{glob}^{t+1}=\sum_{k\in S_{t}}\frac{n_{k}}{n}w_{k}^{t+1} where k\in S_{t} represents the k^{th} silo of the selected silos; \frac{n_{k}}{n} the ratio of data quantity on client k to the total data quantity; w_{k}^{t}+1 denotes the updated model of client k and w_{glob}^{t+1} the updated aggregated model. Client-server communication rounds continue until the global SVM model converges. Inference . Upon training, our FedSVM is integrated to the mobile application to perform inference. Figure 2 shows the inference pipeline. We record the baby’s voice using the mobile application. The recorded signal is then pre-processed – as described in the Data Pre-processing section 1 – followed by the diagnostic result thanks to the on-device FedSVM model. 3. Experiments and Results We conducted experiments to validate our FedSVM pipeline’s performance and embed our model on a hybrid mobile application. Figure 3 shows HumekaFL mobile application’s screens. Our approach consists in first training a SVM pipeline on the Baby Chillanto dataset. We compare our results with the SVM pipeline developed for Ubenwa, the automated diagnosis tool that uses the same training dataset ( Onu et al. 2017 ) . Our SVM model outperformed Ubenwa’s SVM model, achieving a sensitivity of 0.91 , a specificity of 0.96 and an unweighted average recall (UAR) of 0.93 . In contrast, the Ubenwa SVM model exhibited a sensitivity of 0.85, a specificity of 0.89 and a UAR of 0.87. The main difference between our SVM model and the Ubenwa model is the data augmentation, hyperparameter tuning, feature selection of MFCCs and the federated training setup. Models Metric Metric Values Ubenwa SVM Sensitivity 0.85 Ubenwa SVM Specificity 0.89 Ubenwa SVM UAR 0.865 HumekaFL SVM Sensitivity 0.91 HumekaFL SVM Specificity 0.96 HumekaFL SVM UAR 0.93 Table 1 . HumekaFL SVM model performance (a) Recording (b) Perfect baby (c) Asphyxiated baby Figure 3 . HumekaFL mobile application’s screens Our second set of experiments consist in training ten (10) clients over fifty (50) rounds. Each client trains its local model for five (5) epochs. HumekaFL FedSVM model demonstrated a good performance of 95.88% average accuracy following training. However, we need to conduct more experiments with physical healthcare clients to validate these preliminary results. Moreover, further experiments need to be using African health data to prevent biases and enhance our model performance in African healthcare settings. (a) Training Loss vs Communication rounds (b) Average Train Accuracy vs Communication rounds 4. Conclusion In this work, we propose HumekaFL an FL-based mobile application for early detection of newborn birth asphyxia. Our SVM-based federated pipeline, FedSVM, outperformed existing centralized SVM and NN-based models using the Baby Chillanto dataset. Data augmentation, hyperparameter tuning and feature selection in our federated environment revealed to be successful, but in future work, we will refine our current prototype by collaborating with Rwandan hospitals for African data collection. This will help us conduct clinical trials in health facilities and avoid possible biases resulting from not using African data for training our FedSVM pipeline. Additionally, we will incorporate privacy concerns through differential privacy suggested by ( Dwork 2006 ) . Furthermore, we will enhance the functionality of our FedSVM pipeline to securely utilize data from our mobile application for retraining purposes. 5.