Cross-domain cold start article recommendation method based on triple contrast learning

By constructing a cross-domain cold-start item recommendation method for self-contrast learning, source domain comparison learning and cross-domain contrast learning tasks, the problems of limited use of hot item interaction information, large domain differences and low quality of item content representation in the prior art are solved. , achieving more efficient cross-domain cold start item recommendations.

CN119415770AActive Publication Date: 2025-02-11SHANGHAI UNIV

Patent Information

Application Number
CN202411423689.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-11
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The existing cold-start item recommendation methods are limited in utilizing hot item interaction information, and cannot effectively reduce the domain differences between the source domain and the target domain, and the quality of item content characterization is easily affected by useless information.

Method used

Using the cross-domain cold-start item recommendation method based on triple contrast learning, the cross-domain cold-start item recommendation model is optimized by constructing self-contrast learning, source domain comparison learning and cross-domain contrast learning tasks, making full use of the collaborative information of hot items, and reducing Domain differences and improve the quality of item content representation.

Benefits of technology

Effectively utilize the synergistic information of hot items, reduce the domain differences between the source domain and the target domain, improve the quality of item content representation, and thus improve the effectiveness of cross-domain cold-start item recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415770A_ABST
    Figure CN119415770A_ABST
Patent Text Reader

Abstract

The invention relates to a cross-domain cold start article recommendation method based on triple contrast learning. The method comprises the following steps of: performing biased processing on article attribute information and knowledge graph information in a source domain and a target domain to obtain initial attribute representation and initial graph representation, and acquiring initial user representation from interaction information of a user and the article in the source domain by utilizing a multi-thermal coding method; obtaining the screened attribute representation by using a multi-layer perceptron, and obtaining the aggregated map representation by using a map attention network; on the basis of current attribute representation, graph representation and interaction information, a recommendation result is obtained through a trained cross-domain cold-start item recommendation model, and the model is constructed and optimized through a self-comparison learning loss function, a source domain comparison learning loss function, a cross-domain comparison learning loss function and a BPR loss function in a joint training mode. Compared with the prior art, the method has the advantages of fully utilizing hot article collaboration information, reducing field difference, improving article content characterization quality and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recommendation systems and deep learning technologies, and in particular to a cross-domain cold-start item recommendation method based on triple contrastive learning. Background Art

[0002] Traditional collaborative filtering recommendation methods use user-item interaction data to make recommendations, but they perform poorly for cold-start items with sparse interaction data. Since cold-start items are common in real-world application scenarios, such as new items on Taobao shopping websites, research on cold-start item recommendation has received significant attention.

[0003] Since cold-start items are common in real-world application scenarios, such as listing new items on Taobao shopping websites, research on cold-start item recommendation has received significant attention. In the research on cold-start item recommendation, existing methods can be divided into four categories: content-based methods, meta-learning-based methods, robust learning-based methods, and transfer learning-based methods. Content-based methods use information such as item content and knowledge graphs to connect cold items and hot items, thereby connecting user interests and cold items. Meta-learning-based methods take advantage of few-shot learning to locally update the parameters of the recommendation model on a small amount of interaction data, so that the recommendation model converges faster when facing cold items. Robust learning-based methods treat cold items as hot items that lack interaction data, and simulate the interaction information of cold items by performing random interference and other operations on the interaction information of hot items. Transfer learning-based methods are usually combined with cross-domain recommendations, and use common users or items between domains to transfer interaction information between domains, thereby enriching the information in interaction-sparse domains. However, most of the above research methods do not fully utilize the connection between interaction information and content information.

[0004] In recent years, many studies have used contrastive learning to maximize the mutual information between content representation and interaction representation by virtue of its ability to maximize the mutual information between positive sample pairs, so that cold items can more accurately utilize existing interaction data. For example, the CLCRec model trains an item's content vector encoder by maximizing the mutual information between user interaction representation and hot item interaction representation, as well as maximizing the mutual information between hot item interaction representation and hot item content representation, and cold items obtain item representations through this encoder. However, whether it is the existing four types of methods or the method combined with contrastive learning, existing cold start item recommendation research mainly focuses on single-domain items, and there is little research on domain cold start recommendation.

[0005] Domain cold start recommendation refers to cold starting a recommendation domain, where there is no interactive information about items in the domain. It usually uses the rich interactive information of the source domain to start the recommendation of items in the target domain. The scenario of domain cold start recommendation also has important practical significance. For example, a company can expand its business in a new field based on user data in an existing field, so domain cold start recommendation is an issue worthy of attention. However, directly applying the existing general method of cold start item recommendation to domain cold start recommendation will have the following limitations: first, the utilization of interactive information of hot items is limited; second, it is impossible to reduce the domain differences between the source domain and the target domain, and the utilization of useless information is likely to damage the quality of item content representation. Therefore, when performing cross-domain cold start item recommendation, how to make full use of the interactive information of hot items, reduce the differences in features between different domains, and improve the quality of item content representation has become a problem that needs to be solved in this field. Summary of the invention

