Enhanced negative sampling commodity recommendation model based on collaborative knowledge graph

By introducing an enhanced negative sampling model based on collaborative knowledge graphs into the recommendation system, using graph convolutional neural networks and reinforcement learning to explore diverse negative samples, the data imbalance problem and lack of model interpretability in implicit feedback data processing are solved. Significantly improves the performance and user trust of the recommendation system.

CN118628208APending Publication Date: 2024-09-10TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410823430.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing recommendation systems are difficult to effectively capture real negative samples when processing implicit feedback data, leading to data imbalance problems, and traditional methods are difficult to interpret model recommendation results, affecting user trust.

Method used

Adopt an enhanced negative sampling model based on collaborative knowledge graph, extract node high-order information through graph convolutional neural network, combine with reinforcement learning agent to explore diverse and explainable negative samples, use policy network and value network to optimize sampling strategy, and iteratively optimize recommendations filters and samplers to improve prediction performance.

Benefits of technology

It effectively improves the quality of negative samples, enhances the diversity and interpretability of the recommendation system, significantly improves recommendation performance, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628208A
    Figure CN118628208A
Patent Text Reader

Abstract

The invention discloses a collaborative knowledge graph-based enhanced negative sampling commodity recommendation model, and particularly relates to the technical field of online shopping platform commodity recommendation, comprising the steps of integrating user interaction data and external knowledge into a collaborative knowledge graph; constructing a sampler containing neighbor attention and neighbor pruning, and exploring a collaborative knowledge graph by combining a policy network-actor, so as to discover a high-quality negative sample; a commodity recommendation device based on the commentator Critic is constructed, and the accuracy of distinguishing positive and negative samples by the recommendation device is improved; and finally, training a recommender and a sampler by adopting an iterative optimization method, and searching a minimum value of a loss function. According to the method, interpretable and diversified negative samples are provided, so that the prediction performance of the model on training data is continuously improved, and diversified recommendation requirements of users are better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of online shopping platform product recommendation, and in particular to an enhanced negative sampling product recommendation model based on a collaborative knowledge graph. Background Art

[0002] In the recommendation system, in order to provide information about user preferences and dislikes through positive and negative feedback from users to train the recommendation model and learn the user's interests and behaviors more accurately, it is crucial to obtain effective information from historical user-item interactions. However, many user behaviors exist in the form of implicit feedback, such as clicks and purchases, which only provide positive feedback signals. This poses a fundamental challenge to the learning of recommendation models - how to extract negative feedback signals from data with only positive feedback. If all unobserved interactions are regarded as negative samples, the negative samples will be far more than the positive samples, leading to the problem of data imbalance. Negative sampling is an effective strategy to deal with the problem of data imbalance. However, the traditional method of generating negative samples by random sampling or heuristic rules is difficult to capture the distribution of real feedback.

[0003] At the same time, traditional collaborative filtering methods or deep learning-based recommendation models often have difficulty explaining the recommendation results of the model, which to some extent affects the user's trust in the recommendation system. Therefore, we explore explainable negative samples through the rich structure and semantic information of the knowledge graph.

[0004] However, exploring knowledge graphs to find possible negative samples faces great challenges. Existing methods either apply path selection algorithms to select salient paths or define meta-path patterns to constrain paths, but the path size grows exponentially for knowledge graphs with different types of relations. Reinforcement learning agents are able to implicitly reason about knowledge graphs to make decisions, rather than just embedding knowledge graphs as latent vectors for similarity matching. Summary of the invention

[0005] To overcome the problems in the prior art, the present invention proposes a reinforced negative sampling product recommendation model based on a collaborative knowledge graph. By considering user interaction data and external knowledge on the existing knowledge graph reasoning and negative sampling methods, and combining reinforcement learning agents to intelligently explore explainable and diverse negative samples, the prediction performance is improved during the training process, thereby better recommending accurate and diverse products to users.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A reinforced negative sampling product recommendation model based on collaborative knowledge graph includes the following steps:

[0008] Step 1: Align the items in the user-item bipartite graph with the corresponding entities in the knowledge graph, which is called collaborative knowledge graph. , conceptualize the semantic relationship between entity-relationship-entity triples as edges, and and item sets Entity Set with Project Attributes Unified into E entity set, that is .

[0009] Step 2: Build a sampler that includes neighbor attention and neighbor pruning combined with a policy network - actor to explore the collaborative knowledge graph and discover high-quality negative samples;

[0010] Furthermore, the specific process of step 2 is as follows:

[0011] The model is formalized as a Markov decision process, with the collaborative knowledge graph as the environment part of the Markov decision process. A graph convolutional neural network (GCN) is used to extract high-level information of each node in the collaborative knowledge graph. Then, the actor learns a sampling strategy and interacts with the environment after neighbor attention and neighbor pruning operations to obtain its search state on the graph. And possible operations ; Environment through rewards Inform the Actor whether the current action strategy is appropriate for the observed user interaction;

[0012] Step 3: By building a value network that shares the same action space as the Actor, the Critic evaluates the current state and the value of the action taken to guide the strategy update of the Actor network, match high-quality negative samples with positive samples, improve the accuracy of the recommender in distinguishing positive and negative samples, and better meet the diverse recommendation needs of users;

[0013] Step 4. Finally, an iterative optimization method is used to train the recommender and sampler to find the minimum value of the loss function. The optimization process aims to continuously improve the prediction performance of the model on the training data by adjusting the model parameters.

[0014] The beneficial technical effects brought by the present invention are as follows:

[0015] Traditional negative sampling methods, such as random sampling or heuristic rules, often fail to fully capture negative samples that reflect the user's true taste. The present invention dynamically explores and selects diverse and explainable negative samples by utilizing the rich heterogeneous information in the collaborative knowledge graph and integrating the policy network Actor and the value network Critic of reinforcement learning.

[0016] Secondly, the size of the action space depends on the out-degree in the graph. For some nodes, the out-degree may be very large. Therefore, the sampler in the present invention includes a neighbor attention module and a user-conditional action pruning strategy to focus on and filter key information to reduce the size of the action space and improve the accuracy and efficiency of the model.

[0017] The present invention adopts an iterative optimization method to train the recommender and sampler, and finds the minimum value of the loss function so that the prediction performance of the model on the training data is continuously improved, thereby better meeting the diverse recommendation needs of users.

[0018] The experimental results of the present invention on three real data sets prove that obtaining high-quality negative samples can effectively improve the recommendation performance of existing recommendation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flow chart of the enhanced negative sampling product recommendation model based on collaborative knowledge graph of the present invention;

[0020] Figure 2 A schematic diagram of a collaborative knowledge graph provided by the present invention;

[0021] Figure 3 A schematic diagram of a sampler module provided by the present invention;

[0022] Figure 4 A schematic diagram of the performance of the enhanced negative sampling RNS provided by the present invention in an existing recommender. DETAILED DESCRIPTION

[0023] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0024] like Figure 1 The present invention proposes an enhanced negative sampling product recommendation model based on collaborative knowledge graph, which is used to recommend diversified and accurate products to users. Specifically, it includes the following steps:

[0025] Step 1: Integrate user interaction data and external knowledge into a collaborative knowledge graph, such as Figure 2 As shown;

[0026] Furthermore, the specific process of step 1 is as follows:

[0027] Step 1.1: Define user interaction data as a user-item bipartite graph ,in and denote the collection of users and items respectively, represents the historical interaction matrix between users and items, Indicates user and Projects There is interaction between them; otherwise ;

[0028] Step 1.2: Define external knowledge as a knowledge graph ,in is the set of project attribute entities, R is the set of relations, and each triple Header Entity (such as a bull) and a tail entity (e.g. plug board) through the relationship (e.g. production) connections;

[0029] Step 1.3: Aligning the items in the user-item bipartite graph with the corresponding entities in the knowledge graph is called collaborative knowledge graph. , conceptualize the semantic relationship between entity-relationship-entity triples as edges, and and item sets Entity Set with Project Attributes Unified into E entity set, that is .

