# Unsupervised Domain Adaptation via Stacked Convolutional Autoencoder +
## Appendix A  
The aim of the sparse autoencoder is to constrain the neurons in the hidden layers to be inactive most of the time. Given an input set \(\{x_{1},...,x_{i},...,x_{n}\}\), \(x_{i}\in R^{m\times 1}\), and the hidden unit set \(\{\xi_{1},...,\xi_{r},...,\xi_{s}\}\), \(\xi_{i}\in R^{k\times 1}\), the average activation of the hidden unit can be calculated as (A1):  
\[\hat{p}_{r}=\frac{1}{n}\sum_{i=1}^{n}\big{[}\xi_{r}(x_{i})\big{]}\] (A1)  
To ensure that the hidden unit's activation status is inactive, the constraint \(\hat{p}_{r}=p\) is enforced, where \(p\) is the sparsity parameter, which is close to zero. The KL divergence method can be used to penalize \(\hat{p}_{r}\) if it deviates significantly from \(p\), as shown in (A2):  
\[\sum_{r=1}^{s}\text{KL}(p||\hat{p}_{r})=\sum_{r=1}^{s}p\log\frac{p}{\hat{p}_{r} }+(1-p)\log\frac{1-p}{1-\hat{p}_{r}}\] (A2)  
The overall cost function of the sparse auto-encoder can be shown as (A3):  
\[J_{\text{sparse}}(W,b)=J_{r}(W,b)+\beta\sum_{r=1}^{s}\text{KL}(p||\hat{p}_{r})\] (A3)  
where \(J_{r}(W,b)\) is defined as (6) and \(\beta\) is the hyper-parameter which controls the weight of the sparsity penalty term. Since the term \(\hat{p}_{r}\) is the average activation of the hidden unit, it also depends on \(W\) and \(b\). Conceptualization, Y.Z. and X.W. ; methodology, Y.Z. and X.W. ; software, Y.Z. and X.Z. ; validation, X.Z. ; formal analysis,Y.Z. ; investigation, X.W. ; resources, X.Z. ; data curation, X.Z. ; writing--original draft preparation, Y.Z. and X.Z. ; writing--review and editing, X.W. ; visualization, X.W. ; supervision, X.W. ; project administration,Y.Z. and X.W. All authors have read and agreed to the published version of the manuscript. This research is partially supported by the National Natural Science Foundation of China under grants (61906060), Yangzhou University Interdisciplinary Research Foundation for Animal Husbandry Discipline of Targeted Support (yzuk202015,yzuk202008), the Opening Foundation of Key Laboratory of Huizhou Architecture in Anhui Province under grant HPJZ-2020-02, Open Project Program of Joint International Research Laboratory of Agriculture and Agri-Product Safety (JILAR-KF202104). * [PERSON] et al. (2014) [PERSON]; [PERSON]; [PERSON]; [PERSON] Autoencoder-based Unsupervised Domain Adaptation for Speech Emotion Recognition. _IEEE Signal Process. Lett._**2014**, _21_, 1068-1072. * [PERSON] et al. (2020) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Unsupervised Domain Adaptation to Classify Medical Images Using Zero-Bias Convolutional Auto-Encoders and Context-Based Feature Augmentation. _IEEE Trans. Med. Imaging_**2020**, _39_, 2385-2394. * [PERSON] and [PERSON] (2009) [PERSON]; [PERSON] A survey on transfer learning. _IEEE Trans. Knowl. Data Eng._**2009**, _22_, 1345-1359. * [PERSON] et al. (2020) [PERSON]; [PERSON]; [PERSON] Autoencoder based sample selection for self-taught learning. _Knowl.-Based Syst._**2020**, _192_, 105343. * [PERSON] et al. (2017) [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] Adversarial discriminative domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21-26 July 2017; pp. 7167-7176. * [PERSON] et al. (2011) [PERSON]; [PERSON]; [PERSON]; [PERSON] Domain adaptation via transfer component analysis. _IEEE Trans. Neural Netw._**2011**, _22_, 199-210. * [PERSON] et al. (2015) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Supervised representation learning: Transfer learning with deep autoencoders. In Proceedings of the International Joint Conference on Artificial Intelligence, IJCAI, Buenos Aires, Argentina, 25-31 July 2015; pp. 4119-4125. * [PERSON] et al. (2020) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Representation learning via serial robust autoencoder for domain adaptation. _Expert Syst. Appl._**2020**, _160_, 113635. * [PERSON] et al. (2015) [PERSON]; [PERSON]; [PERSON]; [PERSON] Hybrid CNN and dictionary-based models for scene recognition and domain adaptation. _IEEE Trans. Circuits Syst.