[0006] The purpose of the present invention is to provide a cross-domain cold-start item recommendation method based on triple contrastive learning in order to overcome the defects of the above-mentioned prior art, such as limited utilization of collaborative information of hot items, inability to reduce domain differences, and fragile quality of item content representation.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] According to a first aspect of the present invention, a cross-domain cold-start item recommendation method based on triple contrastive learning is provided, comprising the following steps: obtaining attribute information, knowledge graph information, and interaction information between users and source domain items in source and target domains; performing biased processing on the attribute information and the knowledge graph information to obtain corresponding initial attribute representations and initial graph representations, and obtaining initial user representations from the interaction information using a multi-hot encoding method; based on the initial attribute representation, obtaining a filtered attribute representation using a multi-layer perceptron, and based on the initial graph representation, obtaining an aggregated graph representation using a graph attention network; based on the current attribute representation, the graph representation, and the interaction information, obtaining a cross-domain cold-start item recommendation method using a trained cross-domain cold-start item recommendation method; The recommendation model is used to obtain the recommendation result; wherein, the construction and training process of the cross-domain cold-start item recommendation model includes: respectively constructing a self-comparative learning task, a source domain comparative learning task and a cross-domain comparative learning task, and then obtaining an initial cross-domain cold-start item recommendation model; based on attribute representation and graph representation, respectively constructing a self-comparative learning loss function, a source domain comparative learning loss function and a cross-domain comparative learning loss function, and based on the corresponding user representation, constructing a BPR loss function; based on the self-comparative learning loss function, the source domain comparative learning loss function, the cross-domain comparative learning loss function and the BPR loss function, constructing a total loss function; using the total loss function to train and optimize the constructed cross-domain cold-start item recommendation model.

[0009] As an optimal technical solution, the process of constructing a self-contrastive learning task specifically includes: using the current attribute representation and the current graph representation as anchor points for the first self-contrastive learning and the second self-contrastive learning, respectively; using the current graph representation and the current attribute representation as positive samples for the first self-contrastive learning and the second self-contrastive learning, respectively; calculating the cosine similarity between the current attribute representation and other graph representations of items in the same domain, and the cosine similarity between the current graph representation and other attribute representations of items in the same domain, and selecting the graph representation and attribute representation that meet the first preset condition as negative samples for the first self-contrastive learning and the second self-contrastive learning, respectively; based on their respective anchor points, positive samples and negative samples, constructing the first self-contrastive learning loss function and the second self-contrastive learning loss function, respectively.

[0010] As a preferred technical solution, the calculation formula of the total loss function is:

[0011]

[0012] In the formula, λ 1 , 2 , 3 , 4 are different weight parameters, represents the first self-contrastive learning loss, represents the second self-contrastive learning loss, represents the source domain contrastive learning loss, represents the cross-domain contrastive learning loss, represents the BPR loss, Θ represents all the hyperparameters that need to be updated for the cross-domain cold-start item recommendation model.

[0013] As an optimal technical solution, the process of constructing a source domain contrastive learning task specifically includes: merging the current attribute representation and graph representation of the same source domain item to obtain the source domain item representation; using the source domain item representation as the anchor point for source domain contrastive learning; calculating the collaborative similarity between the source domain item and other source domain items, and selecting the item representation that meets the second preset condition as a positive sample; calculating the cosine similarity between the source domain item representation and other source domain item representations, and selecting the item representation that meets the first preset condition as a negative sample; and constructing a source domain contrastive learning loss function based on the determined anchor point, positive sample and negative sample.

[0014] As a preferred technical solution, the expression of the collaborative similarity is:

[0015]

[0016] In the formula, Clicked source domain item v s A collection of users, Clicked another source domain item v j A collection of users;

[0017] The expression of the source domain contrast learning loss function is:

[0018]

[0019] Where V s is the collection of all source domain items in this round, For source domain item v s The set of positive samples, For source domain item v s The set of negative samples, is the item representation of the source domain, is a positive sample of source domain items The representation of items, Negative samples of source domain items The item characterization, τ is the temperature coefficient.

[0020] As an optimal technical solution, the process of constructing a cross-domain comparative learning task specifically includes: merging the current attribute representation and graph representation of the same source domain item and the current attribute representation and graph representation of the same target domain item respectively to obtain the item representation of the source domain and the item representation of the target domain; using the item representation of the source domain as the anchor point for cross-domain comparative learning; calculating the content similarity between the source domain item and other target domain items, and selecting the item representation that meets the second preset condition as the positive sample; calculating the cosine similarity between the item representation of the source domain and the item representation of other target domains, and selecting the item representation that meets the first preset condition as the negative sample; and constructing a cross-domain comparative learning loss function based on the determined anchor points, positive samples and negative samples.

[0021] As a preferred technical solution, the expression of content similarity is:

[0022]

