A personalized recommendation method based on linear variational autoencoder
By regularizing and training the user-product interaction matrix using a linear variational autoencoder, the problems of model-data mismatch and long-tail effect in existing technologies are solved, and more accurate personalized recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2026-03-27
AI Technical Summary
Existing personalized recommendation algorithms based on variational autoencoders suffer from the problem of mismatch between the complex nonlinear neural network models used and user-product interaction data, and fail to effectively handle the long-tail effect, resulting in insufficient recommendation accuracy.
A linear variational autoencoder is employed to regularize the user-item implicit feedback interaction matrix by performing row and column vector regularization, and combining Gaussian and multinomial distributions to construct the user's latent vector and probability vector. The model is then optimized using linear transformation and gradient descent to generate personalized recommendations.
It improves the accuracy of recommendation algorithms, enabling them to more accurately capture changes in user preferences and provide personalized recommendations of products that users like. It is also suitable for implicit feedback from user-product interaction data.
Smart Images

Figure CN114238779B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer science, and more specifically, to a personalized recommendation method based on a linear variational autoencoder. Background Technology
[0002] With the development of the internet, massive amounts of information are generated daily from various platforms, easily leading to information overload. For example, on e-commerce websites, faced with a dazzling array of products, consumers often don't know which items to buy. At this point, an intelligent system is needed that can provide suggestions based on historical information, such as browsing history. Recommendation systems are such intelligent systems. Therefore, how to build an intelligent and efficient recommendation system is a key focus of both academia and industry. Personalized recommendations—recommending products that each user likes—are the core focus of recommendation systems.
[0003] Commonly used algorithms for personalized recommendations include content-based recommendation algorithms, collaborative filtering algorithms, and hybrid recommendation algorithms. Among these, collaborative filtering is a widely used and enduring recommendation algorithm because it only requires user-item interaction data. Moreover, this user-item interaction data exists in large quantities on various platforms, and obtaining this data does not infringe on user privacy. Collaborative filtering algorithms include embedding-based and neighbor-based algorithms. Embedding-based collaborative filtering algorithms include the matrix factorization category and the recently emerging graph convolution-based collaborative filtering algorithms. Neighbor-based collaborative filtering algorithms include user-based and item-based algorithms, with item-based collaborative filtering algorithms achieving better recommendation results, such as autoencoder-based collaborative filtering algorithms. Autoencoder-based collaborative filtering algorithms can be trained in a list-wise manner, achieving better recommendation accuracy compared to the pair-wise training method of embedding-based collaborative filtering algorithms. Variational autoencoder-based collaborative filtering algorithms are a popular type of autoencoder-based collaborative filtering algorithm. Variational autoencoders (VAEs) are generative models that can automatically add noise to data in the latent space, offering significant advantages in both model robustness and modeling data uncertainty. Even in sparse user-item interaction data, VAE-based collaborative filtering algorithms can achieve good recommendation results. However, current VAE-based collaborative filtering algorithms also have some problems: they use complex nonlinear neural network models as encoders and decoders, which are incompatible with relatively simple user-item interaction data; most of them do not consider the long-tail effect in user-item interaction data, where a small number of items are frequently interacted with by users, while most items are interacted with very little, causing the learned model to be biased towards recommending the more frequently interacted items.
[0004] A prior art personalized recommendation method is disclosed, which includes: acquiring user usage behavior data of items; generating a user usage behavior sublist based on the acquired usage behavior data; traversing the generated user usage behavior sublist and estimating the one-step transition probability matrix of items; establishing a personalized recommendation model based on the user's forgetting process of interest in items and a Markov model; and using gradient descent to estimate the user's personalized parameters during the interest forgetting process, thereby making recommendations to the user based on the user usage behavior sublist. The personalized recommendation method provided by this invention can more accurately capture the dynamic changes in user preferences, making it more practical. However, this method does not involve using a linear structure to replace the original nonlinear encoder and decoder, nor does it regularize the row and column vectors of the input user-item interaction matrix. Summary of the Invention
[0005] This invention provides a personalized recommendation method based on a linear variational autoencoder that can improve the accuracy of recommendation algorithms.
[0006] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows:
[0007] A personalized recommendation method based on a linear variational autoencoder includes the following steps:
[0008] S1: Construct a user-product implicit feedback interaction matrix based on user and product interaction data;
[0009] S2: Regularize the row and column vectors of the user-product implicit feedback interaction matrix;
[0010] S3: Input the regularized user-item implicit feedback interaction matrix into the encoder of the linear variational autoencoder, and the latent vector of each user can be obtained after encoding.
[0011] S4: Input the latent vector of the user obtained in step S3 into the decoder of the linear variational autoencoder to reconstruct the interaction vector of each user, and finally form a reconstructed user-item interaction matrix.
[0012] S5: Train a linear variational autoencoder by combining training techniques from variational autoencoders;
[0013] S6: Using a trained linear variational autoencoder, the regularized user-item implicit feedback interaction matrix is input into the linear variational autoencoder for reconstruction, resulting in a probability vector for each user for all items, which is used to generate recommendations.
[0014] Furthermore, the process of step S1 is as follows:
[0015] Collect user-product interaction data, count the number of users and products, and construct a user-product implicit feedback interaction matrix, as follows: if there is an interaction between a user and a product, the value of the corresponding position in the matrix is 1, otherwise it is 0.
[0016] Furthermore, the process of step S2 is as follows:
[0017] S21: View the user-item implicit feedback interaction matrix as a bipartite graph of user and item node interactions. Summate each row of the interaction matrix to obtain a vector of the degree of each node. Construct a diagonal matrix using the elements of this vector as diagonal elements, called the user node degree matrix:
[0018] D U =Diag(X·1)
[0019] Where 1 is a vector with all elements being 1, X represents the user-product implicit feedback interaction matrix, and Diag(·) represents constructing a diagonal matrix with the input vector as the diagonal elements;
[0020] S22: For each product, construct a product node degree matrix:
[0021] D I =Diag(1 T ·X)
[0022] S23: Regularize the row and column vectors of the user-product implicit feedback interaction matrix using the obtained user and product node degree matrices, as shown in the following formula:
[0023]
[0024] Furthermore, the process of step S3 is as follows:
[0025] S31: Interaction vector for each user Right now Each row is transformed linearly to obtain a mean vector:
[0026]
[0027] Among them, W μ and b μ Let be the trainable weight matrix and bias vector, respectively.
[0028] S32: Interaction vector for each user Right now Each row is transformed linearly to obtain a standard deviation vector:
[0029]
[0030] Among them, W σ and b σ These are the trainable weight matrix and bias vector, respectively. Since the output value of the above linear transformation is not necessarily a positive number, the output is considered to be the natural logarithm of the standard deviation, i.e. With σ 2 As diagonal elements, construct the covariance matrix ∑ u =diag(σ 2 );
[0031] S33: Using the mean vector and covariance matrix obtained in S31 and S32, construct a unique... Gaussian distribution of latent vectors And by sampling within this distribution, we obtain The latent vector z u .
[0032] Furthermore, the process of step S4 is as follows:
[0033] S41: Input the user's latent vector obtained in step S3 into the decoder, and the decoder outputs a probability vector π. u Simultaneously calculate the number of items n that user u has interacted with. u , π u The calculation method is as follows:
[0034] π u =softmax(z u ·W θ +b θ )
[0035] Among them, W θ and b θ These are the trainable weight matrix and bias vector, respectively;
[0036] S42: with π u and n u As parameters, construct a multinomial distribution Mult(π) u n u The reconstructed interaction vector of user u can be obtained by sampling from this multinomial distribution, i.e.
[0037] Furthermore, the process of step S5 is as follows:
[0038] S51: Calculate the reconstruction error of user u based on the probability vector obtained in step S4:
[0039]
[0040] S52: Calculate qφ (z u |x u ) and z u The prior distribution p θ (z u The Kullback-Leibler divergence between p and ), where p θ (z u () is a standard normal distribution The purpose is to target q φ (z u |x u Constraints are applied to ensure that q is the value of multiple users. φ (z u |x u The accumulated result can approximate the standard normal distribution.
[0041]
[0042] Where K is the dimension of μ and σ;
[0043] S53: Combining the reconstruction error and KL divergence mentioned above, the model's loss function can be defined as follows:
[0044]
[0045] Where β is a hyperparameter used to adjust the regularization effect of KL divergence on the model;
[0046] S54: To be correct To find the gradient, we need to make z... u ~q φ (z u |x u The sampling process is differentiable, however, this is not feasible. Therefore, the following reparameterization technique is used for sampling:
[0047] z u =μ+∈⊙σ
[0048] Where ∈ is a random vector that follows a normal distribution. Each training round can be randomly generated;
[0049] S55: After the parameter re-parameter technique in step S54, The model is optimized using gradient descent with Adam as the optimizer and a learning rate of 0.001. During training, a batch of interaction vectors is input into the model.
[0050] Furthermore, the process of step S6 is as follows:
[0051] S61. Input the regularized user-item interaction matrix into the trained encoder to obtain the mean vector of each user, i.e., μ;
[0052] S62. Input the mean vector obtained above directly into the trained decoder, and use the probability vector π output by the decoder. u This represents the user's level of preference for each product. The products are then sorted from highest to lowest preference, and the top-N products that the user has not purchased are recommended.
[0053] Preferably, the value of β is in the range of (0, 1), for example, 0.2; and the value of K is 64.
[0054] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0055] This invention provides a personalized recommendation method based on a linear variational autoencoder (LAO), which improves the accuracy of current LAO-based recommendation algorithms and provides personalized recommendations of products that users like. Similar to traditional collaborative filtering algorithms, the model's input is user-product interaction data, specifically implicit feedback data such as user clicks, purchases, and browsing behavior, without involving specific ratings. Therefore, the input data is represented by a 0-1 matrix, where a 1 indicates that the corresponding user has interacted with the corresponding product, and a 0 indicates that the corresponding user has not interacted with the corresponding product. Next, the model regularizes the row and column vectors of the user-product interaction matrix. The regularized interaction matrix is then input into the LAO model, which outputs a probability vector of each user's preference for all products. This probability vector, along with the number of interactions for all products, is used as parameters to construct a multinomial distribution, from which the reconstructed interaction matrix is sampled. Finally, based on the probability vector of each user's preference for all products output by the model, the top-N products with the highest preference that the user has not interacted with are recommended. Attached Figure Description
[0056] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0057] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.
[0058] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;
[0059] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.
[0060] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0061] Example 1
[0062] like Figure 1 As shown, a personalized recommendation method based on a linear variational autoencoder includes the following steps:
[0063] S1: Construct a user-product implicit feedback interaction matrix based on user and product interaction data;
[0064] S2: Regularize the row and column vectors of the user-product implicit feedback interaction matrix;
[0065] S3: Input the regularized user-item implicit feedback interaction matrix into the encoder of the linear variational autoencoder, and the latent vector of each user can be obtained after encoding.
[0066] S4: Input the latent vector of the user obtained in step S3 into the decoder of the linear variational autoencoder to reconstruct the interaction vector of each user, and finally form a reconstructed user-item interaction matrix.
[0067] S5: Train a linear variational autoencoder by combining training techniques from variational autoencoders;
[0068] S6: Using a trained linear variational autoencoder, the regularized user-item implicit feedback interaction matrix is input into the linear variational autoencoder for reconstruction, resulting in a probability vector for each user for all items, which is used to generate recommendations.
[0069] The process of step S1 is as follows:
[0070] Collect user-product interaction data, count the number of users and products, and construct a user-product implicit feedback interaction matrix, as follows: if there is an interaction between a user and a product, the value of the corresponding position in the matrix is 1, otherwise it is 0.
[0071] Example 2
[0072] like Figure 1 As shown, a personalized recommendation method based on a linear variational autoencoder includes the following steps:
[0073] S1: Collect user-product interaction data, count the number of users and products, and construct a user-product implicit feedback interaction matrix, as follows: if there is an interaction between a user and a product, the value of the corresponding position in the matrix is 1, otherwise it is 0;
[0074] S2: Regularize the row and column vectors of the user-product implicit feedback interaction matrix;
[0075] S3: Input the regularized user-item implicit feedback interaction matrix into the encoder of the linear variational autoencoder, and the latent vector of each user can be obtained after encoding.
[0076] S4: Input the latent vector of the user obtained in step S3 into the decoder of the linear variational autoencoder to reconstruct the interaction vector of each user, and finally form a reconstructed user-item interaction matrix.
[0077] S5: Train a linear variational autoencoder by combining training techniques from variational autoencoders;
[0078] S6: Using a trained linear variational autoencoder, the regularized user-item implicit feedback interaction matrix is input into the linear variational autoencoder for reconstruction, resulting in a probability vector for each user for all items, which is used to generate recommendations.
[0079] The process of step S2 is as follows:
[0080] S21: View the user-item implicit feedback interaction matrix as a bipartite graph of user and item node interactions. Summate each row of the interaction matrix to obtain a vector of the degree of each node. Construct a diagonal matrix using the elements of this vector as diagonal elements, called the user node degree matrix:
[0081] D U =Diag(X·1)
[0082] Where 1 is a vector with all elements being 1, X represents the user-product implicit feedback interaction matrix, and Diag(·) represents constructing a diagonal matrix with the input vector as the diagonal elements;
[0083] S22: For each product, construct a product node degree matrix:
[0084] D I =Diag(1 T ·X)
[0085] S23: Regularize the row and column vectors of the user-product implicit feedback interaction matrix using the obtained user and product node degree matrices, as shown in the following formula:
[0086]
[0087] The process of step S3 is as follows:
[0088] S31: Interaction vector for each user Right now Each row is transformed linearly to obtain a mean vector:
[0089]
[0090] Among them, W μ and b μ Let be the trainable weight matrix and bias vector, respectively.
[0091] S32: Interaction vector for each user Right now Each row is transformed linearly to obtain a standard deviation vector:
[0092]
[0093] Among them, W σ and b σ These are the trainable weight matrix and bias vector, respectively. Since the output value of the above linear transformation is not necessarily a positive number, the output is considered to be the natural logarithm of the standard deviation, i.e. With σ 2 As diagonal elements, construct the covariance matrix ∑ u =diag(σ 2 );
[0094] S33: Using the mean vector and covariance matrix obtained in S31 and S32, construct a unique... Gaussian distribution of latent vectors And by sampling within this distribution, we obtain The latent vector z u .
[0095] The process of step S4 is as follows:
[0096] S41: Input the user's latent vector obtained in step S3 into the decoder, and the decoder outputs a probability vector π. u Simultaneously calculate the number of items n that user u has interacted with. u , π u The calculation method is as follows:
[0097] π u =softmax(z u ·W θ +b θ )
[0098] Among them, W θ and b θ These are the trainable weight matrix and bias vector, respectively;
[0099] S42: with π u and n u As parameters, construct a multinomial distribution Mult(π) u nu The reconstructed interaction vector of user u can be obtained by sampling from this multinomial distribution, i.e.
[0100] The process of step S5 is as follows:
[0101] S51: Calculate the reconstruction error of user u based on the probability vector obtained in step S4:
[0102]
[0103] S52: Calculate q φ (z u |x u ) and z u The prior distribution p θ (z u The Kullback-Leibler divergence between p and ), where p θ (z u () is a standard normal distribution The purpose is to target q φ (z u |x u Constraints are applied to ensure that q is the value of multiple users. φ (z u |x u The accumulated result can approximate the standard normal distribution.
[0104]
[0105] Where K is the dimension of μ and σ, and the value of K is 64;
[0106] S53: Combining the reconstruction error and KL divergence mentioned above, the model's loss function can be defined as follows:
[0107]
[0108] Wherein, β is a hyperparameter, and the value of β ranges from (0, 1), for example, 0.2, which is used to adjust the regularization effect of KL divergence on the model;
[0109] S54: To be correct To find the gradient, we need to make z... u ~q φ (z u |x u The sampling process is differentiable, however, this is not feasible. Therefore, the following reparameterization technique is used for sampling:
[0110] z u =μ+∈⊙σ
[0111] Where ∈ is a random vector that follows a normal distribution. Each training round can be randomly generated;
[0112] S55: After the parameter re-parameter technique in step S54, The model is optimized using gradient descent with Adam as the optimizer and a learning rate of 0.001. During training, a batch of interaction vectors is input into the model.
[0113] The process of step S6 is as follows:
[0114] S61. Input the regularized user-item interaction matrix into the trained encoder to obtain the mean vector of each user, i.e., μ;
[0115] S62. Input the mean vector obtained above directly into the trained decoder, and use the probability vector π output by the decoder. u This represents the user's level of preference for each product. The products are then sorted from highest to lowest preference, and the top-N products that the user has not purchased are recommended.
[0116] Example 3
[0117] like Figure 1 As shown, a personalized recommendation method based on a linear variational autoencoder includes the following steps:
[0118] S1: Based on user and product interaction data, construct a user-product implicit feedback interaction matrix, including the following steps:
[0119] S11: In this embodiment, the pre-constructed Yelp2018 dataset is selected. This dataset contains 31,668 users, 38,048 products, and a total of 1,561,406 observed interactions. The products in this dataset are restaurants and other business establishments, i.e., recommendations for business establishments are made. A user-product implicit feedback interaction matrix is constructed based on this dataset. Specifically: if there is interaction between the user and the product, the value at the corresponding position in the matrix is 1; otherwise, it is 0.
[0120] S2: Regularize the row and column vectors of the user-product implicit feedback interaction matrix, including the following steps:
[0121] S21: View the user-item implicit feedback interaction matrix as a bipartite graph of user and item node interactions. Summate each row of the interaction matrix to obtain a vector of the degree of each node. Construct a diagonal matrix using the elements of this vector as diagonal elements, called the user node degree matrix:
[0122] DU =Diag(X·1)
[0123] Where 1 represents a vector with all elements equal to 1 and a dimension of 38048, X represents the user-product implicit feedback interaction matrix, and Diag(·) represents constructing a diagonal matrix with the input vector as its diagonal elements.
[0124] S22: Similarly, for products, construct a product node degree matrix:
[0125] D I =Diag(1 T ·X)
[0126] in,
[0127] S23: Regularize the row and column vectors of the user-product implicit feedback interaction matrix using the obtained user and product node degree matrices, as shown in the following formula:
[0128]
[0129] S3: Input the regularized user-item implicit feedback interaction matrix into a linear variational autoencoder. After encoding, the latent vector of each user can be obtained, including the following steps:
[0130] S31: Interaction vector for each user ,Right now Each row is transformed linearly to obtain a mean vector:
[0131]
[0132] in, and Let be the trainable weight matrix and bias vector, respectively. For ease of description, let be... Its dimension is set to K=64;
[0133] S32: Interaction vector for each user Right now Each row is transformed linearly to obtain a standard deviation vector:
[0134]
[0135] in, and These are the trainable weight matrix and bias vector, respectively. In actual encoding, since the output value of the above linear transformation is not necessarily a positive number, it is generally assumed that the output is the natural logarithm of the standard deviation, i.e. With σ 2As diagonal elements, construct the covariance matrix ∑ u =diag(σ 2 ).in,
[0136] S33: Using the mean vector and covariance matrix obtained in S31 and S32, construct a unique... Gaussian distribution of latent vectors And by sampling within this distribution, we obtain The latent vector z u .
[0137] S4: Input the latent vectors of the users obtained in step S3 into the decoder of the linear variational autoencoder to reconstruct the interaction vectors of each user, ultimately forming a reconstructed user-item interaction matrix, including the following steps:
[0138] S41: Input the user's latent vector obtained in step S3 into the decoder, and the decoder outputs a probability vector. Simultaneously calculate the number of items n that user u has interacted with. u π u The calculation method is as follows:
[0139] π u =softmax(z u ·W θ +b θ )
[0140] in, and These are the trainable weight matrix and bias vector;
[0141] S42: with π u and n u As parameters, construct a multinomial distribution Mult(π) u n u The reconstructed interaction vector of user u can be obtained by sampling from this multinomial distribution.
[0142] S5: Using training techniques from variational autoencoders, train a linear variational autoencoder, including the following steps:
[0143] S51: Calculate the reconstruction error of user u based on the probability vector obtained in step S4:
[0144]
[0145] S52: Calculate q φ (z u |x u ) and zu The prior distribution p θ (z u The KL divergence between p and p, where p θ (z u () is a standard normal distribution The purpose is to q φ (z u |x u Constraints are applied to ensure that q is the value of multiple users. φ (z u |x u The accumulated result can approximate the standard normal distribution.
[0146]
[0147] Where K is the dimension of μ and σ;
[0148] S53: Combining the reconstruction error and KL divergence mentioned above, the model's loss function can be defined as follows:
[0149]
[0150] Where β is a hyperparameter used to adjust the regularization effect of KL divergence on the model, it can be set to a number between 0 and 1, such as 0.2;
[0151] S54: To be correct To find the gradient, we need to make z... u ~q φ (z u |x u The sampling process is differentiable, but this is not feasible. Therefore, the following reparameterization technique is used for sampling:
[0152] z u =μ+∈⊙σ
[0153] in, It is a random vector that follows a normal distribution. This can be randomly generated in each training epoch. In actual training, only one z sample is needed. u That's enough, and
[0154] S55: After the parameter re-parameter technique in step S54, Optimization can be achieved using gradient descent. Adam is used as the optimizer with a learning rate of 0.001. During training, a batch of interaction vectors, such as those from 256 users, is typically input into the model for training.
[0155] S6: Using the trained model, input the regularized user-item implicit feedback interaction matrix into the model for reconstruction, obtaining the probability vector of each user for all items, which is used to generate recommendations, including the following steps:
[0156] S61: Input the regularized user-item interaction matrix into the trained encoder to obtain the mean vector of each user, i.e., μ;
[0157] S62: Input the mean vector obtained above directly into the trained decoder, and use the probability vector π output by the decoder. u This represents the user's level of preference for each product. For each user, products that the user has not interacted with are identified from 38,048 products. These products are then sorted from highest to lowest preference, and the top-N products are recommended to the user.
[0158] The same or similar labels correspond to the same or similar parts;
[0159] The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.
[0160] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A personalized recommendation method based on a linear variational autoencoder, characterized in that, The method comprises the following steps: S1: constructing a user-goods implicit feedback interaction matrix according to user and goods interaction data; S2: normalizing row and column vectors of the user-goods implicit feedback interaction matrix; S3: inputting the user-goods implicit feedback interaction matrix after normalization into an encoder of a linear variational autoencoder, and obtaining an implicit vector of each user through encoding; S4: inputting the implicit vector of each user obtained in step S3 into a decoder of the linear variational autoencoder, and reconstructing an interaction vector of each user to finally form a reconstructed user-goods interaction matrix; The process of step S4 is: S41: input the user's implicit vector obtained in step S3 into a decoder, and the decoder outputs a probability vector At the same time, the number of commodities interacted by the user , The calculation method is as follows: wherein, and are trainable weight matrices and bias vectors, respectively; S42: with and as parameters, construct a polynomial distribution , the reconstructed user's interaction vector is sampled from this polynomial distribution, i.e. ; S5: training the linear variational autoencoder in combination with training techniques in the variational autoencoder; The process of step S5 is: S51: Calculate the reconstruction error of the user based on the probability vector calculated in step S4: S52: compute and the Kullback-Leibler divergence between the prior distribution where, is the standard normal distribution with the goal of constraining so that the cumulative result of across multiple users can approach the standard normal distribution : wherein is and dimension; S53: in combination with the reconstruction error and the KL divergence, the loss function of the model is defined as follows: wherein, is a hyperparameter used to adjust the regularization effect of the KL divergence on the model; S54: To sample the gradient, one needs to make the sampling process differentiable, however this is not possible, use the following reparameterization trick for sampling: wherein is a random vector, following a normal distribution Each training round can be generated randomly; S55: After the reparameterization trick of step S54, The model is optimized by the method of gradient descent, using Adam as the optimizer and a learning rate of 0.
001. During the training process, one batch of interaction vectors is input into the model for training. S6: inputting the user-goods implicit feedback interaction matrix after normalization into the linear variational autoencoder to perform reconstruction and obtain a probability vector of each user to all goods for generating recommendations by using the trained linear variational autoencoder. 2.The personalized recommendation method based on linear variational autoencoder according to claim 1, characterized in that, The process of step S1 is: Collecting user-goods interaction data, counting the number of users and goods, and constructing a user-goods implicit feedback interaction matrix, specifically as follows: if there is interaction between a user and a good, the value of the corresponding position in the matrix is 1, otherwise 0. 3.The personalized recommendation method based on linear variational autoencoder according to claim 2, characterized in that, The process of step S2 is: S21: regarding the user-goods implicit feedback interaction matrix as a two-part graph of user nodes and goods nodes, summing each row of the interaction matrix to obtain a vector of the degree of each node, and constructing a diagonal matrix with the elements of the vector as diagonal elements, which is called a user node degree matrix: wherein, is a vector of all elements being 1, denotes the user-item implicit feedback interaction matrix, denotes constructing a diagonal matrix with the input vector as diagonal elements; S22: for goods, a goods node degree matrix is constructed: S23: normalizing the row and column vectors of the user-goods implicit feedback interaction matrix by using the obtained user and goods node degree matrices, and the formula is as follows: 。 4.The personalized recommendation method based on linear variational autoencoder according to claim 3, characterized in that, The process of step S3 is: S31: For each user's interaction vector i.e. For each row of the matrix, a mean vector is obtained by linear transformation: wherein, and are trainable weight matrices and bias vectors, respectively, denoted ; S32: For each user's interaction vector i.e. For each row of the matrix, a standard deviation vector is obtained by a linear transformation: wherein, and are trainable weight matrices and bias vectors, respectively, and since the values output by the above linear transformations are not necessarily positive, the outputs are considered to be the natural logarithm of the standard deviation, i.e. with as the diagonal elements, a covariance matrix is constructed. S33: Using the mean vector and covariance matrix obtained in S31 and S32, construct a unique... Gaussian distribution of latent vectors And by sampling within that distribution, we obtain latent vectors . 5.The personalized recommendation method based on linear variational autoencoder according to claim 4, characterized in that, The process of step S6 is: S61. input the regularized user-item interaction matrix into the trained encoder to obtain the mean vector of each user, i.e. ; S62. The mean vector obtained above is directly input into the trained decoder, and the probability vector output by the decoder is used to represent the user's preference degree for each commodity The commodities are sorted according to the preference degrees from high to low, and the top-N commodities not purchased by the user are recommended to the user. 6.The personalized recommendation method based on linear variational autoencoder according to claim 5, characterized in that, the value range of is (0, 1). 7.The personalized recommendation method based on linear variational autoencoder according to claim 6, characterized in that, The value of k is 64. 8.The personalized recommendation method based on linear variational autoencoder according to claim 7, characterized in that, the value of 0.2.
Citation Information
Patent Citations
Website recommendation method and equipment based on variational self-encoding data fusion
CN112231582A
Cross-domain recommendation method based on double-flow sliced Wasserstein auto-encoder
CN113536116A