Bundled package recommendation method based on cross-view comparative learning
Through cross-view comparison learning and graph convolution network combined with attention mechanism, the problem of view correlation neglect in the traditional bundle recommendation model is solved, and more efficient bundle recommendation is achieved.
Patent Information
- Application Number
- CN202510545313.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-08
AI Technical Summary
The traditional bundle recommendation model ignores the correlation between different views, resulting in suboptimal recommendation performance and failing to fully tap complex relationships between users, bundles, and items.
Through cross-view comparison learning, let bundled view and item view collaborate, combine graph convolution networks and attention mechanisms to learn advanced embedded representations of users, bundled packages and items, and optimize model parameters with InfoNCE and Bayesian personalized ranking loss.
It realizes mutual enhancement of characterization learning, alleviates the problem of data sparseness, improves the model's ability to capture user preferences, item characteristics and bundle characteristics, and improves the performance of bundle recommendation models.
Smart Images

Figure CN120449675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence recommendation systems, and in particular to a bundle recommendation method based on cross-view contrastive learning. Background Art
[0002] The goal of bundle recommendation is to recommend a group of related items to users, satisfying their diverse needs and enhancing the user experience. Traditional bundle recommendation models typically leverage user-bundle interaction information and user-item interaction information to learn user and bundle representations, corresponding to the bundle and item views, respectively. Traditional bundle recommendation models typically employ two strategies: one uses only a single view for learning without distinguishing between the bundle and item views; the other simply combines the predictions from the bundle and item views. These two strategies ignore the unique information contained in different views, fail to fully exploit the potential connections between the two views, and fail to fully learn the complex relationships between users, bundles, and items, resulting in suboptimal recommendation performance.
[0003] This approach leverages traditional bundle recommendation algorithms, taking into account that different views can capture different aspects of user preferences. Through cross-view comparative learning, bundle and item views collaborate to achieve mutual reinforcement in representation learning and alleviate the data sparsity issue. Furthermore, we introduce an attention mechanism to enhance the model's ability to capture user preferences, item features, and bundle characteristics, effectively improving the performance of existing bundle recommendation models. Summary of the Invention
[0004] This invention addresses the technical problem that traditional bundle recommendation models ignore the correlation between different views. In traditional bundle recommendation algorithms, cross-view comparative learning enables two views to collaborate, achieving mutual reinforcement in representation learning and alleviating the data sparsity issue. Furthermore, we introduce an attention mechanism to enhance the model's ability to capture user preferences, item characteristics, and bundle features, effectively improving the performance of existing bundle recommendation models.
[0005] The present invention adopts the following technical solutions to solve the above technical problems:
[0006] A bundle recommendation method based on cross-view contrastive learning, characterized by comprising the following steps:
[0007] Step 1) Construct a user-bundle interaction graph, a user-item interaction graph, and a bundle-item affiliation graph, and augment each graph by adding edges.
[0008] Step 2) On the user-bundle augmented graph, a graph convolutional network is used to learn high-level embedding representations of users and bundles from the bundle perspective, and an attention mechanism is introduced during the information propagation process. Similarly, on the user-item augmented graph, a graph convolutional network is used to learn high-level embedding representations of users and items from the item perspective. Based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representations to obtain the bundle embedding representation from the item perspective.
[0009] Step 3) Based on the user representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the user side. Similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the bundle side.
[0010] Step 4) Calculate the recommendation loss using Bayesian personalized ranking loss. Obtain the loss function by combining weighted recommendation loss, user-side contrast loss, and bundle-side contrast loss, and learn the model parameters using the Adam optimizer.
[0011] In step 5), the inner product of the embedding representations of the user and the bundle is used as the predicted score, and bundle recommendations are provided based on the predicted score.
[0012] A further improvement of the present invention is that in step 1), a user-bundle interaction graph, a user-item interaction graph, and a bundle-item affiliation graph are constructed, and each graph is augmented by adding edges.
[0013] First, given the user-bundle interaction information, user-item interaction information, and bundle-item affiliation information, a user-bundle interaction graph is constructed. The corresponding interaction matrix X M×N , User-item interaction diagram The corresponding interaction matrix Y M×O , Bundle-item affiliation diagram The corresponding matrix Z N×O , defined as follows:
[0014] X M×N ={x ub |u∈U,b∈B}
[0015] Y M×O ={y ui |u∈U,i∈I}
[0016] Z N×O ={z bi |b∈B,i∈I}
[0017] Where u represents the user index, b represents the bundle index, and i represents the item index. ub、y ui 、z bi ∈{0,1}, respectively indicating whether user u has interacted with bundle b, whether user u has interacted with item i, and whether bundle b contains item i. U, B, and I are the sets of users, bundles, and items, respectively. M, N, and O represent the number of users, bundles, and items, respectively.
[0018] Then, each graph is augmented by adding edges to obtain the user-bundle augmented graph Corresponding interaction matrix User-item augmented graph Corresponding interaction matrix Bundle-item affiliation expansion diagram Matrix
[0019] A further improvement of the present invention is that in step 2), a graph convolutional network is used to learn high-level embedding representations of users and bundles from the bundle perspective on the user-bundle augmented graph, and an attention mechanism is introduced during the information propagation process. Similarly, a graph convolutional network is used to learn high-level embedding representations of users and items from the item perspective on the user-item augmented graph. Based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representations to obtain the bundle embedding representation from the item perspective.
[0020] First, according to the interaction matrix Interaction Matrix matrix Construct the corresponding adjacency matrix A UB 、A UI 、A BI , defined as follows:
[0021]
[0022] in, for The transposed matrix of for The transposed matrix of for The transposed matrix of .
[0023] Next, the adjacency matrix A UB 、A UI 、A BI Normalize:
[0024]
[0025] Among them, D UB yes The diagonal matrix, D UIyes The diagonal matrix, D BI yes The diagonal matrix, D UB 、D UI 、D BI They are formalized as:
[0026]
[0027] in, represents the number of first-order neighbors of user u1 on the user-bundle augmented graph, represents the number of first-order neighbors of bundle b1 on the user-bundle augmented graph; represents the number of first-order neighbors of user u1 on the user-item augmented graph, Represents the number of first-order neighbors of item i1 in the user-item augmented graph; represents the number of first-order neighbors of bundle b1 on the bundle-item affiliation augmented graph, that is, the number of items contained in bundle b1, Represents the number of first-order neighbors of item i1 in the bundle-item affiliation augmented graph.
[0028] The neighbor aggregation and information propagation mechanism of the graph convolutional network is used to learn the high-order embedding representation of users and bundles on the user-bundle augmented graph. In particular, during the information propagation process, the attention mechanism is introduced to learn the weights of the neighbor representations and obtain the embedding representation of user u and bundle b at the kth layer under the bundle view. as follows:
[0029]
[0030] in, represents the first-order neighbors of user u in the user-bundle augmented graph, represents the first-order neighbors of bundle b in the user-bundle augmented graph, represents the number of first-order neighbors of user u in the user-bundle augmented graph, represents the number of first-order neighbors of bundle b in the user-bundle augmented graph. and is the initial representation of the user and bundle, a u,b represents the weight of the bundle b representation that user u has interacted with, a b,u The weight of the user u representation that the bundle b has interacted with is defined as follows:
[0031]
[0032] Among them, softmax() represents the normalized exponential function, LeakyReLU() represents the activation function, and W ub represents the attention weight matrix of the bundle, W bu Represents the user's attention weight matrix under the bundle view, and concat() represents the vector concatenation operation.
[0033] Then, after K layers of convolution, we concatenate the outputs of the K-layer graph convolutional network to obtain the final embedding representation of the user and bundle under the bundle view.
[0034]
[0035]
[0036] Then, the message dropout enhancement method is used to obtain the embedded representation of users and bundles under the bundle view.
[0037]
[0038] Among them, Dropout() means randomly discarding some elements, and p represents the probability that some elements of each embedding are randomly discarded.
[0039] Similarly, the neighbor aggregation and information propagation mechanism of the graph convolutional network is used to learn the high-order embedding representation of users and items on the user-item augmented graph, and the embedding representation of user u and item i at the kth layer under the item view is obtained. as follows:
[0040]
[0041] in, represents the first-order neighbors of user u in the user-item augmented graph, represents the first-order neighbors of item i in the user-item augmented graph, represents the number of first-order neighbors of user u in the user-item augmented graph, represents the number of first-order neighbors of item i in the user-item augmented graph. and It is the initial representation of users and items. u,i represents the weight of the item i that user u has interacted with, a i,u The weight of the user u representation that item i has interacted with is as follows:
[0042]
[0043] Among them, W uiRepresents the attention weight matrix of the item, W iu Represents the user's attention weight matrix under the item view.
[0044] After K layers of convolution, we concatenate the outputs of the K-layer graph convolutional network to obtain the final embedding representation of users and items in the item view. as follows:
[0045]
[0046] Next, we use the message dropout enhancement method to obtain the embedded representation of users and items in the item view:
[0047]
[0048] Then, based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representation to obtain the bundle embedding representation under the item view:
[0049]
[0050] in, represents the first-order neighbors of bundle b in the bundle-item affiliation augmented graph, represents the number of items contained in bundle b in the bundle-item affiliation augmented graph, Represents the embedded representation of the item in the item view.
[0051] A further improvement of the present invention is that: in the step 3), based on the user representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss of the user end; similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss of the bundle end.
[0052] First, based on the user representations in the bundle view and the item view, InfoNCE is used to calculate the user-side contrast loss, which is defined as follows:
[0053]
[0054] in, and denote the embedding representation of user u in the bundle view and item view respectively, denote the embedding representation of user u in the bundle view and user v in the item view, respectively. s() is the cosine similarity function, and τ is the temperature hyperparameter.
[0055] Similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the bundle side:
[0056]
[0057] in, Represents the embedded representation of bundle b in the bundle view and item view respectively, and They represent the embedded representation of bundle b under the bundle view and the embedded representation of bundle p under the item view, respectively.
[0058] Next, we average the contrastive losses of the user side and the bundle side to get the final contrastive loss:
[0059]
[0060] A further improvement of the present invention is that in step 4), the recommendation loss is calculated using the Bayesian personalized ranking loss. The loss function is obtained by combining the weighted recommendation loss, the user-side contrast loss, and the bundle-side contrast loss, and the model parameters are learned using the Adam optimizer.
[0061] First, calculate the inner product of the representations of user u and bundle b, user u and bundle b' under the bundle view, and obtain the preference scores of user u for bundle b and bundle b' under the bundle view.
[0062]
[0063] Similarly, calculate the inner product of the representations of user u and bundle b, user u and bundle b' under the item view, and obtain the preference score of user u for bundle b and bundle b' under the item view
[0064]
[0065] Combining the above inner product values, we can obtain the user u’s preference prediction score for bundle b. User u's preference prediction score for bundle b'
[0066]
[0067]
[0068] Then, the Bayesian personalized ranking loss is used to calculate the recommendation loss L BPR :
[0069]
[0070] Among them, Q={(u,b,b')|u∈U,b,b'∈B,x ub =1,x ub' =0}, Q is all possible user-positive sample-negative sample triplets, b represents the bundles that user u has interacted with, b' represents the bundles that user u has not interacted with, σ() is the Sigmoid function, represents the probability that user u prefers bundle b over bundle b'.
[0071] The loss function of the bundle recommendation model for cross-view contrastive learning is obtained through weighted recommendation loss, user-side contrast loss, and bundle-side contrast loss, and the model parameters are learned through the Adam optimizer.
[0072]
[0073] in, are all the parameters of the model, Represents all user embeds under the bundle view, Indicates that all bundles are embedded under the bundle view. represents the embedding of all users in the item view, Indicates the embedding of all bundles under the item view. represents the embedding of all items under the item view. λ1 and λ2 are the weight coefficients of the contrastive loss and L2 regularization term, and the L loss function is minimized by the Adam optimizer.
[0074] A further improvement of the present invention is that: in step 5), the inner product of the embedded representations of the user and the bundle is used as the predicted score, and a bundle recommendation is provided based on the predicted score.
[0075] Use the trained user embedding representation of the bundle view and the bundle embed representation The inner product of the user embedding representation under the item view and the bundle embed representation The sum of the inner products of as follows:
[0076]
[0077] After calculating the predicted scores, the top bundles are recommended to users according to the score ranking.
[0078] The beneficial effects of the present invention are:
[0079] Cross-view contrastive learning enables collaboration between two views, achieving mutual reinforcement in representation learning and alleviating data sparsity. Furthermore, we introduce an attention mechanism to enhance the model's ability to capture user preferences, item features, and bundle characteristics, effectively improving the performance of existing bundle recommendation models. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 Schematic diagram of the process of bundle recommendation method based on cross-view contrastive learning.
Claims
1. A bundle recommendation method based on cross-view contrastive learning, characterized in that The following steps are involved: Step 1) Construct a user-bundle interaction graph, a user-item interaction graph, and a bundle-item affiliation graph, and augment each graph by adding edges. Step 2) On the user-bundle augmented graph, a graph convolutional network is used to learn high-level embedding representations of users and bundles from the bundle perspective, and an attention mechanism is introduced during the information propagation process. Similarly, on the user-item augmented graph, a graph convolutional network is used to learn high-level embedding representations of users and items from the item perspective. Based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representations to obtain the bundle embedding representation from the item perspective. Step 3) Based on the user representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the user side. Similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the bundle side. Step 4) Calculate the recommendation loss using Bayesian personalized ranking loss. Obtain the loss function by combining weighted recommendation loss, user-side contrast loss, and bundle-side contrast loss, and learn the model parameters using the Adam optimizer. In step 5), the inner product of the embedding representations of the user and the bundle is used as the predicted score, and bundle recommendations are provided based on the predicted score.
2. The bundle recommendation method based on cross-view contrastive learning according to claim 1, characterized in that: In the step 1), a user-bundle interaction graph, a user-item interaction graph, and a bundle-item affiliation graph are constructed, and each graph is augmented by adding edges. First, given the user-bundle interaction information, user-item interaction information, and bundle-item affiliation information, a user-bundle interaction graph is constructed. The corresponding interaction matrix X M×N , User-item interaction diagram The corresponding interaction matrix Y M×O , Bundle-item affiliation diagram The corresponding matrix Z N×O , defined as follows: X M×N ={x ub |u∈U,b∈B} AND M×O ={and ui |u∈U,i∈I} WITH N×O =[z bi |b∈B,i∈I} Where u represents the user index, b represents the bundle index, and i represents the item index. ub 、y ui 、z bi ∈{0,1}, respectively indicating whether user u has interacted with bundle b, whether user u has interacted with item i, and whether bundle b contains item i. U, B, and I are the sets of users, bundles, and items, respectively. M, N, and O represent the number of users, bundles, and items, respectively. Then, each graph is augmented by adding edges to obtain the user-bundle augmented graph Corresponding interaction matrix User-item augmented graph Corresponding interaction matrix Bundle-item affiliation expansion diagram Matrix 3. The bundle recommendation method based on cross-view contrastive learning according to claim 2, characterized in that: In step 2), a graph convolutional network is used on the user-bundle augmented graph to learn high-level embedding representations of users and bundles from the bundle perspective, and an attention mechanism is introduced during the information propagation process. Similarly, a graph convolutional network is used on the user-item augmented graph to learn high-level embedding representations of users and items from the item perspective. Based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representations to obtain the bundle embedding representation from the item perspective. First, according to the interaction matrix Interaction Matrix matrix Construct the corresponding adjacency matrix A UB 、A UI 、A BI , defined as follows: in, for The transposed matrix of for The transposed matrix of for The transposed matrix of . Next, the adjacency matrix A UB 、A UI 、A BI Normalize: Among them, D UB yes The diagonal matrix, D UI yes The diagonal matrix, D BI yes The diagonal matrix, D UB 、D UI 、D BI They are formalized as: in, represents the number of first-order neighbors of user u1 on the user-bundle augmented graph, represents the number of first-order neighbors of bundle b1 on the user-bundle augmented graph; represents the number of first-order neighbors of user u1 on the user-item augmented graph, Represents the number of first-order neighbors of item i1 in the user-item augmented graph; represents the number of first-order neighbors of bundle b1 on the bundle-item affiliation augmented graph, that is, the number of items contained in bundle b1, Represents the number of first-order neighbors of item i1 in the bundle-item affiliation augmented graph. The neighbor aggregation and information propagation mechanism of the graph convolutional network is used to learn the high-order embedding representation of users and bundles on the user-bundle augmented graph. In particular, during the information propagation process, the attention mechanism is introduced to learn the weights of the neighbor representations and obtain the embedding representation of user u and bundle b at the kth layer under the bundle view. as follows: in, represents the first-order neighbors of user u in the user-bundle augmented graph, represents the first-order neighbors of bundle b in the user-bundle augmented graph, represents the number of first-order neighbors of user u in the user-bundle augmented graph, represents the number of first-order neighbors of bundle b in the user-bundle augmented graph. and is the initial representation of the user and bundle, a u,b represents the weight of the bundle b representation that user u has interacted with, a b,u The weight of the user u representation that the bundle b has interacted with is defined as follows: Among them, softmax() represents the normalized exponential function, LeakyReLU() represents the activation function, and W ub represents the attention weight matrix of the bundle, W bu Represents the user's attention weight matrix under the bundle view, and concat() represents the vector concatenation operation. Then, after K layers of convolution, we concatenate the outputs of the K-layer graph convolutional network to obtain the final embedding representation of the user and bundle under the bundle view. Then, the message dropout enhancement method is used to obtain the embedded representation of users and bundles under the bundle view. Among them, Dropout() means randomly discarding some elements, and p represents the probability that some elements of each embedding are randomly discarded. Similarly, the neighbor aggregation and information propagation mechanism of the graph convolutional network is used to learn the high-order embedding representation of users and items on the user-item augmented graph, and the embedding representation of user u and item i at the kth layer under the item view is obtained. as follows: in, represents the first-order neighbors of user u in the user-item augmented graph, represents the first-order neighbors of item i in the user-item augmented graph, represents the number of first-order neighbors of user u in the user-item augmented graph, represents the number of first-order neighbors of item i in the user-item augmented graph. and It is the initial representation of users and items. u,i represents the weight of the item i that user u has interacted with, a i,u The weight of the user u representation that item i has interacted with is as follows: Among them, W ui Represents the attention weight matrix of the item, W iu Represents the user's attention weight matrix under the item view. After K layers of convolution, we concatenate the outputs of the K-layer graph convolutional network to obtain the final embedding representation of users and items in the item view. as follows: Next, we use the message dropout enhancement method to obtain the embedded representation of users and items in the item view: Then, based on the bundle-item affiliation augmented graph, average pooling is performed on the item embedding representation to obtain the bundle embedding representation under the item view: in, represents the first-order neighbors of bundle b in the bundle-item affiliation augmented graph, represents the number of items contained in bundle b in the bundle-item affiliation augmented graph, Represents the embedded representation of the item in the item view.
4. The bundle recommendation method based on cross-view contrastive learning according to claim 3, characterized in that In step 3), based on the user representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the user side; similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the bundle side. First, based on the user representations in the bundle view and the item view, InfoNCE is used to calculate the user-side contrast loss, which is defined as follows: in, and denote the embedding representation of user u in the bundle view and item view respectively, denote the embedding representation of user u in the bundle view and user v in the item view, respectively. s() is the cosine similarity function, and τ is the temperature hyperparameter. Similarly, based on the bundle representation in the bundle view and the item view, InfoNCE is used to calculate the contrast loss on the bundle side: in, Represents the embedded representation of bundle b in the bundle view and item view respectively, and They represent the embedded representation of bundle b under the bundle view and the embedded representation of bundle p under the item view, respectively. Next, we average the contrastive losses of the user side and the bundle side to get the final contrastive loss:
5. The bundle recommendation method based on cross-view contrastive learning according to claim 4, characterized in that: In step 4), the recommendation loss is calculated using the Bayesian personalized ranking loss. The loss function is obtained by combining the weighted recommendation loss, the user-side contrast loss, and the bundle-side contrast loss, and the model parameters are learned using the Adam optimizer. First, calculate the inner product of the representations of user u and bundle b, user u and bundle b' under the bundle view, and obtain the preference scores of user u for bundle b and bundle b' under the bundle view. Similarly, calculate the inner product of the representations of user u and bundle b, user u and bundle b' under the item view, and obtain the preference score of user u for bundle b and bundle b' under the item view Combining the above inner product values, we can obtain the user u’s preference prediction score for bundle b. User u's preference prediction score for bundle b' Then, the Bayesian personalized ranking loss is used to calculate the recommendation loss L BPR : Among them, Q={(u,b,b')|u∈U,b,b'∈B,x ub =1,x ub' =0}, Q is all possible user-positive sample-negative sample triplets, b represents the bundles that user u has interacted with, b' represents the bundles that user u has not interacted with, σ() is the Sigmoid function, represents the probability that user u prefers bundle b over bundle b'. The loss function of the bundle recommendation model for cross-view contrastive learning is obtained through weighted recommendation loss, user-side contrast loss, and bundle-side contrast loss, and the model parameters are learned through the Adam optimizer. in, are all the parameters of the model, Represents all user embeds under the bundle view, Indicates that all bundles are embedded under the bundle view. represents the embedding of all users in the item view, Indicates the embedding of all bundles under the item view. represents the embedding of all items under the item view. λ1 and λ2 are the weight coefficients of the contrastive loss and L2 regularization term, and the L loss function is minimized by the Adam optimizer.
6. The bundle recommendation method based on cross-view contrastive learning according to claim 5, characterized in that: In step 5), the inner product of the embedding representations of the user and the bundle is used as the predicted score, and a bundle recommendation is provided based on the predicted score. Use the trained user embedding representation of the bundle view and the bundle embed representation The inner product of the user embedding representation under the item view and the bundle embed representation The sum of the inner products of as follows: After calculating the predicted scores, the top bundles are recommended to users according to the score ranking.