Explainable recommendation method for handling sentiment inconsistency between ratings and reviews

By decomposing ratings and reviews into modal differences in shared and proprietary semantics, personalized and high-quality text explanations are generated, solving the problem of sentiment inconsistency between ratings and reviews and improving the interpretability and user trust of the recommendation system.

CN116070031BActive Publication Date: 2025-12-09NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310262514.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2025-12-09
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

Existing recommendation systems lack effective explanatory generation capabilities when dealing with the inconsistency between ratings and reviews, leading to a decline in the interpretability and user trust of the recommendation system. Furthermore, traditional encoders limit the quality of text generation.

Method used

By treating ratings and reviews as two modalities, and using different encoders to decompose each modality into shared semantics and proprietary semantics, personalized and high-quality text interpretations are generated through training on the differences between modalities.

Benefits of technology

It improves the accuracy and fluency of the explanations, enhances the explainability and user trust of the recommendation system, and the generated text performs well on multiple evaluation metrics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116070031B_ABST
    Figure CN116070031B_ABST
Patent Text Reader

Abstract

The application provides an explainable recommendation method for processing sentiment inconsistency problems between scoring comments, and relates to the technical field of network recommendation.The application regards the scoring and the comment as two modes, utilizes different encoders to decompose each mode into two representations, i.e., mode-shared semantics and mode-dedicated semantics; the difference information between the two modes is learned by training in a mode of pulling the shared semantics between the modes closer and the dedicated semantics farther away, and then the difference information is used as a component of text generation, so as to generate an explanation with better individualization and text quality, and obtain the scoring value of the user to the item and the explanation given when the item is recommended to the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network recommendation, and in particular to an interpretable recommendation method for processing sentiment inconsistency between rating and review. BACKGROUND

[0002] There are three main research directions in the field of explainable recommendation system based on reviews. The first direction is to directly extract representative text segments (i.e., explanations) from existing reviews, while enriching the representation of users and items. For example, the NARRE model in WWW2018 aggregates information in reviews through an attention mechanism to model the features of items and users. The CAPR model in SIGIR2019 designs a capsule network to aggregate reviews that users pay attention to. Such models only use selected reviews as features of items, without providing specific reasons for recommendations to users, resulting in a loss of explainability of the recommendation system and user trust.

[0003] The second direction is to generate explanations in the form of pre-defined templates. For example, the MTER model in SIGIR2018 combines pre-defined templates with predicted item attribute words and corresponding user opinion words to generate explanations. The DEAML model in AAAI2019 uses attention multi-view to extract rich information from Microsoft Concept Graph to generate template-based explanations. FacT in SIGIR2019 seamlessly combines implicit information with model and explanation rules to learn to achieve explainable recommendations. However, these templates lack the necessary expressive power and diversity of natural language, and therefore lack a certain persuasiveness.

[0004] In recent years, in order to solve these problems, neural networks have received extensive attention due to their ability to generate more flexible explanations in sentence style, and have been used in explainable text generation. The DualPC model in WWW2020 believes that the rating prediction task and the explanation generation task should not be separated, and in order to obtain better explanation recommendations, the model incorporates dual constraints for both tasks. The NETE model in CIKM2020 found that sentences generated by natural language generation are difficult to control in quality, while sentences generated by templates may guarantee quality but are too homogeneous in semantics, so the advantages of both were combined to improve the expressiveness and quality of recommendation explanations. The SAER model in WSDM2021 (pages 1029-1037) conference designed sentiment regularization terms in the training and testing stages to achieve consistency between explanations and ratings.

[0005] The basic assumption behind the model proposed by the existing work is that there is sentiment consistency between the reviews and ratings, which is not true in many cases in practical applications. For example, a user may give a relatively high rating and a relatively negative review for an item. Therefore, the sentiment inconsistency between the ratings and the reviews should be considered in the explanation generation process. At the same time, in the previous text generation implementation, a traditional encoder such as a long short-term memory network is usually used for training, which usually limits the quality of text generation. SUMMARY

[0006] The technical problem to be solved by the present application is to provide an interpretable recommendation method for processing the sentiment inconsistency problem between ratings and reviews, which extracts the difference between ratings and reviews and applies it to text generation to achieve effective personalized explanation.

