Metalearning recommendation algorithm based on construction of user historical interaction information

By identifying and fusing vector representations of similar users, and adjusting model parameters using the MAMAL meta-learning model, the problems of sparse user interaction and cold start in the recommendation system are solved, achieving better user feature extraction and recommendation effects.

CN119537678APending Publication Date: 2025-02-28BEIJING TECH & BUSINESS UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411359076.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

There is a problem of sparse user interaction in the recommendation system, which makes it difficult to effectively capture user preferences, especially during the user's cold start stage.

Method used

By constructing user historical interaction information, identifying similar users and fusing their vector representations, enriching the target user vector. The meta-learning model based on MAMAL is adopted to adjust the model parameters to adapt to multi-tasks and single-tasks, and solve the problems of user cold start and data sparseness.

Benefits of technology

It effectively alleviates the sparseness of user vectors, improves the effect of user feature extraction and preference relationship learning, and significantly improves user cold start problems and recommendation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537678A_ABST
    Figure CN119537678A_ABST
Patent Text Reader

Abstract

The invention discloses a meta-learning recommendation algorithm based on construction of user historical interaction information, and the algorithm comprises the steps: recognizing a plurality of similar users according to the attributes of a user and the user interaction information, carrying out the feature fusion of the plurality of similar users and the user, and enhancing the feature representation of the user; the user codes and the item codes are aggregated, the relation between user features and items is learned through N layers of full-connection layers according to the aggregated new user-item codes, and the user features and preferences are mined; in addition, the algorithm adopts a meta-learning framework to solve the problem of poor recommendation effect under the condition of sparse interaction data of new users and users; finally, experimental results on a public data set MovieLens-1m and an intelligent joint recruitment data set prove that accurate recommendation can be provided for new users and users who are not registered for a long time, and the cold start problem in recommendation is effectively relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of the intersection of meta-learning and recommendation systems, and in particular to a meta-learning recommendation algorithm based on building user historical interaction information. Background Art

[0002] In recommendation systems, there is often a problem that user interactions are insufficient and it is difficult to capture user preferences. This is the cold start problem in recommendation systems. Generally speaking, it is impossible for a user to interact with all items. Therefore, in the user-item interaction table, the interaction between users and items is very sparse, and the use of traditional matrix decomposition techniques often does not work well. In recent years, meta-learning has gradually been applied and developed in many fields, among which good results have been achieved in the recommendation field. The core of meta-learning is to learn how to learn. The goal of meta-learning is to understand how learning itself can be flexibly adjusted according to the field or task being studied. The meta-learner can fine-tune the pre-trained model to adapt to tasks that only use a few examples belonging to the task. Meta-learning can be divided into three types: metric-based meta-learning, memory-based meta-learning, and optimization-based meta-learning. The core idea of ​​metric-based meta-learning is similar to the nearest neighbor algorithm and kernel density estimation. The probability predicted by this type of method on a set of known labels is the weighted sum of the sample labels in the support set. The weight is calculated by the kernel function, which represents the similarity between two data samples. Memory-based meta-learning can store the characteristics of the task, guide the model to initialize personalized parameters and predict user preferences. However, these two methods cannot provide personalized models for users. Optimization-based meta-learning can provide personalized recommendation models by reflecting the item consumption of each user.

[0003] Although meta-learning can continuously learn and update the parameters of the model through a more autonomous learning method, and only slight adjustments are needed to achieve good recommendation results, due to the sparsity of data, user preferences are often not well captured in the initial user feature mapping. Even with strong learning ability, it is difficult to capture the relationship between user features and preferences. Therefore, in the initialization of user vectors, if the user vector representation can be enriched and filled, it is very important for the subsequent extraction of user features and the learning of user feature relationships.

[0004] Therefore, the present invention provides a meta-learning recommendation algorithm based on constructing user historical interaction information, which fuses the vector representations of similar users and enriches the target user vector. All tasks are fully learned through the meta-learning training mode of adjusting the current model parameters of a single task through inner-layer learning and adjusting the global model parameters of multiple tasks through outer-layer learning. The trained model can produce good recommendation effects after just a few interactions. Summary of the invention