[0023] Where D st For source domain item v s and the target domain item v t The Euclidean distance between min For source domain item v s The minimum Euclidean distance between all target domain items, D max For source domain item v s The maximum value of the Euclidean distance to all target domain items;

[0024] The expression of the cross-domain contrastive learning loss function is:

[0025]

[0026] Where V S is the collection of all source domain items in this round, For source domain item v s The positive sample set, For source domain item v s The negative sample set, is the item representation of the source domain, is the positive sample of the target domain item The representation of items, Negative samples of target domain items The item characterization, τ is the temperature coefficient.

[0027] As a preferred technical solution, the calculation formula of the BPR loss function is:

[0028]

[0029] in:

[0030] O={(v s ,u + ,u - )|(v s ,u + )∈O + ,(v s ,u - )∈O / +}

[0031]

[0032]

[0033] Where V S is the set of all source domain items, u + Indicates that the source domain item v has been clicked s User, u - Indicates that the source domain item has not been clicked v s Users, is the inner product, σ is the sigmoid function, Z (·) represents the user representation, Representation of items in the source domain.

[0034] As a preferred technical solution, the attribute information and the knowledge graph information are biasedly processed to obtain an initial attribute representation and an initial graph representation of the object, specifically including: using TextBlob to extract noun information and category noun information from the attribute information and merge them into a sentence sequence, inputting the sentence sequence into a preset Bert model to obtain an initial attribute representation; based on the knowledge graph information, using a preset TransR model and a method of randomly deleting edges to obtain multiple subgraphs, calculating the similarity scores of the same object on different subgraphs, and then obtaining the corresponding initial graph representation.

[0035] As a preferred technical solution, based on the initial attribute representation, a multilayer perceptron is used to obtain a filtered attribute representation, and based on the initial graph representation, a graph attention network is used to obtain an aggregated graph representation, specifically including: updating the initial attribute representation of the item: taking the initial attribute representation as input, sequentially passing through a multilayer perceptron consisting of three linear layers and two activation layers, further filtering the initial attribute representation, and outputting an attribute representation with unchanged dimension as the filtered attribute representation, and the activation layer adopts an ELU activation function; updating the initial graph representation of the item: taking the initial graph representation as input, and using a graph attention network to biasedly aggregate the information of neighbor entities to obtain an aggregated graph representation, and the weight of the neighbor entity is calculated according to the relationship between the item entity and the neighbor entity.

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

[0037] 1. The domain cold-start recommendation method provided by the present invention uses a cross-domain cold-start item recommendation model based on self-contrast learning tasks, source domain contrast learning tasks and cross-domain contrast learning tasks to complete the recommendation, which can make full use of the collaborative information of hot items, reduce the domain differences between the source domain and the target domain, and improve the representation quality of the item content. In the overall framework, the triple contrast learning tasks are layer-by-layer dependent, the source domain contrast learning relies on self-contrast learning to reduce the migration of noise in the item representation, and the cross-domain contrast learning relies on the source domain contrast learning to increase the interactive information in the item representation. The triple contrast learning tasks are progressively weighted by jointly optimizing the total loss, which can gradually increase the enhancement effect of the contrast learning tasks on the item representation;

[0038] 2. The self-contrastive learning task constructed by the present invention uses the attribute representation and graph representation of the object as anchor points for contrastive learning, designs two types of contrastive learning, and uses the two types of representations of the object itself as positive samples for each other. The cosine similarity between vectors is used to select negative samples, and then the loss of the self-contrastive learning task is calculated. The self-contrastive learning task uses the attribute information and knowledge graph information of the object after biased processing to obtain the corresponding initial attribute representation and initial graph representation, and then uses the multi-layer perceptron and graph attention network to update the attribute representation and graph representation respectively, which can effectively avoid the representation of the object containing too much useless information and obtain a higher quality object representation;

[0039] 3. The source domain comparative learning task constructed by the present invention combines the attribute representation and the graph representation of the item to obtain the item representation, and then designs the comparative learning of collaboratively similar items in the source domain. The item representation of the source domain is used as an anchor point, and the collaborative similarity between the source domain item and other source domain items is used to select positive samples, and the cosine similarity is used to select negative samples, and then the loss of the source domain comparative learning task is calculated. The content information of the collaboratively similar items in the source domain can be aligned, and the collaboratively similar information can be memorized into the content information, so that the target domain items can more fully utilize the collaborative information of the source domain items through the content information, which can solve the data sparsity problem of cold start item recommendation and improve the training effect of the content encoding model;

[0040] 4. The cross-domain comparative learning task constructed by the present invention respectively merges the attribute representation and graph representation of the same source domain item and the attribute representation and graph representation of the same target domain item to obtain the item representation of the source domain and the item representation of the target domain, and then designs the comparative learning of similar items across domains. The item representation of the source domain is used as an anchor point, and the content similarity between the source domain item and other target domain items is used to select positive samples, and the cosine similarity is used to select negative samples, and then the cross-domain comparative learning task loss is calculated. That is, for source domain items and target domain items with similar content, the weight combination of their content features is aligned by comparative learning, which can effectively reduce the domain differences of domain cold start recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic flow chart of the method provided by the present invention;

