## 6 Conclusions  
We focused on designing a cloud-based platform for developing machine learning-based analytics solutions for wearable sensor data by protecting the integrity of the collected health data. A symmetric-key homomorphic encryption scheme was used for privacy-preserving computation in the cloud within machine learning-based models. We presented CipherML, a C++ framework for training and deploying learning approaches on homomorphically encrypted data. The proposed privacy-preserving framework is applied to distinguish atrial fibrillation from normal rhythms, other abnormal rhythms, and noise from short single-lead ECGsignals acquired by a wearable device. Two different approaches have been investigated for atrial fibrillation detection: a machine learning-based method using a feature engineering step, and a fully data-driven approach directly using the encrypted raw ECG signal. In the first scenario, the wearable device collects the ECG signal, extracts the features from the recording, performs encryption, and sends the encrypted feature data to the cloud for machine learning-based classification. However, this is not feasible for devices with limited computation capabilities. Moreover, transmitting only the extracted features has little use outside of a specific predetermined scenario, a considerable limitation that prevents the data being reused for further analytics and the development of other prediction tools. Therefore, in the second approach, the wearable device encrypts the raw ECG recording and sends it to the cloud for deep-learning-based classification. Although the CNN model achieves a lower mean F1-score than the model trained on hand-crafted features, classification performance can be further improved by increasing the amount of training data. This approach has the primary advantage of removing the requirement to extract problem-specific hand-crafted features, allowing the model to choose what to focus on based on the problem being addressed. Although the presented algorithms are trained on encrypted data, they achieve a performance comparable to that of existing plaintext solutions. In both scenarios, the input data from the wearable device is encrypted and sent to the cloud for further processing by the AI models. Within seconds, the outcome of the computation is obtained and returned to the user in encrypted form, which can be interpreted only after decryption. This proof-of-concept study aims to assess the ability of cloud AI-based analytics software solutions to process personal ECG data without compromising privacy. Our AF detection experiments prove that the combination of homomorphic encryption and learning-based models is effective in building privacy-preserving classification systems while maintaining a runtime that is feasible for real-world applications. Overall, we identify two main limitations of the current study that should be addressed in future research activities. First, the CipherML library has a series of limitations: max-pooling cannot be formulated because no comparison operations can be performed on ciphertexts, the only optimizer currently available is SGD, and advanced training strategies such as gradient clipping, learning rate decay, or early stopping are not supported because they rely on comparison operations. Second, the MORE encryption scheme is a fundamentally different approach compared to standard FHE schemes based on modulo operations over integers, where security is based on the difficulty of factorizing large numbers. The adopted scheme based on linear operations over continuous variables is known to be vulnerable in cases where there are known pairs of plaintext-ciphertext values with the same key (i.e., chosen ciphertext attack). However, this is not a disabling feature for this particular scenario since the plaintext data are never disclosed or distributed. On a different note, although privacy and security are critical aspects and should be enforced, compromising data availability and usability will not be a sustainable solution.