Multi-behavior recommendation method, system, equipment and medium
By constructing a semantic transformation enhanced diffusion model based on the contrastive learning paradigm, generating a main view and constructing a contrast view, the problem of insufficient semantic information capture between different behavior types in multi-behavior recommendation is solved, and the recommendation performance and accuracy are improved.
Patent Information
- Application Number
- CN202510745716.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-05
AI Technical Summary
Existing technologies find it difficult to effectively capture the key semantic information between different behavior types in multi-behavior interactions, and ignore the complex semantic conversion patterns between different behavior types, resulting in insufficient recommendation performance.
A semantic transformation enhanced diffusion model based on the contrastive learning paradigm is constructed. The main view is generated through a graph neural network, and the graph diffusion model is used to construct the contrast view. The auxiliary view representation is destroyed and restored by noise to align it with the target view in the semantic space, generating self-supervised training signals to update the model parameters.
It improves the learning ability and robustness of the multi-behavior recommendation system, can better distinguish the importance differences of different user behaviors, generate more discriminative feature representations, and improve the interpretability and prediction accuracy of the recommendation model.
Smart Images

Figure CN120596741A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-behavior recommendation, and in particular to a multi-behavior recommendation method, system, device and medium. Background Art
[0002] Multi-behavior recommendation aims to exploit auxiliary behaviors between users and items as supplementary information. This helps to deeply explore user preferences and thus improve the prediction performance of the target behavior. Early research has improved multi-behavior recommendation by incorporating various user behaviors as auxiliary information into single-behavior matrix factorization models. However, these matrix factorization-based methods rely on shallow models and are limited in their ability to capture the complex dependencies in multi-behavior interactions.
[0003] In recent years, graph neural networks (GNNs), also known as graph convolutional networks (GCNs), have demonstrated remarkable performance in gaining a deeper understanding of and effectively leveraging the complex relationships in multi-action recommendations. By extracting high-level collaborative information between users, GNNs can improve recommendation performance. However, in many real-world applications, learning node representations from extremely limited interaction data presents the challenge of data sparsity. To address this challenge, some researchers have utilized graph contrastive learning (GCL), a form of self-supervised learning, to improve multi-action recommendations. Specifically, it addresses data sparsity by comparing defined pairs of positive samples with their corresponding negative samples, ensuring alignment between the generated contrast views. However, actions are often subject to noise, which manifests as topic-unrelated interactions between users and items. For example, click behavior is often highly unpredictable, influenced by factors such as random browsing, curiosity, or style and color choices during shopping. These actions can generate noisy interactions that fail to reflect users' true preferences in the contrast views, negatively impacting the performance of downstream network research. Recently, diffusion models (DMs) have demonstrated excellent performance in robust view generation. These models assume that the original multi-behavior interactions follow an unknown probability distribution and attempt to approximate this distribution using a neural network to recover the original interactions. In addition, the generated views are optimized by the top q relationships between users and items that are highly relevant to the target task. This strategy ensures that valuable structural information is retained in the reconstructed multi-behavior interactions while minimizing noise. However, the above models only focus on single-user behaviors and have limited capabilities in multi-behavior recommendations. In addition, diverse interaction behaviors provide rich and valuable semantic information, which helps to gain a deeper understanding of users' different preferences. For example, HGT learns semantic-level representations by dynamically evaluating the importance of various behaviors; TemporalHAN introduces a semantic-level attention mechanism to learn the importance of different behavior types to the target behavior.
[0004] However, different behavior types are not independent of each other, but interdependent. The above methods ignore the key semantic information between different behavior types, resulting in the inability to accurately capture the complex semantic conversion patterns between different behavior types. Summary of the Invention
[0005] In view of the deficiency of existing technologies in capturing the key semantic information between different behavior types in multi-behavior interactions, the present invention proposes a multi-behavior recommendation method, system, device and medium. By constructing a semantic conversion enhanced diffusion model based on the contrastive learning paradigm, it can distinguish the importance differences between different user behaviors and generate more discriminative feature representations, thereby solving the problems existing in the existing technologies.
[0006] A multi-behavior recommendation method includes the following steps: Collect data of multiple behavior types and construct a heterogeneous graph of user sets and item sets. The behavior types related to the target task are used as the target view, and the remaining behavior types are used as auxiliary views. A semantic transformation enhanced diffusion model based on the contrastive learning paradigm is constructed; the semantic transformation enhanced diffusion model includes a main view generation module and a contrast view generation module; the main view generation module is used to learn the representation of heterogeneous graphs based on the encoding process of the graph neural network and generate a main view; the contrast view generation module is used to construct contrast views using the graph diffusion model, specifically including destroying the representation of the auxiliary view by introducing noise in the diffusion stage so that it eventually converges to a Gaussian distribution, obtaining the mean of the Gaussian distribution through the neural network in the reverse stage, and learning to obtain the Gaussian distribution at time steps by parameterizing the mean. t The added noise, based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the evidence lower bound, ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation, forcing it to be aligned with the target view representation in the semantic space and generating contrast views; The representation of the comparison view is compared with that of the main view to generate a self-supervised training signal to update the parameters of the semantic transformation enhanced diffusion model; the multi-behavior interaction data between users and items are input into the updated semantic transformation enhanced diffusion model to obtain the predicted value scores of users and items under specific behaviors, and items are recommended to users based on the predicted value scores.
[0007] Furthermore, the heterogeneous graph is represented as: ,in and represent the user set and item set respectively, and denote the number of users and items respectively, Represents edges associated with various behavior types; defines the existence Types of user-item interactions, The edge representing the user-item interaction under this behavior is denoted as ,At the same time, heterogeneous graph According to the behavior type subgraphs , taking the behavior type related to the target task as the target view , other behavior types serve as auxiliary views .
[0008] Furthermore, the encoding process based on the graph neural network learns the representation of the heterogeneous graph and generates a main view, specifically including learning the node embedding representation of all behaviors in the heterogeneous graph G based on the GNN as the main view, which is expressed as: in, Representative A specific adjacency matrix under this behavior, is its corresponding diagonal matrix, Represents the GNN No. The embedding matrix of the layer, represents the activation function; Through the encoding process of GNN Iterate to generate node embeddings , by aggregating nodes of different behavior types into embeddings To get the main view E : ; in, AGG Represents an aggregate function, Represents the number of behavior types.
[0009] Furthermore, in the diffusion stage, noise is introduced to destroy the representation of the auxiliary view so that it eventually converges to a Gaussian distribution, specifically including: Corrupt the auxiliary view by introducing noise during the diffusion stage In Chinese The process is specifically expressed as follows: in, represents the time step, represents the Gaussian distribution, is the identity matrix, Indicates that control is performed at each diffusion step The scale of the added Gaussian noise; when When, status Converges to a Gaussian distribution, To assist in the overall representation of the behavior graph, the encoding process based on GNN is obtained; represents the weight of controlling noise; Indicates that during the forward diffusion process, given the original embedding x 0 o'clock t Step noise embedding x t The conditional distribution of Representative t The noise embedding after step diffusion, The node embedding representing the original auxiliary view, Indicates the calculation of the control noise weight coefficient Temporary iteration variable when .
[0010] Furthermore, in the reverse phase, the mean and covariance of the Gaussian distribution are obtained through the neural network, and the mean is parameterized to learn the t The noise added specifically includes the following steps: In the reverse process, the diffusion model is defined to remove the added noise through neural network learning, from Mid-term recovery , the specific process is expressed as: in, and represents the mean and covariance of the Gaussian distribution, represents Gaussian distribution; By the mean Reparameterize and learn at time step Added noise : in, represents the weight of controlling noise.
[0011] Furthermore, the method ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the lower bound of evidence, and forces it to be aligned with the target view representation in the semantic space, specifically including the following steps: Embedding using target view and embedding of auxiliary views As a lower bound of evidence, Medium sampling time step Update model parameters: in, is the reconstruction loss term, is the semantic conversion loss term, U Represents all users, represents the time step; is the embedding of the target view obtained through the GNN encoding process; It is the embedding of the auxiliary view obtained through the GNN encoding process; By converting the restored representation Simultaneous approach and Or just approximate , so that the auxiliary view is embedded Transform to target semantic space through diffusion model To align, Represents the training objective function of the diffusion model; q ( x 0) represents the distribution of the original node embeddings of the auxiliary view, It means yes x Find the expected value of the distribution of 0.
[0012] Furthermore, the method further includes training the semantic transformation diffusion enhancement model parameters using the InfoNCE loss function based on the contrast view embedding and the main view embedding, specifically including the following steps: user The contrast loss is expressed as: in, and denote the cosine similarity and temperature parameters respectively; Indicates the same nodes in the main view and the comparison view; Represents any two different nodes in the main view and the comparison view; u Represents the user, v Indicates the project, U Represents all users; The same nodes in the main view and the contrast view are taken as positive sample pairs, and any two different nodes in the main view and the contrast view are taken as negative sample pairs; the semantic conversion diffusion enhancement model is trained by enhancing the similarity of the positive sample pairs and reducing the similarity of the negative sample pairs to determine the object Contrastive loss ; According to the main objective function, user Contrastive loss and items The contrast loss is used to optimize the semantic conversion diffusion enhancement model parameters, which is expressed as: use To adjust the model parameters Contribution, while using To adjust the contribution of contrast loss; define the main objective function as : Represents the weight of contrast loss; represents the weight of regularization loss; represents the total loss; in, Represents user Related genuine products i The prediction score of Represents user Related negative items j The prediction score of O Represents the set of all training triplets.
[0013] The present invention also includes a multi-behavior recommendation system, comprising: The acquisition module is used to collect data of multiple behavior types and construct a heterogeneous graph of user sets and item sets. The behavior types related to the target task are used as the target view, and the remaining behavior types are used as auxiliary views. The model construction module is used to construct a semantic transformation enhanced diffusion model based on the contrastive learning paradigm; the semantic transformation enhanced diffusion model includes a main view generation module and a contrast view generation module; the main view generation module is used to learn the representation of heterogeneous graphs based on the encoding process of the graph neural network and generate a main view; the contrast view generation module is used to use the graph diffusion model to construct contrast views, specifically including destroying the representation of the auxiliary view by introducing noise in the diffusion stage so that it eventually converges to a Gaussian distribution, obtaining the mean of the Gaussian distribution through the neural network in the reverse stage, and learning to obtain the Gaussian distribution at time steps by parameterizing the mean. t The added noise, based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the evidence lower bound, ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation, forcing it to be aligned with the target view representation in the semantic space and generating contrast views; The recommendation module is used to compare the representation of the comparison view with that of the main view, generate self-supervised training signals to update the parameters of the semantic transformation enhanced diffusion model; input the multi-behavior interaction data between users and items into the updated semantic transformation enhanced diffusion model to obtain the predicted value scores of users and items under specific behaviors, and recommend items to users based on the predicted value scores.
[0014] The present invention also includes a multi-behavior recommendation computer device, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor implements the steps of the multi-behavior recommendation method when executing the computer program.
[0015] The present invention also includes a readable storage medium, wherein the readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to execute the steps of the multi-behavior recommendation method.
[0016] The present invention provides a multi-behavior recommendation method, which has the following beneficial effects: The present invention learns the representation of heterogeneous graphs through an encoding process based on a graph neural network to generate a main view; utilizes a graph diffusion model, takes auxiliary behaviors as diffusion sources, and the target behavior provides a denoising training signal to construct a comparative view. In this way, the auxiliary behaviors are converted to the target semantic space through the diffusion model, and can accurately model the semantic conversion from the target behavior to the auxiliary behavior, thereby generating accurate extraction of task-related information for the comparative view; it can effectively filter the noise in the auxiliary behavior; constructs a semantic conversion enhanced diffusion model based on the contrastive learning paradigm, which can effectively improve the learning ability and robustness of the multi-behavior recommendation system; by comparing the comparative view representation with the main view representation, updating the model parameters, and then improving the recommendation performance, it can better distinguish the importance differences between different user behaviors, generate more discriminative feature representations, and thus improve the interpretability and prediction accuracy of the recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a schematic diagram of a framework of a multi-behavior recommendation method according to an embodiment of the present invention; Figure 2 Schematic diagram of a cross-type semantic conversion framework in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0019] This paper proposes a multi-behavior recommendation method based on semantic transformation enhanced diffusion technology, and proposes a semantic transformation diffusion enhanced (STDE) architecture based on the contrastive learning paradigm for multi-behavior recommendation. Specifically, STDE first determines the behavior type that is most critical to the prediction task as the target behavior, and regards the remaining behaviors as auxiliary behaviors to enhance the prediction of the target behavior. Then, using the graph diffusion model, a cross-type semantic transformation strategy between auxiliary behaviors and target behaviors is designed. This strategy coordinates the forward and backward diffusion processes, using auxiliary behaviors as the diffusion source and the target behavior as a denoised training signal to construct a contrast view. In this way, the auxiliary behaviors are transformed into the target semantic space through the diffusion model, which can accurately model the semantic transformation from the target behavior to the auxiliary behaviors, thereby accurately extracting task-related information for the contrast view generation. In addition, in the process of converting the auxiliary behaviors to the target semantic space, the noise in the auxiliary behaviors can be effectively filtered. Finally, the contrast view representation is compared with the main view representation, and the model parameters are updated to improve the recommendation performance. The method specifically includes the following steps:
[0020] S1. Constructing heterogeneous graphs using multi-behavior data (multi-behavior graphs) ,in and represent the user set and item set respectively, and The number of users and items are defined respectively. Represents edges related to various behavior types. Assume that there is Types of user-item interactions, The edge representing the user-item interaction under this behavior is denoted as At the same time, heterogeneous graph Behavior can be divided into subgraphs Therefore, the present invention converts the target behavior type (such as purchase) subgraph into Defined as the prediction target, the remaining behavior type subgraphs Considered as auxiliary behavior.
[0021] It is a major challenge to build a diffusion model that can generate robust comparative views with cross-type semantic transformations while effectively reducing noise. Therefore, the multi-behavior recommendation task in this paper is formally defined as follows: This paper first uses the graph diffusion model to design a Diffusion source, target behavior Provides a semantic cross-type conversion strategy for denoising training signals, thereby building a comparative view with cross-type conversion and cross-view denoising capabilities. Then, the present invention will enhance the view representation Compare with the main view representation to generate self-supervised training signals. Finally, the goal of the multi-behavior recommendation task of the present invention is to use the information of auxiliary behaviors to predict the unobserved target behavior user-item interaction. The overall model framework is shown in the figure Figure 1 As shown in the figure, this paper first uses an encoding process based on graph neural networks (GNNs) to learn representations of multi-behavior graphs to generate a primary view. Then, a graph diffusion model incorporating cross-type semantic transformations is used to construct a comparative view. Finally, a model optimization paradigm is designed to compare the representation of the comparative view with that of the primary view to update the model parameters, thereby improving recommendation performance.
[0022] S2. Multi-behavior Graph Learning: Graph neural networks can extract high-level collaborative information between users and excel in deeply understanding and effectively leveraging complex relationships in multi-behavior recommendations. Inspired by the simplicity and effectiveness of GNNs, our STDE adopts a GNN-based approach to learn a representation of the multi-behavior graph G as the primary view, which can be defined by Equation 1.
[0023] (1) in, Representative A specific adjacency matrix under this behavior, is its corresponding diagonal matrix. Represents GNNs The embedding matrix of the layer, represents the activation function. The final node embedding Can be achieved through Iterative generation (GNN encoding process, L refers to the number of GNN layers), can be achieved by aggregating nodes of different behavior types into embeddings To obtain the final node embedding , main view The definition is as shown in formula (2):
[0024] (2) Among them, AGG represents aggregation functions, such as Mean and pooling. Represents the number of behavior types. In this way, the main view can capture different types of behavior relationships.
[0025] S3. Contrastive Learning Based on Semantic Transformation: Achieving a robust contrastive view with cross-type semantic transformation. The contrastive view is a node embedding of all behaviors after the diffusion model. At the same time, effectively minimizing noise remains a major challenge. Inspired by the ability of the diffusion model to capture complex data generation processes, this paper designs a cross-type semantic transformation strategy that uses the graph diffusion model to construct a contrastive view, such as Figure 2Specifically, the present invention implements a bidirectional process consisting of a forward phase for systematically adding noise and a backward phase for removing it, with the auxiliary behaviors serving as diffusion sources and the target behaviors providing denoised training signals, jointly enhancing the model's robustness to data noise. Unlike traditional diffusion models, the present method allows for transitions between the auxiliary and target subgraphs via multiple, fine-grained diffusion steps. This enables precise modeling of semantic transitions at a fine-grained level while effectively minimizing noise.
[0026] (1) Forward process: The present invention performs a reverse process to reconstruct the auxiliary view , thereby identifying task-related information for generating contrast views. Therefore, the present invention destroys the original auxiliary image by introducing noise in the diffusion stage. In Chinese The expression, x 0 refers to the initial state in the diffusion process, as shown in formula (3). Here, It is obtained through a GNN-based encoding process, which specifically includes calculating node representations through layer-by-layer message passing of GNN, iteratively aggregating neighbor information through L-layer GNN to generate the final single-behavior node representation, and merging the node representations of all auxiliary behaviors through an aggregation function to obtain the overall representation of the auxiliary behavior graph.
[0027] (3) in, represents the time step, represents the Gaussian distribution, is the identity matrix, Control at every step The scale of the Gaussian noise added. Finally, when When, status Converges to a Gaussian distribution; Indicates that during the forward diffusion process, given the original embedding x 0 o'clock t Step noise embedding x t The conditional distribution of Representative t The noise embedding after step diffusion, The node embedding representing the original auxiliary view, Indicates the calculation of the control noise weight coefficient Temporary iteration variable when .
[0028] (2) Reverse process: In the reverse process, the present invention focuses on the process of reversing the pure Gaussian noise. Iterative recovery representation The present invention defines a diffusion model that removes the added noise through neural network learning. Mid-term recovery , x t represents the current state of the diffusion process, at time step t Node representation when x t-1 represents the previous state of the diffusion process, at time step t The node representation when -1 is shown in Formula 4.
[0029] (4) in, and represents the mean and covariance of the Gaussian distribution, which can be obtained by The parameterized neural network is obtained by Reparameterization is performed, as shown in formula (5), and the present invention can learn Added noise .
[0030] (5) in, It is implemented by Multi-Layer Perceptron (MLP) based on the input and time steps t Derived neural network in t The predicted value generated at the moment .
[0031] To restore the embed , the present invention adopts the embedding of target graph and auxiliary graph embedding As the Evidence Lower Bound (ELBO), from Medium sampling time step To update the model parameters, as shown in Formula 6. Here, It is also obtained through the GNN-based encoding process.
[0032] (6) Formula (6) includes a reconstruction loss term and a semantic transformation loss term , where the reconstruction loss is an optional component, is the embedding of the target view obtained through the GNN encoding process; is the embedding of the auxiliary view obtained through the GNN encoding process, Represents the training objective function of the diffusion model; q (x 0) represents the distribution of the original node embeddings of the auxiliary view, It means yes x Therefore, the model of the present invention encourages Simultaneous approach and , or only approximate , thus facilitating the update of model parameters. In this way, auxiliary behavior embedding Transform to target semantic space through diffusion model This transformation can accurately model the semantic transformation from the target behavior to the auxiliary behavior, making it easier to accurately extract task-related information for generating contrast views. Transform to target semantic space In the process of obtaining the reconstructed Then, the present invention uses it to recover the contrast view embedding .
[0033] S4. Model training: The present invention uses InfoNCE loss to compare the main view and the comparison view to train the model parameters. The contrast loss is defined as shown in formula (7).
[0034] (7) in, and denote the cosine similarity and temperature parameters respectively, represents the same nodes in the main view and the comparison view as positive sample pairs, and Represent any two different nodes in the main view and the comparison view as negative sample pairs. In this way, the model parameters can be trained by enhancing the similarity of positive sample pairs and reducing the similarity of negative sample pairs, thereby alleviating the data sparsity problem. The present invention defines items in a similar way. Contrastive loss The present invention combines the main objective function and contrast loss to optimize the model parameters, as shown in formula (8).
[0035] (8) The present invention uses To adjust the model parameters Contribution, while using To adjust the contribution of contrast loss. The present invention defines the main objective function as , as shown in formula (9). Represents user Related genuine products The prediction score of Represents user Related negative items The prediction score of .
[0036] (9).
[0037] in, Represents user Related genuine products i The prediction score of Represents user Related negative items j The prediction score of O Represents the set of all training triplets.
[0038] This paper proposes a new method STDE that uses contrastive learning to improve model performance. In multi-behavior recommendation, it systematically filters out non-critical semantic information through a diffusion mechanism. A cross-type semantic conversion strategy is designed using a graph diffusion model to construct a comparative view. This strategy effectively eliminates noise information through a sophisticated multi-step process, thereby facilitating the accurate extraction of task-related information. By comprehensively utilizing contrastive learning methods, the potential relationships between different user behaviors are deeply explored to improve the accuracy and efficiency of recommendations. Compared with Bayesian personalized ranking BPRH for heterogeneous implicit feedback, multi-behavior recommendation MBGCN based on graph convolutional networks, multi-behavior recommendation MB-CGCN based on cascaded graph convolutional networks, and hypergraph temporal multi-behavior recommendation HyperTEM-MBR, this paper introduces contrastive learning to improve multi-behavior recommendation, which can more effectively extract key information from multi-behavior data. By comparing different behavior views, the model learns more discriminative feature representations, thereby improving the accuracy of recommendations. Compared with the contrast regularization SG-MST for hypergraph enhancement, the adaptive enhancement and neighbor contrast learning AANCL for multi-behavior recommendation, and the contrast clustering learning MBRCC for multi-behavior recommendation, the present invention constructs a target view and an auxiliary view. Through contrast learning between the two, it can effectively distinguish between real user behavior and noise behavior, significantly alleviate the impact of noise on user behavior, and thus more accurately capture the user's true preferences. Compared with the multi-interest network with simple diffusion for multi-behavior sequence recommendation MISD and the heterogeneous graph diffusion model DiffGraph, the present invention considers incorporating contrastive learning into model optimization, effectively alleviating the data sparsity problem, so that the model can learn richer features under limited data conditions and improve the reliability of recommendations. Compared with the diffusion contrastive learning recommendation method DICES based on knowledge graph, the sequence recommendation enhancement method CaDiRec based on context-aware diffusion contrastive learning, and the multimodal recommendation framework DiffCL based on diffusion contrastive learning and semantic alignment, the present invention deeply mines the multi-behavior interaction data between users and items to guide the generation of highly relevant task node graphs, so that the generated graph structure can better reflect user behavior patterns and item characteristics, provide more accurate information support for the recommendation system, and thus significantly improve the recommendation effect. Compared to the current state-of-the-art, this paper introduces a comparative view that generates cross-type semantic transformations to better guide the learning of node representations. First, the most critical behavior type for the prediction task is identified as the target behavior, and the remaining behaviors are considered auxiliary behaviors to enhance the prediction of the target behavior. Then, using a graph diffusion model, this paper designs a cross-type semantic transformation strategy between auxiliary and target behaviors. This strategy coordinates the forward and backward diffusion processes, using auxiliary behaviors as the diffusion source and the target behavior as a denoised training signal to construct a comparative view.In this way, auxiliary behaviors are transformed into the target semantic space via a diffusion model, accurately modeling the semantic transformation from target to auxiliary behaviors, thereby accurately extracting task-relevant information for the comparison view generation. Furthermore, during the conversion of auxiliary behaviors into the target semantic space, noise in the auxiliary behaviors can be effectively filtered. Finally, the present invention compares the comparison view representation with the primary view representation, updates the model parameters, and thus improves recommendation performance.
[0039] Based on the same inventive concept, the present invention also includes a multi-behavior recommendation system, comprising: The acquisition module is used to collect data of multiple behavior types and construct a heterogeneous graph of user sets and item sets. The behavior types related to the target task are used as the target view, and the remaining behavior types are used as auxiliary views.
[0040] The model construction module is used to construct a semantic transformation enhanced diffusion model based on the contrastive learning paradigm; the semantic transformation enhanced diffusion model includes a main view generation module and a contrast view generation module; the main view generation module is used to learn the representation of heterogeneous graphs based on the encoding process of the graph neural network and generate the main view; the contrast view generation module is used to use the graph diffusion model to construct contrast views, specifically including destroying the representation of the auxiliary view by introducing noise in the diffusion stage so that it eventually converges to a Gaussian distribution, obtaining the mean of the Gaussian distribution through the neural network in the reverse stage, and learning to obtain the Gaussian distribution at time steps by parameterizing the mean. t The added noise, based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the evidence lower bound, ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation, forcing it to be aligned with the target view representation in the semantic space and generating contrastive views.
[0041] The recommendation module is used to compare the representation of the comparison view with that of the main view, generate self-supervised training signals to update the parameters of the semantic transformation enhanced diffusion model; input the multi-behavior interaction data between users and items into the updated semantic transformation enhanced diffusion model to obtain the predicted value scores of users and items under specific behaviors, and recommend items to users based on the predicted value scores.
[0042] The present invention also provides a multi-behavior recommendation computer device, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor implements the steps of the multi-behavior recommendation method when executing the computer program.
[0043] The present invention further provides a readable storage medium storing a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the program instructions are used to execute the steps of the multi-behavior recommendation method.
[0044] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A multi-behavior recommendation method, characterized in that: The following steps are involved: Collect multi-behavior data between user sets and item sets, and construct a heterogeneous graph of user sets and item sets; The behavior types related to the target task are used as the target view, and the other behavior types are used as auxiliary views; A semantic transformation enhanced diffusion model based on the contrastive learning paradigm is constructed; the semantic transformation enhanced diffusion model includes a main view generation module and a contrast view generation module; the main view generation module is used to learn the representation of heterogeneous graphs based on the encoding process of the graph neural network and generate a main view; the contrast view generation module is used to construct contrast views using the graph diffusion model, specifically including destroying the representation of the auxiliary view by introducing noise in the diffusion stage so that it eventually converges to a Gaussian distribution, obtaining the mean of the Gaussian distribution through the neural network in the reverse stage, and learning to obtain the Gaussian distribution at time steps by parameterizing the mean. t The added noise, based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the evidence lower bound, ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation, forcing it to be aligned with the target view representation in the semantic space and generating contrast views; The representation of the comparison view is compared with that of the main view to generate a self-supervised training signal to update the parameters of the semantic transformation enhanced diffusion model; the multi-behavior interaction data between users and items are input into the updated semantic transformation enhanced diffusion model to obtain the predicted value scores of users and items under specific behaviors, and items are recommended to users based on the predicted value scores.
2. A multi-behavior recommendation method according to claim 1, characterized in that: The heterogeneous graph is represented as: ,in and represent the user set and item set respectively, and denote the number of users and items respectively, Represents edges associated with various behavior types; defines the existence Types of user-item interactions, The edge representing the user-item interaction under this behavior is denoted as ,At the same time, heterogeneous graph According to the behavior type subgraphs , taking the behavior type related to the target task as the target view , other behavior types serve as auxiliary views .
3. A multi-behavior recommendation method according to claim 2, characterized in that: The encoding process based on the graph neural network learns the representation of the heterogeneous graph and generates a main view. Specifically, it includes learning the node embedding representation of all behaviors in the heterogeneous graph G based on the GNN as the main view, which is expressed as: in, Representative A specific adjacency matrix under this behavior, is its corresponding diagonal matrix, Represents the GNN No. The embedding matrix of the layer, represents the activation function; Through the encoding process of GNN Iterate to generate node embeddings , by aggregating nodes of different behavior types into embeddings To get the main view E : ; in, AGG Represents an aggregate function, Represents the number of behavior types.
4. The multi-behavior recommendation method according to claim 2, characterized in that: The diffusion stage introduces noise to destroy the representation of the auxiliary view so that it eventually converges to a Gaussian distribution, specifically including: Corrupt the auxiliary view by introducing noise during the diffusion stage In Chinese The process is specifically expressed as follows: in, represents the time step, represents the Gaussian distribution, is the identity matrix, Indicates that control is performed at each diffusion step The scale of the added Gaussian noise; when When, status Converges to a Gaussian distribution, To assist in the overall representation of the behavior graph, the encoding process based on GNN is obtained; represents the weight of controlling noise; Indicates that in the forward diffusion process, given the original embedding x 0 o'clock t Step noise embedding x t The conditional distribution of Representative t The noise embedding after step diffusion, The node embedding representing the original auxiliary view, Indicates the calculation of the control noise weight coefficient Temporary iteration variable when .
5. A multi-behavior recommendation method according to claim 4, characterized in that: In the reverse phase, the mean and covariance of the Gaussian distribution are obtained through the neural network, and the mean is parameterized to learn the t The noise added specifically includes the following steps: In the reverse process, the diffusion model is defined to remove the added noise through neural network learning, from Mid-term recovery , the specific process is expressed as: in, and represents the mean and covariance of the Gaussian distribution, represents Gaussian distribution; By the mean Reparameterize and learn at time step Added noise : in, represents the weight of controlling noise.
6. A multi-behavior recommendation method according to claim 5, characterized in that: The method ensures that the representation restored by the auxiliary view is close to the original auxiliary representation based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the lower bound of evidence, and forces it to be aligned with the target view representation in the semantic space. Specifically, the following steps are included: Embedding using target view and embedding of auxiliary views As a lower bound of evidence, Medium sampling time step Update model parameters: in, is the reconstruction loss term, is the semantic conversion loss term, U Represents all users, represents the time step; is the embedding of the target view obtained through the GNN encoding process; It is the embedding of the auxiliary view obtained through the GNN encoding process; By converting the restored representation Simultaneous approach and Or just approximate , so that the auxiliary view is embedded Transform to target semantic space through diffusion model To align, Represents the training objective function of the diffusion model; q ( x 0) represents the distribution of the original node embeddings of the auxiliary view, It means yes x Find the expected value of the distribution of 0.
7. The multi-behavior recommendation method according to claim 1, characterized in that: It also includes training the semantic transformation diffusion enhancement model parameters using the InfoNCE loss function based on the contrast view embedding and the main view embedding, which specifically includes the following steps: user The contrast loss is expressed as: in, and denote the cosine similarity and temperature parameters respectively; Indicates the same nodes in the main view and the comparison view; Represents any two different nodes in the main view and the comparison view; u Represents the user, v Indicates the project, U Represents all users; The same nodes in the main view and the contrast view are taken as positive sample pairs, and any two different nodes in the main view and the contrast view are taken as negative sample pairs; the semantic conversion diffusion enhancement model is trained by enhancing the similarity of the positive sample pairs and reducing the similarity of the negative sample pairs to determine the object Contrastive loss ; According to the main objective function, user Contrastive loss and items The contrast loss is used to optimize the semantic conversion diffusion enhancement model parameters, which is expressed as: use To adjust the model parameters Contribution, while using To adjust the contribution of contrast loss; define the main objective function as : Represents the weight of contrast loss; represents the weight of regularization loss; represents the total loss; in, Represents user Related genuine products i The prediction score of Represents user Related negative items j The prediction score of O Represents the set of all training triplets.
8. A multi-behavior recommendation system, characterized in that: include: The acquisition module is used to collect multi-behavior data and construct a heterogeneous graph of user sets and item sets; The behavior types related to the target task are used as the target view, and the other behavior types are used as auxiliary views; A model building module for constructing a semantic transformation-enhanced diffusion model based on the contrastive learning paradigm; The semantic transformation enhanced diffusion model includes a main view generation module and a contrast view generation module; the main view generation module is used to learn the representation of heterogeneous graphs based on the encoding process of the graph neural network and generate a main view; the contrast view generation module is used to construct a contrast view using the graph diffusion model, specifically including destroying the representation of the auxiliary view by introducing noise in the diffusion stage so that it eventually converges to a Gaussian distribution, obtaining the mean of the Gaussian distribution through the neural network in the reverse stage, and learning to obtain the Gaussian distribution at time step by parameterizing the mean. t The added noise, based on the learned noise and the embedding of the target view and the embedding of the auxiliary view as the evidence lower bound, ensures that the representation recovered by the auxiliary view is close to the original auxiliary representation, forcing it to be aligned with the target view representation in the semantic space and generating contrast views; The recommendation module is used to compare the representation of the comparison view with that of the main view, generate self-supervised training signals to update the parameters of the semantic transformation enhanced diffusion model; input the multi-behavior interaction data between users and items into the updated semantic transformation enhanced diffusion model to obtain the predicted value scores of users and items under specific behaviors, and recommend items to users based on the predicted value scores.
9. A multi-behavior recommendation computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, wherein when the processor executes the computer program, the steps of the multi-behavior recommendation method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, they are used to execute the steps of the multi-behavior recommendation method according to any one of claims 1 to 7.