Font Size: a A A

Adaptive Cross-domain Sentiment Analysis Based On BERT Model

Posted on:2024-01-21Degree:MasterType:Thesis
Country:ChinaCandidate:Z T ChenFull Text:PDF
GTID:2568307070451694Subject:Electronic information
Abstract/Summary:
Cross-domain sentiment analysis aims to use labeled source domain data to perform sentiment classification on unlabeled target domain data.At present,cross-domain sentiment analysis generally obtains domain-invariant features through pre-training,and uses a linear classification-based sentiment classifier to classify the sentiment of the target domain.The adversarial training used in pre-training implicitly narrows the probability distribution of the source domain and the target domain,which alleviates the problem of inconsistent probability distributions of the two domains,but the output of the feature encoder still contains a large number of private features of the source domain,and is based on linear classification Sentiment classifiers also cannot adequately learn private features of the target domain.In response to the above problems,this paper proposes a domain classification pretraining M-BERT model based on the MMD adaptive metric.The MMD adaptive metric is introduced during pre-training to explicitly narrow the probability distributions of the source and target domains,thereby extracting More accurate domain invariant features.On this basis,this paper proposes a sentiment classifier CKM-BERT model that combines KNN and contrastive learning.It introduces a similar feature vector search mechanism based on KNN to find the K most similar feature vectors for each target field.The feature vectors of the source domain,according to the similarity to the emotional polarity weighted summation of the source domain feature vectors,and finally realize the emotional classification of the target domain.It can deal with nonlinear and high-dimensional eigenvectors well; The CKM-BERT model also introduces a comparative learning objective based on label similarity,so that the feature encoder encodes texts with the same emotional polarity similarly,while the encoding between texts with different emotional polarities.The results are as different as possible,helping the sentiment classifier to better differentiate sentiment polarity.The experimental results show that the CKM-BERT model can learn the private characteristics of the target domain well.On Amazon multi-domain sentiment analysis data set,the average accuracy of CKM-BERT model is nearly 1% higher than that of the current frontier models.Ablation experiments show that the new methods used in this paper are helpful to improve the performance of the model.
Keywords/Search Tags:Cross-domain Sentiment Analysis, Domain Classification Pre-training, MMD, KNN, Contrastive Learning
Related items