[0007] To solve the above technical problems, the technical solution adopted by the present application is:

[0008] An interpretable recommendation method for processing the sentiment inconsistency problem between ratings and reviews, comprising data preprocessing, training model and generating ratings and explanations.

[0009] After data preprocessing, ratings and reviews are regarded as two modalities, and different encoders are used to decompose each modality into two representations, i.e. modality shared semantics and modality exclusive semantics; the difference information between the two modalities is learned by training the shared semantics between the modalities to be close and the exclusive semantics to be far apart, and then the difference information is used as a component of text generation, so as to generate an explanation with better individualization and text quality, and obtain the rating value of the user for the item and the explanation given when recommending the item to the user.

[0010] Further, in the data preprocessing, the training set is marked as: X={U,I,R,E}, U, I, R, E represent user set, item set, rating set and review set respectively; and r u,i is the rating of user u for item i, e u,i is the review of u for i; the data preprocessing specifically includes the following steps:

[0011] Step 1.1: The training data set of interpretable recommendation contains a plurality of sequences, each sequence including a user, an item, a rating of the user for the item and a review. In the preprocessing process, users and items with less than 5 reviews are removed to obtain a relatively clean and standard data set.

[0012] Step 1.2: For the review data input into the model, the length of the review is defined as 15; reviews with less than 15 words are filled with <pad>Pad to 15 words; truncate reviews longer than 15 words, while adding <bos>and <eos>The marks represent the beginning and end of a sentence.

[0013] Step 1.3: During model training, each sequence is input into the model one by one, and the score is used as the supervision signal for the score prediction model, while the review is used as the supervision signal for text generation.

[0014] Further, in the training learning, after initializing the model parameters, data is read from the data set and input into the model, and after score prediction, difference extraction and explanation generation, three loss functions are obtained, which are combined into a multi-task learning framework for loss fusion, and finally the target function of the model is obtained; The above process is repeated until the model converges.

[0015] Further, the specific method of training learning is as follows:

[0016] Step 2.1: The overall representation ui_ra of the rating modality is obtained by concatenating the user and the item, as shown in the following formula:

[0017] ui_ra = Linear([u, i])

[0018] Where u represents the user, i represents the item, and Linear represents a linear function.

[0019] Step 2.2: Concatenate each word in the user, item and corresponding review to input into the Transformer to obtain the representation ui_re of the review modality.

[0020] Step 2.3: Use multi-layer perception MLP to decouple the rating representation and the review representation, and decouple each modality into shared semantic representation and exclusive semantic representation; The shared semantic representations of the two modalities are ra_c and re_c, and the exclusive semantic representations of the two modalities are ra_s and re_s.

[0021] Step 2.4: Use the overall representation ui_ra of the rating modality to predict the score, so that the user and the item learn the information of the score; Use MSE loss as the target function to learn the distance L between the score prediction value ui_ra and the score supervision signal r u,i . R :

[0022]

[0023] Step 2.5: Take ra_s and re_s as the differences in the rating modality and the review modality respectively; In order to ensure that the generated shared representation and exclusive representation can capture the different aspects of the modalities, further constraints are added to these representations, specifically, the shared representations of the two modalities are approximated, and the exclusive representations of the two modalities are far away from each other; The loss function L cl in the decoupling process is represented as follows:

[0024] L cl = ||ra_c - re_c|| 2 - ||ra_s - re_s|| 2

[0025] Step 2.6: Introduce an opposite objective to optimize the model; first cross-modal align the shared semantic representations of the two modalities through a multi-layer perception (MLP), then minimize the cross-modal gap L cm c , maximize the condition that the correct shared features are extracted;

[0026] Step 2.7: Further optimize the original modal representation and the exclusive semantic representation;

[0027] Minimize the cross-modal gap between the original semantic representation and the exclusive semantic representation, respectively, L cm o , L cm s ; Use the contrastive loss L cm to optimize the objective to meet the condition L cm c < L cm o < L cm s , which is specifically represented as follows:

[0028]

[0029] Where Φ = {Φ a , Φ e} represents all the parameters in the cross-modal alignment;

[0030] Step 2.8: In the cross-decoupling part, the final loss representation is L DE = L cl + L cm ;