[0042] Figure 2 Schematic diagram of the construction and training process of the cross-domain cold-start item recommendation model in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] Based on the existing cold-start item recommendation methods, there are mainly the following problems in implementing domain cold-start recommendation:

[0044] First, the interactive information of hot items is limited. Specifically, if two items are clicked by the same user, then the two items are mutually collaborative items, and the collaborative similarity can be defined according to the number of users who click together. Aligning two items with a certain collaborative similarity will increase the probability that the items are clicked by potential users. Since cold items only have content information, aligning collaboratively similar hot items from the content level and training a collaboratively aligned content encoding model intuitively allows cold items to make more full use of the collaborative information of hot items. However, most cold-start item recommendation methods ignore the collaborative similarity between hot items at the content level. Although the CCFCRec model considers collaboratively similar items, it does not directly use the content information of collaboratively similar aligned items, but aligns the content representation of the item and the interactive representation of its collaborative items. Since the information encoded in the interactive representation and the content representation is different, aligning the two intuitively considers that it will affect the training effect of the content encoding model. In response to this problem, the domain cold-start recommendation method provided by the present invention aligns the content information of collaboratively similar items by constructing a contrastive learning task in the source domain to make full use of the interactive information of hot items.

[0045] Second, it is impossible to reduce the domain differences between the source domain and the target domain. The difference in domains is manifested in that content features receive different attention from recommendation systems in different domains. For example, in the book domain, genre and literary style attributes receive almost equal attention in the recommendation system; in the movie domain, movie types usually receive more attention from the recommendation system than movie styles. The general method of cold-start item recommendation ignores the content information of cold items during the model training stage, so it is impossible to reduce domain differences by adjusting the content representation of items during training. If the content information of cold items is explicitly considered during the model training stage, the weighted combination of content features of cross-domain items connected by auxiliary information is aligned, which will increase the probability of recommending target domain items. In response to this problem, the domain cold-start recommendation method provided by the present invention aligns the content feature combination methods of items in different domains by constructing a cross-domain comparative learning task to fully reduce the differences between different domains.

[0046] In addition, most common cold-start item recommendation methods implement recommendations based on the content information of cold items or auxiliary information such as knowledge graphs. However, some useless information exists in these information, which will damage the quality of item content representation and thus affect the recommendation effect. Most existing cold-start item recommendation studies have ignored the biased processing of different information. To address this problem, the domain cold-start recommendation method provided by the present invention aligns the attribute representation and graph representation generated after biased information processing by constructing an item self-comparative learning task to improve the quality of item content representation.

[0047] Therefore, the domain cold-start recommendation method provided by the present invention is based on triple contrastive learning, which can fully utilize the interactive information of hot items, reduce the differences in features between different fields, and improve the quality of item content representation, thereby obtaining high-quality target domain item representation and better realizing domain cold-start recommendation.

[0048] It should be clarified that the cold start items / cold items in the present invention refer to items that completely lack user interaction data, and hot items refer to items that have user interaction data.

[0049] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0050] Example

[0051] like Figure 1 As shown, this embodiment provides a cross-domain cold-start item recommendation method based on triple contrastive learning. The method first obtains the attribute information, knowledge graph information and interaction information of items in the source domain and the target domain, and the user and the source domain items. Secondly, the attribute information and knowledge graph information are biased to obtain the corresponding initial attribute representation and initial graph representation, and the initial user representation is obtained from the interaction information using the multi-hot encoding method; then, based on the initial attribute representation, a multi-layer perceptron is used to obtain the filtered attribute representation, and based on the initial graph representation, a graph attention network is used to obtain the aggregated graph representation; finally, based on the current attribute representation, graph representation and interaction information, the trained cross-domain cold-start item recommendation model is used to obtain the recommendation result. The method is based on the triple contrastive learning task, aims to make full use of the collaborative information of hot items, can reduce the differences between the source domain and the target domain, and can bias the item content information and auxiliary information, can obtain high-quality target domain item representation, and better realize cross-domain cold-start item recommendation.

[0052] The specific implementation process of the above method is as follows:

[0053] Step 1: Collect the attribute information of items in the source domain and the target domain, the knowledge graph information, and the interaction information between users and items in the source domain, perform biased processing on the attribute information and knowledge graph information, obtain the corresponding initial attribute representation and initial graph representation, and use the multi-hot encoding method to obtain the initial user representation from the interaction information. Specifically:

[0054] (1) Information collection: Collect attribute information of items, including item categories and item descriptions; collect knowledge graph information of items, including triples consisting of entities corresponding to items; and collect interaction records between users and source domain items.

[0055] (2) Generate the initial attribute representation of the item: After collecting information, use TextBlob to extract category nouns and nouns in the item description text, filter non-noun information, merge the extracted nouns and category nouns into a sentence, and input the sentence into the preset Bert model to obtain the initial vector of the attribute, i.e., the initial attribute representation.