[0005] The purpose of the present invention is to solve the data sparsity and user cold start problems in the above-mentioned recommendation. To this end, a meta-learning recommendation algorithm based on building user historical interaction information is proposed. The vector representations of similar users are fused with the target vector to alleviate the sparsity of the target user vector. Meta-learning based on MAMAL is used to alleviate the user's cold start problem, including the following steps:

[0006] S1: Prepare the recommended data set, perform preprocessing operations on the data set, and convert the data format into an algorithm-supported format;

[0007] S2: intercept the interactions between users and items in the dataset;

[0008] S3: Identify similar users based on their own attributes and interaction information, and aggregate multiple user attributes to generate the final user representation;

[0009] S4: Perform dimensionality reduction operations on user vectors and item vectors;

[0010] S5: Build a user preference estimator to estimate user preferences;

[0011] S6: Use the MAML-based meta-learning model to train the aggregated user and item representations to obtain a prediction model; pass the data in the query set through the prediction model to finally predict the user's rating of the item.

[0012] The step S1 comprises:

[0013] S11, converting the timestamp into a date and time format;

[0014] S12, encoding each feature into a One-Hot format according to the feature information of the user and the project;

[0015] S13. Concatenate the one-dimensional tensors generated by each feature to generate a new tensor, namely the user representation u i And project representation j ;

[0016] S14, randomly disrupting the order of items that the user has interacted with;

[0017] S15. Divide the data set into 8:2 according to the time sequence, randomly select 80% of the users as existing users, and the rest as new users;

[0018] The step S2 includes: taking the first ten interaction items as a support set and the last ten interaction items as a query set;

[0019] The step S3 comprises:

[0020] S31. Feature vector for target user and other users Calculate similarity using Jaccard similarity coefficient The numerator represents the number of elements that are 1 at the corresponding positions of the two eigenvectors, indicating the size of the intersection. The denominator represents the sum of the total dimensions of any one of the two eigenvectors equal to 1, encapsulating their union. The calculation formula is as follows:

[0021]

[0022] S32: Evaluate the similarity S(u) between users based on the difference in their ratings of the same item. i ,u j ), through user u i and user u j Ratings for the same items il and r jl The absolute value of the difference is accumulated and summed, and the calculation formula is as follows:

[0023]

[0024] S33, based on the two similarity evaluation indicators obtained in step S31 and step S32, further use parameters To control the effect of two factors on u i and u j The similarity of the target user is affected, and the final target user similarity E is obtained. sim (u i ,u j ), the calculation formula is as follows:

[0025]

[0026] S34, after obtaining the user similarity score, the features of similar users are merged with the features of the target user by weighted average to generate the final user vector representation U i , weight Determined based on similarity, the calculation formula is as follows:

[0027]

[0028] The step S4 comprises:

[0029] S41. Define the embedding layer, set the total number of categories and embedding dimension, and set the total number of categories R for features of different categories C and embedding dimension R d , mapping the category index into a low-dimensional space: R C →R d

[0030] S42, initialize the score embedding layer, initialize an embedding matrix, E rate ∈R d , and randomly assign each rating an embedding vector: E rate = {r 1 , r 2 , ..., r R}

[0031] S43. Pass the category index into the embedding layer and find the corresponding embedding vector: e i =f(i)

[0032] S44, adjust the embedding vector through the training process to better represent the category characteristics;

[0033] S45. Initialize the linear layer of features and map their one-hot encodings to embedding vectors: e x =W x +b

[0034] Among them, W is the weight matrix, b is the bias term, and e x is the output embedding vector.

[0035] The step S5 comprises:

[0036] S51. Concatenate the user feature vector and the item feature vector to obtain a new user-item vector:

[0037] x 0 =[U i , I j ]

[0038] S52, according to the weight matrix W of the first fully connected layer set n and the bias vector b n , using ReLU as the activation function a, calculate the new user-item vector representation, the calculation formula is as follows:

[0039]

[0040] S53, the user-item vector representation x calculated in step S52 through the first fully connected layer 1 , passing through the next fully connected layer in turn, the user-item vector x calculated after the Nth fully connected layer can be calculated n , x n Input to the final output layer to get the final user's rating of the project The calculation formula is as follows:

[0041]

[0042] where σ and b 0 is the weight matrix and bias vector of the output layer.

[0043] The step S6 comprises:

[0044] S61. In the outer loop, the model trained for the nth task Get the loss value l n , accumulate the loss values ​​of the first n tasks to get the global loss The calculation formula is as follows:

[0045]

[0046] Then, the gradient is calculated through back propagation to obtain the optimized global parameters The calculation formula is as follows:

[0047]

[0048] Where ω represents the learning rate.

[0049] S62, after the inner and outer loops are completed, the initialization parameters Is the global optimal, put other items into the model In this way, a score can be generated for each item, and finally the final recommendation list R is obtained according to the ranking of the scores. l , the calculation formula is as follows:

[0050]

[0051] The beneficial effects of the present invention are as follows: the present invention identifies similar users through the inherent attributes and interactive attributes of the users themselves, and fuses the vector representations of similar users and target users. This similarity recognition and fusion method enriches the user representation and effectively alleviates the problem of poor user feature extraction caused by too sparse user vectors. The present invention introduces meta-learning based on the designed user preference estimator, further alleviating the user cold start problem and producing good recommendation effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a framework diagram of the meta-learning recommendation algorithm based on constructing user historical interaction information in the present invention;

[0053] Figure 2 A user preference estimator based on user similarity fusion according to the present invention;

[0054] Figure 3 It is a schematic diagram of low-level feature processing for users and projects of the present invention;

[0055] Figure 4 This is a comparison chart of the impact of user attributes and interactive attributes on recommendation effects in the present invention; DETAILED DESCRIPTION

[0056] The present invention adopts the following technical solutions to achieve this: a basic framework of a meta-learning recommendation algorithm based on building user historical interaction information is as follows: Figure 1 As shown, the steps are as follows:

[0057] Step 1: Prepare the recommendation dataset MovieLens-1M and Zhilian job recommendation dataset, preprocess the dataset, and convert the data format into a format supported by the algorithm;

[0058] Step 2: Intercept the interactions between users and movies in the dataset;

[0059] Step 3: Identify similar users based on their own attributes and interaction information, and aggregate multiple user attributes to generate the final user representation;

[0060] Step 4: Perform dimensionality reduction operations on user vectors and item vector representations;

[0061] Step 5: Use the user preference estimator MELU to estimate the user's preference;

[0062] Step 6: Use the MAML-based meta-learning model to train the aggregated user and item representations to obtain a prediction model; pass the data in the query set through the prediction model to ultimately predict the user's rating of the item;

[0063] Step 7: Evaluate the performance of this method based on the commonly used evaluation indicators of recommendation algorithms, NDCG@5 and MAE.

[0064] The decomposition steps of step 1 are:

[0065] Step 1.1: Based on the completeness of the data, 6040 users and 3881 movies were filtered out from the MovieLens dataset, and 4257 users and 194776 jobs were filtered out from the job recommendation dataset;

[0066] Step 1.2: Convert the timestamp in the .data file to date and time format;

[0067] Step 1.3: Use the torch method to generate the corresponding number of tensors based on the features of users and items;

[0068] Step 1.4: Concatenate the user and item tensors to generate the user representation u i And project representation j ;

[0069] Step 1.5: Randomly shuffle the order of items that the user has interacted with;

[0070] Step 1.6: Take the first ten interaction items as the support set and the last ten interaction items as the query set.

[0071] The decomposition steps of step 2 are:

[0072] Step 2.1: Divide the data set into 8:2 parts according to the time sequence;

[0073] Step 2.2: Randomly select 80% of the users as existing users and the rest as new users.

[0074] The decomposition steps of step 3 are:

[0075] Step 3.1: Feature vector of target user and the feature vectors of other users Calculate similarity using Jaccard similarity coefficient The calculation formula is as follows:

[0076]

[0077] The numerator represents the number of elements in the two eigenvectors that are 1 at the corresponding position, indicating the size of the intersection. The denominator represents the sum of the total dimensions of any one of the two eigenvectors that is equal to 1, encapsulating their union.

[0078] Step 3.2: Evaluate the similarity S(u i ,u j ), through user u i and user u j Ratings for the same items il and r jl The absolute value of the difference is accumulated and summed, and the calculation formula is as follows:

[0079]

[0080] Among them, ABS represents user u i and user u j Ratings for the same items il and r jl The absolute difference.