[0031] Step 2.9: In the text generation part, use the overall representation of the review ui_re and the exclusive semantic representation ra_s in the rating modal to generate better quality text, then use the negative log-likelihood loss L EG to optimize the text generation;

[0032] Step 2.10: Combine the three parts into a multi-task learning framework, and the objective function of the final model is represented as follows:

[0033]

[0034] Where Θ represents all the trainable parameters, λ r and λ d is a regularization factor balancing the importance of the score prediction task and the discrepancy extraction task.

[0035] Further, in step 2.3, the shared semantic representations of the two modalities are defined as:

[0036] ra_c = MLP(ui ra; 0 a )

[0037] re_c = MLP(ui re; 0 e )

[0038] where 0 a and 0 e are all parameters of the multi-layer perceptron MLP, respectively.

[0039] Given the overall representations ui ra, ui re of the rating and review modalities and the shared semantic representations ra c, re c extracted from the two modalities, respectively, the exclusive semantic representations ra s, re s in the two modalities are obtained by subtraction as follows:

[0040] ra s = ui ra - ra c

[0041] re s = ui re - re c.

[0042] Further, in step 2.6, the specific formula of cross-modal alignment is as follows:

[0043] ra c' = MLP(re c; F e ); re c' = MLP(ra c; F a )

[0044] L cm c is as follows:

[0045] L cm c = ||ui ra - ra c' || 2 + ||ui re - re c' || 2

[0046] where ra c' and re c' represent the cross-modal representations of re c and ra c, respectively, F a and F e are learnable parameters.

[0047] Further, in step 2.7, the minimum of the original semantic representation and the exclusive semantic representation under cross-modal alignment is obtained by:

[0048] Similar to the cross-alignment of shared semantics, the original representation and the exclusive semantic representation under the cross-modal can be obtained as follows:

[0049] ui_ra' = MLP(ui_re, Φ e )

[0050] ui_re' = MLP(ui_ra, Φ a )

[0051] ra_s' = MLP(re_s, Φ e ); re_s' = MLP(ra_s, Φ a )

[0052] Based on the above cross-representation, the original semantic representation and the exclusive semantic representation under the cross-modal are minimized as follows:

[0053] L cm o = ||ui_ra-ui_ra'|| 2 + ||ui_re-ui_re'|| 2

[0054] L cm s = ||ui_ra-ra_s'|| + ||ui_re-re_s'|| 2 + ||ui_re-re_s'|| 2 .

[0055] Further, in the step 2.9, the negative log-likelihood loss L EG The specific formula is as follows:

[0056]

[0057] wherein, represents the final representation of the review fused with the difference information, represents the distribution of the t-th word e' w,t in the entire vocabulary; W v ∈R Vxd and b v ∈R V are trainable parameters, and |V| is the size of the vocabulary.

[0058] Further, after the training is completed, the test is performed, the score and the explanation are generated, and by inputting the user u and the item i into the trained model, the score value of the user u to the item i is generated and the explanation given by the model when the item i is recommended to the user u.

[0059] The beneficial effects produced by the technical scheme are that the explainable recommendation method for processing sentiment inconsistency between ratings and reviews provided by the application regards ratings and reviews as two modalities, utilizes different encoders to decompose each modality into two representations: modality-shared semantics and modality-specific semantics. The difference information between the two modalities is learned by pulling the shared semantics between the modalities closer and the specific semantics farther apart, and then the difference information is used as a component of text generation to generate an explanation that is better in personalization and text quality. Specifically, compared with the three methods currently excellent in the explainable field, the method performs excellently in the index of representation explanation accuracy (BLEU1 and ROUGE1), and is also very competitive in the indexes of representation explanation fluency (BLEU4 and ROUGE2) and representation personalization degree (USR). BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 The recommendation method provided by the embodiment of the application is shown in the overall flowchart.

[0061] Figure 2 The training flowchart provided by the embodiment of the application is shown.

[0062] Figure 3 The algorithm architecture diagram provided by the embodiment of the application is shown. DETAILED DESCRIPTION

[0063] The specific embodiments of the application are described in further detail below in combination with the drawings and examples. The following examples are used to illustrate the application, but are not used to limit the scope of the application.

