Multi-behavior recommendation method for cross-behavior comparative learning based on particle balls
By employing particle-sphere contrastive learning and graph attention mechanisms, the problems of preserving behavior-specific structures and transferring cross-behavior knowledge in multi-behavior recommendation are solved, thereby improving the accuracy and robustness of the recommendation system.
Patent Information
- Application Number
- CN202511505571.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-12-16
AI Technical Summary
Existing multi-behavior recommendation methods struggle to simultaneously preserve behavior-specific local structures and achieve effective cross-behavior knowledge transfer. Furthermore, shared convolutional modeling can easily lead to oversmoothing of representations and negative transfer problems.
We construct user and item embeddings using the granular sphere theory, learn behavior-specific embeddings through graph neural networks, optimize cross-behavior user and item representations by combining granular sphere contrastive learning and graph attention mechanisms, and generate personalized target behavior representations through a two-layer attention mechanism.
It achieves the preservation of behavior-specific structures and the effective transfer of cross-behavioral knowledge, improving the accuracy and robustness of recommendations and reducing noise interference.
Smart Images

Figure CN121146874A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of recommender system technology, and in particular to a multi-behavior recommender method based on cross-behavior contrastive learning using granular balls. Background Technology
[0002] With the widespread application of recommender systems in e-commerce platforms, social media, and content delivery networks, accurately capturing users' complex and ever-changing interests and preferences has become a core challenge. Traditional single-behavior recommendation methods rely on only a single type of user-item interaction (such as clicks or purchases), making it difficult to comprehensively portray users' true interests, resulting in limited recommendation effectiveness.
[0003] To alleviate this problem, multi-behavior recommendation methods have gradually emerged in recent years. These methods attempt to provide richer and more robust predictive data for target behaviors (such as purchasing) by jointly modeling user interaction data under different behaviors (e.g., browsing, adding to cart, saving, purchasing). However, existing technologies mainly suffer from the following two types of problems:
[0004] While independent behavior modeling methods can preserve the local structural features of each behavior, they sever the higher-order relationships between behaviors, making it difficult to achieve effective transfer of cross-behavior knowledge.
[0005] Shared convolution modeling methods enhance the global connectivity between behaviors by sharing parameters or graph structures, but they ignore the fine-grained signals specific to the behaviors, which can easily lead to oversmoothing of representations or even negative transfer problems, thus reducing the predictive performance of the target behavior. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-behavior recommendation method based on cross-behavior contrastive learning of granular balls, thereby solving the aforementioned problems existing in the prior art.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A multi-behavior recommendation method based on cross-behavior contrastive learning using granular spheres includes the following steps:
[0009] (1) Obtain user sets, item sets, and user-item interaction data under various behavior types, and construct user-item graphs corresponding to each behavior;
[0010] (2) Based on the user-item graph, a graph neural network is used to learn the initial user and item embeddings to obtain the behavior-specific embeddings for each behavior;
[0011] (3) Construct a set of particle balls for each user and item embedding under each behavior. The particle balls are defined by the center vector and the radius, and are used to capture the local structure and semantic clustering information within the behavior;
[0012] (4) Based on the set of granules, construct the intra-behavioral granule correlation matrix and the inter-behavioral granule overlap matrix to characterize the structural correlation within and between behaviors;
[0013] (5) Based on the particle sphere center and the association matrix, perform particle sphere contrastive learning to optimize the representation consistency of users and items across behaviors and generate enhanced embedding representations;
[0014] (6) The enhanced embedding representation is input to the target perception noise suppression encoder, and the graph attention mechanism is used to distinguish between beneficial signals and noise in the auxiliary behavior to generate a refined behavior embedding;
[0015] (7) A two-layer attention mechanism is used to fuse the refined behavioral embeddings to generate the final representation of users and items under the target behavior;
[0016] (8) Calculate the matching score between users and items based on the final representation to achieve recommendation prediction of target behavior.
[0017] Furthermore, step (2) "learning initial user and item embedding representations using a graph neural network" specifically includes:
[0018] Let the learnable initial user embedding be:
[0019]
[0020] The initial item is embedded as follows:
[0021] Where M and N are the number of users and items, respectively, and d is the embedding dimension;
[0022] Merge the various behavior interaction graphs to obtain a unified behavior graph. Its adjacency matrix is denoted as ;
[0023] Using LightGCN Upward propagation yields a unified embedding:
[0024]
[0025] For the b-th behavior diagram using its adjacency matrix and Using LightGCN as input, behavior-specific embeddings are obtained again:
[0026] .
[0027] Furthermore, step (3) "Constructing the set of particle spheres" specifically includes:
[0028] Embedding of items under behavior b ∈R^(N×d), initialize K particle centers:
[0029] , ∈R^d;
[0030] Item embeddings are calculated using the Student t-distribution kernel function. With the center Soft assignment probability:
[0031]
[0032] Where κ represents the degrees of freedom of the student's t-distribution;
[0033] soft allocation matrix Convert to a hard-assigned matrix:
[0034]
[0035] For a particle sphere k, its assigned embedding set is: The radius of a particle sphere is defined as:
[0036]
[0037]
[0038] Furthermore, step (4), “behavioral particle-sphere correlation matrix,” is specifically constructed in the following manner:
[0039] The set of granular balls for behavior b , ={ , },
[0040] Constructing the behavior-intra-overlap matrix Its elements:
[0041]
[0042] Where t is the current training round number, used to control the overlap judgment threshold.
[0043] Furthermore, step (4), the "inter-behavior particle-sphere overlap matrix," is specifically constructed in the following manner:
[0044] The set of item spheres for actions m and n , ,
[0045] First calculate the intersection matrix of the number of shared samples. :
[0046]
[0047] Reconstruct the overlap matrix between behaviors ,
[0048]
[0049] Where τ is the preset minimum overlap ratio threshold.
[0050] Furthermore, step (5) "particle-ball comparison learning" specifically includes:
[0051] The unified center matrix is obtained by splicing the centers of the particles with behavior m and behavior n:
[0052]
[0053] in and respectively behavior and The matrix formed by the centers of all the particles;
[0054] Constructing the mask matrix By splicing , , and its transpose get:
[0055]
[0056] The contrast loss of the granules is defined as follows:
[0057]
[0058] in , , The total number of balls,
[0059] Cosine similarity; the final comparison loss is the average of the losses for all actions:
[0060]
[0061] Where B represents the total number of behaviors.
[0062] Furthermore, step (6) "target perception noise suppression encoder" specifically includes:
[0063] For auxiliary behavior b, construct the target intersection behavior graph. Its adjacency matrix is ,
[0064] Using LightGCN Refined Embedding:
[0065] Behavioral graph of target complement Weighted aggregation using graph attention mechanism, the first... Layer embedding updated to:
[0066]
[0067] The attention weights are embedded from the target behavior. guide;
[0068] The final refined embedding is as follows:
[0069] Furthermore, step (7), the "two-layer attention mechanism," specifically includes:
[0070] First layer of attention: For node v, compute the embedding of behavior b. Embedded with target behavior Attention score:
[0071] Weight:
[0072]
[0073] Intermediate fusion representation:
[0074] Second layer of attention: Focus on the set of target-related behaviors calculate:
[0075] Calculate the weights again using softmax. And aggregate to obtain the final embedding:
[0076]
[0077] Furthermore, the specific steps of step (8) "matching score and training loss" include:
[0078] Matching score between user u and item i under target behavior t:
[0079] Bayesian personalized ranking loss is used:
[0080] in For the sigmoid function, The regularization coefficient is . For the set of model parameters, For positive samples and negative samples The set of triplets formed;
[0081] The total loss function is:
[0082]
[0083] in Hyperparameters for controlling the intensity of contrastive learning.
[0084] The beneficial effects of this invention are:
[0085] 1. Theoretical Construction: This invention introduces particle ball theory into multi-behavior recommendation for the first time, and introduces particle ball contrastive learning to evaluate and optimize the quality of user and item representations across behaviors;
[0086] 2. Methodological Innovation: The MGMRec proposed in this invention achieves local structure preservation and cross-behavioral alignment through particle ball construction and contrastive learning, then dynamically identifies the utility of auxiliary signals through graph attention mechanism, and finally generates personalized target behavior representation through two-layer attention fusion, thus solving the problems of negative transfer and oversmoothing. Attached Figure Description
[0087] Figure 1 A flowchart illustrating a multi-behavior recommendation method based on cross-behavior contrastive learning using granular spheres, provided as an embodiment of the present invention;
[0088] Figure 2 This is a schematic diagram of the structure of the particle sphere construction and comparison learning module provided in an embodiment of the present invention;
[0089] Figure 3 This is a schematic diagram of the structure of a target-aware noise suppression encoder provided in an embodiment of the present invention;
[0090] Figure 4 This is a schematic diagram of the structure of the attention aggregation module provided in an embodiment of the present invention;
[0091] Figure 5 A comparison chart of experimental results provided for embodiments of the present invention. Detailed Implementation
[0092] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0093] Reference Figures 1 to 5 The multi-behavior recommendation method based on cross-behavior contrastive learning using granular spheres, as shown, includes the following steps:
[0094] (1) Obtain user sets, item sets, and user-item interaction data under various behavior types, and construct user-item graphs corresponding to each behavior;
[0095] (2) Based on the user-item graph, a graph neural network is used to learn the initial user and item embeddings to obtain the behavior-specific embeddings for each behavior;
[0096] (3) Construct a set of particle balls for each user and item embedding under each behavior. The particle balls are defined by the center vector and the radius, and are used to capture the local structure and semantic clustering information within the behavior;
[0097] (4) Based on the set of granules, construct the intra-behavioral granule correlation matrix and the inter-behavioral granule overlap matrix to characterize the structural correlation within and between behaviors;
[0098] (5) Based on the particle sphere center and the association matrix, perform particle sphere contrastive learning to optimize the representation consistency of users and items across behaviors and generate enhanced embedding representations;
[0099] (6) The enhanced embedding representation is input to the target perception noise suppression encoder, and the graph attention mechanism is used to distinguish between beneficial signals and noise in the auxiliary behavior to generate a refined behavior embedding;
[0100] (7) A two-layer attention mechanism is used to fuse the refined behavioral embeddings to generate the final representation of users and items under the target behavior;
[0101] (8) Calculate the matching score between users and items based on the final representation to achieve recommendation prediction of target behavior.
[0102] Furthermore, step (2) "learning initial user and item embedding representations using a graph neural network" specifically includes:
[0103] Let the learnable initial user embedding be:
[0104]
[0105] The initial item is embedded as follows:
[0106] Where M and N are the number of users and items, respectively, and d is the embedding dimension;
[0107] Merge the various behavior interaction graphs to obtain a unified behavior graph. Its adjacency matrix is denoted as ;
[0108] Using LightGCN Upward propagation yields a unified embedding:
[0109]
[0110] For the b-th behavior diagram using its adjacency matrix and Using LightGCN as input, behavior-specific embeddings are obtained again:
[0111] .
[0112] Furthermore, step (3) "Constructing the set of particle spheres" specifically includes:
[0113] Embedding of items under behavior b ∈R^(N×d), initialize K particle centers:
[0114] , ∈R^d;
[0115] Item embeddings are calculated using the Student t-distribution kernel function. With the center Soft assignment probability:
[0116]
[0117] Where κ represents the degrees of freedom of the student's t-distribution;
[0118] soft allocation matrix Convert to a hard-assigned matrix:
[0119]
[0120] For a particle sphere k, its assigned embedding set is: The radius of a particle sphere is defined as:
[0121]
[0122]
[0123] Furthermore, step (4), “behavioral particle-sphere correlation matrix,” is specifically constructed in the following manner:
[0124] The set of granular balls for behavior b , ={ , },
[0125] Constructing the behavior-intra-overlap matrix Its elements:
[0126]
[0127] Where t is the current training round number, used to control the overlap judgment threshold.
[0128] Furthermore, step (4), the "inter-behavior particle-sphere overlap matrix," is specifically constructed in the following manner:
[0129] The set of item spheres for actions m and n , ,
[0130] First calculate the intersection matrix of the number of shared samples. :
[0131]
[0132] Reconstruct the overlap matrix between behaviors ,
[0133]
[0134] Where τ is the preset minimum overlap ratio threshold.
[0135] Furthermore, step (5) "particle-ball comparison learning" specifically includes:
[0136] The unified center matrix is obtained by splicing the centers of the particles with behavior m and behavior n:
[0137]
[0138] in and respectively behavior and The matrix formed by the centers of all the particles;
[0139] Constructing the mask matrix By splicing , , and its transpose get:
[0140]
[0141] The contrast loss of the granules is defined as follows:
[0142]
[0143] in , , The total number of balls,
[0144] Cosine similarity; the final comparison loss is the average of the losses for all actions:
[0145]
[0146] Where B represents the total number of behaviors.
[0147] Furthermore, step (6) "target perception noise suppression encoder" specifically includes:
[0148] For auxiliary behavior b, construct the target intersection behavior graph. Its adjacency matrix is ,
[0149] Using LightGCN Refined Embedding:
[0150] Behavioral graph of target complement Weighted aggregation using graph attention mechanism, the first... Layer embedding updated to:
[0151]
[0152] The attention weights are embedded from the target behavior. guide;
[0153] The final refined embedding is as follows:
[0154] Furthermore, step (7), the "two-layer attention mechanism," specifically includes:
[0155] First layer of attention: For node v, compute the embedding of behavior b. Embedded with target behavior Attention score:
[0156] Weight:
[0157]
[0158] Intermediate fusion representation:
[0159] Second layer of attention: Focus on the set of target-related behaviors calculate:
[0160] Calculate the weights again using softmax. And aggregate to obtain the final embedding:
[0161]
[0162] Furthermore, the specific steps of step (8) "matching score and training loss" include:
[0163] Matching score between user u and item i under target behavior t:
[0164] Bayesian personalized ranking loss is used:
[0165] in For the sigmoid function, The regularization coefficient is . For the set of model parameters, For positive samples and negative samples The set of triplets formed;
[0166] The total loss function is:
[0167]
[0168] in Hyperparameters for controlling the intensity of contrastive learning.
[0169] In the above embodiments, this invention proposes a multi-behavior recommendation method, MGMRec, based on granular sphere-based cross-behavior contrastive learning. This method aims to address the challenge of existing multi-behavior recommendation systems simultaneously preserving behavior-specific local structures and achieving effective cross-behavior knowledge transfer, while also overcoming the interference of auxiliary behavior noise on target behavior prediction. MGMRec divides the user-item interaction embedding space under each behavior into several semantically consistent local granular spheres to capture the intra-behavior topological structure and high-order cross-behavior associations. It also distinguishes between beneficial signals and noise in auxiliary behaviors based on a graph attention mechanism and generates personalized representations for target behavior prediction through an attention aggregator. Experimental results show that MGMRec outperforms baseline methods on Taobao, Tmall, and Jdata datasets.
[0170] As recommender systems are increasingly used in practice, single-behavior data is no longer sufficient to fully depict users' complex and ever-changing interests and preferences. Multi-behavior recommendation tasks have emerged to address this, aiming to provide more accurate and robust predictions for target behaviors (such as purchasing) by jointly utilizing various interactive behaviors such as browsing, adding to cart, favoriting, and purchasing. However, existing methods mainly follow two technical routes: independent behavior modeling, while preserving the unique local structure of each behavior, severs the higher-order connections between cross-behaviors; shared convolutional modeling, while strengthening global connectivity, ignores the fine-grained signals specific to each behavior, leading to both oversmoothing and negative transfer problems. For example... Figure 1 As shown, consider a user who frequently browses, adds to cart, and purchases outdoor gear (e.g., jackets), indicating a preference for outdoor activities. Simultaneously, they browse cameras, suggesting an interest in electronic products. An ideal multi-behavior recommendation system should be able to coordinate these signals to recommend items such as drones, aligning with both the user's outdoor preferences and their interest in electronic products. Therefore, the objective of this invention is to promote effective cross-behavior knowledge transfer while preserving behavior-specific local structures. This invention proposes a multi-behavior recommendation method, MGMRec, based on particle sphere-based cross-behavior contrastive learning. Particle spheres are used to divide the embedding space of each behavior, capturing the intra-behavior structure and cross-behavior associations. The target behavior is represented by graph attention after noise reduction to achieve recommendation. This objective is achieved through the following technical solutions:
[0171] Step 1, Problem Statement: Describe in detail the input data, output results, and various variables of this invention.
[0172] This invention aims to deeply mine multi-behavioral data to achieve accurate recommendations. The MGMRec model proposed in this invention takes a user set as input. ,in Number of users. Item collection. ,in Quantity of items. Multi-behavior interaction data. ,in Indicates the number of behavior types. Multi-behavior graph. ,in Indicates the first User-item graph under this behavior, and The output of the MGMRec model is the user's... With items Sorting scores between , indicating user For items Target behavior occurs (e.g., the probability of purchasing).
[0173] Step two, Particle Sphere Contrastive Learning Module: The MGMRec model constructs particle spheres for each behavior and performs particle sphere contrastive learning to capture the topology within behaviors and the diversity between behaviors.
[0174] The specific implementation details are as follows:
[0175] a) Data preprocessing: First, learnable user and item embeddings are initialized. The computation process can be formalized as follows:
[0176]
[0177] in and These represent learnable user and item embeddings, respectively. It's an embedded dimension. A unified behavior graph is constructed by aggregating all user-item interactions across different behaviors. This invention utilizes LightGCN in... The unified embedding of users and items is shown below:
[0178]
[0179] in express The adjacency matrix. In order to be based on Capture the unique graph signal corresponding to each behavior, for Each behavior graph in Perform the following operations:
[0180]
[0181] in express The adjacency matrix, This is a user and item behavior-specific embedding for behavior b. This invention calculates the corresponding embedding for each behavior. Taking the Taobao dataset as an example, the final result is... , ,and .
[0182] b) Behavior-Specific Particle Sphere Construction: For each behavior-specific view, this invention constructs particle spheres based on user and item embeddings. Item embeddings for behavior b are used... For example, first initialize the center of the particle to... Each of them The center of the particles is obtained using Xavier initialization, and K represents the number of particles. The Student t-distribution is used as the kernel function to measure the item representation. With the center The similarity between them, among which yes The j-th row, yes The k-th row. Its calculation formula is as follows:
[0183]
[0184] Where κ represents the degrees of freedom of the student's t-distribution. This can be viewed as the probability of assigning the item embedding j to the center k of the particle sphere, i.e., a soft assignment. Consider this as the probability distribution of item allocation under the b-th behavior. To calculate the radius of the particle sphere, we will... This is converted to a hard-assigned matrix. The formal definition of this transformation is as follows:
[0185]
[0186] This process converts the soft-assigned probabilities into a binary matrix. Each row contains only one 1, indicating that the corresponding item is assigned to the center of the particle ball.
[0187] To define the radius of the particle sphere, calculate the average distance between each embedding assigned to the particle sphere and its center. Given... Let k be the center of the particle sphere (where k is the index of the particle sphere's center), and let k be the set of embeddings to which it is assigned. ,radius Defined as:
[0188]
[0189] in express The number of embedded particles. Based on the method described above for calculating the particle radius, the first... The set of granular spheres embedded in an item under this behavior is defined as follows: Each of the particles Characterized by its center and radius, i.e. By examining all The above construction process, which embeds user and item behaviors into the application, yields a complete set of user granular spheres. and item particle ball set Each (or ) indicates from the first The set of granular spheres extracted from the user (or item) embedding under a certain behavior is used to capture the potential clustering structure in the corresponding embedding space.
[0190] c) Intra-behavior particle ball association: Given a behavior The following is a collection of granular balls. Each of the particles From its center and radius The characterization defines intra-behavioral correlation as the overlap between particles within the same behavior, and constructs an intra-behavioral overlap matrix. :
[0191]
[0192] in This indicates the current training epoch. This design allows the model to capture a wider range of associations in the early stages of training, gradually focusing on closer and more meaningful overlaps as training progresses. The heatmap of the overlap matrix of granular spheres within the behavior is shown below. Figure 4 As shown.
[0193] d) Particle-sphere association between behaviors: For behaviors and behavior The two groups of object particles below are denoted as follows: and Construct an intersection matrix ,in Indicates granular balls and Number of samples shared between them:
[0194]
[0195] in Indicates sample Assigned to behavior granular balls Similarly Indicating in behavior The allocation within the calculation. This summation, or statistical calculation, is simultaneously allocated to... and The number of samples. Based on the intersection matrix. Define the overlap matrix between behaviors. This is to capture meaningful correlations between particles from different behaviors. Each element in this matrix... Indicates granular balls and Whether it is considered overlapping:
[0196]
[0197] in express and The number of shared samples between them Indicates allocation to the particle ball The number of samples, This is a threshold hyperparameter that controls the minimum required overlap ratio. The heatmap of the particle-sphere overlap matrix between behaviors is shown below. Figure 4 As shown.
[0198] e) Particle-based comparative learning: Behavioral intra-association matrix Overlap matrix between actions The correlations between granular balls within and across behaviors were captured. For the first... and For items under a certain behavior, the centers of the two behavior's spheres are joined together to form a unified representation:
[0199]
[0200] in and respectively behavior and A matrix formed by the centers of all the particles. To simultaneously capture the correlations within and between actions, a mask matrix is constructed. By splicing , , and its transpose get:
[0201]
[0202] The contrast loss of the granules is defined as follows:
[0203]
[0204] in , , The total number of balls,
[0205] Cosine similarity. The final comparison loss is the average loss across all actions:
[0206]
[0207] Step 3: Achieve target-aware recommendation through attention aggregation: Input the representation enhanced by granules into the target-aware noise suppression encoder to capture the complex and diverse relationships between behaviors; then, use an attention aggregator to effectively fuse the above multi-behavior embeddings to serve the downstream recommendation task.
[0208] Target intersection behavior This reflects the positive impact of auxiliary behaviors on target behaviors. Let... For auxiliary behavior set, Let the target behavior be defined as follows: The set of target intersection behaviors is defined as follows: The target complement behavior set is defined as For each Its interaction set is For each Its interaction set is This invention utilizes this subset to refine the original behavioral embeddings. Let... For behavior picture Embeddings learned from above Let the target intersection line graph be an adjacency matrix. The updated embedding is:
[0209]
[0210] This process involves re-propagating the graph on a simplified graph using a lightweight graph convolutional network to remove the effects of noisy interactions.
[0211] Target complement behavior Interactions within a graph are uncertain and may contain genuine interest or noise. To differentiate their importance, this invention proposes the target-aware noise suppression encoder TANSE, which is based on graph attention networks in graphs. The flowchart for weighted aggregation is as follows: Figure 5 As shown. TANS utilizes target behavior embedding. As a guiding signal, potentially important interactions are given high weight, while irrelevant connections are suppressed. Let the initial embedding be... TANSE The final embedding is output after layer propagation:
[0212]
[0213] Among them, the first Layer embedding updated to:
[0214]
[0215] The normalization operation includes attention weight calculation to ensure that key interactions are highlighted.
[0216] After obtaining the refined embeddings of each behavior, this invention aggregates and generates the final target behavior embedding through a two-layer attention mechanism. For each node Computational behavior embedding Embedded with target behavior Attention score:
[0217]
[0218] The attention weights are then calculated using the softmax function:
[0219]
[0220] The middle embedding is:
[0221]
[0222] The second layer of attention focuses on the set of goal-related behaviors. For each Calculate its embedding With intermediate embedding Attention score:
[0223]
[0224] Calculate the weights again using softmax. And aggregate to obtain the final embedding:
[0225]
[0226] Based on the final embedding ,user With items In target behavior The matching score is as follows:
[0227]
[0228] The training loss for the target behavior is calculated using a Bayesian personalized ranking criterion.
[0229]
[0230] in For the sigmoid function, The regularization coefficient is . For the set of model parameters, For positive samples and negative samples The set of triplets formed.
[0231] The total loss function of this invention is:
[0232]
[0233] in Hyperparameters for controlling the intensity of contrastive learning.
[0234] To verify the ability of the proposed framework to capture high-order relationships across behaviors, MGMRe will be compared with the following representative and state-of-the-art baseline methods, which can be divided into four categories: (1) for single-behavior models, we compare MF-BPR, NeuMF, and LightGCN; (2) for multi-behavior models employing a unified fusion strategy, we compare RGCN, GNMR, and MBGCN; (3) for cascaded methods, we compare NMTR, CRGCN, and MB-CGCN; and (4) for parallel methods, we compare HPMR, PKEF, MB-HGCN, and MuLE.
[0235] Experimental results show that MGMRec outperforms all 13 baselines across all evaluation metrics on three e-commerce datasets. For example, MGMRec improves the HR@10 metric by 3.39% compared to MULE on the Taobao dataset.
[0236] Table 1 shows the overall recommended performance on HR@10 and NDCG@10. The best results are marked in bold, and the second-best results are marked with an underline.
[0237]
[0238] This invention proposes a multi-behavior graph recommendation model called MGMRec, which utilizes particle-sphere learning to capture intra-behavior and cross-behavior signals. The invention employs a two-stage framework: particle-sphere contrastive learning constructs a behavior-aware representation that preserves local topology, while a target-aware noise-suppressing encoder filters out irrelevant signals and transfers useful information to target behavior prediction. Experiments verify the advantages of this invention compared to state-of-the-art baseline methods.
[0239] By adopting the above-disclosed technical solution of this invention, the following beneficial effects are obtained:
[0240] This invention proposes a multi-behavior recommendation method based on cross-behavior contrastive learning using granular spheres. By constructing behavior-specific granular spheres, performing cross-behavior contrastive learning, suppressing auxiliary behavior noise, and employing two-layer attention fusion, a unified modeling of behavior-specific structure preservation and cross-behavior knowledge transfer is achieved. Experimental results show that this method significantly outperforms existing baseline methods on multiple real-world datasets, exhibiting higher recommendation accuracy and robustness, and demonstrating promising prospects and application value.
[0241] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-behavior recommendation method based on cross-behavior contrastive learning using granular spheres, characterized in that, Includes the following steps: (1) Obtain user sets, item sets, and user-item interaction data under various behavior types, and construct user-item graphs corresponding to each behavior; (2) Based on the user-item graph, a graph neural network is used to learn the initial user and item embedding representations to obtain the behavior-specific embeddings for each behavior; (3) Construct a set of particle balls for each user and item embedding under each behavior. The particle balls are defined by a center vector and a radius and are used to capture local structure and semantic clustering information within the behavior. (4) Based on the set of particles, construct the particle association matrix within the behavior and the particle overlap matrix between the behavior to characterize the structural association within and between behaviors; (5) Based on the particle sphere center and the correlation matrix, perform particle sphere contrastive learning to optimize the representation consistency of users and items across behaviors and generate enhanced embedding representations; (6) The enhanced embedding representation is input to the target perception noise suppression encoder, and a refined behavior embedding is generated by distinguishing between beneficial signals and noise in the auxiliary behavior based on the graph attention mechanism. (7) A two-layer attention mechanism is used to fuse the refined behavior embeddings to generate the final representation of users and items under the target behavior; (8) Calculate the matching score between the user and the item based on the final representation to achieve the recommendation prediction of the target behavior.
2. The method according to claim 1, wherein step (2) of "learning initial user and item embedding representations using a graph neural network" specifically includes: Let the learnable initial user embedding be: ; The initial item is embedded as follows: Where M and N are the number of users and items, respectively, and d is the embedding dimension; Merge the various behavior interaction graphs to obtain a unified behavior graph. Its adjacency matrix is denoted as ; Using LightGCN Upward propagation yields a unified embedding: ; For the b-th behavior diagram ; using its adjacency matrix and Using LightGCN as input, behavior-specific embeddings are obtained again: 。 3. The method according to claim 1, wherein step (3) of "constructing a set of granular spheres" specifically includes: Embedding of items under behavior b ∈R^(N×d), initialize K particle centers: , ∈R^d ; Item embeddings are calculated using the Student t-distribution kernel function. With the center Soft assignment probability: ; Where κ represents the degrees of freedom of the student's t-distribution; soft allocation matrix Convert to a hard-assigned matrix: For a particle sphere k, its assigned embedding set is: The radius of a particle sphere is defined as: ; 4. The method according to claim 1, wherein the "behavioral particle ball correlation matrix" in step (4) is specifically constructed in the following manner: The set of granular balls for behavior b , ={ , } ; Constructing the behavior-intra-overlap matrix Its elements: ; where t is the current training round number, used to control the overlap judgment threshold.
5. The method according to claim 1, wherein the "inter-behavior particle-sphere overlap matrix" in step (4) is specifically constructed in the following manner: The set of item spheres for actions m and n , ; First calculate the intersection matrix of the number of shared samples. ; ; Reconstruct the overlap matrix between behaviors ; ; where τ is the preset minimum overlap ratio threshold.
6. The method according to claim 1, wherein step (5) of "particle-sphere comparison learning" specifically includes: The unified center matrix is obtained by splicing the centers of the particles with behavior m and behavior n: ;in and respectively behavior and The matrix formed by the centers of all the particles; Constructing the mask matrix By splicing , , and its transpose get: The contrast loss of the granules is defined as follows: ;in , , The total number of balls, Cosine similarity; the final comparison loss is the average of the losses for all actions: Where B represents the total number of rows.
7. The method according to claim 1, wherein the "target-aware noise suppression encoder" in step (6) specifically includes: For auxiliary behavior b, construct the target intersection behavior graph. Its adjacency matrix is ; Using LightGCN Refined Embedding: Behavioral graph of target complement Weighted aggregation using graph attention mechanism, the first Layer embedding updated to: ; The attention weights are embedded from the target behavior. guide; The final refined embedding is as follows:
8. The method according to claim 1, wherein the "two-layer attention mechanism" in step (7) specifically includes: First layer of attention: For node v, compute the embedding of behavior b. Embedded with target behavior Attention score: ; Weight: ; Intermediate fusion representation: ; Second layer of attention: Focus on the set of target-related behaviors calculate: ; Calculate the weights again using softmax. And aggregate to obtain the final embedding: .
9. The method according to claim 1, wherein step (8) of "matching score and training loss" specifically includes: Matching score between user u and item i under target behavior t: ; Bayesian personalized ranking loss is used: ; in For the sigmoid function, The regularization coefficient is . For the set of model parameters, For positive samples and negative samples The set of triplets formed; The total loss function is: ; in Hyperparameters for controlling the intensity of contrastive learning.