A cross-domain Mongolian sentiment distribution learning method integrating polar coordinates

By integrating polar coordinate ideas and domain adaptation models in cross-domain Mongolian emotional distribution learning, the problem of lack of Mongolian emotional distribution data and similar samples alignment is solved, and more accurate emotional distribution learning and feature alignment effects are achieved.

CN115130560BActive Publication Date: 2025-04-04INNER MONGOLIA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210640789.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2025-04-04
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

The prior art ignores whether similar samples in different domains are accurately aligned in cross-domain Mongolian emotion distribution learning, and the Mongolian emotion distribution data set is relatively lacking, and manual labeling is high.

Method used

A cross-domain Mongolian emotional distribution learning method that integrates polar coordinates is adopted. By integrating polar coordinate ideas into the emotional wheel, polar coordinate emotions representation is constructed, and new loss functions are designed to promote the emotional distribution learning process. In addition, the domain adaptation model is applied and a multi-adversarial network weight calculation method is constructed to achieve the same emotional text alignment in different domains.

Benefits of technology

It effectively reduces the dimension of the emotional distribution label, introduces new loss functions to promote emotional distribution learning, alleviates the problem of lack of emotional distribution corpus in Mongolian, and achieves more accurate alignment between similar sample features in different domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130560B_ABST
    Figure CN115130560B_ABST
Patent Text Reader

Abstract

A cross-domain Mongolian sentiment distribution learning method integrating polar coordinates, preprocessing Mongolian sentiment corpus; integrating polar coordinates into the Plutchik sentiment wheel, constructing a polar coordinate sentiment representation for sentiment distribution; building an adversarial-based domain adaptation model and integrating it into a weighted multi-adversarial network structure; combining the polar coordinate sentiment representation and the domain adaptation structure to construct a loss function for the model; and using the constructed model to train cross-domain Mongolian sentiment distribution learning. The present invention integrates the idea of ​​polar coordinates into the psychological model of the sentiment wheel, represents the sentiment distribution as a composite sentiment vector, which not only reduces the dimension of the sentiment distribution label, but also introduces a new loss to promote the learning of sentiment distribution; the present invention applies the domain adaptation model to Mongolian sentiment distribution learning, alleviating the problem of the lack of Mongolian sentiment distribution corpus; and the present invention can also achieve more accurate alignment of the same sentiment texts in different domains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of sentiment analysis in natural language processing, and in particular relates to a cross-domain Mongolian sentiment distribution learning method integrating polar coordinates. Background Art

[0002] With the development of social networks and shopping platforms, text sentiment analysis has attracted more and more attention. Human emotions are complex. When expressing a certain point of view, different emotions are often contained, and the intensity of each emotion is also different. In order to solve the ambiguity of this emotion, a new multi-emotion analysis model, sentiment distribution learning, has been proposed in recent years. Its core idea is to record the expression degree of each emotion in the sentiment corpus through sentiment distribution. Sentiment distribution defines that an example is composed of multiple basic emotions, the expression intensity of each emotion is between 0 and 1, and the sum of the expression degrees of all basic emotions is 1.

[0003] Mongolian is a low-resource language. The research on natural language processing of Mongolian started relatively late, so there are relatively few studies on sentiment analysis based on Mongolian. Applying Mongolian to sentiment distribution learning is a direction worthy of research.

[0004] In multi-label classification problems, how to use the correlation between labels is the key to multi-label learning. Similarly, in sentiment distribution learning, there is a certain correlation between emotions. Some emotions are more likely to occur at the same time, while some emotions rarely occur at the same time. Therefore, the psychological prior knowledge of the emotion wheel is often introduced in sentiment distribution learning. Most of the research integrates the prior knowledge of the emotion wheel into the training model through the attention mechanism. Therefore, how to combine the emotion wheel with sentiment distribution learning in a new way is a problem worth studying.