[0081] Step 3.3: Based on the two similarity evaluation indicators obtained in step 3.1 and step 3.2, further use parameters To control the effect of two factors on u i and u j The similarity of the target user is affected, and the final target user similarity E is obtained. sim (u i,u j ), the calculation formula is as follows:

[0082]

[0083] Step 3.4: After obtaining the user similarity score, the features of similar users are fused with the features of the target user by weighted average to generate the final user vector representation U i , the weight is determined based on the similarity, and the calculation formula is as follows:

[0084]

[0085] in It represents the ratio of the similarity value of the i-th user to the sum of similarities of all similar users. The calculation formula is as follows:

[0086]

[0087] The decomposition steps of step 4 are:

[0088] Step 4.1: Define the embedding layer, set the total number of categories and embedding dimension, and set the total number of categories R for features of different categories C and embedding dimension R d , mapping the category index into a low-dimensional space: R C →R d

[0089] Step 4.2: Initialize the score embedding layer and initialize an embedding moment, E rate ∈R d , and randomly assign each rating an embedding vector: E rate = {r 1 , r 2 , ..., r R}

[0090] Step 4.3: Adjust the embedding vector through the training process to better represent the category characteristics:

[0091] in is the model output after using the embedded vector, and y is the true label.

[0092] Step 4.4: Initialize the linear layer of features and map their one-hot encodings to embedding vectors: e x =W x +b

[0093] Among them, W is the weight matrix, b is the bias term, and ex is the output embedding vector.

[0094] The decomposition steps of step 5 are:

[0095] Step 5.1: Concatenate the user feature vector and the item feature vector to obtain a new user-item vector:

[0096] x 0 =[U i , I j ]

[0097] Step 5.2: According to the weight matrix W of the first fully connected layer n and the bias vector b n , using ReLU as the activation function a, calculate the new user-item vector representation, the calculation formula is as follows:

[0098]

[0099] Step 5.3: The user-item vector representation x calculated in step S52 through the first fully connected layer 1 , through the next fully connected layer in turn, the user-item vector x calculated after the Nth fully connected layer can be calculated N :

[0100]

[0101] Step 5.4: Set x n Input to the final output layer to get the final user's rating of the project The calculation formula is as follows:

[0102]

[0103] where σ and b 0 is the weight matrix and bias vector of the output layer.

[0104] The steps of step 6 can be divided into:

[0105] Step 6.1: In the outer loop, train the model for the nth task Get the loss value l n , the calculation formula is as follows:

[0106]

[0107] Among them, H i represents the set of items interacted by user i, y ij is the actual rating given to the item by the user.

[0108] Step 6.2: Accumulate the loss values ​​of the first n tasks to get the global loss The calculation formula is as follows:

[0109]

[0110] Then, the gradient is calculated through back propagation to obtain the optimized global parameters The calculation formula is as follows:

[0111]

[0112] Where ω represents the learning rate.

[0113] Step 6.3: After the inner and outer loops are completed, the initialization parameters Is the global optimal, put other items into the model In this way, a score can be generated for each item, and finally the final recommendation list R is obtained according to the ranking of the scores. l , the calculation formula is as follows:

[0114]

[0115] Step 7 can be divided into the following steps:

[0116] Step 7.1: The performance of this method is evaluated based on the two common indicators of NDCG@5 and MAE commonly used in recommendation algorithms, and compared with advanced models and methods. Our method shows the best recommendation performance, as shown in the following table:

[0117]

[0118] Table 1 Comparison table of recommended algorithm models

[0119] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the specific implementation modes of the present invention can still be modified or replaced by equivalents, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A meta-learning recommendation algorithm based on building user historical interaction information, characterized by The following steps are involved: S1: Prepare the recommended data set, perform preprocessing operations on the data set, and convert the data format into an algorithm-supported format; S2: intercept the interactions between users and items in the dataset; S3: Identify similar users based on their own attributes and interaction information, and aggregate multiple user attributes to generate the final user representation; S4: Perform dimensionality reduction operations on user vectors and item vectors; S5: Build a user preference estimator to estimate user preferences; S6: Use the MAML-based meta-learning model to train the aggregated user and item representations to obtain a prediction model; pass the data in the query set through the prediction model to finally predict the user's rating of the item.

