A graph neural network session recommendation method based on disentangled representation learning

By using graph neural networks based on disentangled representations, the noise and oversmoothing problems of graph neural networks in session recommendation are solved, enabling effective modeling and recommendation of multiple features and improving the accuracy and interpretability of the model.

CN114092181BActive Publication Date: 2026-01-30SHANDONG ARTIFICIAL INTELLIGENCE INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111331082.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2026-01-30
Estimated Expiration
2041-11-11

AI Technical Summary

Technical Problem

Existing graph neural networks cannot effectively overcome noise problems, oversmoothing problems, and the inability to provide interpretable multi-feature modeling in session recommendation, resulting in poor model performance.

Method used

We employ a graph neural network based on disentangled representations. By constructing a session directed graph, we use disentangled representations to learn and model product features. We then combine cross-entropy loss and distance correlation regularization to optimize the model and achieve the recommendation of candidate products.

Benefits of technology

It improves the accuracy and interpretability of recommendations, overcomes noise and oversmoothing issues, effectively extracts and models multiple features, and enhances model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092181B_ABST
    Figure CN114092181B_ABST
Patent Text Reader

Abstract

This paper proposes a graph neural network-based session recommendation method. By employing a deentanglement representation learning mechanism, the method leverages graph neural networks to address the challenges of extracting latent entangled features and susceptibility to noise in the session domain. Furthermore, an attention feature fusion mechanism is proposed to alleviate the over-smoothing problem in graph neural networks. Finally, a session deentanglement representation based on candidate items is presented, enriching the session representation. The success of these three aspects significantly improves the performance of our model compared to other models in the field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of recommendation systems and deep learning technology, specifically to a graph neural network session recommendation method based on disentangled representation learning. Background Technology

[0002] In recent years, recommendation algorithms have greatly improved people's online shopping and social experiences, making them a major technological direction for various platforms. Currently, many methods are based on personalized recommendations tailored to user preferences. However, due to national privacy regulations, platforms cannot easily obtain user information. Therefore, session-based recommendation methods have emerged. These methods can recommend the next product based on a single anonymous session, composed of user behaviors over a period of time. Graph neural networks have achieved considerable success in this field, but some problems remain unsolved. One is the inability to overcome noise in the session, such as users randomly clicking on irrelevant items; and the oversmoothing problem inherent in graph neural networks due to excessive iterations. Furthermore, and most importantly, there is no interpretable process for extracting and modeling multiple features, resulting in limited feature information acquired by the model and thus failing to achieve optimal model performance. Summary of the Invention

[0003] To overcome the shortcomings of the above technologies, this invention provides a method for extracting and modeling multiple features of a product based on a graph neural network with deentangled representation.

[0004] The technical solution adopted by this invention to overcome its technical problems is:

[0005] A graph neural network-based session recommendation method based on disentangled representation learning includes the following steps:

[0006] a) Extract session sequences that do not contain user information from the commodity transaction dataset. This session sequence consists of several items that the user interacts with. The first interaction the user makes in this session One product, , To determine the number of products a user interacts with during a session, select N% of the data from the session sequence as training data and the remaining 1-N% as test data to build a candidate product set. , For the first in the session One product, , The number of items in the session;

[0007] b) Construct a directed graph of the session;

[0008] c) Establish and train a graph neural network model based on unentangled representations;

[0009] d) Calculate the score of the candidate product as the next possible interaction object in the session, and complete the recommendation of the next product.

[0010] Preferably, N is 80 in step a).

[0011] Furthermore, in step b), the formula is used. Building a session graph , Let be the set of edges of a directed graph. , Indicates the first individual products To the individual products The directed edge.

[0012] Furthermore, step c) includes the following steps:

[0013] c-1) Through formula The calculated product is embedded in the initialized session. Mapped to the Feature subspace In the formula For goods The initial embedding, , It is a real matrix. The number of feature spaces. It is the L2 norm. This is the weight matrix. This is the weight matrix. For transpose, , For goods The original dimension, To map to the The dimensions of a space;

[0014] c-2) Through formula Calculated at Two neighboring items in a space and similarity score , For the first in the session The features of each product are represented by similarity scores. As the weights among neighbors and the session direction in step b), Figure 1 Start by constructing the adjacency matrix The adjacency matrix is ​​formed by concatenating the out-degree matrix and the in-degree matrix, and the elements in the adjacency matrix are the weights between adjacent items;