[0056] (3) Generate the initial graph representation of the item: First, input the knowledge graph information into the preset TransR model to obtain the entity vector e v , and then use the method of randomly deleting edges to obtain the subgraphs kg of the two knowledge graphs 1 and kg 2 , calculate the same item entity in kg 1 and kg 2 The similarity score s on v For item v x , its initial spectrum characterization The calculation formula is:

[0057]

[0058] Where N is the item v x The set of neighbor entities.

[0059] (4) Generate initial user representation: Use the multi-hot encoded {0,1} array to obtain the initial user representation According to the interaction information, if user u has interacted with item v, the value of the vth element of the array is 1, otherwise it is 0.

[0060] Step 2: Input the initial attribute representation of the item into the multi-layer perceptron to obtain the attribute representation after feature screening; input the initial graph representation of the item into the graph attention network to obtain the graph representation of aggregated neighbor entity information.

[0061] Update the initial attribute representation of the item Characterize the initial attributes As input, it passes through a multilayer perceptron consisting of three linear layers and two activation layers in sequence to further filter the initial attribute representation, and the attribute representation with unchanged dimension is output as the filtered attribute representation. The activation layer uses the ELU activation function;

[0062] Update the initial graph representation of the item Characterize the initial spectrum As input, the graph attention network is used to aggregate the information of neighbor entities in a biased manner to obtain the aggregated graph representation. The weight of the neighbor entity is calculated based on the relationship between the item entity and the neighbor entity.

[0063] Step 3: Based on the current attribute representation Spectral characterization The trained cross-domain cold-start item recommendation model is used to obtain recommendation results based on the interaction information.

[0064] like Figure 2 As shown, the construction process of the cross-domain cold-start item recommendation model includes: constructing a self-comparative learning task, a source domain comparative learning task and a cross-domain comparative learning task, and then obtaining an initial cross-domain cold-start item recommendation model; on this basis, based on the first attribute representation and the first graph representation, respectively construct a self-comparative learning loss function, a source domain comparative learning loss function and a cross-domain comparative learning loss function, and based on the corresponding user representation, construct a BPR loss function; based on the self-comparative learning loss function, the source domain comparative learning loss function, the cross-domain comparative learning loss function and the BPR loss function, construct a total loss function; the training process includes: using the total loss function to train and optimize the constructed cross-domain cold-start item recommendation model. Specifically:

[0065] Step 301: Constructing a self-contrastive learning task

[0066] (1) Construct the first self-contrastive learning loss function and calculate the loss:

[0067] Represent the current attributes Serves as an anchor point for first self-contrastive learning;

[0068] The positive sample is item v x Spectral characterization

[0069] The process of selecting negative samples is as follows: first calculate The cosine similarity of the graph representations of other items in the same domain is used, and then the graph representations of 40 items with similarities between Top1 and Top40 (i.e., the first preset condition) are used as negative samples;

[0070] According to the selected positive and negative samples, calculate the first self-contrastive learning loss The calculation formula is:

[0071]

[0072] In the formula, V is the set of all items in this round, Is an item v x A set of negative samples with attribute representation as contrastive learning anchor points. sim(x,y) calculates the cosine similarity between x and y vectors. τ is the temperature coefficient. For another same domain item v j′ Spectral representation of .

[0073] (2) Construct the second self-contrastive learning loss function and calculate the loss:

[0074] Represent the current graph Serves as an anchor point for second self-contrastive learning;

[0075] The positive sample is item v x Attribute representation

[0076] The process of selecting negative samples is as follows: first calculate The cosine similarity of the attribute representation of other items in the same domain is used, and the attribute representation of 40 items with similarity in Top1 to Top40 (i.e. the first preset condition) is used as negative samples; based on the selected positive and negative samples, the second self-contrastive learning loss is calculated The calculation formula is:

[0077]

[0078] In the formula, Is an item v x A set of negative samples using atlas representation as anchor points for contrastive learning, For another same domain item v j′ Attribute representation.

[0079] Step 302: Construct source domain contrast learning task

[0080] (1) Generate source domain item representation:

[0081] The same source domain item v s The current attribute representation and graph representation are horizontally spliced ​​to obtain the object representation of the source domain It is expressed as:

[0082]

[0083] (2) Select positive and negative samples for source domain contrast learning:

[0084] Represented by objects in the source domain Serves as an anchor for contrastive learning;

[0085] The process of selecting positive samples is as follows: first calculate the source domain item v s and other source domain items, looking for interactive behaviors and v s Similar source domain items, then select the item representations of 10 items with similarity in the top 1 to top 10 (i.e., the second preset condition) as positive samples;