[0064] First, the sentiment analysis of the comments of the used Yelp, AmazonMov and TripAdvisor data sets is performed using the Stanford University Stanza tool, the Vendor tool and the Textblob tool. Specifically, the sentiment of the comments is divided into 0 (negative), 1 (neutral) and 2 (positive) according to the sentiment polarity obtained by the analysis, and the ratings are also marked as 0 (rating < 3), 1 (rating = 3) and 2 (rating > 3). For each data set, the sentiment consistency of each (rating, comment) pair is calculated, and the specific results are shown in Table 1. It can be found that the distribution of sentiment inconsistency tends to be consistent in each data set. Overall, the sentiment inconsistency rate is as high as 40%, which means that sentiment inconsistency often occurs in practical applications.

[0065] It is found through the above data analysis that there is inconsistency between ratings and reviews, therefore, the embodiment proposes an explainable recommendation method for processing sentiment inconsistency between ratings and reviews, which extracts the difference between ratings and reviews and applies it to text generation to realize effective personalized explanation.

[0066] Results of the analysis of the percentage of inconsistencies between ratings and review sentiment

[0067]

[0068] As Figure 1 shown, the method of the present embodiment is as follows.

[0069] The interpretable recommendation method for processing the problem of sentiment inconsistency between rating and review, after data preprocessing, regards the rating and review as two modalities, uses different encoders to decompose each modality into two representations, i.e. modality shared semantics and modality exclusive semantics; by training to learn the difference information between the two modalities in the way of pulling the shared semantics between the modalities closer and the exclusive semantics farther, then using the difference information for the components of text generation, thus generating better personalized and text quality explanation, obtaining the rating value of the user to the item and the explanation given when recommending the item to the user.

[0070] Step 1: data preprocessing.

[0071] For ease of discussion, the present embodiment marks the training set as: X={U,I,R,E}, U, I, R, E represent the user set, the item set, the rating set and the review set respectively; at the same time, mark r u,i as the rating of the user u to the item i, e u,i as the review of u to i.

[0072] Data preprocessing specifically includes the following steps:

[0073] Step 1.1: the training data set of interpretable recommendation contains several sequences, each sequence includes user, item, rating and review of the user to the item, in the preprocessing process, users and items with less than 5 reviews are removed, thus obtaining a relatively clean and standard data set;

[0074] Step 1.2: for the review data input into the model, define the length of the review as 15 (the average length of the review in the data set is 15); the review with less than 15 words is filled with <pad>Pad to 15 words; truncate reviews longer than 15 words, while adding <bos>and <eos>The marks represent the beginning and end of a sentence;

[0075] Step 1.3: During model training, each sequence is input into the model in turn, and the score is taken as the supervision signal of the score prediction model, while the review is taken as the supervision signal of text generation.

[0076] Step 2: Train the model.

[0077] As shown in Figure 2 , after initializing the model parameters, data is read from the data set and input into the model, and after score prediction, difference extraction and explanation generation, three loss functions are obtained. The three parts are combined into a multi-task learning framework, loss fusion is performed, and finally the objective function of the model is obtained; the above process is repeated until the model converges.

[0078] The specific algorithm architecture is as shown in Figure 3 , and the specific method is as follows:

[0079] Step 2.1: The overall representation of the rating modality ui_ra is obtained by concatenating the user and the item, as shown in the following formula:

[0080] ui_ra=Linear([u,i])

[0081] Where u represents the user, i represents the item, and Linear represents a linear function;

[0082] Step 2.2: Concatenate each word in the user, item and corresponding review to input into the Transformer to obtain the representation of the review modality ui_re;

[0083] Step 2.3: Use a multi-layer perception MLP to decouple the rating representation and the review representation, and decouple each modality into a shared semantic representation and an exclusive semantic representation;

[0084] The shared semantic representations of the two modalities are defined as:

[0085] ra_c=MLP(ui_ra;θ a )

[0086] re_c=MLP(ui_re;θ e )

[0087] Where θ a and θ e are all parameters of the multi-layer perception MLP;

[0088] Given the overall representations ui_ra, ui_re of the rating and review modalities and the shared semantic representations ra_c, re_c extracted from the two modalities, the exclusive semantic representations ra_s, re_s of the two modalities are obtained by subtraction as follows:

[0089] ra_s = ui_ra - ra_c