[0030] Step 2: Build a sampler that includes neighbor attention and neighbor pruning combined with a policy network - actor to explore the collaborative knowledge graph and find high-quality negative samples, such as Figure 3 As shown;

[0031] Furthermore, the specific process of step 2 is as follows:

[0032] Step 2.1: Formalize the model as a Markov decision process ,in is the set of states for extracting paths during the exploration process, is the action set of the exploration operation, is the state transition probability function, is the reward function of the environment;

[0033] Step 2.2: Use the collaborative knowledge graph as the environment part of the Markov decision process; use the graph convolutional neural network (GCN) to extract high-level information of each node in the collaborative knowledge graph; then, the actor learns the sampling strategy and interacts with the environment after neighbor attention and neighbor pruning operations to obtain its search state on the graph. And possible operations ; Environment through rewards Inform the Actor whether the current action strategy is appropriate for the observed user interaction;

[0034] Furthermore, the specific process in step 2.2 is as follows:

[0035] Step 2.2.1, GCN captures high-level information of node context, In the convolutional layer, the nodes in the graph exist or Receive the propagation information of its neighbors to update its representation, the formula is:

[0036] (1)

[0037] in, Represents the passing Step embedding propagation node The expression, Represents the slave node The information transmitted by the neighbors is as follows:

[0038] (2)

[0039] in, Is with the node A collection of directly or indirectly connected nodes;

[0040] Step 2.2.2: After the node is established and its neighbors After the representation, from the node The explored neighbor nodes have different influences; therefore, the attention mechanism is used to distinguish their importance; currently in state , the sampler will take action This is accomplished by:

[0041] (3)

[0042] in, express is the basic confidence or probability of negative samples, and Model the confidence of each exploration operation separately;

[0043] first step, It can be expressed as follows:

[0044] (4)

[0045] in, It is a slave node To the neighbors The expression, Is a user Representation; the softmax function is used to calculate the attention score, and the formula is expressed as follows:

[0046] (5)

[0047] Step 2 It can be expressed as follows:

[0048] (6)

[0049] For the same reason, the attention score is calculated as follows:

[0050] (7)

[0051] The attention modeling of the user's positive interaction is as follows:

[0052] (8)

[0053] Step 2.2.3: User conditional action pruning strategy uses a general multi-hop scoring function The similarity between two entities is quantified based on the k-hop pattern;

[0054] Then, define the state The user-conditional pruning action space is used It is defined as:

[0055] (9)

[0056] in, is a predefined integer that is the upper limit of the size of the action space;

[0057] Step 2.2.4: Actor learns a negative sample strategy , through a policy network To obtain is the probability of a negative sample, that is, at step t ; This strategy is based on the state and its possible action space Compute the probability distribution of actions: , policy network To prune the action space and the state vector As input, the probability of issuing each action, the state vector Apply two layers of fully connected neural network FC mapping to :

[0058] (10)

[0059] (11)

[0060] Among them, ⊙ is the Hadamard product, and the model parameters are recorded as .

[0061] Step 3: By building a value network that shares the same action space as the Actor, the Critic evaluates the current state and the value of the action taken to guide the strategy update of the Actor network, match high-quality negative samples with positive samples, improve the accuracy of the recommender in distinguishing positive and negative samples, and better meet the diverse recommendation needs of users;

[0062] Furthermore, the specific process of step 3 is as follows:

[0063] Step 3.1: Introduce the Critic network Q into the recommender to improve the prediction accuracy of the recommender. First, the current path state and the next action Input into the Q-network, the state vector and actions Apply two layers of fully connected neural network FC to map to a real value, output express Actions in status The expected value of the Q network is defined as follows:

[0064] Q ( s t , a t , i ) = f i ( [ s t ; a t ] ) = d r o p o u t ( s ( d r o p o u t ( s ( x W 1 ) ) W 2 ) (12)

[0065] in, is a fully connected neural network, x = [ s t ; a t ] ∈ R d is the learned state and action hidden features, the state vector Represented as embedding , and history connection;

[0066] Step 3.2: Reinforcement learning agent Actor The expected reward selects the action and sets the state Updated to ; Q network The predicted reward value of the action is:

[0067] (13)

[0068] Where γ is the discount factor, are the parameters of the original network, are the parameters of the target network;

[0069] Step 3.3: The recommender evaluates the user by using the inner product of the user and item embeddings and the sum of the critic network outputs. For items The preference is expressed as follows:

[0070] (14)

[0071] in, Represents The likelihood score of the interaction, is the recommendation function, and The users are and items The ID is embedded, is the embedding dimension, is a weight parameter used to adjust the output of the critic network;

[0072] Step 3.4: Optimize the recommender using Bayesian Personalized Ranking (BPR) loss, the formula is:

[0073] m i n I R ∑ ( u , i ) ∈  1 E j ~ f S ( u , i ,  1 |  2 ) [ − l n s ( f R ( u , i ) − f R ( u , j ) ) + l | | I R | | 2 2 ] (15)

[0074] in, yes Function, in The Parameterized Regularization to prevent overfitting.

[0075] Step 4. Finally, an iterative optimization method is used to train the recommender and sampler to find the minimum value of the loss function.

[0076] Furthermore, the specific process of step 4 is as follows:

[0077] First, fix the parameters , sample a negative sample Paired with a positive interaction, they are sent to the recommender and the parameters are updated via stochastic gradient descent (SGD) ; Next, fix the parameters And update the parameters :

[0078] ∇ I S ℒ S = ∇ I S ∑ ( u , i , j ) ∈  E π [ ∑ t = 1 T l t − 1 ℛ ( j ) ] ≈ ∑ ( u , i , j ) ∈  1 T ∑ t = 1 T  [ ℛ ( j ) ∇ I S l o g P ( a t 1 | s t ) ] = ∑ ( u , i , j ) ∈  1 T ∑ t = 1 T  [ ℛ ( j ) ∇ I S l o g ( P ( ( i , e ′ t ) | ( u , i ) ) ] · P ( ( e ′ t , j ) | ( u , i ) , ( i , e ′ t ) ) ) ] (16)

[0079] The optimization is formulated as a two-level problem, where the optimization of the reinforced negative sampling distribution based on the collaborative knowledge graph is nested in the recommendation model, and is optimized by alternately updating the knowledge-aware reinforced negative sampling distribution and the recommendation model parameters. More specifically, the negative sampling distribution is learned by an external optimizer, while the personalized ranking algorithm (i.e., BPR) serves as an internal optimizer to update user and item representations. The optimization process aims to continuously improve the prediction performance of the model on the training data by adjusting the model parameters.

[0080] This paper proposes a reinforced negative sampling product recommendation model based on collaborative knowledge graph. This technology improves the sampler's ability to select high-quality negative samples and can effectively improve the model's recommendation index. The present invention mainly undergoes three-part processing. First, a graph convolutional neural network (GCN) is used to extract high-order information of each node in the collaborative knowledge graph. Then, the Actor learns the sampling strategy and interacts with the environment after neighbor attention and neighbor pruning operations to obtain its search status and possible operations on the graph. Secondly, the Critic evaluates the current state and the value of taking actions to guide the strategy update of the Actor network and match high-quality negative samples to positive samples.

[0081] In order to verify the effectiveness of the proposed enhanced negative sampling method, RNS, three classic recommendation models were selected: SBPR, SGL and SimGCL. Then the RNS negative sampling method was added to these models for comparison with their original models. Experiments were conducted on three category datasets of the Tmall shopping platform in November 2022. The results are as follows Figure 4 shown.

[0082] Figure 4 It is shown that on all the indicators and datasets used, the three baselines used have achieved significant performance improvements after combining with enhanced negative sampling RNS. This shows that the RNS scheme proposed in the present invention can significantly improve the recommendation performance of general recommendation systems.