[0015] c-3) Through formula

[0016] Calculate the first The product in the first The node representation of a feature space. For the first The product in the first The first feature space The relevant information about neighboring nodes obtained from rounds of iteration. , Both are weight matrices. The bias matrix, The hyperbolic tangent activation function is used. To update the door, For the Gate of Oblivion For the sigmoid function, For the first The first iteration Feature subspace , For the first The first iteration Feature subspace , To determine how much information from previous events needs to be forgotten in the current round based on the forgetting gate mechanism. , For the first The session graph of the round of iteration The point at the th The representation of a feature subspace, , This represents the number of points present in the session graph.

[0017] c-4) after After iteration of the graph neural network, the th iteration in the session is obtained. Representation of each product in each feature space , will the The representations of each product in each feature space are sequentially from 1 to... pieced together to form the first The unentanglement representation of an individual product ;

[0018] c-5) Through formula The final representation of the product is calculated. , , , Both are weight matrices. For the first one that has not gone through the neural network Representation of individual products;

[0019] c-6) According to the formula Get the first in the session The product represents the current interest level. Importance coefficient In the formula , and Both are weight matrices. For the first in the session The characteristics of a product are represented by a formula. The global interest representation of the session is calculated. , will select the product set Alternative step c-1) formula In Using this formula to select candidate product sets Mapping to different feature subspaces yields , For candidate products in the The representation of each feature space will represent the global interest. Alternative step c-1) formula In This formula is used to represent global interest. Mapping to different feature subspaces yields , For global interest representation in the th Representation of a feature space;

[0020] c-7) Through formula The average representation of the candidate item in each feature space is calculated. According to the formula The candidate product was calculated for the first... Attention score in each feature space Through formula The session representation of the candidate product is calculated. In the formula For the splicing operation, the formula is used. The final unentangled representation of the session is calculated. In the formula This is the weight matrix. For local interest, it is composed of the unentangled representation of the last item in the session;

[0021] c-8) Through formula Calculate the probability score of the candidate item being the next interaction. Complete the establishment of the graph neural network model;

[0022] c-9) via formula Calculate the loss function In the formula The difference between the cross-entropy loss function and the actual product label is calculated. , The distance correlation function is used as a regularization method to eliminate redundancy in each feature subspace. , , For real labels, The labels are calculated by the graph neural network model. To control the coefficient of this regularization term, The distance covariance between the two matrices The covariance of the matrix itself. For all items in the session in the first... The initial representation matrix of each feature space. For all items in the session in the first... The initial representation matrix of each feature space is obtained by backpropagation via BPTT combined with the loss function. Optimize the graph neural network model in steps c-1) to c-8).

[0023] Furthermore, in step d), the test data from the session sequence is input into the trained graph neural network model to obtain the session unentangled representation. and candidate products Through formula Calculate the probability score of the product being the next recommendation. According to probability scores The items are sorted, and the item with the highest ranking is recommended as the next item.

[0024] Preferably, in step c-2), before concatenating the out-degree matrix and the in-degree matrix, each row of the out-degree matrix and the in-degree matrix is ​​standardized.

[0025] The beneficial effects of this invention are: Attached Figure Description

[0026] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0027] The following is in conjunction with the appendix Figure 1 The present invention will be further described below.

[0028] A graph neural network-based session recommendation method based on disentangled representation learning includes the following steps:

[0029] a) Extract session sequences that do not contain user information from the commodity transaction dataset. This session sequence consists of several items that the user interacts with. The first interaction the user makes in this session One product, , To determine the number of products a user interacts with during a session, select N% of the data from the session sequence as training data and the remaining 1-N% as test data to build a candidate product set. , For the first in the session One product, , The number of items in the session;

[0030] b) Construct a directed graph of the session;

[0031] c) Establish and train a graph neural network model based on unentangled representations;

[0032] d) Calculate the score of the candidate product as the next possible interaction object in the session, and complete the recommendation of the next product.

[0033] Example 1:

[0034] In step a), N is set to 80.

[0035] Example 2:

[0036] In step b), the formula is used. Building a session graph , Includes All points that appear in the text (repeated points are counted as one). Let be the set of edges of a directed graph. , Indicates the first individual products To the individual products A directed edge, i.e., the edge where the user clicked on the product. Then I clicked on the product. .

