## 2 Fundamental Theory
### Domain Distribution Difference Measure  
There are two very important concepts in transfer learning: domain and task. The domain can be interpreted as a specific domain, and the task is a specific problem that we need to solve. For example, sentiment analysis and entity recognition are two different tasks. In the field of fault diagnosis, transfer tasks are mainly used to solve the problem of unlabeled or less labeled data in the target domain. Fault diagnosis of unlabeled target domain data is performed by network parameters learned using labeled source domain data.  
Suppose that the source space \(X^{s}=\left\{x_{i}^{s},y_{i}^{s}\right\}_{i=1}^{m}\), \(\left\{x_{i}^{s},y_{i}^{s}\right\}\) represents the \(i\)th source domain data and label, and \(m\) is the total number of samples in the source domain; the target domain space is \(X^{t}=\left\{x_{j}^{t}\right\}_{j=1}^{n}\), where \(x_{j}^{t}\) represents the \(j\)th target domain data; and \(n\) is the total number of samples of the target domain. The edge distribution of the two domains is allowed to be different, namely \(P_{s}(X_{s})\
eq P_{t}(X_{t})\). Domain adaptation ensures that the data of different distributions are as close as possible, via certain methods, when the data distribution of the source domain and target domain are different. There are four commonly used methods: (1) methods based on statistical criteria, (2) methods based on structural criteria, (3) methods based on popular criteria, and (4) methods based on graph criteria.  
The methods based on statistical criteria use mean or higher-order moments to measure the differences between different domains. Common methods include maximum mean difference (MMD) [24], association alignment distance (CORAL) [25], and joint maximum mean difference (JMMD) [26]. These kinds of methods map the source domain data and the target domain data to the feature space for calculation so that the data distribution difference between the two mapped domains is minimized.  
The MMD metric is widely used in domain adaptation. MMD is a kernel learning method that measures the distance between two distributions in a regenerated Hilbert space. The basic idea behind MMD is that if the generating distributions are identical, all the statistics are the same [27]. The distance between the source domain and the target domain is expressed as follows. \(X^{s}\) and \(X^{t}\) are two datasets from the source domain and the target domain, \(s\) and \(t\) are the abbreviations for the source domain and target domain,  
Figure 2: (a) Residual block structure. (b) Repeated residual block structure.  
respectively, \(x_{i}^{s}\) and \(x_{j}^{t}\) are examples of \(X^{s}\) and \(X^{t}\), and \(m\) and \(n\) are the number of samples from the source domain and target domain.  
\[\begin{array}{rcl}D(X^{s},X^{t})&=&\|\mathop{\bot}\limits_{i=1}^{m}\phi(x_{i} ^{s})-\mathop{\bot}\limits_{i}\mathop{\bot}\limits_{j=1}^{n}\phi(x_{j}^{t})\|_ {H}^{2}\\ &=&\frac{1}{m(m-1)}\mathop{\bot}\limits_{i=1}^{m}\mathop{\bot}\limits_{j\
eq i }^{m}k(x_{i}^{s},x_{j}^{s})+\frac{1}{n(n-1)}\mathop{\bot}\limits_{j}^{n} \mathop{\bot}\limits_{j\
eq i}^{n}k(x_{i}^{t},x_{j}^{t})\\ &&-\frac{2}{mn}\mathop{\bot}\limits_{i=1}^{m}\mathop{\bot}\limits_{j=1}^{n}k(x _{i}^{s},x_{j}^{t})\end{array} \tag{2}\]  
In Formula (2), \(\phi(\cdot)\) represents feature mapping and is used to solve the inner product mapped to two high-dimensional vectors. \(H\) represents the Hilbert space. \(k(\,\ )\) represents the inner product of the vector.