## 5 Materials and Methods
### Contrastive Semantic Alignment
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & & & & & & **Macro-F1** & & & \\ \hline \multicolumn{3}{c}{**Source Domains**} & \multicolumn{3}{c}{**Target Domain**} & \multicolumn{3}{c}{**Proposed Multi-Source Models**} & \multicolumn{3}{c}{**Combined-Source Models**} \\ \hline
**Source 1** & **Source 2** & **Source 3** & **Target 1** & **M-FUDA (MMD)** & **M-FUDA (MK-MMD)** & **M-FUDA (MMD)** & **CORAL [72]** & **Wasserstein [89]** & **MCD [59,88]** \\ \hline
**S1** & **S2** & **S1 + S2** & **S3** & 0.83 & 0.86 & 0.78 & 0.81 & 0.82 & 0.76 \\ \hline
**S2** & **S3** & **S2 + S3** & **S1** & 0.74 & 0.82 & 0.66 & 0.63 & 0.59 & 0.59 \\ \hline
**S1** & **S3** & **S1 + S3** & **S2** & 0.85 & 0.80 & 0.88 & 0.69 below in which we compare the averaged micro- and macro-F1 scores of multi-source M-FUDA to baseline models, as illustrated in Figure 8.

### Experiments with Varying Users and Environments

Our second experiment was designed to train our multi-source M-FUDA model for activities performed by users with different physical characteristics. Their performance also depended upon the environmental settings, such as the position of furniture, doors, windows, and transmission contact between the transmitter (Tx) and the receiver (Rx). The training data were not good enough to capture the diversity of the users and environments when the trained model was tested on varying external factors, for instance unseen users in unknown environments. Therefore, the transfer learning task was to assess our trained model's robustness, adaptability, and transferability in terms of how well it generalized in such critical but very near to real-world scenarios. We utilized the Alsaify dataset to evaluate our model in such domain-changing applications using nine different users executing six different activities in three environments specified as (1) Jordan University of Science and Technology, a research laboratory (4.7 m \(\times\) 4.7 m) area equipped with a Tx-Rx pair 3.7 m apart with a line-of-sight contact; (2) Jordan University of Science and Technology, Department, a university hallway (7.95 m \(\times\) 3.6 m) area equipped with a Tx-Rx pair 7.6 m apart with a line-of-sight contact; and (3) Jordan University of Science and Technology, a room attached to a corridor fitted with a Tx inside the room and an Rx is outside the room with an 8 cm-thick wooden wall as a barrier causing a non-line-of-sight contact between the Tx-Rx pair, which are spaced 5.44 m apart. We also compared our model's performance with baselines to investigate the impacts of model configurations and arrangements in multi-source MUDA vs combined-source SUDA settings. Multi-source M-FUDA (MMD) achieved the best micro- and macro-F1 scores on 7 out of 11 tasks when we changed both users and environments from the training to the testing phase, and this was even better than multi-source M-FUDA (MK-MMD) in terms of higher accuracy and shorter simulation time, as reported in Section 7.4. Our model obtained the highest averaged micro- and macro-F1 scores--75.6% and 75.0%, which is 3.70% and 3.59% higher than combined-source MCD [59; 88], the second best performing technique, as reported in Tables 6 and 7. It is also worth noting that the MUDA setting with the proposed alignments was able to achieve more balanced accuracy on individual instances and also per each class, leading to much higher micro- and macro-F1 scores than all the comparison techniques. In addition, multi-source MUDA (MMD) outperformed single-source M-FUDA (MMD) by 6.48% and 6.53% in micro- and macro-F1

Figure 8: Comparison of average micro- and macro-F1 scores for multi-source M-FUDA and baseline models across cross-user tasks. ### Experiments with Varying Atmospheric Conditions

Our last experiment was designed to train our multi-source M-FUDA model for activities performed by users on different days of the week.