2. According to claim 1, a meta-learning recommendation algorithm based on constructing user historical interaction information is characterized in that: Step S1 also includes the following steps: S11: Convert the timestamp to date and time format; S12: Divide the data set into 8:2 parts according to the time sequence, randomly select 80% of the users as existing users, and the rest as new users; S13: Encode the feature information of the user and the project into a One-Hot format, and then concatenate the one-dimensional tensors generated by each feature to generate a new tensor, namely the user representation u i And project representation j .

3. The meta-learning recommendation algorithm based on constructing user historical interaction information according to claim 1 is characterized by: Step S2 also includes the following steps: taking the first ten interaction items as a support set and the last ten interaction items as a query set.

4. According to claim 1, a meta-learning recommendation algorithm based on constructing user historical interaction information is characterized in that: Step S3 also includes the following steps: S31: Feature vector for target user and the feature vectors of other users Calculate similarity using Jaccard similarity coefficient The numerator represents the number of elements that are 1 at the corresponding positions of the two eigenvectors, indicating the size of the intersection. The denominator represents the sum of the total dimensions of any one of the two eigenvectors equal to 1, encapsulating their union. The calculation formula is as follows: S32: Evaluate the similarity S(u) between users based on the difference in their ratings for the same item. i ,u j ), through user u i and user u j Ratings for the same items il and r jl The absolute value of the difference is accumulated and summed, and the calculation formula is as follows: S33: Based on the two similarity evaluation indicators obtained in step S31 and step S32, further use parameters To control the effect of two factors on u i and u j The similarity of the final user is E sim (u i ,u j ), the calculation formula is as follows: S34: After obtaining the user similarity score, the features of similar users are fused with the features of the target user by weighted average to generate the final user vector representation U i , weight Determined based on similarity, the calculation formula is as follows: 。 5. According to claim 1, a meta-learning recommendation algorithm based on constructing user historical interaction information is characterized in that: Step S4 also includes the following steps: S41. Define the embedding layer, set the total number of categories and embedding dimension, and set the total number of categories R for features of different categories C and embedding dimension R d , mapping the category index into a low-dimensional space: R C →R d S42, initialize the score embedding layer, initialize an embedding matrix, E rate ∈R d , and randomly assign each rating an embedding vector: E rate ={r1,r2,...,r R} S43. Pass the category index into the embedding layer and find the corresponding embedding vector: have been i =f(i) S44, training and adjusting the embedding vector to better represent the category features; S45. Initialize the linear layer of features and map their one-hot encodings to embedding vectors: have been x =W x +b Among them, W is the weight matrix, b is the bias term, and e x is the output embedding vector.

6. According to claim 1, a meta-learning recommendation algorithm based on constructing user historical interaction information is characterized in that: Step S5 also includes the following steps: S51: Concatenate the user feature vector and the item feature vector to obtain a new user-item vector: x0=[U i ,I j ] S52: According to the weight matrix W of the first fully connected layer set n and the bias vector b n , using ReLU as the activation function a, calculate the new user-item vector representation, the calculation formula is as follows: S53. The user-item vector x calculated after the Nth fully connected layer can be calculated by the above formula n , x n Input to the final output layer to get the final user's rating of the project. The calculation formula is as follows: Where σ and b0 are the weight matrix and bias vector of the output layer.

7. According to claim 1, a meta-learning recommendation algorithm based on constructing user historical interaction information is characterized in that: Step S6 also includes the following steps: S61: In the inner loop of meta-learning, the model quickly adapts to the specific task through a small number of gradient updates, which is very important for the initialization parameters. For learning, for the nth task, the loss value l is obtained n , the learned model is expressed as S62: In the outer loop, the model trained for the nth task Get the loss value l n , accumulate the loss values ​​of the first n tasks to get the global loss The calculation formula is as follows: S63: Then calculate the gradient through back propagation to obtain the optimized global parameters The calculation formula is as follows: Where ω represents the learning rate; S63, after the inner loop and the outer loop are completed, the initialization parameters at this time Is the global optimal, put other items into the model In this way, a score can be generated for each item, and finally the final recommendation list R is obtained according to the ranking of the scores. l , the calculation formula is as follows:

Citation Information

Cited By

  • Interaction control method and system based on smart home equipment

    CN120370731A