[0005] Since sentiment distribution datasets are relatively scarce, and Mongolian sentiment distribution datasets are even rarer, and the cost of manual annotation is too high, in order to expand the Mongolian sentiment distribution dataset, a domain adaptation model can be used to perform cross-domain Mongolian sentiment distribution training. For example, if you need to judge the sentiment of a "computer" text review, you need to annotate a large number of "computer" review samples for sentiment distribution, and obtain the comment sentiment distribution rules after supervised learning. Similarly, if you want to judge the sentiment of "clothes" text reviews, you also need to perform two stages: sample annotation and supervised learning. However, e-commerce websites contain data from multiple fields. If you annotate massive data for each field, it is a very time-consuming and laborious task. If you use labeled "computer" field (source domain) samples and unlabeled "clothes" field (target domain) samples, and obtain the common knowledge of the two fields through machine learning or deep learning methods, you can achieve the cross-domain application of the knowledge obtained by supervised learning in the source domain to the text sentiment distribution of the target domain.

[0006] Existing research combines the idea of ​​adversarial learning with the domain adaptation model and applies it to cross-domain text classification problems. However, this adversarial domain identification uses the idea of ​​reducing the overall feature distribution of the source domain and the target domain, while ignoring whether similar samples in different domains are accurately aligned. Therefore, when conducting cross-domain sentiment distribution learning, it is more meaningful to reduce the difference between the features of similar samples in the source domain and the target domain. Summary of the invention

[0007] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a cross-domain Mongolian sentiment distribution learning method integrating polar coordinates. First, the idea of ​​polar coordinates is integrated into the sentiment wheel to construct a polar coordinate sentiment representation method, and a new loss function is designed to promote the Mongolian sentiment distribution learning process. Secondly, the domain adaptation model is applied to Mongolian sentiment distribution learning, and a multi-adversarial network weight calculation method is constructed in the adversarial domain adaptation network, so that the same sentiment texts in different domains can be aligned more accurately.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is:

[0009] A cross-domain Mongolian sentiment distribution learning method integrating polar coordinates, including:

[0010] Step 1, preprocessing the Mongolian sentiment corpus;

[0011] Step 2, integrate polar coordinates into the Plutchik emotion wheel to construct a polar coordinate emotion representation method consisting of polar diameter and polar angle for emotion distribution;

[0012] Step 3: Build an adversarial domain adaptation model and integrate a weighted multi-adversarial network structure into the model;

[0013] Step 4, combining the polar coordinate emotion representation method and the domain adaptation structure to construct a loss function for the model;

[0014] Step 5: Use the constructed model to train cross-domain Mongolian sentiment distribution learning.

[0015] The step 1, the pre-processing operation comprises:

[0016] For Mongolian sentiment corpus, data cleaning is performed first, and then BPE is used for word segmentation.

[0017] In step 2, the polar coordinate emotion representation method takes the center O of the emotion wheel as the fixed point, the line segment Ox corresponding to the emotion "fear" as the polar axis, the radius 1 of the emotion wheel as the unit length, and the counterclockwise direction as the positive direction to establish a polar coordinate system of the emotion wheel;

[0018] Each emotional state is defined using an emotion vector e i The expression method is as follows:

[0019] e i =(θ i , ρ i )

[0020] Among them, the polar angle θ i represents the emotion type, θ i ∈[0, 2π], which conforms to all the emotional distributions in the emotional wheel; the extreme diameter ρ i represents the intensity of emotion, ρ i ∈[0, 1], ρ i =1 indicates the strongest emotion intensity, ρ i =0 means the emotion intensity is the weakest;

[0021] The polar coordinate sentiment representation satisfies similarity and additivity:

[0022] The similarity refers to the similarity between different emotions measured by the difference between their polar angles, that is, when When , sentences i1 and i2 have the same emotion type. When the difference between the two polar angles is larger, the difference between the two emotion types is also larger.

[0023] The additivity refers to constructing a composite emotion vector representing emotion distribution through vector addition operation.