[0083] The superior performance of the model emphasizes that by utilizing the rich heterogeneous information in the collaborative knowledge graph and integrating the policy network Actor and the value network Critic of reinforcement learning, it is beneficial to improve the effectiveness of negative sampling and the interpretability of the knowledge graph. Exclusivity on KG entities helps explain why target users About Project Disinterested. In the real world, users usually learn about these items through some means (such as search, friend recommendations, or advertising systems); her failure to click on them suggests that this factor may actually make her uninterested, so this factor can serve as a negative signal. Figure 1 shows an example where the user Purchased product and , both of which are from the same manufacturer and the same type It can be inferred that the manufacturer and type The combination is Therefore, It is likely that Other clothing produced (such as ), but of different types, and not very interested in them, such as short down jackets. Therefore, from the perspective of negative sampling, Can provide high-quality negative signals (e.g. may be exist and differences in behavior).

Claims

1. The enhanced negative sampling product recommendation model based on collaborative knowledge graph is characterized by: The steps include: Step 1: Integrate user interaction data and external knowledge into a collaborative knowledge graph; Step 2: Build a sampler that includes neighbor attention and neighbor pruning combined with a policy network - actor to explore the collaborative knowledge graph and discover high-quality negative samples; Step 3: Build a product recommender based on critics to improve the accuracy of the recommender in distinguishing positive and negative samples. Better meet users' diverse recommendation needs; Step 4. Finally, an iterative optimization method is used to train the recommender and sampler to find the minimum value of the loss function.

2. The enhanced negative sampling product recommendation model based on collaborative knowledge graph according to claim 1 is characterized in that: In step 1, user interaction data and external knowledge are obtained, and the further specific process is as follows: Step 1.1: Define user interaction data as a user-item bipartite graph ,in and denote the collection of users and items respectively, represents the historical interaction matrix between users and items, Indicates user and Projects There is interaction between them; otherwise ; Step 1.2: Define external knowledge as a knowledge graph ,in is the set of project attribute entities, R is the set of relations, and each triple Header Entity (such as a bull) and a tail entity (e.g. plug board) through the relationship (e.g. production) connections; Step 1.3: Aligning the items in the user-item bipartite graph with the corresponding entities in the knowledge graph is called collaborative knowledge graph. , conceptualize the semantic relationship between entity-relationship-entity triples as edges, and and item sets Entity Set with Project Attributes Unified into E entity set, that is .

3. According to claim 1, the enhanced negative sampling product recommendation model based on collaborative knowledge graph is characterized in that: The specific process in steps 2 and 3 is as follows: Step 2.1: Formalize the model as a Markov decision process ,in is the set of states for extracting paths during the exploration process, is the action set of the exploration operation, is the state transition probability function, is the reward function of the environment; Step 2.2: Use the collaborative knowledge graph as the environment part of the Markov decision process; use the graph convolutional neural network (GCN) to extract high-level information of each node in the collaborative knowledge graph; The actor then learns a sampling strategy to interact with the environment after neighbor attention and neighbor pruning operations to obtain its search state on the graph. And possible operations ; Environment through rewards Inform the Actor whether the current action strategy is appropriate for the observed user interaction; Step 3.1: Use a value network, Critic, that shares the same action space as the Actor to evaluate the value of the current state and the action taken to guide the Actor network's policy update and match high-quality negative samples with positive samples.