[0086] The process of selecting negative samples is as follows: first calculate The cosine similarity of the representations of other source domain items is calculated, and then the representations of the 40 items with similarity in the top 1 to top 40 (i.e., the first preset condition) are used as negative samples. If an item in the negative sample has been used as a positive sample, the item is deleted from the negative sample and the items are postponed according to the cosine similarity. The calculation formula for collaborative similarity is:

[0087]

[0088] In the formula, Clicked source domain item v s A collection of users, Clicked another source domain item v j A collection of users.

[0089] (3) Construct the source domain contrastive learning loss function and calculate the contrastive learning loss:

[0090] According to the selection of positive and negative samples, the source domain contrast learning loss is calculated, and the formula is:

[0091]

[0092] Where V s is the collection of all source domain items in this round, For source domain item v s The set of positive samples, For source domain item v s The set of negative samples, is the item representation of the source domain, is a positive sample of source domain items The representation of items, Negative samples of source domain items Representation of items.

[0093] Step 303: Construct a cross-domain contrastive learning task

[0094] (1) Generate item representations in the source domain and target domain respectively:

[0095] Horizontally splice the attribute representation and graph representation of the same item to obtain the item representation in the source domain and the object representation of the target domain

[0096] (2) Select positive and negative samples for cross-domain contrastive learning:

[0097] Represented by objects in the source domain Serves as an anchor for contrastive learning;

[0098] The process of selecting positive samples is as follows: first calculate the item v sThe content similarity between other target domain items is used to find semantic similarities with v s For similar target domain items, select the item representations of 10 items with similarity in the top 1 to top 10 (i.e., the second preset condition) as positive samples;

[0099] The process of selecting negative samples is as follows: first calculate The cosine similarity of the representation of other target domain items is used, and the item representations of the 40 items with similarity in the top 1 to top 40 (i.e. the first preset condition) are used as negative samples. If an item in the negative sample has been used as a positive sample, the item is deleted from the negative sample and the item is postponed according to the cosine similarity. The calculation formula for content similarity is:

[0100]

[0101] Where D st For source domain item v s and the target domain item v t The Euclidean distance between min For source domain item v s The minimum Euclidean distance between all target domain items, D max For source domain item v s The maximum Euclidean distance between the target domain and all the target domain items.

[0102] (3) Construct a cross-domain contrastive learning loss function and calculate the contrastive learning loss:

[0103] According to the selected positive and negative samples, the cross-domain contrastive learning loss is calculated, and the formula is:

[0104]

[0105] Where V s is the collection of all source domain items in this round, For source domain item v s The positive sample set, For source domain item v s The negative sample set, is the item representation of the source domain, is a positive sample (target domain item) The representation of items, is a negative sample (target domain item) Representation of items.

[0106] Step 304: Based on the user representation obtained from the interaction information between the user and the source domain items, a BPR loss function is constructed, and then a total loss function is constructed to achieve the construction and training optimization of the cross-domain cold start item recommendation model, and the trained model is used to recommend items to users.

[0107] (1) Calculate the loss of the BPR function:

[0108] For source domain item v s , according to the actual source domain item click relationship, represented by the item and user characterization Calculate the BPR loss function, the calculation formula is:

[0109]

[0110] in:

[0111] o={(v s ,u + ,u - )|(v s ,u + )∈o + ,(v s ,u - )∈o / +} (10)

[0112]

[0113] Where V s is the set of all source domain items, u + Indicates that the source domain item v has been clicked s User, u - Indicates that the source domain item has not been clicked v s Users, is the calculation of the inner product, and σ is the sigmoid function.

[0114] (2) Joint optimization loss:

[0115] Construct the total loss function and calculate the total loss The total loss value is used to reversely update the model parameters. The total loss function is the weighted sum of the above loss functions and the hyperparameters that need to be updated in the model. The calculation formula is:

[0116]

[0117] In the formula, λ 1 , 2 , 3 are different weight parameters, represents the first self-contrastive learning loss function, represents the second self-contrastive learning loss function, represents the source domain contrastive learning loss function, represents the cross-domain contrastive learning loss function, represents the BPR loss function, Θ represents all the hyperparameters that need to be updated for the cross-domain cold-start item recommendation model.

[0118] Specifically, the weight parameter λ 1 , 2 , 3 The values ​​of are all 0.6. In order to fully mine the user’s interest in the target domain items from the unlabeled data, 1 The setting of makes the model pay more attention to the feedback information of contrastive learning during training; due to the gradual improvement of triple contrastive learning on the representation of objects, λ 2 and λ 3 The setting allows the model to pay more attention to triple contrastive learning layer by layer during the training process.

[0119] Compared with other triple contrastive learning methods, the joint optimization loss of the present invention progressively considers the relationship of triple contrastive learning layer by layer.

[0120] (3) Recommended target domain items:

[0121] First, obtain the object representation of the target domain Then calculate The inner product of the candidate user representations is calculated and sorted in descending order according to the inner product scores, and the target domain items are recommended to the users ranked at the top of the candidate list.

[0122] Next, we use simulation experiments to verify the effectiveness of the above recommended methods:

[0123] The experimental environment is a server equipped with Ubuntu 20.04 64-bit operating system and 128G memory. The processor is Intel Xeon Platinum 8358P CPU and NVIDIA TESLA A100 GPU.

[0124] The experiment is conducted based on the Amazon public dataset to verify the effectiveness of the method provided by the present invention in practical applications. This embodiment selects the Movies & TV (AM) subset and the Books (AB) subset of the Amazon dataset, and conducts two sets of experiments with AB as the source domain dataset and AM as the target domain dataset, and AM as the source domain dataset and AB as the target domain dataset. The data statistics of the dataset are shown in Table 1:

[0125] Table 1 Data statistics of the data set

[0126]

[0127] The experiment uses two representative indicators, HR@K and NDCG@K, to evaluate the performance of the proposed method, and sets the value of K to 5 and 10 respectively. HR@K measures the recall rate of the recommendation results, and NDCG@K measures the ranking quality of the recommendation list. The hyperparameters of the experiment are set as follows: the dimension of the vector is 100, the batch size is 1024, the learning rate is 0.01, and the temperature coefficient of contrastive learning is 0.1.

[0128] This experiment is an ablation experiment, which aims to verify the effectiveness of the three contrastive learning modules of the present invention in solving the domain cold start problem. The three variants of the method of the present invention are:

[0129] (1) Variant 1, directly concatenates the attribute representation and graph representation of the object without using self-contrastive learning loss.

[0130] (2) Variant 2: The relationship between the content information of source domain items only considers content similarity, not co-similarity, and does not use source domain contrastive learning loss.

[0131] (3) Variant 3: The attribute spaces of the source and target domains are not aligned, and cross-domain contrastive learning loss is not used.

[0132] The experimental results are shown in Table 2:

[0133] Table 2 shows the results of ablation experiments

[0134]

[0135] From the analysis of the results in Table 2, we can see that the three contrastive learning modules can demonstrate superiority in the HR indicator; although the method of the present invention does not have the best score in the NDCG indicator, the gap with the best score is small. It is worth noting that all indicator scores of variant 3 are lower than those of the method of the present invention, indicating that the cross-domain contrastive learning module is the key to solving the domain cold start problem. In general, the self-contrast learning module, source domain contrastive learning module, and cross-domain contrastive learning module introduced by the method of the present invention have certain rationality and effectiveness in solving the domain cold start problem.

[0136] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A cross-domain cold-start item recommendation method based on triple contrastive learning, characterized in that: The following steps are involved: Obtain attribute information, knowledge graph information, and interaction information between users and source domain items in the source and target domains; The attribute information and the knowledge graph information are biased to obtain corresponding initial attribute representations and initial graph representations, and an initial user representation is obtained from the interaction information using a multi-hot encoding method; Based on the initial attribute representation, a multi-layer perceptron is used to obtain a filtered attribute representation, and based on the initial graph representation, a graph attention network is used to obtain an aggregated graph representation; Based on the current attribute representation, graph representation and the interactive information, a trained cross-domain cold-start item recommendation model is used to obtain recommendation results; The construction and training process of the cross-domain cold-start item recommendation model includes: Construct self-comparative learning tasks, source domain comparative learning tasks, and cross-domain comparative learning tasks respectively, and then obtain the initial cross-domain cold-start item recommendation model; Based on attribute representation and graph representation, we construct the self-contrastive learning loss function, source domain contrastive learning loss function and cross-domain contrastive learning loss function respectively, and based on the corresponding user representation, we construct the BPR loss function. Constructing a total loss function based on the self-contrastive learning loss function, the source domain contrastive learning loss function, the cross-domain contrastive learning loss function and the BPR loss function; The total loss function is used to train and optimize the constructed cross-domain cold-start item recommendation model.

2. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: The process of constructing a self-contrastive learning task specifically includes: The current attribute representation and the current graph representation are used as anchor points for the first self-contrastive learning and the second self-contrastive learning respectively; The current graph representation and the current attribute representation are used as positive samples for the first self-contrastive learning and the second self-contrastive learning respectively; Calculate the cosine similarity between the current attribute representation and other graph representations of items in the same domain, and the cosine similarity between the current graph representation and other attribute representations of items in the same domain, and select the graph representation and attribute representation that meet the first preset condition as negative samples for the first self-contrastive learning and the second self-contrastive learning respectively; Based on the respective anchor points, positive samples and negative samples, the first self-contrastive learning loss function and the second self-contrastive learning loss function are constructed respectively.

3. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 2 is characterized in that: The calculation formula of the total loss function is: In the formula, λ1, λ2, and λ3 are different weight parameters. represents the first self-contrastive learning loss, represents the second self-contrastive learning loss, represents the source domain contrastive learning loss, represents the cross-domain contrastive learning loss, represents the BPR loss, Θ represents all the hyperparameters that need to be updated for the cross-domain cold-start item recommendation model.

4. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: The process of constructing the source domain contrastive learning task specifically includes: Merge the current attribute representation and graph representation of the same source domain item to obtain the item representation of the source domain; Using the object representation of the source domain as an anchor point for source domain contrastive learning; Calculating the collaborative similarity between the source domain item and other source domain items, and selecting item representations that meet the second preset condition as positive samples; Calculating the cosine similarity between the item representations in the source domain and the item representations in other source domains, and selecting the item representations that meet the first preset condition as negative samples; Based on the determined anchor points, positive samples and negative samples, a source domain contrastive learning loss function is constructed.

5. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 4 is characterized in that: The expression of the collaborative similarity is: In the formula, Clicked source domain item v s A collection of users, Clicked another source domain item v j A collection of users; The expression of the source domain contrast learning loss function is: Where V S is the collection of all source domain items in this round, For source domain item v s The set of positive samples, For source domain item v s The set of negative samples, is the item representation of the source domain, is a positive sample of source domain items The representation of items, Negative samples of source domain items The item characterization, τ is the temperature coefficient.

6. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: The process of constructing a cross-domain contrastive learning task specifically includes: Merge the current attribute representation and graph representation of the same source domain item and the current attribute representation and graph representation of the same target domain item respectively to obtain the item representation of the source domain and the item representation of the target domain; Using the item representation of the source domain as an anchor for cross-domain contrastive learning; Calculating the content similarity between the source domain item and the other target domain items, and selecting the item representation that meets the second preset condition as a positive sample; Calculating the cosine similarity between the object representations in the source domain and the object representations in the other target domains, and selecting the object representations that meet the first preset condition as negative samples; Based on the determined anchor points, positive samples and negative samples, a cross-domain contrastive learning loss function is constructed.

7. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 6, characterized in that: The expression of the content similarity is: Where D st For source domain item v s and the target domain item v t The Euclidean distance between min For source domain item v s The minimum Euclidean distance between all target domain items, D max For source domain item v s The maximum value of the Euclidean distance to all target domain items; The expression of the cross-domain contrastive learning loss function is: Where V S is the collection of all source domain items in this round, For source domain item v s The positive sample set, For source domain item v s The negative sample set, is the item representation of the source domain, is the positive sample of the target domain item The representation of items, Negative samples of target domain items The item characterization, τ is the temperature coefficient.

8. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: The calculation formula of the BPR loss function is: in: O={(v s ,u + ,u - )|(v s ,u + )∈O + ,(v s ,u - )∈O / +} Where V S is the set of all source domain items, u + Indicates that the source domain item v has been clicked s User, u - Indicates that the source domain item has not been clicked v s Users, is the inner product, σ is the sigmoid function, Z (·) represents the user representation, Representation of items in the source domain.

9. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: The attribute information and the knowledge graph information are biasedly processed to obtain an initial attribute representation and an initial graph representation of the item, specifically including: Using TextBlob to extract noun information and category noun information from the attribute information and merge them into a sentence sequence, and inputting the sentence sequence into a preset Bert model to obtain an initial attribute representation; Based on the knowledge graph information, a preset TransR model and a random edge deletion method are used to obtain multiple subgraphs, and the similarity scores of the same item on different subgraphs are calculated to obtain the corresponding initial graph representation.

10. The cross-domain cold-start item recommendation method based on triple contrastive learning according to claim 1, characterized in that: Based on the initial attribute representation, a multi-layer perceptron is used to obtain a filtered attribute representation, and based on the initial graph representation, a graph attention network is used to obtain an aggregated graph representation, specifically including: Update the initial attribute representation of the item: take the initial attribute representation as input, pass it through a multi-layer perceptron consisting of three linear layers and two activation layers in sequence, further filter the initial attribute representation, and output the attribute representation with unchanged dimension as the filtered attribute representation. The activation layer uses the ELU activation function; Update the initial graph representation of the item: take the initial graph representation as input, use the graph attention network to biasedly aggregate the information of neighbor entities, and obtain the aggregated graph representation. The weight of the neighbor entity is calculated according to the relationship between the item entity and the neighbor entity.

Citation Information

Patent Citations

  • News recommendation method fusing activation diffusion theory and Ebbinghaus forgetting theory

    CN116069921A

  • Distributed cross-boundary service recommendation method and system based on variational reasoning

    CN116361561A

  • Knowledge perception multi-domain recommendation method and system based on hierarchical graph comparative learning

    CN116501956A

  • Object recommendation model training method and object recommendation method and device

    CN117009653A

  • System and method for a convolutional neural network for multi-label classification with partial annotations

    US20200160177A1

Cited By

  • Fair recommendation method and device based on comparative learning

    CN120123593A

  • A cross-domain sequential recommendation method based on causal inference and preference evolution

    CN121350366B

  • Double contrast learning Transform cross-dataset electroencephalogram emotion recognition method

    CN121705849A

  • A dual contrast learning transformer cross-dataset electroencephalogram emotion recognition method

    CN121705849B