[0024] Set the 8 basic emotions in the emotion wheel to 8 evenly distributed unit vectors, and set the emotional intensity of the 8 basic emotions to 1, as follows:

[0025]

[0026] ρ j =1,j∈[1,C]

[0027] Among them, C represents the number of emotion categories in the emotion wheel, C=8, and the corresponding relationship between the unit vectors of the 8 basic emotions is: j=1 for fear, j=2 for trust, j=3 for happiness, j=4 for expectation, j=5 for anger, j=6 for disgust, j=7 for sadness, and j=8 for surprise; and the compound emotion type formed by the 8 basic emotions is distributed in the blank area between the 8 unit vectors.

[0028] In step 3, the domain adaptation model includes:

[0029] Feature extractor: Maps and mixes source domain samples and target domain samples so that the domain discriminator cannot distinguish which domain the data comes from; and extracts the features required by the subsequent network to complete the task so that the feature classifier can distinguish the category of the source domain data;

[0030] Feature classifier: classifies the data from the source domain and assigns the correct labels as much as possible;

[0031] Domain discriminator: classifies the data in the feature space and tries to distinguish which domain the data comes from.

[0032] The process of the domain adaptation model is as follows: the information extracted by the feature extractor is passed to the feature classifier and the domain discriminator respectively. The feature extractor and the feature classifier are used to realize supervised training of source domain samples; the domain discriminator determines whether the incoming information belongs to the source domain or the target domain, and calculates the loss; and the purpose of the feature extractor is to prevent the domain discriminator from correctly judging which domain the information comes from, thus forming an adversarial relationship; finally, through training, an effective feature extractor and feature classifier are obtained, which are applicable to both the source domain and the target domain, and the correct classification results of the source domain and target domain texts are obtained.

[0033] For each category of samples, a domain discriminator with the same structure is used, and each category of samples is used as a training sample for the domain discriminator to train the network parameters, thereby improving the similarity between similar samples in the source domain and the target domain.

[0034] In the weighted multi-adversarial network structure, the weights of different domain discriminators are determined by the following formula:

[0035]

[0036] Among them, N epo The number of Epochs set for training, n epoch is the current training Epoch number, w i =[w i1 w i2 …w ik …w iK ] T , w ik represents the weight of the k-th domain discriminator, k = 1, 2, ..., K, K is the number of domain discriminators, that is, the number of text sentiment categories of the sample;

[0037] is the sentiment classification label similarity vector, The calculation formula is as follows:

[0038]

[0039]

[0040] Among them, C k represents the set of k-th class samples in the source domain included in each iteration, represents the number of samples of the kth category in the source domain of this iteration, and Represent the samples in the source domain and the corresponding emotion labels, respectively. Represents the emotion classification results of the target domain samples;

[0041] If the sample comes from the source domain, then That is, the true emotion label of the sample is equivalent to the weight vector of the domain discriminant network;

[0042] The domain discrimination network loss function of the model for:

[0043]

[0044] Among them, n s and n t Represent the number of samples in the source domain and the target domain respectively, L e is the cross entropy loss function, is the domain discriminator, G y is the feature classifier, d i The domain label.

[0045] In step 4, the model loss function is:

[0046] The model loss function is composed of the main classification loss Polar coordinate sentiment vector loss L p and domain discrimination loss The weighted formula is as follows:

[0047]

[0048] Among them, μ p and μ d is the balance coefficient;

[0049] L p is the polar coordinate emotion vector loss, which is used to assist in the training of emotion distribution. The formula is as follows:

[0050]

[0051] Among them, θ i For the real emotion type, To predict the emotion type, ρ i For the real emotional intensity, To predict the intensity of emotion;

[0052] For the main classification network in the domain adaptation model, the cross entropy loss function is adopted, and the formula is as follows:

[0053]

