## 3 Multi-Source Subdomain Adaptation Model  
### The Structure of the Model  
The overall structure of the multi-source subdomain adaptive fault diagnosis model designed in this paper is shown in Figure 3.  
Figure 3: Multi-source sub-domain fault diagnosis network structure.  
It can be seen from Figure 3 that the network mainly includes signal preprocessing, a feature extraction network, network optimization, and state recognition. The specific steps of each stage are as follows.  
1. Signal preprocessing: The bearing vibration signal of Jiangnan University is sampled by an overlapping sampling method to increase the number of samples. Continuous wavelet transform is performed on each type of signal sample using CMOR wavelet to obtain a time-frequency diagram. Meanwhile, source-target data pairs are constructed.
2. Feature extraction network: The network consists of shared and domain-specific feature extraction networks. First, the data are extracted using a shared feature extraction network. Then, the specific feature extraction network is used to extract the specific features for each group of data.
3. Network optimization: The total training loss function of the network consists of three parts. In this paper, the local maximum mean difference metric loss function is selected to reduce the distribution difference in each group of data pairs, so that the network can better learn the domain invariant representation. Each group of specific feature extraction networks can extract the domain invariant representation of each pair of source domain and target domain by minimizing \(loss_{lmmd}\). \(N\) classifiers are trained using labeled source domain data, and the cross-entropy loss between the actual label and the predicted label in the source domain is calculated. Each group of classifiers corresponds to the corresponding \(loss_{class}\). The loss function \(loss_{disc}\) is used to minimize the error between all classifiers and reduce the classification error near the target domain class boundary. The network training process uses the Ranger optimizer to reduce the total training loss function value.
4. State recognition: Target domain data are input into the trained network and the diagnostic results are output.  
In order to simplify the parameter adjustment process of the network, the model parameters in this paper are basically consistent with those in reference [20]. The literature presents a multi-source domain migration learning method, where the literature not only aligns the distribution of each pair of source and target domains in multiple specific feature spaces, but also aligns the output of the classifier using domain-specific decision boundaries. The literature uses ResNet50 for the shared feature network and employs mmd loss as the domain alignment method. On this basis, the network structure and parameters can be optimized to improve the recognition effect. The model parameters are shown in Table 1.  
In Table 1, Conv (\(x\),\(y\)) is the convolution operation, Linear (\(x\),\(y\)) is the fully connected layer, Bn (\(\cdot\)) is the batch normalization layer, and ReLU (\(\cdot\)) is the activation function layer. \(x\) represents the number of input neurons, and \(y\) represents the number of output neurons.