A CNN was chosen for feature extraction on the CWT-derived PPG scalograms. In this architecture, ResNet blocks as described in [81] are combined in series following a preprocessing block with a large strided convolution followed by max pooling for dimensionality reduction. We otherwise sparingly make use of pooling and defer to convolution strides greater than unity or our downsampling, as convolutions are learned unlike in (the albeit computationally cheaper) pooling. The ResNet blocks are composed of near-identical sets of convolutions, normalizations, and activations with residual shortcuts, except that the first block of the pair employs a strided convolution. Training proceeded as standard for deep networks. Weight decay, a form of L2 regularization on the weights of the network to encourage model generalization, was set to λ = 0.0005. Mean absolute error was chosen as the loss function for optimization. In-line with prior work, learning rate α was chosen to be 0.001, and Adam was used as the optimizer with momentum of 0.9. A standard batch size of 32 training examples was used, and early stopping was employed to further reduce overfitting by limiting training to 20 epochs.
The model weights were serialized and saved to a cloud filestore to be accessed by the computation engine at runtime. By having the file stored in an object storage database rather than embedded in the processing code itself, the biosignal processing service did not require redeployment when the model changed – by intermittently reloading the model, the processing service would always be provided with the most up-to-date model in the event that the model was improved. A schematic of the signal processing pipeline is shown in Figure 4. The computation service backed by the ABP model was exposed to the internet through the same REST API shared by other processing endpoints such as heart rate and respiration rate, thus presenting a uniform interface for biosignal cloud computation to any authenticated mobile device with the Flutter app. Because the API received raw PPG signals of possibly variable sample rate and imprecise duration, preprocessing logic unique to the cloud environment was developed. Received PPG waveforms were segmented into 10 second groups according to their sample rate (which itself was also provided in the Hypertext Transfer Protocol (HTTP) request to the API), bandpass filtered from 0.8 to 8Hz, resampled such that the length of the segment was 1200 samples to match the shape of the original training segments, and transformed to a scalogram via a Morlet wavelet CWT from scales 20 to 140. A single SBP/DBP pair was then returned for display to the user.