[0054] in, is the true emotion label vector of the i-th sample in the source domain The kth component of The sentiment label vector predicted by the main classification network for this sample The kth component of

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] Firstly, the present invention incorporates the idea of ​​polar coordinates into the psychological model of the emotion wheel and represents the emotion distribution as a composite emotion vector, which not only reduces the dimension of the emotion distribution label but also introduces a new loss to promote the learning of emotion distribution; secondly, the present invention applies the domain adaptation model to the Mongolian emotion distribution learning, which alleviates the problem of the shortage of Mongolian emotion distribution corpus; thirdly, the present invention introduces a multi-adversarial network weight calculation method for the adversarial-based domain adaptation network, so that the same emotion texts in different domains can be more accurately aligned. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a schematic diagram of the overall process of the present invention.

[0058] Figure 2 This is a diagram of Plutchik's emotion wheel.

[0059] Figure 3 It is a polar coordinate diagram.

[0060] Figure 4 It is a schematic diagram of polar coordinate emotion representation of 8 basic emotions of the present invention.

[0061] Figure 5 Schematic diagram of polar coordinate emotion representation of example emotion distribution of the present invention.

[0062] Figure 6 Schematic diagram of the composition of the composite emotion vector of the present invention.

[0063] Figure 7 It is a schematic diagram of a domain adaptation model incorporating a weighted multi-adversarial network structure in the present invention. DETAILED DESCRIPTION

[0064] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.

[0065] like Figure 1As shown, the present invention is mainly a cross-domain Mongolian sentiment distribution learning method integrating polar coordinates.

[0066] Step 1: Preprocess the Mongolian corpus.

[0067] First, perform data cleaning on the Mongolian corpus, and then use BPE to perform word segmentation on Mongolian.

[0068] For the word segmentation operation, take "The hair oil runs out super fast, bad review." as an example, its corresponding Mongolian expression is The result after word segmentation is

[0069] Step 2, integrate polar coordinates into the Plutchik emotion wheel and construct a polar coordinate emotion representation consisting of polar radius and polar angle for emotion distribution.

[0070] Human emotions are very complex, and some emotions have obvious correlations. Some emotions often appear at the same time, that is, they show positive correlation, while some emotions are the opposite, showing negative correlation. In 1980, Robert Plutchik proposed a theory to describe the relationship between human emotions from a psychological perspective-Plutchik's emotion wheel. This emotion wheel contains 8 basic emotions: anger, disgust, sadness, surprise, fear, trust, happiness and expectation. These 8 emotions are divided into 4 groups of opposing emotions in the emotion wheel. Emotions in diagonal positions show opposition (negative correlation), and emotions in adjacent positions are similar (positive correlation). In the emotion wheel, every two adjacent emotions are 45 degrees apart, and opposing emotions are 180 degrees apart. For example, happiness and trust are two adjacent emotions, 45 degrees apart, happiness and sadness are opposing emotions, 180 degrees apart. Figure 2 shown.

[0071] Polar coordinates are a two-dimensional coordinate system created by Newton. Polar coordinates refer to taking a fixed point O in a plane, called the pole, and drawing a ray O x , called the polar axis, and then select a length unit and the positive direction of the angle (usually counterclockwise). For any point M in the plane, use ρ to represent the length of the line segment OM, θ to represent the angle from Ox to OM, ρ is called the polar diameter of point M, θ is called the polar angle of point M, and the ordered pair (ρ, θ) is called the polar coordinates of point M. The coordinate system established in this way is called the polar coordinate system. Usually, the unit of the polar coordinate of M is 1 (unit of length), and the unit of the polar coordinate is rad (or °). The polar coordinates of the vector OM are also (ρ, θ), such as Figure 3 shown.

[0072] The polar coordinate emotion representation method proposed in the present invention integrates the idea of ​​polar coordinates into the emotion wheel, takes the center O of the emotion wheel as the fixed point, the line segment Ox corresponding to the emotion "fear" as the polar axis, takes the radius 1 of the emotion wheel as the unit length, and takes the counterclockwise direction as the positive direction, so as to establish the polar coordinate system of the emotion wheel.

