A meta-learning based responsive recommendation method, system and device
By employing a meta-learning-based responsive recommendation method, and utilizing heterogeneous information networks and ID embedding representation generators, initial embedding representations are generated for new users and new products. This addresses the issues of changing interests among existing users and initial responses to new products, thereby improving the accuracy of the recommendation system and user satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2026-03-03
AI Technical Summary
Existing recommendation systems are unable to capture changes in the interests of existing users and the initial responses of new users and new products in a timely and effective manner, resulting in low accuracy of product recommendations and low user satisfaction.
A meta-learning-based responsive recommendation method is adopted. By constructing a meta-learner and an ID embedding representation generator of a heterogeneous information network, the method uses a neural network to take the attribute information of users and products as input to generate initial embedding representations for new users and new products, thus solving the problem of changing interests of old users and initial response to new products.
It improves the accuracy of product recommendations, enhances user satisfaction, and can perceive recent changes in user interests through a small amount of online data while retaining historical personalized information about users and products.
Smart Images

Figure CN115409579B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of personalized recommendation, specifically relating to a responsive recommendation method, system, and device based on meta-learning. Background Technology
[0002] Recommendation systems, designed to help users find things they're interested in, are being applied to an increasing number of internet services. The recommendation task can typically be formalized as a rating prediction task, that is, predicting a user's rating for candidate items. A good recommendation system can respond promptly to changes in the interests of existing users based on limited recent interaction information, and can also quickly capture the interests of new users to better meet their needs. Collaborative filtering (CF) analyzes historical interaction records between users and items (e.g., rating data) to mine personalized information about users and items (e.g., user preferences, item quality), and then provides accurate personalized recommendations. However, it suffers from limitations such as the inability to effectively and promptly capture changes in the interests of existing users and the initial responses of new users and newly listed items.
[0003] However, existing recommendation methods have problems such as failing to capture changes in the interests of existing users and the initial responses of new users and newly listed products in a timely and effective manner, resulting in low accuracy of product recommendations and low user satisfaction.
[0004] Therefore, how to address the responsiveness issues of changing interests among existing users and the initial response issues of new users and new products, improve the accuracy of product recommendation methods, and enhance user satisfaction are urgent problems to be solved in this field. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a responsive recommendation method, system, and device based on meta-learning. This invention's responsive recommendation method based on meta-learning introduces an optimization-based meta-learning approach and an introduced ID embedding representation generator. This generator uses a neural network to take user and product attribute information as input to generate better initial embedding representations for new users and products. This fundamentally solves the existing problems of responsiveness to changes in the interests of existing users and the initial response problems for new users and new products, which lead to low recommendation accuracy and low user satisfaction.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A responsive recommendation method based on meta-learning includes the following steps:
[0008] S1. Construct a meta-learning-based responsive recommendation model; the meta-learning-based responsive recommendation model includes a meta-learner of a heterogeneous information network and an ID embedding representation generator, wherein the meta-learner of the heterogeneous information network includes a user embedding representation module, a product embedding representation module, an embedding representation connection layer, and a rating predictor.
[0009] The user embedding representation module denotes the user's embedding representation as: The calculation method is as follows:
[0010]
[0011] in, For the basic embedding representation of user u, from the embedding matrix via user ID Find it in the middle; f U (·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of user u in multi-hot form. Mapping to In the same space, the user's attribute embedding representation is obtained; the attribute vector includes the user's age and gender. Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; α and β are respectively and The coefficients determine their... The importance of the middle;
[0012] Among them, semantic embedding representation The calculation can be expressed as:
[0013]
[0014] Where, ω u It is h u The weights, sub-embeddings represent h u This can be obtained by aggregating the embedding representations of its neighboring nodes:
[0015]
[0016] Where g(·) is a mean aggregation function, It is the set of sampled neighbors of user u in the heterogeneous information network G;
[0017] The product embedding representation module, for product i, obtains the product embedding representation through the same network structure as the user. The calculation method is as follows:
[0018]
[0019] in, For the basic embedding representation of product i, the product ID is obtained from the embedding matrix. Find it in the middle; f I (·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of item i in multi-hot form. Mapping to In the same space, the attribute embedding representation of the product is obtained; the attribute vector includes product price and category; W i I Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; λ and θ are respectively and The coefficients determine their... The importance of the middle;
[0020] Among them, semantic embedding representation The calculation can be expressed as:
[0021]
[0022] Where, ω i It is h i The weights, sub-embeddings represent h i This can be obtained by aggregating the embedding representations of its neighboring nodes:
[0023]
[0024] Where g(·) is a mean aggregation function, It is product i in heterogeneous information network G I The sampled neighbor set in;
[0025] The embedding representation connection layer concatenates the user embedding representation obtained by the user embedding representation module and the product embedding representation obtained by the product embedding representation module to obtain the final embedding representation;
[0026] The rating predictor takes the final embedded representation as input and generates a user's rating for the product. Specifically, the rating predictor uses an MLP to model the relationship between the user and product embedded representations, and generates the predicted rating for user u for product i. The calculation is as follows:
[0027]
[0028] Where M(·) represents a multilayer perceptron, This represents a vector concatenation operation;
[0029] The ID embedding representation generator uses a neural network to represent the attributes of a new user u or a new item i. or As input information, the output ID embedding representation is used; this process can be formalized as follows:
[0030]
[0031]
[0032]
[0033]
[0034] in, and These are the initial embedding representations for users and products, respectively. and These are sub-embedded representations for users and products, respectively. g U (·) and g I (·) represent the corresponding ID embedding representation generators, which is a multilayer perceptron;
[0035] S2. Using the acquired data, train the meta-learning-based responsive recommendation model to obtain the trained meta-learning-based responsive recommendation model and the model optimization parameters κ1, κ2, κ3.
[0036] S21. Obtain historical user-product rating data for all users. R = {(u,i,r} u,i )}, divide R into multiple subsets R1, R2, ..., R according to users. m And initialize the model parameters;
[0037] S22. In each training cycle, the user set R is divided into multiple batches = {B1, B2, ...} for training. u Randomly divided into support sets and query set And guarantee Where R u This represents user u's historical rating data for products;
[0038] S23, Construction Task in and These correspond to the support set and query set in meta-learning, respectively. and Let u and i represent the relevant information for user u and product i, respectively, as follows:
[0039]
[0040]
[0041] Where u and i represent the user and product IDs, respectively. and Let u and i represent the attribute vectors of user u and product i, respectively. and For user u in multi-layer network G U Product i in multi-layer network G I The sampled neighbor set in:
[0042]
[0043]
[0044] S24. Based on the support set in corresponding meta-learning The meta-learning-based responsive recommendation model is trained using an inner loop meta-learning method, and the parameters of the rating predictor are locally updated.
[0045] Local update, specifically the steps are: applying the global prior parameter κ2 to a task-specific T u Initialize the parameters, and then... Calculate loss
[0046]
[0047] Finally, update κ to obtain task-specific T. u The parameter κ 2,u :
[0048]
[0049] Where α represents the local update step size, Represents the gradient;
[0050] S25. Based on the query set in the corresponding meta-learning The meta-learning-based responsive recommendation model is trained by outer loop meta-learning, and the parameters of the meta-learner of the heterogeneous information network are globally updated to obtain the trained meta-learning-based responsive recommendation model.
[0051] A global update, including the following steps:
[0052] First, for task T u In step S24, κ is obtained 2,u Then, in the query set Based on the user embedding representation module, the product embedding representation module, the embedding representation connection layer, and the rating predictor, the loss is calculated. Reflects the impact of in-task updates on T u The adaptive effect, i.e., the effect of prior knowledge κ2 on T u Adaptability;
[0053] Secondly, to generalize κ2's ability to adapt to tasks, global updates jointly optimize κ2, κ1, and κ2 across the losses of multiple tasks. The update process for κ2 is as follows:
[0054]
[0055] Where B represents a batch of users sampled, β represents the step size of the global update, and κ1 represents the parameters of the embedding representation module;
[0056] Finally, the local update in step S24 and the global update in step S25 are repeated until convergence, and the optimized parameters κ1 and κ2 are obtained.
[0057] S26. Train the ID embedding representation generator.
[0058] The parameters of the ID embedding representation generator IDEG are denoted as κ3. During the IDEG training process, the optimized κ1 and κ2 obtained in step S25 are frozen, and only κ3 is trained. The ID embedding representation generator is a multilayer perceptron.
[0059] The ID embedding representation generator is trained to obtain optimized parameters κ3. The specific steps include:
[0060] The system's historical rating data R, users, and product sampling neighbors are used. User and product attribute vectors x U x I The local update learning rate η1, the global update learning rate η3, the user and product embedding module parameters κ1, and the rating predictor parameters κ2 are input into the ID embedding representation generator for training, and the optimized parameters κ3 of the ID embedding representation generator are output.
[0061] S3. Obtain the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtain the target recommended product, and recommend the target recommended product to the user;
[0062] The trained meta-learning-based responsive recommendation model includes a user embedding representation module combined with an ID embedding representation generator, a product embedding representation module combined with an ID embedding representation generator, and a rating predictor. The user embedding representation module combined with the ID embedding representation generator generates user embedding representations for both new and returning users. If user u is a returning user, then its corresponding ID embedding representation... and From respectively and Φ U Find it in the middle, otherwise through and g U (·) is obtained by transforming the attribute embedding representation, where and g U (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. For user u related input information, and Φ U The embedding matrices P are the base embedding representation and the sub-embedding representation, respectively. * ∈P U ;
[0063] The product embedding representation module, which combines the ID embedding representation generator, generates product embedding representations for both new and old products; if product i is an old product, then its corresponding ID embedding representation... and From respectively and Φ I Find it in the middle, otherwise through and g I (·) is obtained by transforming the attribute embedding representation, where and g I (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. Input information related to product i and Φ I These are the embedding matrices for the basic embedding representation and the sub-embedding representation, respectively;
[0064] Step S3 specifically includes:
[0065] S31. For the user u to be recommended, construct a support set based on their most recent k product rating data. And construct a query set of the products that need to be predicted.
[0066] S32, For support sets Based on the inner loop learning training in step S24, L local updates are performed to obtain the parameters κ adapted to the task. 2,u ;
[0067] S33, For query set First, based on the user embedding representation module and the product embedding representation module combined with the ID embedding representation generator, corresponding user embedding representations and product embedding representations are generated. Then, the final embedding representation is generated using the embedding representation connection layer and input into the rating predictor. Finally, the obtained κ... 2,u And according to the following formula, the query set The system calculates user ratings for the products in the query set. The predicted rating values for products in the chart, and the process of rating prediction can be expressed as:
[0068]
[0069] Where M represents a multilayer perceptron, and These represent the relevant input information for the user and the product, respectively. κ represents the network parameters, including κ1, κ2, and κ3. 2,u ,κ3; where, κ is used to generate embedded representations for users and items. and And calculate the score, that is and equivalence.
[0070] S34. Based on the predicted rating, obtain the target recommended product and recommend the target recommended product to the user.
[0071] Furthermore, in or The loss function on can be expressed as:
[0072]
[0073] Among them, D u express or and equivalence.
[0074] Furthermore, the ID embedding refers to the fact that during the model training process, each user and product corresponds to a unique integer identifier ID, and the ID needs to be encoded into a vector form before it can be input into the machine learning model.
[0075] A meta-learning-based responsive recommendation system, characterized in that the recommendation system executes the meta-learning-based responsive recommendation method, comprising: a recommendation model construction module, a recommendation model training module, and a product recommendation module;
[0076] The recommendation model building module constructs a responsive recommendation model based on meta-learning.
[0077] The recommendation model training module uses the acquired data to train the meta-learning-based responsive recommendation model, thereby obtaining the trained meta-learning-based responsive recommendation model and model optimization parameters.
[0078] The product recommendation module obtains the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtains the target recommended product, and recommends the target recommended product to the user.
[0079] The present invention also proposes a computer device, the device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0080] This invention discloses a responsive recommendation method, system, and device based on meta-learning. The responsive recommendation method of this invention introduces an optimization-based meta-learning approach and an introduced ID embedding representation generator. This generator uses a neural network to take user and product attribute information as input to generate better initial embedding representations for new users and products. This fundamentally solves the existing problems of responsiveness to changes in the interests of existing users and the initial response problems for new users and new products, which lead to low recommendation accuracy and low user satisfaction.
[0081] Compared with existing technologies, it has the following beneficial effects:
[0082] 1. The meta-learning-based responsive recommendation method of the present invention solves the responsiveness problem of changes in the interests of old users by introducing meta-learning, thereby improving the accuracy of product recommendations.
[0083] 2. The meta-learning-based responsive recommendation method of the present invention introduces an ID embedding representation generator that uses a neural network to take the attribute information of users and products as input to generate better initial embedding representations for new users and products, thus solving the problem of initial response for new users and new products; while retaining the historical personalized information of users and products, it perceives the user's recent interests only through a small amount of online collected data, thereby improving the accuracy of product recommendations and thus improving the user experience. Attached Figure Description
[0084] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0085] Figure 1This is a schematic diagram of a meta-learning-based responsive recommendation method provided in an embodiment of the present invention.
[0086] Figure 2 This is a framework diagram of a meta-learning-based responsive recommendation model provided in an embodiment of the present invention.
[0087] Figure 3 This is a schematic diagram of a user embedding representation module combined with an ID embedding representation generator, provided in an embodiment of the present invention.
[0088] Figure 4 A schematic diagram of a new user initial embedding representation generator provided in an embodiment of the present invention.
[0089] Figure 5 This is a schematic diagram of a responsive recommendation system based on meta-learning provided in an embodiment of the present invention. Detailed Implementation
[0090] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0091] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0092] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0093] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0094] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0095] Recommendation systems aim to learn changes in user interests through a limited number of recent interactions, which is similar to the goal of meta-learning. Therefore, this invention utilizes meta-learning to address the responsiveness problem of changing user interests, proposing a meta-learning-based responsive recommendation method. This method introduces meta-learning to solve the responsiveness problem of changing interests for existing users, and designs a neural network that uses attribute fusion to generate ID embedding representations to solve the initial response problem for new users and new products. This invention, while preserving the historical personalized information of users and products, perceives users' recent interests using only a small amount of online collected data.
[0096] Meta-learning (ML) aims to learn how to learn so that a model can utilize past knowledge to adapt to new tasks with a small number of training samples and iterations. Assuming a set of tasks T with a probability distribution p(T), meta-learning aims to find the optimal meta-knowledge ω. * (Also known as prior knowledge):
[0097]
[0098] Internal updates focus on learning specific tasks, while external updates involve multiple tasks. ω It is an optimization process that uses predefined meta-knowledge ω and a loss function. To update weights This makes the model perform well.
[0099] This invention proposes a responsive recommendation method based on meta-learning. For example... Figure 1 As shown, the meta-learning-based responsive recommendation method includes the following steps S1 to S3.
[0100] S1. Construct a meta-learning-based responsive recommendation model; the meta-learning-based responsive recommendation model includes a meta-learner of a heterogeneous information network and an ID embedding representation generator. The meta-learner of the heterogeneous information network includes a user embedding representation module, a product embedding representation module, an embedding representation connection layer, and a rating predictor. The framework diagram of the meta-learning-based responsive recommendation model is shown below. Figure 2 As shown.
[0101] The user embedding representation module denotes the user's embedding representation as: The calculation method is as follows:
[0102]
[0103] in, For the basic embedding representation of user u, from the embedding matrix via user ID Find it in the middle; f U(·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of user u in multi-hot form. Mapping to In the same space, the user's attribute embedding representation is obtained; the attribute vector includes the user's age and gender. Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; α and β are respectively and The coefficients determine their... The importance of the middle;
[0104] Among them, semantic embedding representation The calculation can be expressed as:
[0105]
[0106] Where, ω u It is h u The weights, sub-embeddings represent h u This can be obtained by aggregating the embedding representations of its neighboring nodes:
[0107]
[0108] Where g(·) is a mean aggregation function, It is the set of sampled neighbors of user u in the heterogeneous information network G;
[0109] The product embedding representation module, for product i, obtains the product embedding representation through the same network structure as the user. The calculation method is as follows:
[0110]
[0111] in, For the basic embedding representation of product i, the product ID is obtained from the embedding matrix. Find it in the middle; f I (·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of item i in multi-hot form. Mapping to In the same space, the attribute embedding representation of the product is obtained; the attribute vector includes product price and category; W i I Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; λ and θ are respectively and The coefficients determine their... The importance of the middle;
[0112] Among them, semantic embedding representation The calculation can be expressed as:
[0113]
[0114] Where, ω i It is h i The weights, sub-embeddings represent h i This can be obtained by aggregating the embedding representations of its neighboring nodes:
[0115]
[0116] Where g(·) is a mean aggregation function, It is product i in heterogeneous information network G I The sampled neighbor set in;
[0117] Specifically, the user attributes include gender, age, occupation, postal code, address, friend relationships, preferences, etc.; the products include books, and the book attributes include book title, publication year, publisher, type, author, price, etc.
[0118] The embedding representation connection layer concatenates the user embedding representation obtained by the user embedding representation module and the product embedding representation obtained by the product embedding representation module to obtain the final embedding representation;
[0119] The rating predictor takes the final embedded representation as input and generates a user's rating for the product. Specifically, the rating predictor uses an MLP to model the relationship between the user and product embedded representations, and generates the predicted rating for user u for product i. The calculation is as follows:
[0120]
[0121] Where M(·) represents a multilayer perceptron, This indicates a vector concatenation operation.
[0122] ID embedding refers to assigning a unique integer identifier (ID) to each user and item during model training. This ID typically needs to be encoded as a vector before being input into the machine learning model. One-hot encoding is a fundamental tool for encoding IDs into sparse binary vectors. For the u-th user, its one-hot encoding has all components except the u-th component (which is 1) set to 0. For example:
[0123]
[0124] Where, φ u Let represent the one-hot encoding of user u, and n represent the number of users in the system. A low-dimensional embedding representation of the ID can be obtained through matrix multiplication, given a dense matrix. pass
[0125] h u =φ u T Φ,
[0126] The dense vector representation of user u can be obtained. For a user with ID u, its dense embedding representation is obtained by directly searching for the u-th row in Φ:
[0127] h u =LookUp(u,Φ),
[0128] Here, LookUp(·,·) represents the operation of searching for the corresponding row or column in the matrix based on the index. The matrix Φ is called the embedded matrix or lookup table, and h u The ID embedding representation is called user u.
[0129] Each ID embedding is unique to a specific user or product, possessing strong expressive power for the personalized features of that user or product, and playing a crucial role in improving prediction performance. However, new users and products are invisible during model training, therefore their ID embeddings cannot be trained, leading to poor initial recommendation results. Generally, some basic information about new users and products is available, such as the user's gender, age, region, and occupation. Therefore, it is necessary to design a parameter-sharing function that can utilize attributes to generate ID embeddings for new users and products.
[0130] To address this problem, this invention designs an ID EmbeddingRepresentation Generator (IDEG). The goal of IDEG is to generate appropriate ID embedding representations for new users and products.
[0131] The ID embedding representation generator uses a neural network to represent the attributes of a new user u or a new item i. or As input information, the output is a well-defined ID embedding representation. This process can be formalized as follows:
[0132]
[0133]
[0134]
[0135]
[0136] in, and These are the initial embedding representations for users and products, respectively. and These are sub-embedded representations for users and products, respectively. g U (·) and g I (·) represents the corresponding ID embedding representation generator, which is a multilayer perceptron.
[0137] S2. Using the acquired data, train the meta-learning-based responsive recommendation model to obtain the trained meta-learning-based responsive recommendation model and the model optimization parameters κ1, κ2, κ3.
[0138] The responsiveness to changes in user interests requires the system to predict a user's rating for a product for which no interaction has been recorded, based on a user's latest limited rating data. This will be achieved by using the user's historical rating data to construct similar scenarios.
[0139] All user-product rating data in the system are denoted as R = {(u,i,r} u,i )}, where all rating data for user u are denoted as First, retrieve user u's historical rating data R u Divided into two parts: and in The data in the image is used to simulate the user's recent rating data. The data in the dataset is used to simulate the data to be predicted. Then, by combining the rating data with other auxiliary information, a dataset that can serve as input for user u is constructed. and The specific steps are as follows:
[0140] S21. Obtain historical user-product rating data for all users. R = {(u,i,r} u,i )}, divide R into multiple subsets R1, R2, ..., R according to users. m And initialize the model parameters.
[0141] Specifically, the model parameters κ1 and κ2 are initialized.
[0142] S22. In each training cycle, the user set R is divided into multiple batches = {B1, B2, ...} for training. u Randomly divided into support sets and query set And guarantee Where R u This represents the user-product historical rating data for user u.
[0143] Among them, guarantee To improve generalization ability.
[0144] S23, Construction Task in and These correspond to the support set and query set in meta-learning, respectively. and Let u and i represent the relevant information for user u and product i, respectively, as follows:
[0145]
[0146]
[0147] Where u and i represent the user and product IDs, respectively. and Let u and i represent the attribute vectors of user u and product i, respectively. and For user u in multi-layer network G U Product i in multi-layer network G I The sampled neighbor set in:
[0148]
[0149]
[0150] A set of tasks, T = {T1, T2, ..., T}, can be constructed using historical data. n}, where n is the number of users.
[0151] Meta-learning methods are used to learn prior knowledge from these tasks, enabling rapid adaptation to new tasks; this process is called meta-training. Meta-training is divided into two processes: local update in step S24 and global update in step S25. Meta-training... Top to T u Adaptation (i.e., partial updates) is performed to simulate the process of learning user u's interests based on their most recent interaction data, and in A global update is performed to optimize prior knowledge. The model parameters are denoted as κ = (κ1, κ2), where κ1 is the embedding representation module parameter (including user and item embedding representation modules), and κ2 is the rating predictor parameter. The model only uses κ2 as prior knowledge to adapt to the specific task during local updates, while κ1 does not participate in the local update process. There are two main reasons for this: 1) The user and item embedding representations contain their historical personalized features to some extent. If κ1 is updated during local updates, these historical personalized features may be "forgotten"; 2) The number of parameters in κ1 increases with the number of support set samples. When the number of samples is large, it will reduce the efficiency of local updates, thus affecting the efficiency of recommendations. κ2, on the other hand, has fewer and fixed parameters, resulting in higher update efficiency, and can also reflect changes in user interests.
[0152] S24. Based on the support set in corresponding meta-learning The meta-learning-based responsive recommendation model is trained using an inner-loop meta-learning method, and the parameters of the rating predictor are locally updated.
[0153] Local update, also known as task-specific update, involves the following steps: applying the global prior parameter κ2 to a task-specific update T. u Initialize the parameters, and then... Calculate loss
[0154]
[0155] Finally, update κ to obtain task-specific T. u The parameter κ 2,u :
[0156]
[0157] Where α represents the local update step size, Represents the gradient;
[0158] S25. Based on the query set in the corresponding meta-learning The meta-learning-based responsive recommendation model is trained by outer loop meta-learning, and the parameters of the meta-learner of the heterogeneous information network are globally updated to obtain the trained meta-learning-based responsive recommendation model.
[0159] A global update, including the following steps:
[0160] First, for task T u In step S24, κ is obtained 2,u Then, in the query set Based on the user embedding representation module, the product embedding representation module, the embedding representation connection layer, and the rating predictor, the loss is calculated. Reflects the impact of in-task updates on T u The adaptive effect, i.e., the effect of prior knowledge κ2 on T u Adaptability;
[0161] Secondly, to generalize κ2's ability to adapt to tasks, global updates jointly optimize κ2, κ1, and κ2 across the losses of multiple tasks. The update process for κ2 is as follows:
[0162]
[0163] Where B represents a batch of users sampled, β represents the step size of the global update, and κ1 represents the parameters of the embedding representation module;
[0164] Finally, the local update in step S24 and the global update in step S25 are repeated until convergence, yielding the optimized parameters κ1 and κ2. Through meta-training, both κ1 and κ2 are optimized, with κ2 serving as task-shared prior knowledge, enabling rapid adaptation to specific tasks through intra-task local updates.
[0165] The model parameters are shown in Table 1.
[0166]
[0167]
[0168] Wherein, parameter κ1 includes d in the embedded representation module e Parameters such as α and β affect the embedding dimension and representation weights. Parameter κ2 includes η1, num_batch, etc.
[0169] S26. Train the ID embedding representation generator.
[0170] The parameters of the ID embedding representation generator IDEG are denoted as κ3. During the IDEG training process, the optimized κ1 and κ2 obtained in step S25 are frozen, and only κ3 is trained. The ID embedding representation generator is a multilayer perceptron.
[0171] The ID embedding representation generator is trained to obtain optimized parameters κ3. The specific steps include:
[0172] The system's historical rating data R, users, and product sampling neighbors are used. User and product attribute vectors x U x IThe local update learning rate η1, the global update learning rate η3, the user and product embedding module parameters κ1, and the rating predictor parameters κ2 are input into the ID embedding representation generator for training, and the optimized parameters κ3 of the ID embedding representation generator are output.
[0173] In one embodiment, the training dataset, Douban Book, includes not only user-book rating data but also auxiliary information related to users and books. Douban Book contains approximately 650,000 ratings, 20,000 books, and 10,000 users. User attributes include address, friend relationships, etc., while book attributes include publication year, publisher, genre, author, etc., with ratings ranging from 1 to 5.
[0174]
[0175] The optimized parameter κ3 was obtained by training with the above dataset.
[0176] To ensure that the embedding representations generated by IDEG can adapt to in-task updates, local updates are retained. The main differences between IDEG training and meta-training lie in two aspects: firstly, the former employs supplementary methods to simulate new users and products. Figure 3 The routes indicated by the dashed lines and dotted arrows are used to generate embedded representations for users and products, while the latter uses routes indicated by solid lines and dotted arrows. On the other hand, the former is trained based on the latter, and only the parameter κ3 is updated.
[0177] Appendix Figure 4 The structure of IDEG is illustrated using the initial embedding representation generator as an example. The IDEG, which is the initial embedded representation, is also a multilayer perceptron.
[0178] After the meta-training process, the parameters (κ1, κ2) of the user and item embedding representation modules and the rating predictor have been trained on a large amount of historical data. In this invention, the parameters of IDEG are denoted as κ3. During the IDEG training process, the parameters (κ1, κ2) are frozen and only κ3 is trained, thereby reducing additional memory and computational overhead.
[0179] S3. Obtain the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtain the target recommended product, and recommend the target recommended product to the user;
[0180] The trained meta-learning-based responsive recommendation model includes a user embedding representation module combined with an ID embedding representation generator, a product embedding representation module combined with an ID embedding representation generator, and a rating predictor. Figure 3 The image shows a user embedding representation module that incorporates the ID embedding representation generator IDEG, where... and g U (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. For user u related input information, and Φ U These are the embedding matrices for the basic embedding representation and the sub-embedding representation, respectively. If user u is a returning user, then its corresponding ID embedding representation is... and From respectively and Φ U Find the path in the middle (as shown by the solid arrow in the image), otherwise use... and g U (·) This is obtained by transforming the attribute embedding representation (the path shown by the dashed arrow in the diagram). Since user u is in each G (G∈G)... U The sampled neighbors in ) include itself, therefore in each G, g is used U (·) Generates an ID embedding representation for new users, while other neighbors are sampled from existing users, therefore still from Φ U The embedded representation is obtained by searching within the matrix. Finally, existing users generate the representation using the paths indicated by solid lines and dotted arrows. New users are generated via the path shown by the dashed and dotted arrows.
[0181] The product embedding representation module, which combines the ID embedding representation generator, generates product embedding representations for both new and old products; if product i is an old product, then its corresponding ID embedding representation... and From respectively and Φ I Find it in the middle, otherwise through and g I (·) is obtained by transforming the attribute embedding representation, where and g I (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. Input information related to product i and Φ I These are the embedding matrices for the basic embedding representation and the sub-embedded representation, respectively.
[0182] The rating predictor takes the final embedded representation as input and generates a user's rating for the product. Specifically, the rating predictor uses an MLP to model the relationship between the user and product embedded representations, and generates the predicted rating for user u for product i. The calculation is as follows:
[0183]
[0184] Where M(·) represents a multilayer perceptron, This indicates a vector concatenation operation.
[0185] Step S3 specifically includes:
[0186] After the meta-learning and ID embedding generator described above, the model parameters κ1, κ2, and κ3 are obtained (where κ2 is treated as global prior knowledge). The model uses the ID embedding generator to generate corresponding ID embedding representations for new users and new products appearing in the system for the first time. Then, during meta-testing, the model learns user interests using the prior knowledge κ2.
[0187] For new users or new products, since their related ID embedding representations are in a randomly initialized state, the ID embedding representation generator is used to generate the corresponding ID embedding representations.
[0188] S31. For the user u to be recommended, construct a support set based on their most recent k product rating data. And construct a query set of the products that need to be predicted.
[0189] S32, For support sets Based on the inner loop learning training in step S24, L local updates are performed to obtain the parameters κ adapted to the task. 2,u ;
[0190] S33, For query set First, based on the user embedding representation module and the product embedding representation module combined with the ID embedding representation generator, corresponding user embedding representations and product embedding representations are generated. Then, the final embedding representation is generated using the embedding representation connection layer and input into the rating predictor. Finally, the obtained κ... 2,u And according to the following formula, the query set The system calculates user ratings for the products in the query set. The predicted rating values for products in the chart, and the process of rating prediction can be expressed as:
[0191]
[0192] Where M represents a multilayer perceptron, and These represent the relevant input information for the user and the product, respectively. κ represents the network parameters, including κ1, κ2, and κ3. 2,u ,κ3; where, κ is used to generate embedded representations for users and items. and And calculate the score, therefore, and equivalence;
[0193] S34. Based on the predicted rating, obtain the target recommended product and recommend the target recommended product to the user.
[0194] Furthermore, in or The loss function on can be expressed as:
[0195]
[0196] Among them, D u express or and equivalence.
[0197] This invention proposes a responsive recommendation method based on meta-learning. To address the responsiveness to changes in user interests, this invention introduces an optimization-based meta-learning method. First, it predicts a user's ratings for uninterrupted products based on their recent interaction data, treating this process as a task in meta-learning. Then, it constructs similar tasks from historical user and product interaction data. Finally, using meta-learning, it learns prior knowledge with strong generalization ability from these similar tasks, enabling better learning of user interests in new tasks based on prior knowledge. To address the initial response problem for new users and products, this method, based on enhancing user and product embedding representations with semantic information, designs an ID embedding representation generator for new users and products appearing in the system for the first time. The introduced ID embedding representation generator uses a neural network to take user and product attribute information as input to generate better initial embedding representations for new users and products, thereby improving the recommendation effect for new users and products. This invention can achieve high prediction accuracy in both responsiveness to changes in user interests and in the case of new users and products. This method can predict a user's ratings for different products in a recommendation system, and then recommend products based on those ratings, thereby improving the accuracy of the recommendation system.
[0198] Figure 5This is a responsive recommendation system based on meta-learning provided in an embodiment of the present invention. For example... Figure 5 As shown, this meta-learning-based responsive recommendation system includes: a recommendation model construction module, a recommendation model training module, and a product recommendation module;
[0199] The recommendation model building module constructs a responsive recommendation model based on meta-learning.
[0200] The recommendation model training module uses the acquired data to train the meta-learning-based responsive recommendation model, thereby obtaining the trained meta-learning-based responsive recommendation model and model optimization parameters.
[0201] The product recommendation module obtains the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtains the target recommended product, and recommends the target recommended product to the user.
[0202] The aforementioned meta-learning-based responsive recommendation system can be implemented as a computer program that can run on a computer device.
[0203] The computer device can be a server, which can be a standalone server or a server cluster consisting of multiple servers.
[0204] Computer devices include processors, memory, and network interfaces connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.
[0205] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform a meta-learning-based responsive recommendation method.
[0206] This processor provides computing and control capabilities to support the operation of the entire computer device.
[0207] This internal memory provides an environment for the execution of computer programs in non-volatile storage media, which, when executed by a processor, enable the processor to perform a meta-learning-based responsive recommendation method.
[0208] This network interface is used for network communication with other devices. Those skilled in the art will understand that the above-described computer device structure is only a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0209] The processor is used to run a computer program stored in the memory, which implements the meta-learning-based responsive recommendation method described in Embodiment 1.
[0210] It should be understood that, in the embodiments of this application, the processor may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0211] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0212] The present invention also provides a storage medium. This storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform a meta-learning-based responsive recommendation method as described in Embodiment 1.
[0213] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0214] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0215] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0216] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0217] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0218] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A responsive recommendation method based on meta-learning, characterized in that, Including the following steps: S1. Construct a meta-learning-based responsive recommendation model; the meta-learning-based responsive recommendation model includes a meta-learner of a heterogeneous information network and an ID embedding representation generator, wherein the meta-learner of the heterogeneous information network includes a user embedding representation module, a product embedding representation module, an embedding representation connection layer, and a rating predictor. The user embedding representation module denotes the user's embedding representation as: The calculation method is as follows: in, For the basic embedding representation of user u, from the embedding matrix via user ID Find it in the middle; f U (·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of user u in multi-hot form. Mapping to In the same space, the user's attribute embedding representation is obtained; the attribute vector includes the user's age and gender. Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; α and β are respectively and The coefficients determine their... The importance of the middle; Among them, semantic embedding representation The calculation can be expressed as: Where, ω u It is h u The weights, sub-embeddings represent h u This can be obtained by aggregating the embedding representations of its neighboring nodes: Where g(·) is a mean aggregation function, It is the set of sampled neighbors of user u in the heterogeneous information network G; The product embedding representation module, for product i, obtains the product embedding representation through the same network structure as the user. The calculation method is as follows: in, For the basic embedding representation of product i, the product ID is obtained from the embedding matrix. Find it in the middle; f I (·) is a mapping function for a multilayer perceptron (MLP) that maps the attribute vector of item i in multi-hot form. Mapping to In the same space, the attribute embedding representation of the product is obtained; the attribute vector includes the product price and category; Given a trainable weight matrix, the semantic embedding representation is... Switch to The same space; λ and θ are respectively and The coefficients determine their... The importance of the middle; Among them, semantic embedding representation The calculation can be expressed as: Where, ω i It is h i The weights, sub-embeddings represent h i This can be obtained by aggregating the embedding representations of its neighboring nodes: Where g(·) is a mean aggregation function, It is product i in heterogeneous information network G I The sampled neighbor set in; The embedding representation connection layer concatenates the user embedding representation obtained by the user embedding representation module and the product embedding representation obtained by the product embedding representation module to obtain the final embedding representation; The rating predictor takes the final embedded representation as input and generates a user's rating for the product. Specifically, the rating predictor uses an MLP to model the relationship between the user and product embedded representations, and generates the predicted rating for user u for product i. The calculation is as follows: Where M(·) represents a multilayer perceptron, This represents a vector concatenation operation; The ID embedding representation generator uses a neural network to represent the attributes of a new user u or a new item i. or As input information, the output ID embedding representation is used; this process can be formalized as follows: in, and These are the initial embedding representations for users and products, respectively. and These are sub-embedded representations for users and products, respectively. and g I (·) represent the corresponding ID embedding representation generators, which is a multilayer perceptron; S2. Using the acquired data, train the meta-learning-based responsive recommendation model to obtain the trained meta-learning-based responsive recommendation model and the model optimization parameters κ1, κ2, κ3. S21. Obtain historical user-product rating data for all users. R = {(u,i,r} u,i )}, divide R into multiple subsets R1, R2, ..., R according to users. m And initialize the model parameters; S22. In each training cycle, the user set R is divided into multiple batches = {B1, B2, ...} for training. u Randomly divided into support sets and query set And guarantee Where R u This represents user u's historical rating data for products; S23, Construction Task in and These correspond to the support set and query set in meta-learning, respectively. and Let u and i represent the relevant information for user u and product i, respectively, as follows: Where u and i represent the user and product IDs, respectively. and Let u and i represent the attribute vectors of user u and product i, respectively. and For user u in multi-layer network G U Product i in multi-layer network G I The sampled neighbor set in: S24. Based on the support set in corresponding meta-learning The meta-learning-based responsive recommendation model is trained using an inner loop meta-learning method, and the parameters of the rating predictor are locally updated. Local update, specifically the steps are: applying the global prior parameter κ2 to a task-specific parameter T. u Initialize the parameters, and then... Calculate loss Finally, update κ to obtain task-specific T. u The parameter κ 2,u : Where α represents the local update step size, Represents the gradient; S25. Based on the query set in the corresponding meta-learning The meta-learning-based responsive recommendation model is trained by outer loop meta-learning, and the parameters of the meta-learner of the heterogeneous information network are globally updated to obtain the trained meta-learning-based responsive recommendation model. A global update, including the following steps: First, for task T u In step S24, κ is obtained 2,u Then, in the query set Based on the user embedding representation module, the product embedding representation module, the embedding representation connection layer, and the rating predictor, the loss is calculated. Reflects the impact of in-task updates on T u The adaptive effect, i.e., prior knowledge κ2 on T u Adaptability; Secondly, to generalize κ2's ability to adapt to tasks, global updates jointly optimize κ2, κ1, and κ2 across the losses of multiple tasks. The update process for κ2 is as follows: Where B represents a batch of users sampled, β represents the step size of the global update, and κ1 represents the parameters of the embedding representation module; Finally, the local update in step S24 and the global update in step S25 are repeated until convergence, and the optimized parameters κ1 and κ2 are obtained. S26. Train the ID embedding representation generator. The parameters of the ID embedding representation generator IDEG are denoted as κ3. During the IDEG training process, the optimized κ1 and κ2 obtained in step S25 are frozen, and only κ3 is trained. The ID embedding representation generator is a multilayer perceptron. The ID embedding representation generator is trained to obtain optimized parameters κ3. The specific steps include: The system's historical rating data R, users, and product sampling neighbors are used. User and product attribute vectors x U x I The local update learning rate η1, the global update learning rate η3, the user and product embedding module parameters κ1, and the rating predictor parameters κ2 are input into the ID embedding representation generator for training, and the optimized parameters κ3 of the ID embedding representation generator are output. S3. Obtain the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtain the target recommended product, and recommend the target recommended product to the user; The trained meta-learning-based responsive recommendation model includes a user embedding representation module combined with an ID embedding representation generator, a product embedding representation module combined with an ID embedding representation generator, and a rating predictor. The user embedding representation module combined with the ID embedding representation generator generates user embedding representations for both new and returning users. If user u is a returning user, then its corresponding ID embedding representation... and From respectively and Φ U Find it in the middle, otherwise through and g U (·) is obtained by transforming the attribute embedding representation, where and g U (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. For user u related input information, and Φ U The embedding matrices P are the base embedding representation and the sub-embedding representation, respectively. * ∈P U ; The product embedding representation module, which combines the ID embedding representation generator, generates product embedding representations for both new and old products; if product i is an old product, then its corresponding ID embedding representation... and From respectively and Φ I Find it in the middle, otherwise through and g I (·) is obtained by transforming the attribute embedding representation, where and g I (·) represent the IDEG of the basic embedding representation and the sub-embedding representation, respectively. Input information related to product i and Φ I These are the embedding matrices for the basic embedding representation and the sub-embedding representation, respectively; Step S3 specifically includes: S31. For the user u to be recommended, construct a support set based on their most recent k product rating data. And construct the query set of the products that need to be predicted. S32, For support sets Based on the inner loop learning training in step S24, L local updates are performed to obtain the parameters κ adapted to the task. 2,u ; S33, For query sets First, based on the user embedding representation module and the product embedding representation module combined with the ID embedding representation generator, corresponding user embedding representations and product embedding representations are generated. Then, the final embedding representation is generated using the embedding representation connection layer and input into the rating predictor. Finally, the obtained κ... 2,u And according to the following formula, the query set The system calculates user ratings for the products in the query set. The predicted rating values for products in the chart, and the process of rating prediction can be expressed as: Where M represents a multilayer perceptron, and These represent the relevant input information for the user and the product, respectively. κ represents the network parameters, including κ1, κ2, and κ3. 2,u ,κ3; where, κ is used to generate embedded representations for users and items. and And calculate the score, that is and equivalence; S34. Based on the predicted rating, obtain the target recommended product and recommend the target recommended product to the user.
2. The method according to claim 1, characterized in that, exist or The loss function on can be expressed as: Among them, D u express or and equivalence.
3. The method according to claim 1, characterized in that, The ID embedding refers to the process where each user and product is assigned a unique integer identifier (ID) during model training. This ID needs to be encoded into a vector form before it can be input into the machine learning model.
4. A responsive recommendation system based on meta-learning, characterized in that, The recommendation system executes the meta-learning-based responsive recommendation method as described in claim 1, comprising: a recommendation model construction module, a recommendation model training module, and a product recommendation module; The recommendation model building module constructs a responsive recommendation model based on meta-learning. The recommendation model training module uses the acquired data to train the meta-learning-based responsive recommendation model, thereby obtaining the trained meta-learning-based responsive recommendation model and model optimization parameters. The product recommendation module obtains the user-product historical rating data of the user to be recommended, and based on the user-product historical rating data of the user to be recommended, the trained meta-learning-based responsive recommendation model and the model optimization parameters, obtains the target recommended product, and recommends the target recommended product to the user.
5. A computer device, characterized in that, The device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 3.