[0090] re_s = ui_re - re_c

[0091] Step 2.4: Use the overall representation ui_ra of the rating modality to make rating prediction, so that the user and the item learn the information of the rating; use MSE loss as the objective function to learn the rating prediction value ui_ra and the rating supervision signal r u,i The distance L R between them is:

[0092]

[0093] Step 2.5: Take ra_s and re_s as the differences in the rating and review modalities respectively; in order to ensure that the generated shared and exclusive representations can capture the different aspects of the modalities, further constraints are added to these representations, specifically, the shared representations of the two modalities are approximated, and the exclusive representations of the two modalities are far away from each other; the loss function L cl in the decoupling process is as follows:

[0094] L cl = ||ra_c - re_c|| 2 - ||ra_s - re_s|| 2

[0095] Step 2.6: In the above decoupling process, although each modality is forced to contain different information, there is no supervision signal to guide the entire decoupling process, and it cannot be guaranteed that the shared semantic representation contains accurate information. Therefore, a reverse objective is introduced to optimize the model. Specifically, first, the shared semantic representations of the two modalities are cross-modally aligned through a multi-layer perception (MLP), and the specific formula is as follows:

[0096] ra_c' = MLP(re_c; Φ e ); re_c' = MLP(ra_c; Φ a )

[0097] By minimizing the formula of the cross-modal gap L cm c , it can be ensured that the correct shared features are extracted;

[0098] L cm c = ||ui ra-ra_c' || 2 +||ui re-re_c' || 2

[0099] where ra_c' and re_c' denote the cross-modal representation of re_c and ra_c respectively, Φ a and Φ e are learnable parameters;

[0100] Step 2.7: In the above cross-modal alignment, it is possible that the shared semantic information is separated into the exclusive semantic information, leading to the inaccuracy of the exclusive semantic information. Therefore, the original modal representation and the exclusive semantic representation are further optimized.

[0101] Similar to the cross-alignment of the shared semantic, the original representation and the exclusive semantic representation under the cross-modal can be obtained as follows:

[0102] ui ra' = MLP(ui re, Φ e )

[0103] ui re' = MLP(ui ra, Φ a )

[0104] ra_s' = MLP(re_s, Φ e ); re_s' = MLP(ra_s, Φ a )

[0105] Based on the above cross-representation, the original semantic representation and the exclusive semantic representation under the cross-modal are minimized as follows:

[0106] L cm o =||ui ra-ui ra' || 2 +||ui re-ui re' || 2

[0107] L cm s =||ui ra-ra_s' || 2 +||ui re-re_s' || 2

[0108] Since it is expected that the shared semantic information can contain more shared information, and the exclusive semantic representation can contain the unique information of each modal, L cm c <L cm o <L cm s should be established, so the contrastive loss L cm To optimize the objective to satisfy the above conditions, it is specifically expressed as follows:

[0109]

[0110] where Φ = {Φ a ,Φ e} represents all parameters in cross-modal alignment;

[0111] Step 2.8: In the cross-decoupling part, the final loss is represented as: L DE = L cl + L cm ;

[0112] Step 2.9: In the text generation part, the overall representation ui_re of the review and the exclusive semantic representation ra_s in the rating modal are used to generate better quality text, and then the negative log-likelihood loss L EG is used to optimize the text generation, and the specific formula is as follows:

[0113]

[0114] where, represents the final representation of the review that fuses the difference information, represents the distribution of the t-th word e′ w,t in the entire vocabulary; W v ∈R |V|xd and b v ∈R |V| are trainable parameters, and |V| is the size of the vocabulary;

[0115] Step 2.10: Combine the three parts into a multi-task learning framework, and the objective function of the final model is represented as follows:

[0116]

[0117] where Θ represents all trainable parameters, λ r and λ d are regularization factors that weigh the importance of the rating prediction task and the difference extraction task.

[0118] Step 3: Generate ratings and explanations.

[0119] During testing, by inputting the user u and the item i into the trained model, the rating value of the user u for the item i is generated, and the explanation given by the model when recommending the item i to the user u is generated.

[0120] The embodiments of the present application are compared with other methods on three public real-world datasets: Yelp (restaurants), AmazonMov (movies and TV), TripAdvisor (in the domain of hotels). The statistics of the datasets are shown in Table 2.

