A sequence recommendation method based on meta-path neighborhood target generalization
By constructing item-item graphs and item-label graphs, combined with heterogeneous graph encoding and Transformer layer training, a sequence recommendation model with target generalization of user behavior is realized, which solves the problem that the existing technology cannot effectively learn the optimal embedding representation of user behavior, and realizes efficient and economical user experience.
Patent Information
- Application Number
- CN202210302504.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-03-25
AI Technical Summary
Existing sequential recommendation models have difficulty in effectively learning the optimal embedding representation of user behavior in CTR prediction, resulting in highly monotonous recommendation results or failure to explore users' potential interests, affecting click-through rate and user experience.
A sequential recommendation method based on meta-path neighborhood target generalization is adopted. By constructing project-project graphs and project-label graphs, heterogeneous graphs are used to encode user historical interaction information. Combined with message propagation and aggregation mechanisms, the Transformer layer is used for node sequence training to generalize potential project targets for personalized interest exploration.
It improves the accuracy of model recommendation items, dynamically explores users' potential interests beyond historical interactions, and improves click-through rate, page views and user experience.
Smart Images

Figure CN114841765B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sequence recommendation technology, and more particularly to a sequence recommendation method based on meta-path neighborhood target generalization. Background Art
[0002] Sequential recommendation involves recommending the next items a user might be interested in, given their historical click behavior. In recommendation systems, click-through rate (CTR) significantly impacts user experience and, consequently, product revenue. The primary challenge in building CTR prediction models is meticulously modeling user preferences based on their historical behavior. Various CTR prediction models have been proposed for sequential recommendation based on historical user behavior.
[0003] Sequential recommendation models primarily involve two research areas: sequential recommendation and graph neural networks (GNNs). Early work on recommendation systems often employed collaborative filtering to model user behavior sequences, but these methods often ignore the order information of the sequence and are therefore unsuitable for sequential recommendation. Recently, recurrent neural networks (RNNs) and their variants, GRUs and LSTMs, have become increasingly popular for modeling user behavior. For example, attention mechanisms are incorporated into RNNs to capture changes in user preferences across sessions. Another example is combining gated recurrent neural networks (GRUs) with loss functions tailored for sequential recommendation. The key idea behind these methods is to encode a user's historical behavior into an embedding vector reflecting their preferences to make predictions. However, these recurrent networks limit their ability to model the mutual influence between items in a session. Therefore, inspired by the Transformer architecture, SASRec and BERT4Rec use the Transformer architecture to learn the mutual influence coefficients of items in a sequence.
[0004] Numerous research works have demonstrated the ability of graph neural networks to model graph-structured data. For example, GNN variants including GCN, GAT, and GraphSAGE have demonstrated groundbreaking performance in learning node embedding representations. Recently, GNNs have been widely applied to recommendation. For example, PinSage combines GraphSAGE and achieves large-scale application of deep graph node embedding. MEIRec utilizes meta-path-guided GNNs to model the rich interactions of complex objects (items, users) in heterogeneous graphs for search intent recommendations. However, none of these methods are designed for sequential recommendation because they ignore the order information in the sequence. Subsequently, SR-GNN proposed modeling conversation sequences as graph-structured data and obtaining more accurate item embeddings by considering complex transformation relationships between items. Fi-GNN represents the multi-field features of advertising systems as a graph structure and combines it with a gated GNN to learn feature interactions within sequences. HyperRec employs a hypergraph structure to represent short-term item dependencies and employs convolutional layers to learn embeddings. MA-GNN applies GNN methods to model short-term item dependencies and uses memory networks to model long-term item dependencies. However, all of these methods are unidirectional models from left to right and cannot learn the mutual influence of items in the historical sequence. In addition, these methods fail to consider behavioral goal generalization in CTR prediction.
[0005] Recently, a variety of CTR prediction models have been proposed for sequential recommendation of user historical behaviors. GRU-BPR and its variants use GRU to model user behavior sequences. Bert4Rec believes that the unidirectional architecture limits the expressive power of hidden layer embedding, so a bidirectional self-attention mechanism network trained by the cloze task is used to model user behavior sequences. Although these models are common and effective in recommending highly relevant items to users, their sequence learning methods are not sufficient to learn the optimal embedding representation vector of user behavior and will inevitably damage the long-term user experience. The main limitations include: (a) Highly single recommendations. Products with high attribute similarity have higher exposure rates, which may make users feel monotonous about the recommended content. (b) Insufficient interest exploration and failure to help users find items of potential interest.
[0006] Recommendation systems should be designed to help users explore their interests, for example, by recommending items that are less relevant to their historical interactions but that the user has potential interest in. An effective interest exploration strategy will help improve the number of page views (PV), unique visitors (UV), and click-through rate. Therefore, it is crucial to explore potential interests beyond a user's historical behavior for content recommendation. However, it is not easy to find a user's potential interest items, especially in session-based recommendations where the session click information for each user is limited. An intuitive approach is to randomly generate a set of new items for each user outside of each user's behavior sequence, but this approach may harm the user experience because these items may be completely irrelevant to the user. Summary of the Invention
[0007] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide a sequence recommendation method based on meta-path neighborhood target generalization. The method comprises the following steps:
[0008] Based on the user's historical behavior sequence, we model items and their co-occurrences as an item-item graph. We then construct an item-tag graph based on the correspondence between items and tags. We also construct meta-paths to capture different composite relationships between items or tags, and find the meta-path-based neighbors of item and tag nodes.
[0009] Heterogeneous graphs are used to encode user historical interaction information and build relationships between items and items, and between items and tags. Message propagation and message aggregation mechanisms are then used to integrate different types of nodes and their relationships.
[0010] Embedding learning training is performed on the heterogeneous graph to obtain a trained sequence recommendation model. During the training process, for each target prediction, potential item targets that do not exist in the original behavior sequence are generalized for auxiliary training, and the vector representation of the item node is input into the conversion layer, where the potential item targets are obtained based on the neighbors of the meta-path.
[0011] Compared with the existing technology, the advantage of the present invention is that it provides a sequential recommendation model based on the generalization of meta-path neighborhood targets, which can not only improve the accuracy of the model recommendation items based on the user's historical behavior, but also dynamically perform personalized user interest exploration, that is, explore the user's potential interest items beyond historical interaction behavior.
[0012] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with the description, serve to explain the principles of the application.
[0014] Figure 1 is a schematic diagram of a sequence recommendation model based on meta-path neighborhood target generalization according to an embodiment of the present application;
[0015] Figure 2 is a heterogeneous graph constructed based on user behavior sequences and item-tag relationships according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangements, numerical expressions, and numerical values of components and steps set forth in these embodiments are not limiting to the scope of the present application unless specifically stated otherwise.
[0017] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way limiting to the scope of the application or its applications or uses.
[0018] Techniques, methods, and apparatus known to those of ordinary skill in the relevant art can not be discussed in detail herein, but should be considered as part of the specification, where appropriate.
[0019] In all of the examples shown and discussed herein, any specific values should be interpreted as merely illustrative and not as a limitation. Thus, other examples of exemplary embodiments can have different values.
[0020] It should be noted that like references and characters herein relate to like items throughout the figures, and once an item is defined in one figure, it need not be discussed further in subsequent figures.
[0021] The present application is a sequence recommendation model based on meta-path neighborhood target generalization (HGESNN). Referring to Figure 1 as shown, the model generally includes a heterogeneous graph representation, behavioral target generalization, and node sequence training, wherein Figure 1 (a) are users’ behavior sequences, Figure 1 (b) is a behavioral item graph construction, Figure 1 (c) are examples of items F and C generated by the meta-path Item-Tag-Item, where the meta-path is generated by the item-tag graph, as shown in Figure 1 (b) and Figure 1 (c); Figure 1(d) is a heterogeneous graph embedding learning for behavior target generalization.
[0022] In the following, first, we explain how to construct the item graph from user historical behaviors, and then introduce the meta-path neighbor based embedding representation learning method and behavior target generalization. Next, we introduce the Transformer layer for node sequence training. Compared with the left-to-right unidirectional architecture in RNN-based models, Transformer adopts a bidirectional attention mechanism for modeling sequences and has shown its success in learning more powerful embedding representations in recommendation tasks.
[0023] I. Meta-path based neighbor
[0024] To achieve not only the accuracy of model recommendation based on user historical behavior, but also dynamic personalized user interest exploration, exploring user interest beyond historical interaction, the present application proposes a meta-path neighbor target generalization based sequence recommendation model for personalized interest exploration in CTR prediction.
[0025] Figure 2 is a heterogeneous graph constructed based on user behavior sequence and item label relationship, wherein, Figure 2 (a) is the node type (Node type); Figure 2 (b) is the sequential recommendation of items based on sequence behavior (Sequential recommendation); Figure 2 (c) is three meta-paths involving item and label relationship; Figure 2 (d) is the neighbor of item and label nodes based on meta-path.
[0026] Specifically, first, based on the user historical behavior sequence, the item and its associated relationship are modeled as an item-item graph, as shown in Figure 2 (b). Then, the relationship between items and labels (each item contains one or more labels) is captured as an item-label graph, as shown in Figure 2 (b). Finally, meta-paths can be constructed to capture the semantics of two objects connected by composite relationships to search for the user's potential interest.
[0027] As shown in Figure 2 (a), the heterogeneous graph contains three types of nodes, including user (user), item (Item) and label (Tag). Figure 2 (b) reveals the task of sequential recommendation, that is, according to the user's historical sequence i1→i2→i3, it is predicted whether i4 should be recommended to the user, where t1, t2, t3 and t4 are labels associated with the item. Figure 2(c) shows three meta-paths that capture different compound relationships between items or tags. The meta-path-based neighbors of item and tag nodes can be found as Figure 2 As shown in (d), this helps to explore user potential interests (e.g., i4) under the assumption that the user is interested in items with the same label.
[0028] 2. Construction of Behavioral Project Map
[0029] This section introduces how to build a behavior project graph from user history sequences. In practical scenarios, it is difficult to utilize all the historical information of users in training. In one embodiment, a specific time window is used, such as truncating the user behavior sequence within an hour. Figure 1 (a). Then, if two items appear consecutively in the sequence, they are connected by an undirected edge. For example, Figure 1 As shown in (b), item D and item A are connected because user u1 clicks on them consecutively. Therefore, the global transitive dependencies between items across all user sequences can be captured, which provide rich semantic information for behavioral target generation. In addition, since each item is associated with multiple labels, such as Figure 1 As shown in (c), we can search its meta-path-based neighbors to generalize the behavior goal. Here, item C is the meta-path neighbor of item B generated by Item-Tag-Item, as shown in Figure 1 (c) Then, user interest exploration is performed by considering item C as a potential target prediction, as shown in Figure 1 (d) shown.
[0030] 3. Unified Heterogeneous Graph Representation
[0031] Based on the user's historical preferences, items and their co-occurrences (e.g., items in a sequence) can be modeled as an item-item graph. Furthermore, since each item contains one or more tags, the relationships between items and tags can be extracted as an item-tag graph. However, in order to fuse two different types of nodes and their relationships, in one embodiment, a message propagation mechanism and a message aggregation mechanism are proposed to fuse these two types of nodes and their relationships during the representation learning process.
[0032] 1) Message propagation mechanism
[0033] Figure 1 There are two types of nodes in , namely items and tags. For each item, the message is sent to the central node (e.g. Figure 1 i in (c) A ) and its neighbors, including direct neighbor i D and i B and the neighbor i based on the meta-path FSince linear transformation has been shown to be effective in encoding the features of structured neighbors, we use this transformation to define the nodes v j to v i Spread of the news:
[0034]
[0035] in Represents the slave node v j Propagate to v i The message dimension is d, M v ∈R d×d is the transformation matrix, represents the relationship type using one-hot encoding (e.g., direct neighbors are encoded using [0,1], and neighbors generated by meta-paths are encoded using [1,0]), f m (·)Relationship type and adjacent node representation vectors As input, and output transformation matrix M v By concatenating vectors and Then a multi-layer perception (MLP) is used to fuse the two vector representations. m The details of (·) are defined as follows:
[0036]
[0037] in Represents a vector concatenation operation.
[0038] 2) Message aggregation mechanism
[0039] After receiving messages propagated from neighboring nodes to the central node, different methods can be used to aggregate the messages, such as the mean-based aggregation method (Mean Aggregator) and the attention-based aggregation method (AttentionAggregator).
[0040] For the mean-based aggregation method, the following method can be used to average the neighbor information of the node:
[0041]
[0042] in is node v i Neighbor set, W∈R d×d Represents the weight matrix that needs to be obtained through training, σ is the activation function, and ReLU can be used.
[0043] In the attention-based aggregation method, for each target node, the attention mechanism is used to learn the importance weights of its neighbors. Given a node pair (vi , v j ), weight coefficient The definition is as follows:
[0044]
[0045] where W∈R d×d is the weight matrix obtained through training, a∈R 2d represents the weight vector. Then, the node v i The representation vector of is obtained by aggregating the messages passed by its neighbors and multiplying them by the weight coefficient, as shown below:
[0046]
[0047] Furthermore, a multi-head attention mechanism can be used to stabilize the learning process of the self-attention mechanism. Specifically, repeat equation (5) K times and concatenate the obtained vectors to express it as:
[0048]
[0049] So far, we have introduced how to aggregate node representations, such as Figure 1 (d) The order of items in the sequence needs to be taken into account before inputting them into the Transformer layer.
[0050] 4. Temporal Information Embedding Layer
[0051] In order to utilize the order information of items in the input sequence, it is necessary to embed the time information into the graph node representation. However, there are shortcomings in the existing technical solutions. For example, the time information in Transformer utilizes a fixed sinusoidal embedding, which limits the expression of node item embedding. Bert4rec introduces a learnable time embedding vector to achieve better performance. However, this method imposes a limit on the maximum time length of the sequence, so it is necessary to truncate the item sequence that is too long. Therefore, in an embodiment of the present invention, by scaling the time difference between items to between (0, N), where N is a set integer, which can be set to 150 in the experiment. Then, the time information is embedded in the matrix P∈R N×d To encode the input representation vector. Specifically, given Perform the following addition calculations:
[0052]
[0053] where p i ∈P is a d-dimensional temporal information embedding vector, whose index i is represented by the item node v i-1 and v i The time difference between them is calculated and obtained after scaling.
[0054] 5. Generalization of Behavioral Goals
[0055] Unlike existing CTR models, one of the main tasks of this invention is to explore the potential interests of users beyond historical interactions in order to improve the performance of the recommendation system. To achieve this task, we first propose to construct a heterogeneous graph to encode user historical interaction information, which is used to build relationships between items and items, and between items and tags. Then, we assume that users may be interested in other items under the same tag. Based on this assumption, for each target prediction during the training process, a potential project target that does not exist in the original sequence is generalized to assist in training. For example, in Figure 1 In (d), item C has not been clicked by user u1, but it has the same tag as item B, i.e., B and C are potential neighbors based on the meta-path Item-Tag-Item. Therefore, when using sequence i D →i A To predict i B When i C This process is referred to as behavioral goal generalization in this paper.
[0056] It should be noted that the method proposed in the present invention has two main differences compared to the current graph session-based methods and heterogeneous graph-based methods: First, the present invention implements a message propagation mechanism and an aggregation step mechanism to fuse the heterogeneous information of the target project and its neighbors to obtain all project node representations. Then, the neighbor projects based on the meta-path are used as click targets for training, thereby realizing personalized interest exploration of users. Second, the present invention adopts a bidirectional attention mechanism to train and obtain the final project node representation. Compared with unidirectional training models (such as SR-GNN), the present invention can learn better representation vectors in recommendation tasks.
[0057] 6. Transformer layer
[0058] like Figure 1 As shown in (d), the representation vectors of all item nodes in the sequence are input into the Transformer layer. The Transformer layer contains two important components: the Multi-Head Self-Attention mechanism and the Position-Wise Feed Forward network, which are described below.
[0059] 1) Multi-head self-attention mechanism
[0060] Using the Matrix To represent a length of n u The project node input sequence of The node representation vector representing item i in layer l Then, by adding H l Projecting to n representation subspaces uses a multi-head self-attention mechanism, which allows the model to focus on information at different positions in the sequence and from different representation subspaces. The formula is as follows:
[0061]
[0062] Where W i Q ∈R d×d / n 、W i K ∈R d×d / n 、W i V ∈R d×d / n and W O ∈R d×d are all projection matrices obtained during training.
[0063] In addition, the Attention function in the above formula (8) is defined as follows:
[0064]
[0065] Where Q, K, and V represent and Used for scaling to avoid excessively large gradients.
[0066] 2) Position feedforward network
[0067] In order to give the model the ability to express nonlinear relationships and make the model pay attention to the interaction between different feature dimensions in the vector, the output of the multi-head self-attention mechanism is multi-headed (H l ) is input to the position feed-forward network layer (FFN). The FFN layer consists of two linear transformations with a ReLU activation function in the middle, as shown below:
[0068] FNN(x)=max(0,ReLU(xW1+b1))W2+b2 (10)
[0069] Where W1∈R d×4d , W2∈R 4d×d , b1∈R 4d , b2∈R d It is a parameter obtained through training, and the max(*) function represents selecting the largest value in the set.
[0070] 7. Optimization Goals
[0071] The present invention aims to predict the possibility of a user clicking on the next item based on the user's previous historical interaction sequence. To this end, the node representation vectors of all items in the target user's historical interaction sequence before item i are input into the Transformer layer, and the final output h u As a representation of the entire sequence, such as Figure 1 (d) In addition, we hope to utilize the statistical properties of the user's long-term historical sequence, for example, taking the labels of the top k items clicked by user u within 30 days as its statistical feature A u , input into MLP to obtain the final statistical feature vector representation Then, h u and The embeddings are concatenated and another MLP is used to fuse the representation vectors. Finally, the prediction score is obtained after the activation function, as shown below:
[0072]
[0073] Where σ is the activation function, Represents vector concatenation operation, =([i]) / (i ...
[0074]
[0075] Where T represents the training batch, is the prediction score of the positive sample (the prediction score of user u clicking the next item i given the historical interaction sequence), is the prediction score of negative samples (here negative samples are defined as item j from other historical interaction sequences in the training batch).
[0076] In order to further verify the effect of the present invention, an experiment was conducted, and the experimental details are as follows.
[0077] 1) Dataset
[0078] A large-scale user web browsing history is collected from the QQ browser homepage as a dataset, including commodity items such as news, novels, and entertainment content.
[0079] Specifically, user data for three days was collected at one-day intervals, and the trained model was put online to evaluate the performance of the recommendation system on the second day. For each day, 8 hours of browsing behavior during the peak user access period was collected. After removing user behaviors that browsed less than 5 items, a total of approximately 710,000 historical sequences were obtained, including approximately 13 million item clicks, 730,000 different item items, and 110,000 tags. For more statistical details, see Table 1. All sequences were divided into training sequences, validation sequences, and test sequences in a ratio of 4:1:5. In general, the dataset has the following characteristics. First, the dataset is large enough, containing millions of click records in both the training and test sets. Second, the test set contains up to a quarter of the number of new items in the training set. Third, the density of the dataset (the average number of items contained in each sequence / the total number of different items) is very sparse. These characteristics of the data pose a great challenge to the performance of the recommendation model.
[0080] Table 1: Statistics of the dataset
[0081]
[0082] 2) Different methods for comparison
[0083] In order to verify the effectiveness of the present invention, several recently proposed methods are used as comparison baselines, including GRU4Rec, a two-layer GRU network, and Bert4Rec.
[0084] GRU4Rec uses a gated recurrent neural network GRU and a ranking-based loss function to optimize the model, which is often used for session-based recommendations.
[0085] Two-layer GRU network uses a two-layer GRU network to model the user's behavior sequence.
[0086] Bert4Rec uses a deep bidirectional Transformer architecture to model user behavior, which achieves high performance in sequential recommendation.
[0087] HGESNN-meanAgg is a mean-based aggregation method of the present invention, which uses the neighbor node information of the average center node for vector learning of the project.
[0088] HGESNN-attAgg is an attention-based aggregation method of the present invention, which uses the attention mechanism to learn the importance weights of neighbor nodes.
[0089] 3) Implementation details
[0090] The present disclosure is implemented using TensorFlow. For all models, the embedding vector dimension is uniformly set to 32. Before training, the model parameters are randomly initialized using a Gaussian distribution, and the model parameters are optimized using mini-batch Adam. The learning rate is set to 1e-3, the batch size is 1024, and the maximum sequence length is set to 50. For both Bert4Rec and the HGESNN of the present disclosure, the number of Transformer layers and the number of multi-head attentions are both set to 4. In addition, in the HGESNN, the number of sampled neighbors for the mean-based aggregation method and the attention-based aggregation method are set to 5 and 15, respectively.
[0091] 4) Evaluation metrics
[0092] Due to limited online resources, online experiments cannot be performed for all compared methods. Therefore, offline experiments are performed to obtain the best-performing baseline method, and the next step of online experiment comparison is performed. The experimental indicators include offline indicators and online indicators, which are set as follows.
[0093] In offline experiments, hit ratio (HR) and mean reciprocal rank (MRR) and other indicators are used to evaluate the performance of different recommendation models. In order to apply these indicators, the widely used leave-one-out method is used for calculation. Specifically, for each sequence in the test set, the last item is taken as the true target, and the items browsed and clicked before the item are taken as input. Since there is only one true item for prediction in each sequence, HR@k is equivalent to recall@k and is proportional to precision@k. In addition, the MRR indicator is also equivalent to mean average precision (MAP). Therefore, in an embodiment, HR@k (k e {5, 10}) and MRR indicators are used for evaluation.
[0094] In online experiments, there are four widely used evaluation metrics: Click Page View (CPV), Exposure Page View (EPV), Click Unique Visitor (CUV), and Exposure Unique Visitor (EUV). Based on these metrics, we can derive commonly used online metrics: Click-Through Rate (CTR), Per Click Capita Consumption (PCC), and Per Exposure Capita Consumption (PEC), expressed as follows:
[0095]
[0096] Exploration Rate (ER): One of the goals of the recommendation model algorithm is to explore user interests through behavioral goal generalization. Therefore, an exploration rate metric is defined here, which calculates the number of content-themed products clicked by users in the past 30 days that have not been clicked in the user's historical sequence.
[0097] For all these offline and online metrics, higher predicted values indicate better algorithmic performance of the model.
[0098] 5) Experimental results and analysis
[0099] Table 2 shows the offline metric evaluation results. Using an industrial dataset, the model predicts the next item a user is likely to click. The highest performance scores are bolded, and the next best scores are underlined. "Improv" indicates the improvement achieved by the proposed method over the comparison method. * indicates a statistical confidence level p-value < 0.05, indicating a significant performance improvement.
[0100] Table 2: Comparison of experimental results
[0101]
[0102] It can be observed in the experiments that in most cases BERT4Rec achieved the second best performance on all datasets. In terms of the HR@10 indicator, BERT4Rec improved the performance of GRU4Rec by 34.98%, 2.35%, and 15.03% on the three datasets respectively, and compared with the two-layer GRU network method, it improved the performance by 23.86%, 32.93%, and 18.12% on the three datasets respectively. The performance improvement may be because GRU4Rec and the two-layer GRU network are both unidirectional models from left to right, while BERT4Rec is a bidirectional model with a Transformer layer. This bidirectional self-attention mechanism can more effectively learn the interactive relationship between items, thereby providing better sequence recommendation effects. These improvements illustrate the effectiveness of the Transformer layer in the model design of this invention. In addition, we also noticed that GRU4Rec can usually achieve better performance than the two-layer GRU network. For example, in Table 2, the performance indicators of the 3rd-day and 5th-day datasets are better. One possible reason is that the two-layer GRU network may overfit during training due to the larger number of layers, resulting in poor results.
[0103] The proposed methods, including HGESNN-meanAgg and HGESNN-attAgg, consistently outperform other comparative methods in all metrics across all datasets. For example, compared to the best-performing comparative method, HGESNN achieves an average improvement of 14.90%, 26.65%, and 14.10% in evaluation metrics such as HR@10, HR@5, and MRR, as shown in Table 2, and significance tests show that the improvement in the model of the present invention is statistically significant. In addition, HGESNN-attAgg generally achieves better performance than HGESNN-meanAgg, which also demonstrates the effectiveness of the attention mechanism.
[0104] To further demonstrate the effects of the present invention, the following is described.
[0105] 1) The Behavioral Target Generalization (BTG) method proposed in this invention improves the model benefits.
[0106] Ablation studies were conducted to verify the improvement effect of BTG in HGESNN. As shown in Table 3, ablation experiments were conducted on two datasets. The results show that after removing the BTG module, the performance of HGESNN in terms of MRR decreases by 12.41%, which proves that the BTG module method proposed in this paper plays a key role in sequential recommendation.
[0107] Table 3: Ablation experiments on behavioral goal generalization
[0108]
[0109] 2) The present invention has good performance on public datasets compared to baselines.
[0110] Experiments are conducted on the Movielens dataset, which is a benchmark dataset commonly used to evaluate the performance of recommendation algorithms. The SR-GNN method is included in the comparison of public datasets. In Table 4, the highest score model performance is indicated in bold, and the present invention compared to the best performing baseline model (underlined part) achieves a performance improvement of about 10% to 28%.
[0111] Table 4: Comparison results of experiments on public dataset MovieLens (ML-20m)
[0112]
[0113] 3) The results of the A / B test experiments conducted online by the present invention.
[0114] The A / B test time for the online web browser was from August 13th to 26th. During the online service, the user behavior data of the past 8 hours was used, the model was updated from the beginning every hour, and the importance sampling strategy was used to truncate the number of neighbors of the nodes to 100. In addition, when encountering commodity items that do not appear in the training set during testing, a randomly generated embedding vector is assigned to them uniformly. As shown in Table 5, the BERT4Rec model was selected as the baseline model online, while the HGESNN-attAgg was used for comparison. It can be observed that the method of the present invention achieves performance improvement in all indicators, for example, it brings 6.28%, 6.82% and 4.77% CTR improvement in content recommendation of news, novels and entertainment, respectively. In addition, the present invention achieves 2.46% improvement in the ER indicator, which indicates that more potential new content of interest to users can be explored by the model.
[0115] Table 5: Results of online A / B test experiments
[0116]
[0117] 4) The main difference between the present invention and BERT4Rec.
[0118] In summary, the present invention differs from BERT4Rec in two key ways. First, through message propagation and aggregation, the present invention fuses heterogeneous information from the target item node and its neighboring nodes to obtain the final target node representation, which is then fed into the Transformer layer for sequential node training. Second, the present invention utilizes a meta-path-based approach to generalize behavioral goals for target nodes, enabling personalized user interest exploration.
[0119] 5) The present invention performs better than existing sequential recommendation models on data sets that lead to highly single recommendation results.
[0120] For example, when recommending short videos, a user might be recommended a short video about "Naruto." This video contains multiple tags, including "ninjutsu," "ninja," and "ramen." Without the method of the present invention, the system might continuously recommend animations featuring action scenes. However, the method proposed in the present invention not only recommends animations featuring action scenes but also discovers food categories related to the "ramen" tag, thus improving the long-term user experience.
[0121] In summary, the present invention explores user interests while considering the relationship between user historical behavior and exploratory projects. It uses a meta-path structure to explicitly model project relationships to explore user interests beyond historical interactions. Furthermore, it incorporates a transformer-based network to embed the user's personalized intent into sequence learning. Furthermore, in addition to using user historical interaction sequences as the basis for recommendations, the present invention also considers the different relationships between projects during training, thereby performing generalized training based on behavioral goals. This means that the neighbors of projects generalized based on meta-paths can be used to improve the performance of the recommendation model.
[0122] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0123] Computer-readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device.Computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device or any suitable combination thereof.More specific examples (non-exhaustive list) of computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove having instructions stored thereon, and any suitable combination thereof.Computer-readable storage medium used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0124] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0125] The computer program instructions for performing the operation of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, Python, and conventional procedural programming languages such as "C" language or similar programming languages. The computer readable program instructions can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), is personalized by utilizing the state information of the computer readable program instructions, and the electronic circuit can execute the computer readable program instructions, thereby realizing various aspects of the present invention.
[0126] Various aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0127] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0128] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0129] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
[0130] While various embodiments of the present invention have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A sequence recommendation method based on meta-path neighborhood target generalization, comprising the following steps: Based on the user's historical behavior sequence, the items and their co-occurrences are modeled as an item-item graph. The item-tag graph is constructed based on the correspondence between each item and the tag. Meta-paths are constructed to capture different composite relationships between items or tags, and the meta-path-based neighbors of item nodes and tag nodes are found. Heterogeneous graphs are used to encode user historical interaction information and build relationships between items and items, and between items and tags. Message propagation and message aggregation mechanisms are then used to integrate different types of nodes and their relationships. Embedding learning training is performed on the heterogeneous graph to obtain a trained sequence recommendation model. During the training process, for each target prediction, a potential item target that does not exist in the original behavior sequence is generalized for auxiliary training, and a vector representation of the item node is input into a conversion layer, where the potential item target is obtained based on the neighbors of the meta-path; Among them, the optimization goal of training is: The node representation vectors of all items in the historical interaction sequence of the target user before item i are input into the Transformer layer, and the final output h u as a representation of the entire sequence of behavior; The labels of the first k items clicked by user u within the set time period are used as its statistical features A u , input the first multi-layer perceptron MLP to obtain the statistical feature vector representation h u and The embedding is concatenated and the second multi-layer perceptron MLP is used to fuse the representation vectors. After the activation function, the prediction score is obtained, which is expressed as: Where σ is the activation function, Represents vector concatenation operation, It indicates the possibility of predicting that user u may click on item i; The message propagation mechanism is set as follows: For each item, the message is propagated between the central node and its neighbors, including direct neighbors and neighbors based on meta-paths, using a linear transformation to define the nodes from v j to v i The message propagation is expressed as: in Represents the slave node v j Propagate to v i The message dimension is d, M v ∈R d×d is the transformation matrix, Indicates the relationship type using one-hot encoding, f m (·)Relationship type and adjacent node representation vectors As input, and output transformation matrix M v , use multi-layer perceptron MLP to fuse the splicing vectors and hv j ; The message aggregation mechanism is based on attention aggregation, including: For each target node, the self-attention mechanism is used to learn the importance weights of its neighbors. Given a node pair (v i , v j ), weight coefficient Defined as: Node v i The representation vector of is obtained by aggregating the messages passed by its neighbors and multiplying them by the weight coefficient, which is expressed as: The multi-head attention mechanism is used to stabilize the learning process of the self-attention mechanism, which can be expressed as: Where K is the number of self-attention mechanisms, W∈R d×d is the weight matrix obtained through training, a∈R 2d represents the weight vector, d is the dimension, Represents the slave node v j Propagate to v i news; The step of embedding time information into the heterogeneous graph node representation includes: Scale the time difference between items to between (0, N), where N is a set integer; Use time information embedding matrix P∈R N×d To encode the input representation vector, given Perform the following addition calculations: where p i ∈P is a d-dimensional temporal information embedding vector, whose index i is represented by the item node v i-1 and v i The time difference between them is calculated and scaled to obtain, is node v i The representation vector of .
2. The method according to claim 1, characterized in that The conversion layer includes a multi-head attention mechanism and a position feedforward network. The multi-head attention mechanism is expressed as: Multi-Head(H l )=Concat(head1,...,head n )W O , in, and W O ∈R d×d is the projection matrix obtained through training, d is the dimension, Q, K, and V represent and For scaling, matrix Represents a length of n u The item node input sequence, The node representation vector representing item i in layer l By adding H l Projecting to n representation subspaces to use multi-head self-attention mechanism; The position feedforward network is expressed as: FNN(x)=max(0, ReLU(xW1+b1))W2+b2 in, is a parameter obtained through training, the max(*) function represents the maximum value in the set, and the position feedforward network layer uses the output of the multi-head self-attention mechanism Multi-Head (H l ) as input.
3. The method according to any one of claims 1 to 2, characterized in that Also includes: Based on the historical interaction sequence of the target user, the trained sequence recommendation model is used to predict the possibility of the user clicking on the next item.
4. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
5. A computer device comprising a memory and a processor, wherein a computer program capable of being executed on the processor is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Collaborative filtering recommendation algorithm based on graph convolution attention mechanism
CN112905900A