[0073] Borrowing the idea of ​​polar coordinates, each emotional state is defined using an emotional vector e i The expression method is as follows:

[0074] e i =(θ i , ρ i )

[0075] Among them, the polar angle θ i represents the emotion type, θ i ∈[0, 2π], which conforms to all the emotional distributions in the emotional wheel. i represents the intensity of emotion, ρ i ∈[0, 1], ρ i =1 indicates the strongest emotion intensity, ρ i =0 indicates the weakest emotion intensity. First, the 8 basic emotions in the emotion wheel are set to 8 evenly distributed unit vectors, and the emotional intensity of the 8 basic emotions is set to 1, as follows:

[0076]

[0077] ρ j =1,j∈[1,C]

[0078] Wherein, C represents the number of emotion categories in the emotion wheel, and in the present invention, C=8, and the corresponding relationship between the unit vectors of the eight basic emotions is: j=1 for fear, j=2 for trust, j=3 for happiness, j=4 for expectation, j=5 for anger, j=6 for disgust, j=7 for sadness, and j=8 for surprise. In addition, there are also compound emotion types, which are composed of these eight basic emotions and are distributed in the blank areas between these eight basic vectors.

[0079] At this time, the polar coordinate emotions corresponding to the 8 basic emotions are: fear (0, 1), trust Happy expect Anger (π, 1), Disgust sad surprise like Figure 4 shown.

[0080] The polar coordinate emotion representation method in the present invention satisfies the following two characteristics:

[0081] (1) Similarity. The similarity between different emotions is measured by the difference between their polar angles. When , sentences i1 and i2 have the same emotion type. The greater the difference between the two polar angles, the greater the difference between the two emotion types.

[0082] (2) Additivity. Since the emotion distribution is composed of eight emotions of different intensities, the polar coordinate emotion representation is introduced to simplify the representation of emotion distribution. Therefore, in order to transform the emotion distribution into a polar coordinate vector in the polar coordinate system of the emotion wheel, a composite emotion vector representing the emotion distribution can be constructed through vector addition operations.

[0083] For example, the sentence " (The hair oil runs out super fast, bad review.)" expresses the emotions: 60% anger, 30% disgust, 10% sadness, and the distribution of this emotion corresponds to the unit vectors of the eight basic emotions in the polar coordinate system of the emotion wheel, such as Figure 5 As shown. Using vector additivity, it is synthesized into a composite emotion vector, as Figure 6 shown.

[0084] Step 3: Build an adversarial domain adaptation model and integrate a weighted multi-adversarial network structure into the model.

[0085] Domain adaptation, also known as domain adversarial learning, is an important branch of transfer learning, which is used to eliminate the differences in feature distribution between different domains. The purpose is to map data in the source domain and target domain with different distributions to the same feature space, and find a certain metric to make their "distance" in this space as close as possible. Then, the classifier trained in the source domain can be directly used to classify the target domain data.

[0086] The domain adaptation model consists of three parts: feature extractor, feature classifier and domain discriminator. Their functions are as follows:

[0087] Feature extractor: (1) Maps and mixes source domain samples and target domain samples so that the domain discriminator cannot distinguish which domain the data comes from; (2) Extracts the features required by the subsequent network to complete the task so that the feature classifier can distinguish the category of the data from the source domain.

[0088] Feature classifier: classifies the data from the source domain and assigns the correct labels as much as possible.

[0089] Domain discriminator: classifies the data in the feature space and tries to distinguish which domain the data comes from.

[0090] The process of the domain adaptation model is as follows: the information extracted by the feature extractor will be passed to the feature classifier and the domain discriminator respectively. The feature extractor and the feature classifier are used to implement supervised training of source domain samples. The domain discriminator will determine whether the incoming information belongs to the source domain or the target domain and calculate the loss. The purpose of the feature extractor is to prevent the domain discriminator from correctly judging which domain the information comes from, thus forming an adversarial relationship. Finally, through training, an effective feature extractor and feature classifier are obtained, which are applicable to both the source domain and the target domain, and the correct classification results of the source domain and target domain texts are obtained.