4. The enhanced negative sampling product recommendation model based on collaborative knowledge graph according to claim 3 is characterized in that: The specific process in step 2.2 is as follows: Step 2.2.1, GCN captures high-level information of node context, In the graph convolution layer, the nodes in the graph exist or Receive the propagation information of its neighbors to update its representation, the formula is: (1) in, Represents the passing Step embedding propagation node The expression, Represents the slave node The information transmitted by the neighbors is as follows: (2) in, Is with the node A collection of directly or indirectly connected nodes; Step 2.2.2: After the node is established and its neighbors After the representation, from the node The explored neighbor nodes have different have different influences; therefore, an attention mechanism is used to distinguish their importance; currently in state , the sampler will take action This is accomplished by: (3) in, express is the basic confidence or probability of negative samples, and Model the confidence of each exploration operation separately; first step, It can be expressed as follows: (4) in, It is a slave node To the neighbors The expression, Is a user Representation; the softmax function is used to calculate the attention score, and the formula is expressed as follows: (5) Step 2 It can be expressed as follows: (6) For the same reason, the attention score is calculated as follows: (7) The attention modeling of the user's positive interaction is as follows: (8) Step 2.2.3: User conditional action pruning strategy uses a general multi-hop scoring function The similarity between two entities is quantified based on the k-hop pattern; Then, define the state The user-conditional pruning action space is used It is defined as: (9) in, is a predefined integer that is the upper limit of the size of the action space; Step 2.2.4: Actor learns a negative sample strategy , through a policy network To obtain is the probability of a negative sample, that is, at step t ; This strategy is based on the state and its possible action space Compute the probability distribution of actions: , policy network To prune the action space and the state vector As input, the probability of issuing each action, the state vector Apply two layers of fully connected neural network FC mapping to : (10) (11) Among them, ⊙ is the Hadamard product, and the model parameters are recorded as .

5. The enhanced negative sampling product recommendation model based on collaborative knowledge graph according to claim 3 is characterized in that: The specific process in step 3.1 is as follows: Step 3.1.1, introduce the critic network Q into the recommender to improve the prediction accuracy of the recommender; first, the current path state and the next action Input into the Q-network, the state vector and actions Apply two layers of fully connected neural network FC to map to a real value, output express Actions in status The expected value of the Q network is defined as follows: Q ( s t , a t , θ ) = f θ ( [ s t ; a t ] ) = d r o p o u t ( σ ( d r o p o u t ( σ ( x W 1 ) ) W 2 ) (12) in, is a fully connected neural network, x = [ s t ; a t ] ∈ R d is the learned state and action hidden features, the state vector Represented as embedding , and history connection; Step 3.1.2: Reinforcement learning agent Actor The expected reward selects the action and sets the state Updated to ; Q network The predicted reward value of the action is: (13) Where γ is the discount factor, are the parameters of the original network, are the parameters of the target network; Step 3.1.3: The recommender evaluates the user by using the inner product of the user and item embeddings and the sum of the critic network outputs. For items The preference is expressed as follows: (14) in, Represents The likelihood score of the interaction, is the recommendation function, and The users are and items The ID is embedded, is the embedding dimension, is a weight parameter used to adjust the output of the critic network; Step 3.1.4: Optimize the recommender using Bayesian Personalized Ranking (BPR) loss, the formula is: m i n Θ R ∑ ( u , i ) ∈  1 E j ~ f S ( u , i ,  1 |  2 ) [ − l n σ ( f R ( u , i ) − f R ( u , j ) ) + λ | | Θ R | | 2 2 ] (15) in, yes Function, in The Parameterized Regularization to prevent overfitting.

6. The enhanced negative sampling product recommendation model based on collaborative knowledge graph according to claim 1 is characterized in that: In step 4, iterative optimization is performed to find the minimum value of the loss function. The further specific process is as follows: First, fix the parameters , sample a negative sample Paired with a positive interaction, they are sent to the recommender and the parameters are updated via stochastic gradient descent (SGD) ; Next, fix the parameters And update the parameters : ∇ Θ S ℒ S = ∇ Θ S ∑ ( u , i , j ) ∈  E π [ ∑ t = 1 T λ t − 1 ℛ ( j ) ] ≈ ∑ ( u , i , j ) ∈  1 T ∑ t = 1 T  [ ℛ ( j ) ∇ Θ S l o g P ( a t 1 | s t ) ] = ∑ ( u , i , j ) ∈  1 T ∑ t = 1 T  [ ℛ ( j ) ∇ Θ S l o g ( P ( ( i , e ′ t ) | ( u , i ) ) ] · P ( ( e ′ t , j ) | ( u , i ) , ( i , e ′ t ) ) ) ] (16) The optimization process aims to continuously improve the predictive performance of the model on the training data by adjusting the model parameters.

Citation Information

Cited By

  • Recommendation system optimization method and device based on negative sample perception

    CN120509497A