## 5 Materials and Methods
### Contrastive Semantic Alignment
The model's overall loss was monitored after an initial warm-up phase, and training was halted if the loss did not improve over five consecutive epochs. This strategy helped maintain computational efficiency while optimizing model performance. The dataset was split into 60% for training, 20% for validation, and 20% for testing. This division ensured a fair evaluation of the model's generalization capabilities. The final model was selected based on its high predictive performance on the validation set, particularly for domain-shifting tasks that challenged the adaptability of the architecture. Our analysis revealed that while the original configuration proposed in [67] was highly effective, certain refinements--such as the adoption of NLLoss and fine-tuned learning rate strategies--led to further improvements. These modifications highlight the importance of nuanced adjustments in achieving state-of-the-art results for domain-adaptive learning tasks. ### Comparison Techniques and Evaluation Metrics

Our proposed model consists of three blocks with four aligning stages. Stage 1 is a pre-trained model optimizing its weights on a multi-source CSI data distribution, producing a shared feature subspace for Stage 2 of \(N\) unshared domain-specific feature extractors. These feature extractors generalize the target distribution with each diverse source distribution using distance minimization approaches such as maximum mean discrepancy (MMD) [74]. We also tested two variants of maximum mean discrepancy (MMD) [74], namely multiple-kernel maximum mean discrepancy (MK-MMD) [75; 76] and joint maximum mean discrepancy (JMMD) [77]. We first explored the sole impact of discrepancy and contrastive semantic alignment losses on the Parisafm dataset and then added these losses to one of the selected distance minimization losses. Finally, we chose the two best models in terms of high predictive performance and moderate simulation time and compared the state-of-the-art baseline adaptation techniques to the preferred versions of the recommended setup. For a fair comparison, all of the baseline methods followed the same deep learning architecture as the recommended version and were fine-tuned from a pytorch-provided model of ResNet50 [80]. The entire training process was repeated ten times for each domain-shifting task. Each time performance was evaluated on unseen target samples in order to take the average of these multiple trials for unbiased and satisfactory analysis. Our first baseline model was a combination of the source version of the proposed model with recommended model settings and MMD loss because this loss function successfully adopted the target domain with the highest or second-highest predictive performance among all of our tested multi-domain unsupervised domain adaptation (MUDA) techniques and did so with moderate simulation time. We used a single feature extractor and a classifier followed by the pre-trained ResNet50 [80] architecture and combined all the source domains into a traditional single-source vs target setting to testify to the importance of multiple sources being combined in training a prototype that has originated from a single unsupervised domain adaptation (SUDA) technique. Our second baseline model was derived from Wi-Adaptor [59], although we changed its architecture to match the proposed one in order to achieve a fair model comparison. Wi-Adaptor [59] trains a generator and two classifiers on combined-source samples to generate discriminative features and then utilizes the trained classifiers to maximize the discrepancy on target samples. Finally, it trains the generator on target samples to minimize the discrepancy. The authors' contribution was inspired by the study of maximum classifier discrepancy (MCD) for unsupervised domain adaptation [88].