[0037] Example 3:

[0038] Step c) includes the following steps:

[0039] c-1) Through formula The calculated product is embedded in the initialized session. Mapped to the Feature subspace In the formula For goods The initial embedding, , It is a real matrix. The number of feature spaces. It is the L2 norm. This is the weight matrix. This is the weight matrix. For transpose, , For goods The original dimension, To map to the The dimensions of a space;

[0040] c-2) After obtaining the representations of the items in each feature subspace of the session, the formula is used. Calculated at Two neighboring items in a space and similarity score , For the first in the session The features of each product are represented by similarity scores. As the weights among neighbors and the session direction in step b), Figure 1 Start by constructing the adjacency matrix The adjacency matrix is ​​formed by concatenating the out-degree matrix and the in-degree matrix, and the elements in the adjacency matrix are the weights between adjacent items;

[0041] c-3) Through formula

[0042] Calculate the first The product in the first The node representation of a feature space. For the first The product in the first The first feature space The relevant information about neighboring nodes obtained from rounds of iteration. , Both are weight matrices. The bias matrix, The hyperbolic tangent activation function is used. To update the door, Forget gates are used to calculate the ratio of new to old information. New information refers to the neighbor information obtained in this round, while old information refers to the representation of the current product node. For the sigmoid function, For the first The first iteration Feature subspace , For the first The first iteration Feature subspace , To determine how much information from previous events needs to be forgotten in the current round based on the forgetting gate mechanism. , For the first The session graph of the round of iteration The point at the th The representation of a feature subspace, , This represents the number of points present in the session graph.

[0043] c-4) after After iteration of the graph neural network, the th iteration in the session is obtained. Representation of each product in each feature space , will the The representations of each product in each feature space are sequentially from 1 to... pieced together to form the first The unentanglement representation of an individual product ;

[0044] c-5) Through formula The final representation of the product is calculated. , , , Both are weight matrices. For the first one that has not gone through the neural network Representation of individual products;

[0045] (c-6) After obtaining the unentangled feature representations of the items in the session, the common practice is to construct a complete session representation based solely on these items. However, this ignores the role of candidate items (items to be recommended). We intend to customize a unique session unentangled representation for each candidate item. First, according to the formula... Get the first in the session The product represents the current interest level. Importance coefficient In the formula , and Both are weight matrices. For the first in the session The characteristics of a product are represented by a formula. The global interest representation of the session is calculated. , will select the product set Alternative step c-1) formula In Using this formula to select candidate product sets Mapping to different feature subspaces yields , For candidate products in the The representation of each feature space will represent the global interest. Alternative step c-1) formula In This formula is used to represent global interest. Mapping to different feature subspaces yields , For global interest representation in the th Representation of a feature space;

[0046] After obtaining the representations of global interest and candidate items in each feature subspace (c-7), the formula is used... The average representation of the candidate item in each feature space is calculated. According to the formula The candidate product was calculated for the first... Attention score in each feature space After obtaining the scores of candidate items for each feature space, the formula is used... The session representation of the candidate product is calculated. In the formula For the splicing operation, the formula is used. The final unentangled representation of the session is calculated. In the formula This is the weight matrix. For local interest, it is composed of the unentangled representation of the last item in the session;

[0047] c-8) Through formula Calculate the probability score of the candidate item being the next interaction. Complete the establishment of the graph neural network model;

[0048] c-9) via formula Calculate the loss function In the formula The difference between the cross-entropy loss function and the actual product label is calculated. , The distance correlation function is used as a regularization method to eliminate redundancy in each feature subspace. , , For real labels, The labels are calculated by the graph neural network model. To control the coefficient of this regularization term, The distance covariance between the two matrices The covariance of the matrix itself. For all items in the session in the first... The initial representation matrix of each feature space. For all items in the session in the first... The initial representation matrix of each feature space is obtained by backpropagation via BPTT combined with the loss function. Optimize the graph neural network model in steps c-1) to c-8). This indicates that it has not yet been trained using a graph neural network.

[0049] Example 4:

[0050] In step d), the test data from the session sequence is input into the trained graph neural network model to obtain the session unentangled representation. and candidate products Through formula Calculate the probability score of the product being the next recommendation. According to probability scores The items are sorted, and the higher the score, the greater the likelihood that the item will be the next interactive item in the current session. The item with the highest score is then recommended as the next item.

