A cross-domain recommendation method based on consistent alignment and preference decoupling
By employing a consistent alignment-based preference decoupling method, we learn the interest and conformity embedding features of shared users, solving the challenges of embedding non-shared item entities and implicit feedback data in cross-domain recommendation, and achieving better recommendation results.
Patent Information
- Application Number
- CN202311825003.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Existing cross-domain recommendation methods cannot effectively learn the embedded features of non-shared item entities in scenarios involving shared user entities, and the implicit feedback data cannot truly reflect user interests, resulting in poor recommendation performance.
By employing a consistent alignment preference decoupling method, we learn the interest embedding features and conformity embedding features of shared users to alleviate the data sparsity problem. Furthermore, by aligning non-shared item attribute features through consistent regularization, we improve the performance of the recommendation model.
It can more accurately capture users' true behavioral intentions, improve recommendation performance, and alleviate the data sparsity problem in cross-domain recommendation scenarios.
Smart Images

Figure CN117786218B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of recommendation technology, specifically relating to a cross-domain recommendation method based on consistency alignment and preference decoupling. Background Technology
[0002] The rapid development of the internet has dramatically changed people's daily lives and revolutionized how they access information. However, along with the convenience brought by the internet, the explosive growth of information has also created a burden, such as in shopping decisions, music selection, and social media reading. This has evolved into the well-known problem of information overload. Since individuals cannot browse and filter all information on the internet, finding content that matches their interests becomes difficult. Therefore, automated systems are needed to assist users in identifying potentially interesting information while filtering out other content. Recommendation systems are a type of information filtering technology. Their basic principle is to use data on users' historical interests, purchasing behavior, and evaluation of consumed content to predict items that may interest them. However, in today's internet age, the number of items available is enormous, while users actually interact with only a very small percentage. This leads to a severe data sparsity problem, which in turn limits the performance of recommendation algorithms.
[0003] Transfer learning is an effective method for addressing the problem of data sparsity. Inspired by the human ability to transfer knowledge, transfer learning aims to leverage the rich knowledge of the source domain to improve the performance of the target domain model or minimize its dependence on labeled data in the target domain. To address the long-standing challenge of data sparsity in recommender systems, some researchers have proposed cross-domain recommendation methods based on the concept of transfer learning. By utilizing knowledge from a relatively information-rich domain, these methods effectively improve the recommendation performance of sparser domains.
[0004] Currently, cross-domain recommendation models can be categorized into four main types: models based on shared entity representations, models based on inter-domain mapping, models based on heterogeneous graph embeddings, and models based on multi-domain collaborative training. For models based on shared entity representations, this type focuses on overlapping entities across different domains. By sharing or combining the representations of overlapping entities across different domains, it integrates information from different domains, establishes connections between domains, and improves recommendation performance across multiple domains. Generally, the structure of this type of model can be divided into three layers: first, the feature embedding layer obtains the embedding vectors of users and items in each domain; then, the combination layer combines the embeddings of overlapping entities in a certain way, so that the representation vectors of overlapping entities contain information from each domain; finally, a recommendation model is trained in the prediction layer to make recommendations based on the embedding representations of users and items.
[0005] While various methods exist for knowledge transfer in cross-domain recommendations, these methods typically focus only on feature extraction and learning of shared entities. For example, when the shared entity is a user, previous models focused solely on learning better embedding features of the shared user, neglecting the embedding features of non-shared entities (items). Furthermore, regarding data selection, recommendation algorithms are often built upon implicit feedback data because it is readily available. However, implicit feedback data only reflects the user's click on an item and does not accurately reflect their interests. Using implicit feedback data as user interest information to train the model degrades the performance of the recommendation algorithm. Summary of the Invention
[0006] This invention addresses the data sparsity problem encountered in recommendation implementation across the source and target domains in scenarios based on shared user entities (i.e., source and target domain data contain only shared user entities and non-shared item entities). It utilizes learned shared user representations to alleviate this data sparsity issue. A cross-domain recommendation method based on consistency alignment and preference decoupling is provided, solving the problem of learning shared embedded features for non-shared item entities and addressing the issue of using interaction data from implicit feedback as user interests.
[0007] The technical solution adopted in this invention is as follows:
[0008] A cross-domain recommendation method based on consistency alignment and preference decoupling includes the following steps:
[0009] Step 1: Clean and filter the input source and target domain data, filter out users and items with more than a preset number of interactions, and extract the common users of the source and target domains.
[0010] Step 2: Divide the source domain and target domain into data sets to obtain corresponding training and test sets, and set positive and negative samples for items in the test set.
[0011] Step 3: Initialize the feature embedding vectors for users and items, and define z. u z represents the user feature embedding vector of shared users. u The feature embedding vector of the corresponding positive sample item in the source domain is used It means that z u The feature embedding vector of the positive sample item in the target domain is used It means that z u The feature embedding vector of the corresponding negative sample item in the source domain is used It means that z u The feature embedding vector of the corresponding negative sample item in the target domain is used The feature embedding vectors of items in the hybrid domain (which combines information from the source and target domains) are respectively represented as follows: and Where the subscripts i and k are the distinguishers of positive sample items and negative sample items, respectively, i.e., item numbers, and the superscripts A and B represent the source domain and the target domain, respectively;
[0012] Step 4: Embed the user feature vector z u Training optimization is performed, along with feature embedding vectors for positive sample items in the source and target domains. Feature embedding vectors of items in the mixed domain Perform consistency alignment to ensure that the feature embedding vectors are consistent. and Learn the attribute characteristics of items common to the domain;
[0013] Step 5: Embed the user features trained and optimized in Step 4 into the vector z using a neural network composed of stacked fully connected layers. u Decoupling into interest preference embedding vectors and conformity preference embedding vector
[0014] Embedded vectors based on conformity preferences respectively with feature embedding vector and The inner product represents the first inner product rating of the item, embedded in the interest preference vector. respectively with feature embedding vector and The inner product represents the second inner product score of an item, and the higher the popularity of an item, the higher the first inner product score, and the lower the popularity of an item, the higher the second inner product score.
[0015] The interest preference embedding vector is based on the number of clicks on the item and a contrastive loss function about popularity. and conformity preference embedding vector Optimize and update;
[0016] Step 6: Optimize and update the interest preference embedding vector based on Step 5 and conformity preference embedding vector We obtain the user feature embedding vector of the user to be recommended, and then, based on the user feature embedding vector of the user to be recommended, we compare it with the feature embedding vector of the item in the mixed domain. The inner product of the two methods yields the predicted scores for items in the source and target domains, respectively, and items from the source and target domains are recommended to the user to be recommended based on these predicted scores.
[0017] The technical solution provided by this invention brings at least the following beneficial effects:
[0018] (1) By decoupling the click preferences of shared user entities, the true behavioral purpose of users under implicit feedback data is captured more accurately, thereby achieving better recommendation results.
[0019] (2) In cross-domain recommendation scenarios where data is relatively sparse, common item attributes are extracted through consistent alignment, which alleviates the problem of data sparsity. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a cross-domain recommendation method based on consistency alignment and preference decoupling provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0023] Because implicit feedback data is relatively easy to obtain, many recommender systems tend to use this type of data for construction. However, due to the way implicit feedback data is collected, it cannot clearly reflect the user's exact interests. In single-domain recommender systems, the paper "Zheng,Y.,Gao,C.,Li,X.,He,X.,Jin,D.,&Li,Y.(2021).Disentangling UserInterest and Conformity for Recommendation with Causal Embedding.Proceedingsof the Web Conference 2021" decouples user interaction information and divides the user's click on an item into interest-based clicks and conformity-based clicks. In cross-domain recommendation based on shared user entities, the paper "iangxiaCao et al. 'Disencdr: Learning disentangled representations for cross-domain recommendation'. In: Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2022, pp. 267–277" decouples shared users into domain-shared user features and domain-specific user features. The first decoupling method has proven effective and reasonable, as it can learn user interest embeddings well from implicit feedback data. However, cross-domain recommendation scenarios have sparser data compared to single-domain recommendation scenarios, and cross-domain recommendation scenarios involve two item domains with different attribute categories. Directly applying this preference decoupling method leads to poor recommendation performance. The second decoupling method is simpler than the first and better adapts to the sparser data scenarios in cross-domain recommendation, but it cannot reflect the user's true interests. Therefore, this invention proposes a recommendation method that uses consistency regularization to align non-shared item attribute features, and then uses these aligned attribute features to guide the model to learn shared user interest embedding features and conformity embedding features, thereby improving the model's recommendation quality.
[0024] like Figure 1 As shown in the figure, the cross-domain recommendation method based on consistency alignment and preference decoupling provided by this embodiment of the invention specifically includes the following steps:
[0025] Step 1: Data Cleaning. This embodiment mainly utilizes user rating data for different products for recommendation processing. First, the dataset is cleaned, filtering out users and products with more than N1 interactions, and extracting users common to both the source and target domains to construct a cross-domain recommendation scenario based on shared user entities;
[0026] Step 2: Data partitioning. In this embodiment, the leave-one-out method is used to partition the training and test sets. One item clicked by the user is selected as a positive sample in the test set, and N² items not clicked by the user are randomly sampled as negative samples. Since this is an exploration of implicit recommendation, the sample ratings for all rated items are set to 1, and the sample ratings for unrated items are set to 0.
[0027] Step 3: Initialize user and item embeddings. In this embodiment, corresponding feature embedding vectors are created based on the number of users and items, and the feature dimension of the feature embedding vector is defined as d, the value of which can be customized. An embedding table is obtained based on all feature embedding vectors, the purpose of which is to capture user preference features and item attribute features. The model parameters are then randomly initialized with a normal distribution using a data distribution with a mean of 0 and a variance of 0.5. Generally, the user feature embedding vector is represented by z... u Represents z u The feature embedding vector of the corresponding positive sample item in the source domain is used This indicates that the feature embedding vector of the positive sample item in the target domain is used... This indicates that the feature embedding vector of the negative sample item in the source domain is used... This indicates that the feature embedding vector of negative sample items in the target domain is used... This is represented as follows. Furthermore, the feature embedding vector of an item in a hybrid domain (integrating information from both domains) is used... and express.
[0028] Step 4: Consistent Alignment. Step 3 created and initialized the feature embedding vectors for users and items. In this step, the values of these feature embedding vectors are optimized. For domain-specific item feature embedding vectors ( and ) and feature embedding vectors of items in the mixed domain ( and Consistent alignment is performed to ensure that the features of the items are embedded into the vector. and Learn the attribute characteristics of items common to the domain.
[0029] First, the user's embedded feature vector z is learned in their respective domains. u Feature embedding vectors of positive sample items specific to the domain and and the feature embedding vectors of negative sample items specific to the domain and Since the user's rating of an item is represented by the dot product of the feature embedding vectors of the user and the item, it is desirable to increase the rating of positive samples and decrease the rating of negative samples.
[0030]
[0031]
[0032] By iterating through a certain number of training rounds, the trained user feature embedding vector z can be obtained. u Feature embedding vectors of positive sample items specific to the domain and and the feature embedding vectors of negative sample items specific to the domain and Next, and As the anchor point in the feature space of the feature embedding vector of an item, and As a negative sample in the feature space, it is hoped that and In the feature space, it is close to the anchor point and far away from the negative sample.
[0033] Cosine similarity is used as the constraint function for consistency alignment. This is based on the feature embedding vectors of the item's anchor points. and Feature embedding vector of negative samples and Training is complete, therefore the feature embedding vectors specific to the stopping region are... The gradients (i.e., their values do not change during backpropagation in deep learning, and are defined as SG: stop gradient in the loss function). The cosine similarity loss function defined in this embodiment is as follows:
[0034]
[0035]
[0036] Through deep learning backpropagation, the feature embedding vectors of domain-shared items can be continuously updated. and
[0037]
[0038]
[0039] Where α is the learning rate, a hyperparameter that is set manually. Due to... The gradient stopping operation is used, so only the item embedding feature vectors containing domain-shared information are updated. and Iterative training continues until convergence, resulting in well-trained embedded feature vectors. and
[0040] Step 5: Preference Decoupling. In Step 4, the trained user feature embedding vector z was obtained. u and item feature embedding vector and Then, through two fully connected layers of a neural network, the user's features are embedded into the vector z. u Decoupling into interest preference embedding vectors and conformity preference embedding vector
[0041]
[0042] Where W1 and W2 represent the weight matrices of the two fully connected layers, and b1 and b2 represent the bias terms of the two fully connected layers.
[0043] Update later and For items with high popularity, the aim is to embed the herd preference vector. This will result in a higher inner product score. Meanwhile, for items with lower popularity, the interest preference embedding vector... A higher inner product score will be achieved. The contrasting loss functions for interest preference embedding vectors and conformity preference embedding vectors are shown below:
[0044]
[0045]
[0046] in, τ represents the number of times item i was clicked by all users, reflecting the popularity of item i. τ is a hyperparameter in the contrastive loss function, where I... A This represents the set of items in the source domain. B This represents the set of items in the target domain.
[0047] Then, through deep learning backpropagation, the user's decoupled interest preference embedding vector can be continuously updated. and conformity preference embedding vector
[0048]
[0049]
[0050] Step 6: Calculate the inner product of the saved user and item feature embedding vectors to obtain the corresponding score, which represents the user's level of interest in the item.
[0051]
[0052]
[0053] in, This represents the rating of item i by user u in the source domain. This represents the rating of item i by user u in the target domain.
[0054] Then, based on the user's level of interest in the items, the items are recommended. That is, based on a predetermined number of item recommendations K, the top K highest-rated items are used as the current item recommendation list and recommended to the user.
[0055] The cross-domain recommendation method based on consistency alignment and preference decoupling provided in this invention embodiment can be used in application scenarios such as shopping decision-making, music selection, and social media reading. When implementing cross-domain recommendation, the method of this invention learns the domain-shared attribute features of items through consistency alignment, and uses this as an aid to decouple user interests and conformity preferences. In terms of user preference decoupling methods, existing methods decouple implicit feedback data preferences in the following ways: (1) interest and conformity decoupling in single-domain recommendation, (2) domain-shared and domain-specific preference decoupling in cross-domain recommendation. Method (1) has achieved good results in single-domain recommendation systems and has also proven that users have click behaviors different from interest purposes when clicking on items. However, this method has achieved poor results in cross-domain scenarios based on shared user entities because the recommendation data in this scenario is more sparse. Method (2) is a relatively simple decoupling method and cannot extract the user's true click purpose. It can be seen that the existing decoupling methods cannot effectively and reasonably decouple user preferences in cross-domain recommendation scenarios. The method in this invention alleviates the data sparsity problem in cross-domain recommendation through consistent alignment, and extracts the user's true click purpose through a more complex decoupling method, thereby improving the recommendation effect.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0057] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A cross-domain recommendation method based on consistent alignment decoupled preference, characterized in that, The method comprises the following steps: Step 1, data cleaning and screening on the input source domain and target domain data, screening users and items with interaction quantity greater than a preset value, and extracting common users in the source domain and the target domain; Step 2: respectively divide the source domain and the target domain to obtain corresponding training sets and test sets, and set positive and negative samples of the items in the test set; Step 3: Initialize the feature embedding vectors of users and items, define the user feature embedding vector of a common user, the feature embedding vector of a positive sample item on the source domain, the feature embedding vector of a positive sample item on the target domain, the feature embedding vector of a negative sample item on the source domain, the feature embedding vector of a negative sample item on the target domain, and the feature embedding vector of an item on the corresponding mixed domain, and respectively. Step 4: User feature embedding vector Training optimization is performed on the feature embedding vectors of the positive sample items of the source domain and the target domain 、 , and the feature embedding vectors of the items of the mixed domain 、 Consistency alignment processing is performed to make the feature embedding vectors and learn the attribute features of the items common to the domains; In the consistency alignment processing, the feature embedding vectors of the target domain are aligned with the feature embedding vectors of the source domain in the feature space 、 The anchor point of the feature space is the feature embedding vector of the item, and the negative sample items on the source domain and the target domain are and The negative sample of the feature space is the feature embedding vector of the item, and the feature embedding vectors of the target domain are and In the feature space, the feature embedding vectors of the target domain are close to the anchor point and far away from the negative sample 、 and 、 The consistency alignment processing is performed. Step 5: passing the user feature embedding vector trained and optimized in step 4 through a neural network composed of stacked fully connected layers Decoupling the preference to obtain an interest preference embedding vector and a conformity preference embedding vector ; a first inner product score of the item is represented by an inner product of the interest preference embedding vector and a feature embedding vector and a second inner product score of the item is represented by an inner product of the crowd preference embedding vector and a feature embedding vector and the higher the popularity of the item, the higher the first inner product score, and the lower the popularity of the item, the higher the second inner product score; optimizing the interest preference embedding vector based on the number of clicks of the items and a set contrastive loss function with respect to popularity and the conformity preference embedding vector performing an optimization update; Step 6: updating the interest preference embedding vector based on the optimization in step 5 and the conformity preference embedding vector obtain the user feature embedding vector of the user to be recommended, and then respectively obtain the predicted scores of the corresponding items in the source domain and the target domain based on the inner product of the user feature embedding vector of the user to be recommended and the feature embedding vector of the items in the mixed domain , and recommend the source domain and target domain items to the user to be recommended based on the predicted scores.
2. The method of claim 1, wherein, Step 2 further comprises: setting the sample score of the item with the score as 1, and setting the sample score of the item without the score as 0.
3. The method of claim 1, wherein, In step 2, the leave-one-out method is used to divide the training set and the test set.
4. The method of claim 1, wherein, In Step 3, the user feature embedding vector is initialized and each feature embedding vector for the items is normally randomly initialized with a mean of 0 and a variance of 0.
5.
5. The method of claim 1, wherein, In step 4, the user feature embedding vector When training optimization, the optimization objective is set as: ; ; The user feature embedding vector trained based on the optimization target after a certain number of training iterations , the feature embedding vectors of the positive sample items on the source domain and the target domain , .
6. The method of claim 5, wherein, In step 4, the cosine similarity is used as a constraint function for consistency alignment, and the constraint function is specifically: ; ; wherein, denotes the stop gradient operation, i.e. during backpropagation of the deep learning, the value of the object in the parentheses is not changed, , respectively denote the consistency alignment constraint functions of the source domain and the target domain. The feature embedding vector is continuously updated through deep learning back propagation , The value of the consistency alignment constraint function is converged or the number of updates reaches the preset upper limit. wherein the feature embedding vector , is updated in the following manner: ; ; wherein, denotes a preset learning rate.
7. The method of claim 1, wherein, In step 5, the user feature embedding vectors trained and optimized in step 4 are passed through two fully connected layers Preference decoupling is performed.
8. The method of claim 1, wherein, In step 5, the interest preference embedding vector and the conformity preference embedding vector The contrast loss function when performing the optimization update is specifically: ; ; wherein, denotes the number of times the item i is clicked by all users, denotes preset hyperparameters of the contrastive loss function, denotes a set of items in the source domain, denotes a set of items in the target domain, , denote the contrastive loss functions for the popularity bias and the interest bias, respectively. The interest preference embedding vector decoupled from the preference is continuously updated through deep learning back propagation and the conformity preference embedding vector until the contrast loss function converges or the number of updates reaches a preset upper limit; wherein the interest preference embedding vector and the conformity preference embedding vector is updated in the following manner; ; ; wherein, denotes a preset learning rate.
9. The method according to any one of claims 1 to 8, characterized in that, In step 6, the specific calculation method of the predicted score is: wherein, denotes the rating of item i by user u in the source domain, denotes the rating of item i by user u in the target domain.
Citation Information
Patent Citations
Cross-domain recommendation method oriented to cold start users and based on classification preference migration
CN115438732A
Cross-domain common migration recommendation method and system based on multivariate auxiliary information fusion
CN115757529A