End-to-end forest-based implicit feedback recommendation method
Through a forest-based end-to-end recommendation method, tree and forest index structures are utilized to alternately train scoring models and tree representations to generate a forest of multiple trees. This solves the problems of limited expressive power and inconsistent training and search in implicit feedback recommendation systems, and achieves efficient and high-quality recommendation results.
Patent Information
- Application Number
- CN202210391776.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-04-14
AI Technical Summary
Existing recommendation systems use simple metric functions when processing implicit feedback, resulting in limited expressiveness and restricting recommendation effectiveness. In addition, there are inconsistencies between training and searching when searching on multiple trees.
A forest-based end-to-end recommendation method is adopted, which utilizes the tree and forest index structure. By alternately training the scoring model and tree representation, multiple trees are generated to form a forest. Beam search and a pre-trained discriminator are used to generate candidate sets to achieve efficient recommendation.
It improves the efficiency and effectiveness of recommendations, can provide recommendation results within logarithmic time complexity, generate more high-quality candidate products, and narrow the inconsistency between training and search.
Smart Images

Figure QLYQS_22 
Figure QLYQS_29 
Figure QLYQS_31
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information retrieval and recommendation systems, and in particular to a forest-based end-to-end implicit feedback recommendation method. Background Art
[0002] Recommender systems play a crucial role in addressing information overload, helping users quickly find items of interest. Based on the form of user feedback, recommendation systems can be categorized as either explicit or implicit feedback. Explicit feedback occurs when users provide ratings, while implicit feedback occurs when users click or purchase items. In practice, implicit feedback is more common. Current recommendation systems often use simple metrics, such as inner product and cosine similarity, to measure user ratings of items. These simple metrics have limited expressive power, limiting the effectiveness of recommendation systems. Therefore, more complex and expressive scoring models, such as neural networks, are needed. Item recommendations can be transformed into nearest neighbor searches for these simple metrics. Index structures (such as random quantization, tree structures, and graph structures) have been widely used to address this problem. These index structures help efficiently find near-optimal solutions to the nearest neighbor search problem. Combining complex scoring models with index structures to design efficient end-to-end recommendation models is a worthy research question.
[0003] To address this problem, researchers proposed a tree-based approach, constructing a binary tree in which the leaf nodes correspond one-to-one to products. Any complex scoring model can be matched to this tree structure. A user's rating of a product is equivalent to the user's rating of the tree's leaf nodes. A user's rating of a non-leaf node can be understood as the user's rating of the leaf items contained in the subtree corresponding to that node. The leaf nodes and their ancestor nodes corresponding to products with which the user has interacted can be used as positive samples, while the remaining nodes in the tree can be used as negative samples. At this point, the learning of the scoring model and the tree representation can be treated as a binary classification problem for training and tree updates. Once the tree representation and scoring model are trained, a beam search method is used, starting from the root node, to ultimately return the desired leaf nodes.
[0004] However, in binary classification training, nodes at the same level of the tree are not compared, leading to inconsistencies between training and search. Compared to searching a single tree, searching across multiple trees clearly yields more high-quality candidate solutions. Therefore, it is necessary to design more appropriate training models and index structures to construct efficient recommendation systems. Summary of the Invention
[0005] The purpose of the present invention is to provide an end-to-end implicit feedback recommendation method based on a forest. The system provided by this method, with the help of the index structure of trees and forests, can be applied to any advanced user-to-product scoring model and can efficiently provide recommendation results to users based on implicit feedback data.
[0006] To achieve the above objectives, the present invention provides a forest-based end-to-end implicit feedback recommendation method, which includes:
[0007] Use U={u1,u2,…,u M} represents the user set, I={i1,i2,…,i N} represents the product set, s(u, i) represents the score of user u on product i given by the scoring model; where s(·, ·) is an arbitrarily complex scoring model; T represents a tree, and the products correspond one-to-one to the leaf nodes of the tree T, that is, π(i) = leaf i Represents product i and leaf node leaf i Corresponding; use b j (π(i)) represents the ancestor node of leaf node π(i) at the jth layer, and the ancestor node of the leaf node at the bottom layer is recorded as the leaf node itself. The scoring model further represents the user's score for the node on the tree;
[0008] Step 1: Assuming π is fixed, learn the parameters θ used in the scoring model and tree representation;
[0009] Step 2: Fix the parameters of the scoring model s(·,·) and the tree representation, and learn the mapping π between products and leaf nodes;
[0010] Step 3: Alternately run steps 1 and 2 to generate multiple trees and corresponding scoring models, and the generated trees form a forest. When making recommendations, use the scoring model corresponding to each tree to perform beam search on the tree to generate a candidate set. The candidate sets generated on each tree form a larger candidate set. Use a pre-trained discriminator to sort the candidate set and select the top-k items as recommended items for the user.
[0011] Preferably, step 1 comprises:
[0012] Given an interaction pair (u, i) between a user and a product as a training sample, this sample is used to perform a multi-classification task at each level of the tree; at the jth level of the tree, b j (π(i)) is the positive sample of this layer, and its corresponding label is 1. The rest of the nodes in this layer are negative samples, and their corresponding labels are 0. Then the loss function of training the nodes in this layer and the scoring model is the cross entropy of multiple classifications, that is,
[0013]
[0014] Among them, c(j) represents the number of nodes in the jth layer, represents the kth node in the jth layer, represents the label of the kth node in the jth layer of the tree, and there is
[0015]
[0016] Calculate the loss function L j (u,i) can be repeatedly sampled according to a given distribution q, that is, a total of m+1 samples are used in the calculation, including one positive sample and m negative samples, where m is an adjustable hyperparameter; at this time, these m+1 samples are recorded as That is, the training nodes used in the jth layer; the following adjustments are made based on the user's scores for these training nodes:
[0017]
[0018] At this point the loss function becomes:
[0019]
[0020] in, In this way, at each layer, we only need to calculate the user's scores for m+1 nodes;
[0021] If the probability q of each negative sample node n being sampled n ∝exps(u,n), then we have Among them, θ is the parameter required for the representation of the scoring model and the tree, that is, the expected gradient of the changed loss function is equivalent to the gradient of the original loss function; however, to make q n The computational complexity of ∝exps(u,n) is the same as that of the original loss function, which means that the user's scores for all nodes in each layer need to be calculated. According to this training method, the parameters θ required for the scoring model and tree representation can be learned.
[0022] Preferably, step 2 includes:
[0023] Assume that the layer where the root node is located is the 0th layer. Initially, the root node represents a set containing all products. Then, the products are assigned to the nodes in the dth layer. The number of products assigned to each node is exactly the number of leaf nodes contained in the subtree with the node as the root node. The products assigned to each node in the dth layer are disjoint and their union is exactly the product set represented by the root node. d is an adjustable hyperparameter. Since the dth layer contains at most 2 d nodes, so that the commodities contained in the root node can be allocated to at most c≤2 dnodes; the matching degree between product i and a node n in the dth layer is defined as follows:
[0024]
[0025] in, Represents all user-item pairs that interact with item i; for item i, c such matching scores can be obtained, then item i is assigned to the node corresponding to the maximum matching score. If the item assigned to the node corresponding to the maximum matching score exceeds the limit, that is, the item assigned to the node cannot exceed the number of leaf nodes contained in the subtree with the node as the root node, then the item is assigned to the node corresponding to the second largest matching score; if the item assigned to this node still exceeds the limit, then the item is assigned to the node corresponding to the third largest matching score, and so on, until the item is successfully assigned to a node; in this way, all the items contained in the root node are assigned to the nodes on the dth layer respectively, and for each node on the dth layer, it is regarded as a subtree with this node as the root node, and this step is repeated until exactly each leaf node of the tree is assigned to a item.
[0026] According to the above technical solution, the present invention first sorts all product categories and groups products belonging to the same category together. If a product belongs to more than one category, it is randomly assigned to its category. Then, the products in each category are cyclically divided into two equal parts until each part contains only one product. This results in a nearly complete binary tree. This tree is then fine-tuned to ensure that each product is at the bottom of the tree. The scoring model s(·,·) and the mapping π(·) are trained alternately to improve recommendation performance.
[0027] Other features and advantages of the present invention will be described in detail in the following detailed description. DETAILED DESCRIPTION
[0028] The following is a detailed description of the specific embodiments of the present invention. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.
[0029] The present invention provides a forest-based end-to-end implicit feedback recommendation method, which includes:
[0030] Use U={u1,u2,…,u M} represents the user set, I={i1,i2,…,i N} represents the product set, s(u, i) represents the score of user u on product i given by the scoring model; where s(·, ·) is an arbitrarily complex scoring model; T represents a tree, and the products correspond one-to-one to the leaf nodes of the tree T, that is, π(i) = leaf i Represents product i and leaf node leaf i Corresponding; use b j (π(i)) represents the ancestor node of leaf node π(i) at the jth layer, and the ancestor node of the leaf node at the bottom layer is recorded as the leaf node itself. The scoring model further represents the user's score for the node on the tree;
[0031] Items in the same category are more likely to be similar and therefore more likely to be located close together in the tree. Therefore, the initial tree and mapping π are generated as follows: First, sort all product categories and group items belonging to the same category together. If an item belongs to more than one category, it is randomly assigned to a category. Then, the items in each category are repeatedly divided into two equal parts, until each part contains only one item. This results in a nearly complete binary tree. Fine-tune this tree so that every item is at the bottom of the tree. Alternately train the scoring model s(·,·) and the mapping π(·) to improve recommendation performance.
[0032] Specifically, the above training process includes:
[0033] Step 1: Assuming π is fixed, learn the parameters θ used in the scoring model and tree representation;
[0034] Given an interaction pair (u, i) between a user and a product as a training sample, this sample is used to perform a multi-classification task at each level of the tree; at the jth level of the tree, b j (π(i)) is the positive sample of this layer, and its corresponding label is 1. The rest of the nodes in this layer are negative samples, and their corresponding labels are 0. Then the loss function of training the nodes in this layer and the scoring model is the cross entropy of multiple classifications, that is,
[0035]
[0036] Among them, c(j) represents the number of nodes in the jth layer, represents the kth node in the jth layer, represents the label of the kth node in the jth layer of the tree, and there is
[0037]
[0038] Calculate the denominator It is required to calculate the user's rating for each node in the layer, which is very time-consuming in large-scale recommendation systems. In order to speed up training, the loss function L is calculated.j (u,i) does not use all negative samples, but repeatedly samples m negative samples according to a given distribution q. When calculating the loss function, a total of m+1 samples are used, that is, one positive sample and m negative samples, where m is an adjustable hyperparameter. At this time, these m+1 samples are recorded as That is, the training nodes used in the jth layer; the following adjustments are made based on the user's scores for these training nodes:
[0039]
[0040] At this point the loss function becomes:
[0041]
[0042] in, In this way, at each layer, we only need to calculate the user's scores for m+1 nodes;
[0043] Theoretically, it can be proved that if the probability q of each negative sample node n being sampled is n ∝expS(u,n), then Among them, θ is the parameter required for the representation of the scoring model and the tree, that is, the expected gradient of the changed loss function is equivalent to the gradient of the original loss function; however, to make q n The computational complexity of ∝exps(u,n) is the same as that of the original loss function, requiring the calculation of user scores for all nodes in each layer. Therefore, in practical applications, a simple distribution q can be sampled, for example, where the probability of each negative sample being sampled is equal, i.e., uniform random sampling. Existing gradient descent algorithms such as SDG and Adam can be used to optimize a given loss function. This training method can be used to learn the parameters θ required for the scoring model and tree representation.
[0044] Step 2: Fix the parameters of the scoring model s(·,·) and the tree representation, and learn the mapping π between products and leaf nodes;
[0045] Assume that the layer where the root node is located is the 0th layer. Initially, the root node represents a set containing all products. Then, the products are assigned to the nodes in the dth layer. The number of products assigned to each node is exactly the number of leaf nodes contained in the subtree with the node as the root node. The products assigned to each node in the dth layer are disjoint and their union is exactly the product set represented by the root node. d is an adjustable hyperparameter. Since the dth layer contains at most 2 d nodes, so that the commodities contained in the root node can be allocated to at most c≤2 d nodes; the matching degree between product i and a node n in the dth layer is defined as follows:
[0046]
[0047] in, Represents all user-item pairs that interact with item i; for item i, c such matching scores can be obtained, then item i is assigned to the node corresponding to the maximum matching score. If the item assigned to the node corresponding to the maximum matching score exceeds the limit, that is, the item assigned to the node cannot exceed the number of leaf nodes contained in the subtree with the node as the root node, then the item is assigned to the node corresponding to the second largest matching score; if the item assigned to this node still exceeds the limit, then the item is assigned to the node corresponding to the third largest matching score, and so on, until the item is successfully assigned to a node; in this way, all the items contained in the root node are assigned to the nodes on the dth layer respectively, and for each node on the dth layer, it is regarded as a subtree with this node as the root node, and this step is repeated until exactly each leaf node of the tree is assigned to a item.
[0048] Step 3: Alternately run steps 1 and 2 to generate multiple trees and corresponding scoring models, and the generated trees form a forest. When making recommendations, use the scoring model corresponding to each tree to perform beam search on the tree to generate a candidate set. The candidate sets generated on each tree form a larger candidate set. Use a pre-trained discriminator to sort the candidate set and select the top-k items as recommended items for the user.
[0049] It can be seen that the present invention provides an end-to-end implicit feedback recommendation method based on a forest and also proposes an end-to-end recommendation system for implicit feedback. With the help of tree and forest index structures, the recommendation system can match any complex scoring model. At the same time, the recommendation task can give recommendation results within the logarithmic time complexity of the product scale, and the recommendation efficiency is much higher than the direct ranking recommendation of all products. The learning of the scoring model and the node representation of the tree is also regarded as a multi-classification task, so that competition can be introduced between the nodes at the same level on the tree, reducing the inconsistency between training and search. Furthermore, the recommendation system uses all the generated trees to form a forest, so that the system can generate more high-quality candidate products.
[0050] In summary, the method provided by the present invention establishes a product index through a tree structure and a forest, and integrates any complex scoring model, thereby greatly improving the recommendation efficiency and effect.
[0051] The preferred embodiments of the present invention are described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various simple modifications can be made to the technical solution of the present invention, and these simple modifications all fall within the scope of protection of the present invention.
[0052] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0053] In addition, the various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A forest-based end-to-end implicit feedback recommendation method, characterized in that: The method comprises: use Represents a collection of users, Represents a collection of products. Indicates the user given by the scoring model For products 's score; among them, For any complex scoring model; use Represents a tree, the product and the tree The leaf nodes of Indicates product With leaf nodes corresponding; use Represents a leaf node In the The ancestor node of each layer, and the ancestor node of the leaf node at the bottom layer is recorded as the leaf node itself. The scoring model further represents the user's score for the nodes on the tree; Step 1: Assumption Fixed, learned parameters used for scoring model and tree representation ; Step 2: Fixed scoring model And the parameters of the tree representation, learning the mapping between products and leaf nodes ; Step 3: Alternately run steps 1 and 2 to generate multiple trees and corresponding scoring models, which form a forest. When making recommendations, use the scoring model corresponding to each tree to perform beam search on the tree to generate a candidate set. The candidate sets generated by each tree form a larger candidate set. Use a pre-trained discriminator to sort the candidate set and select the top-k items as recommended items for the user. Step 1 includes: Given an interaction pair of user and item As a training sample, this sample is used to do a multi-classification task at each level of the tree; layer, is the positive sample of this layer, and its corresponding label is 1. The rest of the nodes in this layer are negative samples, and their corresponding labels are 0. Then the loss function of training the nodes in this layer and the scoring model is the cross entropy of multiple classifications, that is, in, Indicates the The number of layer nodes, Indicates the Layer nodes, Represents the tree Tier The labels of the nodes, and Calculating the loss function According to a given distribution Repeatable sampling negative samples, that is, a total of samples, including a positive sample and negative samples, of which is an adjustable hyperparameter; at this time, Samples are recorded as , that is, The training nodes used by the layer; the following adjustments are made based on the user's scores for these training nodes: At this point the loss function becomes: in, , so that in each layer, we only need to calculate the user Scoring of nodes; If each negative sample node The probability of being sampled , then ;in, are the parameters required for the characterization of the scoring model and the tree, that is, the expected gradient of the changed loss function is equivalent to the gradient of the original loss function; however, to make The amount of calculation is the same as that of the original loss function, then it is necessary to calculate the user's scores for all nodes in each layer; according to this training method, the parameters needed for the scoring model and the tree representation can be learned. .
2. The method according to claim 1, characterized in that Step 2 includes: Set the root node to the 0th layer. Initially, the root node represents a set of all products. Then, assign the products to the The number of commodities distributed by each node is exactly the number of leaf nodes contained in the subtree with the node as the root node. The commodities assigned to each node in the layer are disjoint and their union is exactly the commodity set represented by the root node. is a tunable hyperparameter; since Layer contains at most nodes, so that the commodities contained in the root node can be allocated to at most Nodes; define products With the A node in the layer The degree of matching is as follows: in, , Indicates all products There are interactive user-product pairs; for products , available Such a matching score, then the product Assigned to the node corresponding to the maximum matching score. If the commodity allocated to the node corresponding to the maximum matching score exceeds the limit, that is, the commodity allocated to the node cannot exceed the number of leaf nodes contained in the subtree with the root node of the node, then the commodity is allocated to the node corresponding to the second largest matching score; if the commodity allocated to this node still exceeds the limit, then the commodity is allocated to the node corresponding to the third largest matching score, and so on, until the commodity is successfully allocated to a node; in this way, all the commodities contained in the root node are allocated to the first and second largest matching scores respectively. For nodes on the layer For each node on the layer, treat it as a subtree with this node as the root node, and repeat this step until each leaf node of the tree is assigned to a commodity.
Citation Information
Patent Citations
Personalized food recommendation method based on commodity forest system
CN103345699A
Multiple Peer-to-Peer Personalized Recommendation
CN109299370A