## 4 Man-in-the-Middle (MITM) Attacks
### Differential Privacy to Mitigate MITM Attacks: An IoMT Case  
IoMT-based remote stress detection is seen as a promising solution for increasing the reach of mental healthcare to vulnerable people with no access to medical staff. Such solutions primarily employ IoMT sensors that measure physiological signals, such as those listed in Table 5. A deep learning method is proposed in [1], where an attention-based transformer network is shown to successfully detect stress in unseen people. Such an implementation requires all data to be transmitted to a central server for model training, thus exposing private information to the MITM attack [32; 33]. The same authors employ differential privacy in [34] to protect the IoMT and present a study on the trade-off between privacy and performance. Differential privacy is an established data protection mechanism, where each data signal is contaminated with additive noise before being sent to the central server for processing, as shown in Figure 3. In [34], a noise value \(v\) is sampled from a zero-mean Gaussian distribution with standard deviation \(\sigma=[0\ldots 1]\). In differential privacy terminology, this standard deviation is referred to as the noise multiplier, where \(\sigma=0\) indicates that the original signal is not altered and \(\sigma=1\) offers the highest protection with the highest noise level. Based on the setting of the noise multiplier, a privacy budget \(\varepsilon\) is calculated, estimating the potential risk of privacy leakage as follows in Equation (2) [35]:  
\[\varepsilon=\sqrt{2I\log(1/\delta)}\sigma+I(e^{\sigma^{2}/2}-1), \tag{2}\]  
where \(I\) is the number of training iterations, \(\delta\) is a hyperparameter usually set to a small value, and (\(\sigma\)) is the noise multiplier. In Figure 4, we present the results obtained with the proposed method using WESAD, a publicly available dataset. As can be seen, adding differential privacy (\(\sigma\
eq 0\)) to the transformer model for any of the data streams negatively impacts the performance of the model. The drop in accuracy when \(\sigma\) increases from 0 to 0.1 for each data stream is, on average, 20.6%, with a minimum of 18.4% in the case of the accelerometer data stream and a maximum of 22.8% for the electrocardiogram data stream. In contrast, the multimodal model (referred to as ALL in Figure 4) is significantly more robust when differential privacy is implemented, experiencing a drop in accuracy of 2.9% for \(\sigma=0.1\). As expected, the  
Figure 3: Differential privacy for securing IoMT data privacy. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Data Stream** & **Description** & **Relation to Stress** \\ \hline Electrocardiogram (ECG) & Measures heart activity & Indicates stress via heart rate variability \\ Electrodermal activity (EDA) & Measures skin conductance & Reflects emotional states \\ Temperature (Temp) & Measures skin temperature & Altered by stress-induced variations \\ Respiration (Resp) & Measures breathing patterns & Altered by stress levels \\ Accelerometer (ACC) & Captures movement data & Indicates physical restlessness due to stress \\ Electromyogram (EMG) & Measures muscle activity & Indicates muscular tension from stress \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Overview of data streams and their relation to stress. degradation in the stress detection rate increases with higher noise multipliers, but the highest drop of 6.1% is recorded with maximum privacy (i.e., \(\sigma=1\)), thus yielding an acceptable accuracy of 89.9% for the multimodal model (ALL). Finding the trade-off between privacy and accuracy is delicate and tightly related to the level of harm that might be caused if there were a breach of privacy. It follows that there is no blanket solution or optimum setting that always works best; instead, the trade-off needs to be adjusted for different scenarios and IoMT systems. As an example, the potential harm that might result from leaking data related to skin temperature is lower than that of data related to ECG.