[0091] Assume the source domain is The domain label is in, and Distribution represents the samples in the source domain and the corresponding category labels, ns represents the number of samples in the source domain; let the target domain be The domain label is in, represents the samples in the target domain, n t Represents the number of samples in the target domain. The target domain samples do not contain label information.

[0092] In order to cooperate with the training of the domain adaptation model, the emotional distribution is divided into 8 categories according to the extreme angle range in the composite emotion, namely For fear, For trust, For happiness, For the expectation, For anger, For disgust, For sadness, for surprise. The extreme angle range of the composite emotion of "(I used up my hair oil very quickly, so I gave a bad review.)" belongs to Hence the category of anger.

[0093] In order to improve the alignment of similar samples in the source domain and the target domain, the present invention uses a domain discriminator with the same structure for each type of sample, and uses each type of sample as a training sample for the domain discriminator to train the network parameters, thereby improving the similarity between similar samples. f represents the feature extractor, G y represents the feature classifier, represents the domain discriminator, k = 1, 2…, K, where K is the number of text sentiment categories of the sample, represents the emotion classification result output by the feature classifier, w ik represents the weight of the domain discriminator. Figure 7 shown.

[0094] Since the samples in the source domain carry label information, they can be assigned to the domain discriminator of the corresponding category according to the true label of the sample during training. However, the samples in the target domain are unlabeled and cannot be accurately assigned to the corresponding domain discriminator at one time during training. To address this problem, the present invention constructs a domain discriminant network weight calculation method that integrates the emotion classification label similarity vector and the emotion classification label vector, so that in the early stage of training, regardless of whether the classification result of the target domain sample is accurate, the classification result of the sample will have a good similarity with the classification result of the same sample in the source domain, and the emotion label of the source domain sample is real. In this way, the category of the target domain sample can be preliminarily estimated based on the similarity of the classification results. Emotion classification label similarity vector The calculation formula is as follows:

[0095]

[0096]

[0097] Among them, C k represents the set of k-th class samples in the source domain included in each iteration, represents the number of samples of the kth class in the source domain of this iteration, k = 1, 2…, K, and Represent the samples in the source domain and the corresponding emotion labels, respectively. Represents the sentiment classification results of the target domain samples.

[0098] As the number of training iterations increases, the emotion classification results of the target domain samples It will become more and more stable and accurate. Therefore, the classification results of target domain samples will gradually be given greater weight in pseudo-label calculation. Based on the above analysis, a new weight algorithm method for different domain discriminators is proposed. The formula is as follows:

[0099]

[0100] Among them, N epoch The number of Epochs set for training, n epoch is the current training Epoch number, w i =[w i1 w i2 … w iK ] T .

[0101] If the sample comes from the source domain, then That is, the true emotion label of the sample is equivalent to the weight vector of the domain discriminant network.

[0102] Then the domain discrimination network loss function of the model is for:

[0103]

[0104] Among them, n s and n t Represent the number of samples in the source domain and the target domain respectively, K is the number of text sentiment categories of the samples, and w ik is the weight of the domain discriminator, L e is the cross entropy loss function, is the domain discriminator, G y is the feature classifier, d i is the domain label, which indicates the final emotion label of the source domain samples and target domain samples of the same type in the domain discriminator. Indicates the emotional label of the target domain sample. In the early stage of model training, It may be an incorrect label, so the target domain sample may be assigned to the wrong domain discriminator. However, as the model is continuously trained, the emotion classification results of the target domain samples gradually become stable and accurate. Finally equal to d i .

