## 3 Proposed Method
### Objective Function  
Following the work in [36], we use four types of loss functions in our framework to train. Here is the description of each loss function.  
Figure 3: Illustration of local structure module.  
**Adversarial Loss (\(\mathcal{L}_{adv}\))**: Adversarial loss is used during the GAN discriminator training; it actually helps the discriminator to discriminate between synthetic data and original data. There are two adversarial losses for the generator and discriminator. Here, \(\mathcal{L}_{g(adv)}\) and \(\mathcal{L}_{d(adv)}\) are the generator and discriminator loss, respectively. Generator loss \(\mathcal{L}_{g(adv)}\) is denoted as:  
\[\mathcal{L}_{g(adv)}=\sum_{i}^{n}log(1-\mathcal{D}(\mathcal{G}(z_{i},y_{i}))) \tag{3}\]  
where \(z\) and \(y\) are the random noise and generated class labels, respectively. The discriminator loss \(\mathcal{L}_{d(adv)}\) is denoted as:  
\[\mathcal{L}_{d(adv)}=\sum_{i}^{n}log\mathcal{D}(\mathcal{G}(z_{i},y_{i}))+ \sum_{t_{i}\sim\tau}log\mathcal{D}(t_{i}) \tag{4}\]  
Here, \(t_{i}\) is the target data, which are sampled from \(\tau\) distribution.  
**Cross-Entropy Loss (\(\mathcal{L}_{CE}\))**: This loss is calculated when the generated samples are used in the pretrained classifier. This loss ensures consistent parameters by not updating the pretrained classifier. (\(\mathcal{L}_{CE}\)) is denoted as:  
\[\mathcal{L}_{CE}=\frac{1}{\mathcal{D}_{nf}}\sum_{\mathcal{G}(z_{i},y_{i})\in \mathcal{D}}\mathcal{L}_{t}(P_{c}(\mathcal{G}(z_{i},y_{i})),y_{i}) \tag{5}\]  
Here, \(P_{c}\), \(\mathcal{L}_{t}\) is the pre-trained classifier and traditional cross-entropy [36] loss respectively. \(\mathcal{D}_{nf}\) is the number of synthetically generated samples.  
**Discriminative Loss (\(\mathcal{L}_{D}\))**: Domain invariant features are obtained from the feature extractor, and discriminative loss is used in the feature extractor. This is apparently a binary loss between generated source and target samples. We train this feature extractor using a gradient reversal layer [37]. (\(\mathcal{L}_{D}\)) is denoted as:  
\[\mathcal{L}_{D}=\frac{1}{n}\sum_{x_{i}\in\mathcal{D}_{f}\cup\mathcal{D}_{t}} \mathcal{L}_{t}(\mathcal{D}_{d}(\mathcal{F}(x_{i})),l_{i}) \tag{6}\]  
Here, \(n\) and \(l_{i}\) are the total number of generated and target samples and domain labels, respectively.  
**Classification Loss (\(\mathcal{L}_{clas}\))**: The classification loss for the classifier in training with the generated samples. The gradient of classification loss is also utilized in the feature extractor training.  
\[\mathcal{L}_{cls}=\frac{1}{\mathcal{D}_{nf}}\sum_{\mathcal{G}(z_{i},y_{i})\in \mathcal{D}}\mathcal{L}_{t}(C(\mathcal{F}(\mathcal{G}(z_{i},y_{i})),y_{i}) \tag{7}\]  
Here, \(C\) is the classifier and \(\mathcal{D}_{nf}\) is the number of synthetically generated samples.  
**Total Loss (\(\mathcal{L}_{total}\))**: The total loss is expressed by:  
\[\mathcal{L}_{total}=\alpha\times\mathcal{L}_{adv}+\beta\times\mathcal{L}_{CE} +\gamma\times\mathcal{L}_{D}+\omega\times\mathcal{L}_{cls}. \tag{8}\]  
Here, \(\alpha\), \(\beta\), \(\gamma\), \(\omega\) are the tuning factors. Ideally, \(\alpha\), \(\gamma\), and \(\beta\) are set to 1, and \(\omega\) is set to 0 until 50 epochs, and then it is set to 1.