## 2 Materials and Methods
### Simulating Real-World Data Using Noise  
This study explored the application of synthesized noise to the WESAD dataset. This approach aimed to enhance the robustness and applicability of machine learning models by evaluating their performance under simulated conditions that reflect the complexity of real-world scenarios.  
Recognizing the ubiquity and impact of environmental noise on data quality, the decision was made to employ Gaussian noise as the primary method for this simulation. The Gaussian noise model was chosen for its ability to represent a wide range of common  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Architecture** & **Description** \\ \hline
**FCN** & \(\text{N}^{1}\times[\text{CL}^{2}-\text{CL}-\text{CL}]-\text{FC}^{3}\) \\
**ResNet** & \(\text{N}\times[\text{ResBlock}^{4}-\dots-\text{ResBlock}]-\text{FC}\) \\
**MLP** & \(\text{N}\times[\text{FC}-\dots-\text{FC}]-\text{FC}\) \\
**Encoder** & \(\text{N}\times[\text{CL}-\text{CL}-\text{CL}-\text{Att}^{5}]-\text{FC}\) \\
**Time-CNN** & \(\text{N}\times[\text{CL}-\text{CL}]-\text{FC}\) \\
**CNN-LSTM** & \(\text{N}\times[\text{CL}-\text{CL}-\text{LSTM}^{6}]-\text{FC}\) \\
**MLP-LSTM** & \(\text{N}\times[\text{FC}-\dots-\text{FC}-\text{LSTM}]-\text{FC}\) \\
**MC-DCNN** & \(\text{N}\times[\text{CL}-\text{CL}]-\text{FC}-\text{FC}\) \\
**Inception** & \(\text{N}\times[\text{Inc}^{2}]-\text{FC}\) \\ \hline \hline \end{tabular} Note: \({}^{1}\) N = number of signals; \({}^{2}\) CL = convolutional layer; \({}^{3}\) FC = fully connected layer; \({}^{4}\) ResBloc = residual block with 3 CLs; \({}^{5}\) Att = Attention module; \({}^{6}\) LSTM = long short-term memory module; \({}^{7}\) Inc = inception module.  
\end{table}
Table 2: Summary of deep learning architectures.  
noise types encountered in everyday settings, thereby ensuring that the generated synthetic dataset possessed a realistic degree of variability and complexity.  
We implemented a Gaussian noise function to generate noise. To not introduce bias to our models, we used a zero average Gaussian function with a fixed standard deviation. We ran the models for the following ten pre-defined values, signal to noise ratio (\(SNR\)s) = {0.001, 0.01, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6}, so as to reproduce the range of \(SNR\)s seen in prior real-world wearable data [55]. For a given \(SNR\), the standard deviation, \(\sigma\), was provided by Equation (1):  
\[\sigma=\frac{E\big{(}S^{2}\big{)}}{SNR}\, \tag{1}\]  
where \(E\big{(}S\big{)}\) is the expectation of signal \(S\). Thus, the modified Gaussian noise WESAD value for a given signal \(S\) can be expressed as given by Equation (2):  
\[S_{GN}=S+N(0,\sigma^{2}) \tag{2}\]  
where \(N\big{(}0,\sigma^{2}\big{)}\) is the Gaussian function.  
For each \(SNR\), noise was added to the WESAD dataset, generating a noisy set, \(SNR\)i. Each \(SNR\) value was generated five times, to reduce results variance for each of the \(SNR\)s. This resulted in 100 datasets, all of which were then tested on the feature-based models. Because of the significant limitations associated with running the large end-to-end models (high computation time and cost), the results of the feature-based models were analyzed to assess if the number of datasets could be reduced. Results will be discussed in the following section, but based on the feature-based model results, the \(SNR\)s for end-to-end models were reduced to only four cases, \(SNR\)s = {0.01, 0.1, 0.15, 0.4}.