[0121] Table 2 Statistics of the datasets

[0122] Yelp AmazonMov TripAdvisor Number of users 27,147 7,506 9,756 Number of items 20,266 7,360 6,280 Number of ratings 1,293,247 441,783 320,023 Number of ratings / user 47.64 58.86 32.77 Number of ratings / item 63.81 60.02 50.96 Number of words / review 12.32 14.14 13.01

[0123] The method of the embodiments of the present application is compared with three common interpretable recommendation methods, which are:

[0124] NRT: This method treats the interpretable generation problem as a text summarization task.

[0125] Att2Seq: This method uses an attention mechanism and a two-layer long short-term memory network to implement the explanation generation task.

[0126] PETER: This model produces higher quality explanations by introducing a context prediction task and a new Transformer masking method.

[0127] In order to evaluate the quality of the generated explanations, the embodiments of the present application use BLEU and ROUGE to measure the similarity between the generated text and the real reviews. The embodiments of the present application report BLEU-1 (B1) and BLEU-4 (B4), and report the accuracy, recall and F1 of ROUGE-1, ROUGE-2 and ROUGE-L to measure the different granularity of the generated sentences.

[0128] In order to evaluate the degree of personalization of the generated explanations, the embodiments of the present application use USR (calculate the proportion of generated unique sentences in the dataset), FMR (proportion of features contained in a single explanation) and FCR (proportion of personalization of features in the dataset).

[0129] In order to evaluate the quality of the score prediction, the embodiments of the present application use two common indicators: RMSE (root mean square error) and MAE (mean square error).

[0130] Table 3 shows all the indicators of the embodiments of the present application on the three datasets about the generated explanations. It can be seen that the method proposed in the embodiments of the present application has significant improvement in most evaluation indicators.

[0131] Table 3 Experimental results on the quality and personalization of the explanations

[0132]

[0133] Table 4 is the score prediction results of the present application on three public data sets, since the focus of the present application is interpretable generation, only multilayer perceptron (MLP) is used in score prediction, and the results are not much different from other models.

[0134] Table 4 Experimental results for score prediction

[0135]

[0136]

[0137] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope defined by the claims of the present application.< / eos> < / bos> < / pad> < / eos> < / bos> < / pad>

Claims

