# A Collaborative Domain Adversarial Network for Unlabeled Bearing Fault Diagnosis
## 3 Collaborative Domain Adversarial Network  
### Networking Framework  
The deep domain adversarial transfer network structure is shown in Figure 2, which consists of two feature extractors \(G_{S}\) and \(G_{T}\), a domain discriminator \(D\), and a classifier \(C\). The feature extractors \(G_{S}\) and \(G_{T}\) are used to extract features from the source domain samples and target domain samples, respectively. Traditional adversarial transfer networks only include one feature extractor, which is responsible for mapping both the features of samples in the source domain and target domain. Under such requirements, the performance of the feature extractor is greatly reduced. This study sets up two feature extractors for different tasks of mapping the source domain and target domain, so the feature mapping effect of the traditional transfer network is not as good as the proposed mapping effect. The feature extractors \(G_{S}\) and \(G_{T}\) are composed of convolutional layers (conv-layers), activation layers, normalization layers (BN), and max pooling layers (max-pool). The network parameters of the source domain feature extractor and the target domain feature extractor are represented by \(\theta_{G}^{S}\) and \(\theta_{G}^{T}\), respectively, and the flattened output features are represented by \(f_{S}\) and \(f_{T}\), respectively. A significant problem faced by the single-polar feature extractor of the traditional adversarial transfer network is that one set of network parameters must satisfy the mapping of both source domain samples and target domain samples, which may lead to differences in the feature distribution of the source domain and target domain mappings, resulting in negative transfer of samples and reduced fault classification accuracy. By constraining the feature mapping through two types of feature extractors, the network parameters of the feature extractor can be better optimized, and the consistency of the mapping distribution can be improved. Figure 1: Domain adversarial adaptive method based on transfer learning. The domain discriminator \(D\) is used to identify the origin of the samples, with the output data type being Boolean. If the sample comes from the source domain, the domain discriminator \(D\) outputs 0; if the sample comes from the target domain, the domain discriminator \(D\) outputs 1. By constraining the distribution differences of different dimensional features between the source domain and the target domain through the domain discriminator \(D\), the network parameters of the domain discriminator D are denoted by \(\theta_{D}\). The features extracted by the source domain and target domain feature extractors are flattened to obtain the source domain and target domain features \(f_{S}\) and \(f_{T}\). The state classifier \(C\) is used to identify the fault category of all samples, which consists of three fully connected layers (FCs) and two dropout layers. Since the purpose of the classifier \(C\) is to identify different faults as accurately as possible based on the recognition features of the faults, it is necessary to reduce the loss of the label classifier on the data during the training process. Because the target samples are unlabeled, the state classifier \(C\) is trained only using labeled source samples. The network structure and parameter settings of the feature extractors \(G_{S}\) and \(G_{T}\), the domain discriminator \(D\) and the classifier \(C\) are shown in Table 1.  
In the deep Domain Adversarial (DA) transfer neural network, max pooling was chosen to reduce the model's sensitivity to time. The ReLU activation function is used after the convolutional layers, which can enhance the linear separability of the features. To better illustrate the proposed network, the meaning of the parameters in Table 1 is explained.