[0105] For example, the Mongolian sentiment distribution corpus with labels for evaluating "shampoo" is used as the source domain sample, and the unlabeled Mongolian corpus for evaluating "pants" is used as the target domain sample. A domain discrimination network is constructed for the eight emotion categories of anger, disgust, sadness, surprise, fear, trust, happiness and expectation in the evaluation of "shampoo" and "pants". The evaluation of "shampoo" can be assigned to the corresponding domain discrimination network according to the real emotion label, as shown in the example " "(The hair oil runs out super fast, bad review.)" belongs to the "angry" category, and is directly assigned to the domain discriminator of the "angry" category. The "pants" evaluation uses the domain discriminant network weight calculation method that combines the sentiment classification label similarity vector and the sentiment classification label vector to preliminarily estimate the category of the samples in the "pants" evaluation based on the similarity of the classification results. As the number of training iterations increases, the classification results of the target domain samples will become more and more stable and accurate. For example, in the example " (It started to get fuzzy after two days of wearing. The fabric is too bad.)” Through continuous iteration, it will eventually correspond to the domain discriminator of the “anger” category; and the example (I have purchased it many times, and it is very cost-effective.)” Based on continuous iterations, it will eventually correspond to the domain discriminator of the “trust” category.

[0106] Step 4: Combine the polar coordinate emotion representation method and domain adaptation structure to construct a loss function for the model.

[0107] The present invention constructs the polar coordinate emotion vector loss L p Used to assist in the training of sentiment distribution, the formula is as follows:

[0108]

[0109] Among them, θ i For the real emotion type, To predict the emotion type, ρ i For the real emotional intensity, To predict the intensity of emotion.

[0110] The main classification network in the domain adaptation model uses the cross entropy loss function The formula is as follows:

[0111]

[0112] in, is the true emotion label vector of the i-th sample in the source domain The kth component of The sentiment label vector predicted by the main classification network for this sample The kth component of K is the number of text sentiment categories of the sample.

[0113] The model loss function of the present invention is composed of the main classification loss Polar coordinate sentiment vector loss L p and domain discrimination loss The weighted formula is as follows:

[0114]

[0115] Among them, μ p and μ d is the balance coefficient.

[0116] Step 5: Use the constructed model to train cross-domain Mongolian sentiment distribution learning.

[0117] For example, the sentence " "(The hair oil runs out super fast, bad review.)" is a sample in the source domain, and the emotions it expresses are: 60% anger, 30% disgust, and 10% sadness. After model training, the target domain samples with highly similar feature spaces have the same labels as the source domain samples, such as the sentence " (It started to pill after just two days of wearing. The fabric is too bad.)” The emotions expressed were: 60% anger, 30% disgust, and 10% sadness.

Claims

1. A cross-domain Mongolian sentiment distribution learning method integrating polar coordinates, characterized in that: include: Step 1, preprocessing the Mongolian sentiment corpus; Step 2, integrate polar coordinates into the Plutchik emotion wheel to construct a polar coordinate emotion representation method consisting of polar diameter and polar angle for emotion distribution; Step 3: Build an adversarial domain adaptation model and integrate a weighted multi-adversarial network structure into the model; Step 4, combining the polar coordinate emotion representation method and the domain adaptation structure to construct a loss function for the model; Step 5, using the constructed model to train cross-domain Mongolian sentiment distribution learning; Among them, the model loss function is composed of the main classification loss Polar coordinate sentiment vector loss L p and domain discrimination loss The weighted formula is as follows: Among them, μ p and μ d is the balance coefficient; L p is the polar coordinate emotion vector loss, which is used to assist in the training of emotion distribution. The formula is as follows: Among them, θ i For the real emotion type, To predict the emotion type, ρ i For the real emotional intensity, To predict the intensity of emotion; For the main classification network in the domain adaptation model, the cross entropy loss function is adopted, and the formula is as follows: in, is the true emotion label vector of the i-th sample in the source domain The kth component of The sentiment label vector predicted by the main classification network for this sample The kth component of 2. According to the cross-domain Mongolian sentiment distribution learning method integrating polar coordinates according to claim 1, it is characterized in that: The step 1, the pre-processing operation comprises: For Mongolian sentiment corpus, data cleaning is performed first, and then BPE is used for word segmentation.