1. An explainable recommendation method for handling sentiment inconsistency problem between ratings and reviews, characterized in that: The method comprises data preprocessing, model training, and score and explanation generation; After data preprocessing, the score and the comment are regarded as two modalities, and different encoders are used to decompose each modality into two representations, i.e., modality-shared semantics and modality-specific semantics; the difference information between the two modalities is learned by training in a manner of pulling the shared semantics between the modalities closer and the specific semantics farther apart, and then the difference information is used as a component of text generation, so as to generate an explanation with better individualization and text quality, and obtain the score value of the user for the item and the explanation given when the item is recommended to the user; In the data preprocessing, the training set is marked as: X={U, I, , E}, U, I、 , E represent user set, item set, rating set and comment set respectively; meanwhile, the user u and the item i are marked as: , the rating of the user u to the item i, , the comment of the user u to the item i; the data preprocessing specifically includes the following steps: Step 1.1: The training data set of the explainable recommendation comprises a plurality of sequences, each sequence comprising a user, an item, a score of the user for the item, and a comment; in the preprocessing process, users and items with less than 5 comments are removed, so as to obtain a relatively clean and standard data set; Step 1.2: For the review data of the input model, define the length of the review as 15; reviews with less than 15 words are padded with <pad>Pad to; comments longer than 15 words are truncated with ellipses added at the beginning and end of the comment <bos>and <eos>The mark indicates the beginning and the end of a sentence;< / eos> < / bos> < / pad> Step 1.3: In the model training, each sequence is sequentially input into the model, the score is used as a supervision signal of the score prediction model, and the comment is used as a supervision signal of text generation; In the training and learning, after the model parameters are initialized, data is read from the data set and input into the model; score prediction, difference extraction, and explanation generation are performed, three loss functions are obtained, the three parts are combined into a multi-task learning framework, loss fusion is performed, and finally the target function of the model is obtained; the above process is repeated until the model converges; The specific method of the training and learning is as follows: Step 2.1: Get the overall representation of the rating modality by concatenating the user and item as shown in the following formula; ; Wherein, u represents a user, i represents an item, and Linear represents a linear function; Step 2.2: Concatenate each word in the user, item, and their corresponding reviews into the Transformer to get the representation of the review modality ; Step 2.3: Decouple rating representation and review representation by using multi-layer perception (MLP), decouple each modality into shared semantic representation and exclusive semantic representation respectively; the shared semantic representation of two modalities are respectively , and the exclusive semantic representation of two modalities are respectively ; Step 2.4: Utilizing the overall representation of the rating modality The rating prediction is made so that the user and item learn the information of the rating; the MSE loss is used as the objective function to learn the rating prediction value and the distance between the rating supervision signal :​ ; Step 2.5: The following is the loss function of the decoupling process: respectively, as the difference in the score modality and the review modality; to ensure that the generated shared representation and the exclusive representation can capture different aspects of the modalities, further add constraints to these representations, specifically, approximate the shared representation of the two modalities, and make the exclusive representation of the two modalities far away; the loss function in the decoupling process is shown as follows: ; Step 2.6: Introduce an opposing objective to optimize the model; first cross-modal align the shared semantic representations of the two modalities through a multi-layer perceptron, MLP, then minimize the cross-modal gap , maximize ensuring that the correct shared features are extracted; Step 2.7: Further optimization of the original modality representation and the specific semantic representation; Minimizing the cross-modal loss between the original semantic representation and the specialized semantic representation respectively , ; the contrastive loss is used to optimize the target to meet the condition , which is specifically expressed as follows: ; wherein, denotes all parameters in cross-modal alignment; are learnable parameters; Step 2.8: In the cross-decoupling section, the final loss is represented as: ; Step 2.9: In the text generation part, utilize the overall representation of the review and the specialized semantic representation in the rating modality to generate better quality text, then use negative log-likelihood loss to optimize the text generation; Step 2.10: The three parts are combined into a multi-task learning framework, and the target function of the final model is represented as follows: ; wherein, denotes all trainable parameters, is a regularization factor that trades off the importance of the score prediction task and the discrepancy extraction task.

2. The explainability recommendation method for handling sentiment inconsistency problem between scoring reviews according to claim 1, wherein: In step 2.3, the shared semantic representation of the two modalities is defined as follows: ; ; wherein, and are all parameters of a multi-layer perceptron, MLP, respectively; Given overall representations of the rating modality and the review modality and shared semantic representations extracted from the two modalities respectively Then, the exclusive semantic representations under the two modalities are obtained by subtraction operation as shown in the following two equations respectively: ; 。 3. The explainability recommendation method for handling sentiment inconsistency problem between scoring reviews according to claim 1, wherein: In step 2.6, the specific formula of the cross-modality alignment is as follows: ; The formula is as follows: ; wherein, respectively represent cross-modal representations of are learnable parameters.

4. The explainability recommendation method for handling sentiment inconsistency problem between scoring reviews according to claim 3, characterized in that: In step 2.7, the minimization of the original semantic representation and the specific semantic representation under the cross-modality is obtained in the following manner: Similar to the cross-alignment of the shared semantics, the original representation and the specific semantic representation under the cross-modality are obtained as follows: ; ; ; Based on the above cross-representation, the minimization of the original semantic representation and the specific semantic representation under the cross-modality is as follows: ; 。 5. The explainability recommendation method for handling sentiment inconsistency problem among scored reviews according to claim 1, wherein: In step 2.9, the negative log-likelihood loss The specific formula is expressed as follows: ; where, represents the final representation of the review that incorporates the discrepancy information, ; , represents the t-th word in the review distribution over the entire vocabulary. are trainable parameters, |V| is the size of the vocabulary.

6. The explainability recommendation method for handling sentiment inconsistency problem among scored reviews according to claim 1, wherein: After the training is completed, the test is performed, and the score and the explanation are generated; by inputting the user u and the item i into the trained model, the score value of the user u for the item i and the explanation given by the model when the item i is recommended to the user u are generated.

Citation Information

Patent Citations

  • Commodity recommendation method based on user comments and satisfaction level embedding

    CN111275521A

  • Score and comment content tendency inconsistency detection system

    CN111639184A