Global-Local Dynamic Adversarial Learning for Cross-Domain Sentiment Analysis
Abstract
:1. Introduction
2. Related Work
2.1. Unsupervised Domain Adaption in Transfer Learning
2.2. Cross-Domain Sentiment Analysis
3. Method
3.1. Problem Definition
3.2. Backbones for Cross-Domain Sentiment Analysis
3.2.1. Bidirectional Gate Recurrent Units with Attention
3.2.2. Capsule Neural Network Based on BERT
3.3. Domain Adaption with Adversarial Learning
3.4. Global-Local Dynamic Adversarial Adaption Network
3.4.1. Label Classifier
3.4.2. Global Domain Discriminator
3.4.3. Local Domain Discriminator
3.5. Global and Local Adversarial Factors
3.5.1. The Global Dynamic Adversarial Factor
3.5.2. The Local Dynamic Adversarial Factors
4. Experiments
Algorithm 1 GLDAL |
Input: |
—samples and , , , , |
Output: Neural Network |
while stopping criterion is not meet do calculate the global domain loss : Equation (8) calculate the global : Equation (10) acquire classification probability vector from : calculate the sum of all local loss of sample : Equation (9) calculate each local : Equation (11) if then calculate the classification loss of: Equation (7) Backpropagation: Update dynamic factor : return Output |
4.1. Datasets
4.2. Baselines
4.3. Implementation
4.4. Results
4.5. Effectiveness Analysis and Ablation Study
4.5.1. Analysis of the Importance of the Global Dynamic Adversarial Factor (GDAF) in GLDAL
4.5.2. Analysis of the Importance of the Local Dynamic Adversarial Factor (LDAF) in GLDAL
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhuang, F.; Qi, Z.; Duan, K.; Xi, D.; Zhu, Y.; Zhu, H.; Xiong, H.; He, Q. A Comprehensive Survey on Transfer Learning. Proc. IEEE 2021, 109, 43–76. [Google Scholar] [CrossRef]
- Pan, S.J.; Yang, Q. A Survey on Transfer Learning. IEEE Trans. 2010, 22, 1345–1359. [Google Scholar] [CrossRef]
- Gupta, B.; Awasthi, S.; Singh, P.; Ram, L.; Kumar, P.; Prasad, B.R.; Agarwal, S. Cross domain sentiment analysis using transfer learning. In Proceedings of the 2017 IEEE International Conference on Industrial and Information Systems (ICIIS), Peradeniya, Sri Lanka, 15–16 December 2017. [Google Scholar]
- Ganin, Y.; Lempitsky, V.S. Unsupervised Domain Adaptation by Backpropagation. In Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 6–11 July 2015; pp. 1180–1189. [Google Scholar]
- Pei, Z.; Cao, Z.; Long, M.; Wang, J. Multi-Adversarial Domain Adaptation. In Proceedings of the AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; pp. 3934–3941. [Google Scholar]
- Zhang, M.; Li, X.; Wu, F. Moka-ADA: Adversarial domain adaptation with model-oriented knowledge adaptation for cross-domain sentiment analysis. J. Supercomput. 2023, 79, 13724–13743. [Google Scholar] [CrossRef]
- Sun, B.; Saenko, K. Subspace Distribution Alignment for Unsupervised Domain Adaptation. In Proceedings of the 26th British Machine Vision Conference, Swansea, UK, 7–10 September 2015; pp. 24.1–24.10. [Google Scholar]
- Sun, B.; Feng, J.; Saenko, K. Return of Frustratingly Easy Domain Adaptation. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, Phoenix, AZ, USA, 12–17 February 2016; pp. 2058–2065. [Google Scholar]
- Pan, S.J.; Tsang, I.W.; Kwok, J.T.; Yang, Q. Domain Adaptation via Transfer Component Analysis. IEEE Trans. 2011, 22, 199–210. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Long, M.; Wang, J.; Ding, G.; Sun, J.; Yu, P.S. Transfer Feature Learning with Joint Distribution Adaptation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Sydney, Australia, 1–8 December 2013; pp. 2200–2207. [Google Scholar]
- Wang, J.; Chen, Y.; Hao, S.; Feng, W.; Shen, Z. Balanced Distribution Adaptation for Transfer Learning. In Proceedings of the 2017 IEEE International Conference on Data Mining (ICDM), New Orleans, LA, USA, 18–21 November 2017. [Google Scholar]
- Wang, J.; Feng, W.; Chen, Y.; Yu, H.; Huang, M.; Yu, P.S. Visual Domain Adaptation with Manifold Embedded Distribution Alignment. In Proceedings of the 26th ACM International Conference on Multimedia, Seoul, Republic of Korea, 22–26 October 2018; pp. 402–410. [Google Scholar]
- Zhu, Y.; Zhuang, F.; Wang, J.; Chen, J.; Shi, Z.; Wu, W.; He, Q. Multi-representation adaptation network for cross-domain image classification. Neural Netw. 2019, 119, 214–221. [Google Scholar] [CrossRef] [PubMed]
- Zhuang, F.; Cheng, X.; Luo, P.; Pan, S.J.; He, Q. Supervised Representation Learning: Transfer Learning with Deep Autoencoders. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015; pp. 4119–4125. [Google Scholar]
- Sun, B.; Saenko, K. Deep CORAL: Correlation Alignment for Deep Domain Adaptation. In Proceedings of the ECCV: European Conference on Computer Vision, Amsterdam, The Netherlands, 8–10 and 15–16 October 2016. [Google Scholar]
- Goodfellow, I.J.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.C.; Bengio, Y. Generative Adversarial Nets. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, Baltimore, ML, USA, 22–27 June 2014; pp. 2672–2680. [Google Scholar]
- Durugkar, I.P.; Gemp, I.; Mahadevan, S. Generative Multi-Adversarial Networks. In Proceedings of the 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, 24–26 April 2017. [Google Scholar]
- Yu, C.; Wang, J.; Chen, Y.; Huang, M. Transfer Learning with Dynamic Adversarial Adaptation Network. In Proceedings of the 2019 IEEE International Conference on Data Mining (ICDM), Beijing, China, 8–11 November 2019; pp. 778–786. [Google Scholar]
- Devlin, J.; Chang, M.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the NAACL, Minneapolis, Minnesota, 2–7 June 2019; pp. 4171–4186. [Google Scholar]
- Dai, Z.; Yang, Z.; Yang, Y.; Carbonell, J.G.; Le, Q.V.; Salakhutdinov, R. Transformer-XL: Attentive Language Models beyond a Fixed-Length Context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019; pp. 2978–2988. [Google Scholar]
- Du, C.; Sun, H.; Wang, J.; Qi, Q.; Liao, J. Adversarial and Domain-Aware BERT for Cross-Domain Sentiment Analysis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 4019–4028. [Google Scholar]
- Li, Z.; Li, X.; Wei, Y.; Bing, L.; Zhang, Y.; Yang, Q. Transferable End-to-End Aspect-based Sentiment Analysis with Selective Adversarial Learning. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, Hong Kong, China, 3–7 November 2019; pp. 4589–4599. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Dong, Y.; Fu, Y.; Wang, L.; Chen, Y.; Dong, Y.; Li, J. A Sentiment Analysis Method of Capsule Network Based on BiLSTM. IEEE Access 2020, 8, 37014–37020. [Google Scholar] [CrossRef]
- Tzeng, E.; Hoffman, J.; Zhang, N.; Saenko, K.; Darrell, T. Deep Domain Confusion: Maximizing for Domain Invariance. arXiv 2014, arXiv:1412.3474. [Google Scholar]
- Ghifary, M.; Kleijn, W.B.; Zhang, M. Domain Adaptive Neural Networks for Object Recognition. In Proceedings of the 13th Pacific Rim International Conference on Artificial Intelligence, Gold Coast, QLD, Australia, 1–5 December 2014; pp. 898–904. [Google Scholar]
- Long, M.; Zhu, H.; Wang, J.; Jordan, M.I. Deep Transfer Learning with Joint Adaptation Networks. In Proceedings of the 34th International Conference on Machine Learning, Sydney, NSW, Australia, 6–11 August 2017; pp. 2208–2217. [Google Scholar]
- Ben-David, S.; Blitzer, J.; Crammer, K.; Pereira, F. Analysis of Representations for Domain Adaptation. In Proceedings of the Neural Information Processing Systems 19 (NIPS 2006), Vancouver, BC, Canada, 4–7 December 2006; Schölkopf, B., Platt, J.C., Hofmann, T., Eds.; MIT Press: Cambridge, MA, USA, 2006; pp. 137–144. [Google Scholar]
Method | C → TR | TR → I | COR → S5 | S5 → COR | IM → S2 | S2 → IM | AVG |
---|---|---|---|---|---|---|---|
Bi-GRU-A (No Transfer) | 40.96 | 62.04 | 31.70 | 29.53 | 76.64 | 74.18 | 52.51 |
DDC | 49.85 | 61.88 | 30.95 | 32.60 | 76.99 | 77.72 | 55.00 |
DaNN | 45.35 | 63.65 | 31.31 | 32.00 | 78.46 | 78.40 | 54.86 |
DANN | 49.01 | 65.98 | 32.84 | 33.53 | 80.81 | 78.82 | 56.83 |
D-CORAL | 50.43 | 65.06 | 33.78 | 33.70 | 79.13 | 77.63 | 56.62 |
MADA | 50.18 | 66.39 | 33.12 | 33.96 | 81.16 | 78.98 | 57.30 |
DAAN | 50.69 | 66.05 | 33.09 | 34.08 | 80.99 | 79.02 | 57.32 |
GLDAL (Proposed Approach) | 51.25 | 66.53 | 33.34 | 34.12 | 81.34 | 79.16 | 57.62 |
Method | C → TR | TR → I | COR → S5 | S5 → COR | IM → S2 | S2 → IM | AVG |
---|---|---|---|---|---|---|---|
CapsuleNet (No Transfer) | 47.94 | 63.93 | 33.25 | 30.24 | 83.51 | 80.22 | 56.52 |
DDC | 51.77 | 64.34 | 35.09 | 30.98 | 85.97 | 86.07 | 59.20 |
DaNN | 50.16 | 66.56 | 34.15 | 31.49 | 85.45 | 86.14 | 58.99 |
DANN | 53.55 | 67.72 | 35.21 | 34.45 | 86.11 | 85.60 | 60.44 |
D-CORAL | 56.82 | 67.08 | 34.08 | 34.38 | 86.05 | 85.72 | 60.68 |
JAN | 52.97 | 68.24 | 34.99 | 33.82 | 86.33 | 86.58 | 60.48 |
MADA | 54.31 | 67.65 | 35.79 | 34.64 | 86.96 | 86.32 | 60.95 |
DAAN | 54.76 | 68.78 | 34.96 | 34.24 | 87.21 | 86.50 | 61.08 |
GLDAL (Proposed Approach) | 56.97 | 68.92 | 34.91 | 35.07 | 87.18 | 86.83 | 61.64 |
Transfer Tasks | Average Search | Random Guessing | GLDAL | DANN ( = 1) | MADA ( = 0) |
---|---|---|---|---|---|
S2 → IM | 86.15 | 86.52 | 86.83 | 85.60 | 86.32 |
S5 → COR | 34.98 | 34.86 | 35.07 | 34.45 | 34.64 |
TR → I | 67.73 | 68.25 | 68.92 | 67.72 | 67.65 |
AVG | 62.95 | 63.21 | 63.61 | 62.60 | 62.87 |
BackBone | RNSF | DAAN | GLDAL |
---|---|---|---|
CapsuleNet | 0.988 | 0.952 | 0.925 |
Bi-GRU-A | 1.053 | 1.007 | 0.978 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lyu, J.; Zhang, Z.; Chen, S.; Fan, X. Global-Local Dynamic Adversarial Learning for Cross-Domain Sentiment Analysis. Mathematics 2023, 11, 3130. https://doi.org/10.3390/math11143130
Lyu J, Zhang Z, Chen S, Fan X. Global-Local Dynamic Adversarial Learning for Cross-Domain Sentiment Analysis. Mathematics. 2023; 11(14):3130. https://doi.org/10.3390/math11143130
Chicago/Turabian StyleLyu, Juntao, Zheyuan Zhang, Shufeng Chen, and Xiying Fan. 2023. "Global-Local Dynamic Adversarial Learning for Cross-Domain Sentiment Analysis" Mathematics 11, no. 14: 3130. https://doi.org/10.3390/math11143130
APA StyleLyu, J., Zhang, Z., Chen, S., & Fan, X. (2023). Global-Local Dynamic Adversarial Learning for Cross-Domain Sentiment Analysis. Mathematics, 11(14), 3130. https://doi.org/10.3390/math11143130