3. According to the cross-domain Mongolian sentiment distribution learning method integrating polar coordinates as described in claim 1, it is characterized in that: In step 2, the polar coordinate emotion representation method takes the center O of the emotion wheel as the fixed point, the line segment Ox corresponding to the emotion "fear" as the polar axis, the radius 1 of the emotion wheel as the unit length, and the counterclockwise direction as the positive direction to establish the emotion wheel polar coordinate system; Each emotional state is defined using an emotion vector e i The expression method is as follows: e i =(θ i ,r i ) Among them, the polar angle θ i represents the emotion type, θ i ∈[0,2π], which conforms to all the emotional distributions in the emotional wheel; the extreme diameter ρ i represents the intensity of emotion, ρ i ∈[0,1],ρ i =1 indicates the strongest emotion intensity, ρ i =0 means the emotion intensity is the weakest; The polar coordinate sentiment representation satisfies similarity and additivity: The similarity refers to the similarity between different emotions measured by the difference between their polar angles, that is, when When , sentences i1 and i2 have the same emotion type. When the difference between the two polar angles is larger, the difference between the two emotion types is also larger. The additivity refers to constructing a composite emotion vector representing emotion distribution through vector addition operation.

4. According to the cross-domain Mongolian sentiment distribution learning method integrating polar coordinates as described in claim 3, it is characterized in that: Set the 8 basic emotions in the emotion wheel to 8 evenly distributed unit vectors, and set the emotional intensity of the 8 basic emotions to 1, as follows: r j =1,j∈[1,C] Among them, C represents the number of emotion categories in the emotion wheel, C=8, and the corresponding relationship between the unit vectors of the eight basic emotions is: j=1 is fear, j=2 is trust, j=3 is happiness, j=4 is expectation, j=5 is anger, j=6 is disgust, j=7 is sadness, and j=8 is surprise; and the compound emotion types formed by the eight basic emotions are distributed in the blank areas between the eight unit vectors; The polar coordinates of the eight basic emotions are: fear (0,1), trust Happy expect Anger (π, 1), disgust sad surprise 5. The cross-domain Mongolian sentiment distribution learning method integrating polar coordinates according to claim 1 is characterized in that: In step 3, the domain adaptation model includes: Feature extractor: Maps and mixes source domain samples and target domain samples so that the domain discriminator cannot distinguish which domain the data comes from; and extracts the features required by the subsequent network to complete the task so that the feature classifier can distinguish the category of the source domain data; Feature classifier: classifies the data from the source domain and assigns the correct label; Domain discriminator: classifies the data in the feature space and determines which domain the data comes from; The process of the domain adaptation model is as follows: the information extracted by the feature extractor is passed to the feature classifier and the domain discriminator respectively. The feature extractor and the feature classifier are used to realize supervised training of source domain samples; the domain discriminator determines whether the incoming information belongs to the source domain or the target domain, and calculates the loss; and the purpose of the feature extractor is to prevent the domain discriminator from correctly judging which domain the information comes from, thus forming an adversarial relationship; finally, through training, an effective feature extractor and feature classifier are obtained, which are applicable to both the source domain and the target domain, and the correct classification results of the source domain and target domain texts are obtained.

6. The cross-domain Mongolian sentiment distribution learning method integrating polar coordinates according to claim 5 is characterized in that: According to the extreme angle range in the composite emotion, the emotional distribution is divided into 8 categories, namely For fear, For trust, For happiness, For the expectation, For anger, For disgust, For sadness, For surprise.

7. The cross-domain Mongolian sentiment distribution learning method integrating polar coordinates according to claim 6 is characterized in that: For each category of samples, a domain discriminator with the same structure is used, and each category of samples is used as a training sample for the domain discriminator to train the network parameters, thereby improving the similarity between similar samples in the source domain and the target domain.

Citation Information

Patent Citations

  • Method for determining emotion of computer

    CN110799993A

  • Emotion recognition method and system based on electroencephalogram signals

    CN114578967A