Mere Contrastive Learning for Cross-Domain Sentiment Analysis

Yun Luo, Fang Guo, Zihan Liu, Yue Zhang


Abstract
Cross-domain sentiment analysis aims to predict the sentiment of texts in the target domain using the model trained on the source domain to cope with the scarcity of labeled data. Previous studies are mostly cross-entropy-based methods for the task, which suffer from instability and poor generalization. In this paper, we explore contrastive learning on the cross-domain sentiment analysis task. We propose a modified contrastive objective with in-batch negative samples so that the sentence representations from the same class can be pushed close while those from the different classes become further apart in the latent space. Experiments on two widely used datasets show that our model can achieve state-of-the-art performance in both cross-domain and multi-domain sentiment analysis tasks. Meanwhile, visualizations demonstrate the effectiveness of transferring knowledge learned in the source domain to the target domain and the adversarial test verifies the robustness of our model.
Anthology ID:
2022.coling-1.620
Volume:
Proceedings of the 29th International Conference on Computational Linguistics
Month:
October
Year:
2022
Address:
Gyeongju, Republic of Korea
Editors:
Nicoletta Calzolari, Chu-Ren Huang, Hansaem Kim, James Pustejovsky, Leo Wanner, Key-Sun Choi, Pum-Mo Ryu, Hsin-Hsi Chen, Lucia Donatelli, Heng Ji, Sadao Kurohashi, Patrizia Paggio, Nianwen Xue, Seokhwan Kim, Younggyun Hahm, Zhong He, Tony Kyungil Lee, Enrico Santus, Francis Bond, Seung-Hoon Na
Venue:
COLING
SIG:
Publisher:
International Committee on Computational Linguistics
Note:
Pages:
7099–7111
Language:
URL:
https://aclanthology.org/2022.coling-1.620
DOI:
Bibkey:
Cite (ACL):
Yun Luo, Fang Guo, Zihan Liu, and Yue Zhang. 2022. Mere Contrastive Learning for Cross-Domain Sentiment Analysis. In Proceedings of the 29th International Conference on Computational Linguistics, pages 7099–7111, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
Cite (Informal):
Mere Contrastive Learning for Cross-Domain Sentiment Analysis (Luo et al., COLING 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.coling-1.620.pdf
Code
 luoxiaoheics/cobe