[0051] Example 5:

[0052] In step c-2), before concatenating the out-degree and in-degree matrices, each row of the out-degree and in-degree matrices is standardized.

[0053] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A graph neural network session recommendation method based on disentangled representation learning, characterized in that, Comprising the steps of: a) extracting session sequences from the commodity transaction dataset that do not contain user information , the session sequence consisting of several commodities interacted with by a user, , the first commodity interacted with by the user in the session, , , the number of commodities interacted with by the user in the session, selecting N% of the data from the session sequence as training data and the remaining 1-N% of the data as test data, and establishing a candidate commodity set , , the first commodity in the session, , , the number of commodities in the session; b) constructing a session directed graph; c) establishing and training a graph neural network model based on disentangled representation; d) calculating the score of the candidate commodity as the next possible interaction object of the session, and completing the recommendation of the next commodity; Step c) comprises the steps of: c-1) by the formula session initialized embedded item mapped to the first feature subspace , where is the initial embedding of the item , , is a real matrix, is the number of feature spaces, is the L2 norm, is a weight matrix, is a weight matrix, is the transpose, , is the original dimension of the item , is the dimension mapped to the first space; c-2) by the formula computed in space two neighbor goods with similarity score , is the feature representation of the th good in the session, and similarity score is the weight between neighbors, and the adjacency matrix is constructed with the session directed graph in step b) , which is spliced by the out-degree matrix and the in-degree matrix, and the elements in the adjacency matrix are the weights between adjacent goods; c-3) calculating the score of the candidate commodity as the next possible interaction object of the session by the formula The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated, The node representation of the i-th commodity in the j-th feature space is calculated,​​​​​​​​​​​​​​ c-4) after a predetermined number of iterations of the graph neural network for the wheel, obtaining the representation of the i-th item in each feature space ;​​​​​​ c-5) Through formula The final representation of the product is calculated. , , , Both are weight matrices. For the first one that did not go through the neural network Representation of individual products; c-6) According to the formula the importance coefficient of the i-th item in the session in the j-th feature space for the current interest representation ​​​​​​​​​​​​​​​​​​​​​​​​​ c-7) Through formula The average representation of the candidate item in each feature space is calculated. According to the formula The candidate product was calculated for the first... Attention score in each feature space Through formula The session representation of the candidate product is calculated. In the formula For the splicing operation, the formula is used. The final unentangled representation of the session is calculated. In the formula This is the weight matrix. For local interest, it is composed of the unentangled representation of the last item in the session; c-8) by the formula calculating a likelihood score for the candidate item to be the next interaction , the establishment of the graph neural network model is completed; c-9) via formula Calculate the loss function In the formula The difference between the cross-entropy loss function and the actual product label is calculated. , The distance correlation function is used as a regularization method to eliminate redundancy in each feature subspace. , , For real labels, The labels are calculated by the graph neural network model. To control the coefficient of the regularization term, The distance covariance between the two matrices The covariance of the matrix itself. For all items in the session in the first... The initial representation matrix of each feature space. For all items in the session in the first... The initial representation matrix of each feature space is obtained by backpropagation via BPTT combined with the loss function. Optimize the graph neural network model in steps c-1) to c-8). 2.The session recommendation method based on disentangling representation learning of a graph neural network according to claim 1, characterized in that: In step a), N is 80. 3.The session recommendation method based on disentangling representation learning of a graph neural network according to claim 1, characterized in that: In step b) by formula Constructing the session graph , is a set of directed edges of the directed graph, , denotes a directed edge from the th item to the th item . 4.The session recommendation method based on disentangling representation learning of a graph neural network according to claim 1, characterized in that: inputting the test data in the session sequence into the trained graph neural network model in step d) to obtain a session disentangled representation and candidate item representations , a likelihood score of the item being the next recommendation is calculated by the formula , the items are ranked according to the likelihood scores , and the item with the highest rank is recommended as the next item.​ 5.The session recommendation method based on disentangling representation learning of a graph neural network according to claim 1, characterized in that: In step c-2), before the out-degree matrix and the in-degree matrix are spliced, the out-degree matrix and the in-degree matrix are respectively normalized for each row.