## 3 Preliminaries
### Maximum Mean Discrepancy and Its Variants  
Maximum mean discrepancy (MMD) is a statistical method that transforms the mean embeddings of two probability distributions into a high-dimensional reproducing kernel Hilbert space (RKHS). The RKHS is a special type of space where comparing two probability distributions is simpler. Let us suppose that we have two probability distributions \(P\) and \(Q\). Their mean embeddings in the RKHS are defined as  
\[\mu_{P}=\mathbb{E}_{(x)\ P}[\phi(x)] \tag{9}\]  
\[\mu_{Q}=\mathbb{E}_{(x)\ Q}[\phi(x)] \tag{10}\]  
where \(\phi(\bullet)\) is a mapping function which maps the features into the RKHS. \(\phi(\bullet)\) is associated with a characteristic kernel function \(k(X_{s},X_{t})=<\phi(X_{s}),\phi(X_{t})>\), and \(X_{s}\) and \(X_{t}\) are the source and target domain features, respectively. In deep learning, MMD loss is computedin order to minimize the discrepancy between distributions \(P\) and \(Q\) by measuring the difference of the source and target mean embeddings in the RKHS [74]:  
\[\mathcal{L}_{MMD}(P,Q)=||\mu_{P}-\mu_{Q}||_{H} \tag{11}\]  
where \(H\) is the reproducing kernel Hilbert space (RKHS). When the kernel function used in MMD is changed to a multi-kernel function \(\{k_{i}(X_{s},X_{t})\}_{i=1}^{M}\), it helps to leverage the strengths of multiple kernels to adapt to complex differences between source and target distributions. These kernels are useful for extracting features from different aspects of data using a balancing factor that decides the contribution of each aspect to the overall alignment of two distributions to achieve better adaptation. Such an alignment technique is called multiple-kernel maximum mean discrepancy (MK-MMD) [75; 76]. Mathematically, a multi-kernel function is defined as  
\[K(X_{s},X_{t})=\sum_{i=1}^{M}W_{i}k_{i}(X_{s},X_{t}) \tag{12}\]  
where \(W_{i}\) is a balancing factor for which \(W_{i}\geq 0\) and \(\sum_{i=1}^{M}W_{i}=1\). MMD aligns a single feature between two probability distributions \(P(X_{s})\) and \(Q(X_{s})\) using a single kernel function \(k(X_{s},X_{t})\) to compare samples. We map multiple feature spaces or joint feature representations of two probability distributions to a reproducing-kernel Hilbert space (RKHS) such that their joint probability distributions are \(P(X_{s}^{1},X_{s}^{2},\ldots,X_{s}^{M})\) and \(Q(X_{t}^{1},X_{t}^{2},\ldots,X_{t}^{M})\) where \(\{X_{s}^{j}\}_{j=1}^{M}\) and \(\{X_{t}^{j}\}_{j=1}^{M}\) are the source and target samples, respectively. A single-layer kernel is now replaced with a joint kernel of individual layers using \(K((X_{s}^{1},\ldots,X_{s}^{M}),(X_{t}^{1},\ldots,X_{t}^{M}))\), and such a variant of MMD is called a joint maximum mean discrepancy (JMMD) [77]. This mapping may involve more complex and powerful alignment; however, it is computationally heavier. We cannot always guarantee improvement in matching source and target distributions robustly using any of these techniques because they do not explicitly consider class labels or their relationships, especially in imbalanced data, as they may fail to align class-specific features effectively. Therefore, it is an exercise in trial and error to find their suitability in particular scenarios.