Recommendation model based on improved auto-encoder and generative adversarial network
By improving the combined model of autoencoder and generative adversarial network, the problems of data loss and feature capture are solved, the accuracy and personalization of the recommendation system are improved, and more efficient recommendation result generation is achieved.
Patent Information
- Application Number
- CN202410921274.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-01
AI Technical Summary
The recommendation model based on the autoencoder is prone to errors due to data loss during the learning process, and it is difficult to capture the deep and complex feature information of users and items, affecting the accuracy and personalized effect of recommendations.
Adopt the combined model of improved autoencoder and generative adversarial network, selectively update model parameters, fuse interactive information between users and items, use generative adversarial training to improve expression ability and accuracy of generated data, and enhance the generalization ability and recommendation of the model Effect.
Effectively filter noise data, improve the ability to process sparse data, generate samples that are more in line with the real data distribution, and improve the quality of recommendations and the accuracy and stability of personalized recommendations.
Smart Images

Figure CN118886469A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation technology, and in particular to a recommendation system based on an improved autoencoder and a generative adversarial network. Background Art
[0002] An autoencoder is a neural network model of an unsupervised learning paradigm, and its core goal is to complete effective representation learning tasks by training the network. In its working process, the autoencoder first converts the input raw data vector x through the encoder to obtain a lower-dimensional intermediate representation vector h. This process is often called dimensionality reduction or feature extraction. This step aims to capture the core features of the input data while removing redundant information to provide a more compact and informative data representation for subsequent tasks. Then the low-dimensional data representation h is passed to the decoder to obtain a vector with the same dimension as the input layer. Some recommendation models based on autoencoders have been proposed, which effectively promoted the development of recommendation systems based on deep models and showed good application prospects.
[0003] Generative adversarial networks incorporate the idea of game theory into the neural network architecture. Through the game between the generator (G) and the discriminator (D), the two are prompted to learn continuously and the performance of the generator and the discriminator is gradually optimized. The generator is committed to deeply exploring the inherent distribution laws of real data and noise data, and generating samples that are very similar to the distribution of real data. This process not only challenges the recognition ability of the discriminator, but also promotes the generator's own deeper understanding and learning of data features. It has also been proven to be effective in solving data noise and data sparsity, which can provide new solutions for optimizing recommendation performance.
[0004] However, through in-depth analysis of the recommendation model based on the autoencoder, it is found that the model will generate new errors due to data loss during the learning process, thereby affecting the accuracy of the recommendation. To this end, the recommendation model proposed in the present invention improves the traditional autoencoder recommendation model. According to the interaction between the user and the item, the parameters are selectively updated during model training to avoid errors. At the same time, in order to alleviate the impact of data sparsity in the recommendation application scenario, the item label is integrated into the encoding process to increase the amount of available data. By enriching the dimension of the data, the generalization ability of the model is enhanced, and the model performance is further improved. The feature mining ability of the improved autoencoder model is limited, and it is difficult to capture the deeper and more complex feature information of users and items. In order to better characterize the complex interaction information between users and items, the data structure representation and fusion of complex interaction information are further studied, the intrinsic connection between users and items is more accurately captured, and diversified recommendations are made. The present invention proposes a recommendation model based on an improved autoencoder and a generative adversarial network, which adjusts the improved autoencoder with denoising function as a generator, and uses the idea of adversarial training to improve the expression ability of the model and the accuracy of generated data. Summary of the invention
[0005] In view of this, the present invention proposes a recommendation model based on an improved autoencoder and a generative adversarial network to help the recommendation system filter out noise data and improve the effectiveness of processing sparse data, better model user interaction behavior, and capture high-order interaction features, thereby generating samples that are more consistent with the real data distribution and improving the quality and effect of recommendations. A recommendation model based on an improved autoencoder and a generative adversarial network specifically includes the following:
[0006] The data collection and preparation module is used to acquire and clean the data collected in the database to obtain the required data information.
[0007] The user-item rating acquisition module is used as the interaction feature part of the encoder input.
[0008] The item label acquisition module is used to help the encoder obtain item features from labels and mine the category feature information of items.
[0009] The feature fusion module is used to fuse the user-item rating features and the item label features to generate a vector of fused item features.
[0010] The autoencoder module, as the generator part of the generative adversarial network, is used to generate data, which is used by the discriminator to distinguish the authenticity of the real data. The autoencoder will maximize the deception of the discriminator so that the discriminator will judge the generated data as true.
[0011] The discriminator module distinguishes the authenticity of the generated data from the autoencoder module and the real data, and maximizes its ability to distinguish the real data as true and the data generated from the autoencoder module as false.
[0012] The parameter updating module is used to optimize and update the parameters in the model.
[0013] The recommendation result acquisition module is used to push the top k items with the highest predicted scores to the target user and generate a personalized recommendation list for the target user.
[0014] The user item rating acquisition module of the present invention obtains the user's purchase behavior and user's behavior preference from the user's historical rating records, and reflects the user's preference characteristics through the rating data in the encoder module. Both models in the encoder use a fully connected neural network with the rating value r u,i and the one-hot value l of the item tag attribute t,i As input, the calculation process corresponding to the first model in the encoder is shown in formula (1), that is:
[0015]
[0016] Among them, s q is the feature component obtained from the item rating, is the weight of the score and label in the model, and S is the Sigmoid activation function.
[0017] The item label acquisition module of the present invention is used to obtain item features from labels. The corresponding calculation process is shown in formula (2), that is:
[0018]
[0019] where e q is the feature component obtained from the item label, is the weight of the score and label in the model, and S is the Sigmoid activation function.
[0020] The feature fusion module of the present invention is used to fuse the user preference feature and the item category feature. q and e q Afterwards, the two are added bit by bit to be fused. The calculation process is shown in formula (3):
[0021] h q =s q +e q , q=1,2,...,K (3)
[0022] Among them, h q Represents the result of fusion of the q-th dimension feature component.
[0023] The autoencoder module of the present invention is used to process the user preference vector to reconstruct the item rating vector. The calculation process is shown in formula (4):
[0024]
[0025] in, is the weight of the decoder. As the autoencoder part of the generator, it is mainly to learn the data distribution of the real rating vector, so as to improve the authenticity of the generated rating vector and the prediction accuracy of the model. This method introduces the binary cross entropy error (BCE Loss) as a core component of the objective function of the generator to strengthen the objective function of the generator. The objective function of the model generator A can be expressed by formula (5):
[0026]
[0027] in, Represents the item rating matrix generated by the generator, E i represents the true rating vector, With E i The dimensions are the same, NS i represents the vector obtained by negative sampling, C i represents the conditional distribution vector, N i is the number of negative samples, λ is the regularization coefficient, and the regularization part consists of the reconstruction loss function of negative samples and the regularization proposed in Chapter 3.
[0028] The discriminator module of the present invention is used to measure the difference between the generated item rating matrix and the real item rating matrix. The model uses a multi-layer perceptron as a discriminator, extracts the features of the input data by stacking multiple fully connected layers, and uses ReLU and Sigmoid activation functions. Its input includes the masked matrix of the generator and the real item rating matrix, and the output is the authenticity judgment of these data. During the training process, the discriminator accepts input from the real data set and the generator, and tries to maximize the accuracy of the discrimination of these two types of data. The objective function of the discriminator and the overall objective function of the model are shown in formula (6) and formula (7), respectively:
[0029]
[0030] MinLoss(J)=J D +J A (7)
[0031] The parameter updating module of the present invention is used to avoid errors in the model during the training process, and whether there is interaction between the user and the item is used as a constraint condition for updating the model parameters. In order to avoid errors in the recommendation model during the training process, whether there is interaction between the user and the item is used as a constraint condition for updating the model parameters, the update rules of the model parameters are designed as follows:
[0032]
[0033] The recommendation result acquisition module of the present invention is used to generate a recommendation list for the target user u. The specific process includes: arranging the prediction scores with high reliability in descending order, setting the number of items to be recommended k, selecting the first k highest-scoring items and pushing them to the target user u, thereby forming a personalized recommendation list for the target user u.
[0034] The present invention proposes a recommendation model based on an improved autoencoder and a generative adversarial network. During the learning process, the weights in the model are selectively updated according to the interaction between the user and the item, which effectively avoids the introduction of noise or errors caused by missing data into the model, and ensures the effectiveness of the learning process. At the same time, the selective weight update method can also reduce the amount of calculation of the model, effectively improving the learning efficiency of the model. The present invention combines the generative adversarial network to enhance the model generation capability, generate more realistic and user-friendly recommendation results, and generate more diverse recommendation content, with better stability, improve the personalization and reliability of the recommendation, and better meet the personalized needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0036] Figure 1 It is a schematic diagram of the system process of the present invention;
[0037] Figure 2 It is a system framework diagram of the present invention;
[0038] Figure 3 This is the comparison of the Precision@5 value, Recall@5 value, F1@5 value and NDCG@5 value of the present invention with other models under three data sets. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clear, a recommendation model based on an improved autoencoder and a generative adversarial network proposed by the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation method described herein is only used to explain the present invention and is not used to limit the present invention. Changes, modifications, additions, modifications or substitutions made by ordinary technicians in the technical field within the scope of the present invention should be included in the scope of the claims of the present invention.
[0040] Figure 1 Schematic diagram of the recommendation model process based on improved autoencoder and generative adversarial network of the present invention. Figure 1 It can be seen that the recommendation model based on the improved autoencoder and the generative adversarial network proposed in the present invention includes obtaining and cleaning data information from the database; according to the improved autoencoder, as the generator part of the generative adversarial network, extracting data features, processing the sparsity and noise problems of the data, and generating the user's rating matrix; according to the discriminator module, a multi-layer perceptron is used to distinguish the generated rating matrix from the real item rating matrix; using the generative adversarial network for training to predict the rating value of the non-interaction area; sorting the final predicted rating set, and recommending the top k items in the ranking to the target user to form a personalized recommendation list.
[0041] Figure 2 It is a framework diagram of the recommendation model based on improved autoencoder and generative adversarial network of the present invention. Figure 2 It can be seen that the recommendation model based on improved autoencoder and generative adversarial network proposed in the present invention includes data collection and preparation module, user-item rating acquisition module, item label acquisition module, feature fusion module, autoencoder module, discriminator module, parameter update module and recommendation result acquisition module. The data collection and preparation module extracts and cleans data from the database to obtain the required information; the user-item rating acquisition module is used as the interactive feature part of the encoder input; the item label acquisition module is used for the encoder to obtain item features from the label and mine the category feature information of the item; the feature fusion module fuses the user-item rating features and the item label features to generate a fused item feature vector; the autoencoder module, as a generator of the generative adversarial network, is used to generate data, and the discriminator determines its authenticity. Its goal is to maximize the deception of the discriminator so that it judges the generated data as true; the discriminator module is used to distinguish the authenticity of the data generated by the autoencoder module and the real data, and strives to maximize its ability to identify the real data as true and the generated data as false; the parameter update module is used to optimize and update the parameters in the model; the recommendation result acquisition module is used to push the top k items with the highest predicted scores to the target user to generate a personalized recommendation list.
[0042] Further, the following situation is used as an example to illustrate:
[0043] There are M users U={u1,u2,...,u M} and N items I = {i1, i2, ..., i N}, the rating domain is {1, 2, 3, 4, 5}, and the user-item rating matrix is [R] M×N indicates; r ui represents the user's rating value on item i, U(i, j) represents the set of users who have rated both item i and item j, i.e., the common rating item; U i represents the set of all users who have evaluated item i.
[0044] First, the system data is acquired and cleaned through the data acquisition and preparation module to obtain the variables in the hypothesis. The specific implementation steps of the proposed autoencoder recommendation system based on item interaction constraints are as follows:
[0045] S1: The data collection and preparation module extracts the required data from the database, including user ID, project ID and rating information;
[0046] S2: Item label acquisition module, used to obtain user preference features from existing rating information. This module in the encoder uses a fully connected neural network to calculate the rating value r u,i and the one-hot value l of the item tag attribute t,i As input, the corresponding calculation process is shown in formula (11) and formula (12), that is:
[0047]
[0048] Among them, s q is the feature component obtained from the item rating, e q is the feature component obtained from the item label, and are the weights of the score and label in the model respectively, and S is the Sigmoid activation function;
[0049] S3: User-project rating acquisition module, which takes the rating information of user projects as the data input of the improved encoder and adopts a fully connected neural network. The relevant formula is as described in S2.
[0050] S4: Fusion preference feature module, used to integrate user preference features and item category features. After generating s_q and e_q, the two are fused by bitwise addition. The calculation process is shown in formula (13):
[0051] h q =s q+e q , q=1,2,...,K (13)
[0052] Among them, h q Represents the result of fusion of the q-th dimension feature component.
[0053] S5: Fusion feature processing module, used to process the user preference vector to reconstruct the item rating vector. Its calculation process is shown in formula (14):
[0054]
[0055] in, is the decoder weight.
[0056] S6: Autoencoder module, used to process the data of the fusion feature module to obtain a comprehensive feature vector. This comprehensive feature vector is used as the input of the autoencoder. The autoencoder learns the low-dimensional representation and reconstruction information of the features through the encoding and decoding process. The output of the autoencoder, that is, the reconstructed feature representation, will be used as the input of the generator part of the generative adversarial network (GAN) to generate more realistic data or prediction results. In this way, the autoencoder module not only effectively fuses user ratings and item labels, but also provides high-quality input features for the generative adversarial network, enhancing the recommendation performance of the entire system.
[0057] S7: Discriminator module module, used to evaluate the authenticity of the data output by the generator in the Generative Adversarial Network (GAN) and the real data. It first receives two types of input data: one is the data generated by the autoencoder, and the other is the real data. The features of the input data are extracted through a series of neural network layers, and these features are input into a classifier, which uses the Sigmoid activation function to output a value between 0 and 1, indicating the probability of the authenticity of the data. The discriminator evaluates its performance by calculating the binary cross entropy loss, and optimizes its weights through back propagation to continuously improve its ability to distinguish between generated data and real data. In each training cycle, the generator and the discriminator are trained alternately, and the discriminator strives to improve its ability to distinguish between true and false data, providing feedback to the generator so that the generator can generate more realistic data.
[0058] S8: Parameter update constraint module, used to avoid errors in the model during training, using whether there is interaction between users and items as a constraint for model parameter update. In order to avoid errors in the recommendation model during training, using whether there is interaction between users and items as a constraint for model parameter update, the update rules for model parameters are designed as follows:
[0059]
[0060] S9: Recommendation result acquisition module, which is used to generate a recommendation list for the target user u. The process includes: sorting the predicted scores from high to low internally, setting the number of items to be recommended k, and selecting the top k items with the highest scores to push to the target user u, thereby forming a personalized recommendation list.
[0061] Figure 3 The proposed method is measured in three data and the above four aspects of the performance indicators, and compared with other methods. The four metrics are: Precision, Recall, F1 value (F1) and Normalized Discounted Cumulative Gain (NDCG). Their calculation methods and measurement contents are as follows:
[0062]
[0063] The level of precision directly reflects the accuracy of the model in prediction, which helps to understand the model's ability to identify items that users are really interested in. Recall reflects the number of real points of interest covered by the model, and shows the comprehensiveness of the model in capturing user interests. F1 value (F1) is the harmonic mean of precision and recall, which can balance the weight between precision and recall to a certain extent, providing a more comprehensive performance evaluation perspective. DCG represents the discounted cumulative gain of the first k items in the recommendation list, and IDCG represents the optimal value of DCG theory. NDCG reflects the ranking of items in the recommendation list. Normalized discounted cumulative gain (NDCG) evaluates the ranking performance of the model, taking into account the ranking position of items in the user's interest list, and giving higher weights to items with higher rankings, thereby more accurately reflecting the model's ability in generating recommendation lists.
Claims
1. A recommendation model based on improved autoencoders and generative adversarial networks to limit the errors caused by missing data during model training, including the following: The data collection and preparation module is used to acquire and clean the data collected in the database to obtain the required data information. The user-item rating acquisition module is used as the interaction feature part of the encoder input. The item label acquisition module is used to help the encoder obtain item features from labels and mine the category feature information of items. The feature fusion module is used to fuse the user-item rating features and the item label features to generate a vector of fused item features. The autoencoder module, as the generator part of the generative adversarial network, is used to generate data, which is used by the discriminator to distinguish the authenticity of the real data. The autoencoder will maximize the deception of the discriminator so that the discriminator will judge the generated data as true. The discriminator module distinguishes the authenticity of the generated data from the autoencoder module and the real data, and maximizes its ability to distinguish the real data as true and the data generated from the autoencoder module as false. The parameter updating module is used to optimize and update the parameters in the model. The recommendation result acquisition module is used to push the top k items with the highest predicted scores to the target user and generate a personalized recommendation list for the target user.
2. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The item rating acquisition module is used to obtain the user's purchase behavior and behavior preferences from the user's historical rating records, and the encoder module reflects the user's preference characteristics through the rating data. Both models in the encoder use a fully connected neural network with the rating value r u,i and the one-hot value l of the item tag attribute t,i As input, the calculation process corresponding to the first model in the encoder is shown in formula (1), that is: Among them, s q is the feature component obtained from the item rating, is the weight of the score and label in the model, and S is the Sigmoid activation function.
3. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The item tag acquisition module is used to obtain item features from tags. The corresponding calculation process is shown in formula (2), that is: where e q is the feature component obtained from the item label, is the weight of the score and label in the model, and S is the Sigmoid activation function.
4. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The feature fusion module is used to fuse the user preference feature and the item category feature. q and e q Afterwards, the two are added bit by bit to be fused. The calculation process is shown in formula (3): h q =s q +e q ,q=1,2,…,K (3) Among them, h q Represents the result of fusion of the q-th dimension feature component.
5. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The autoencoder module is used to process the user preference vector to reconstruct the item rating vector. The calculation process is shown in formula (4): in, is the decoder weight. As the autoencoder part of the generator, it is mainly used to learn the data distribution of the real rating vector, so as to improve the authenticity of the generated rating vector and the prediction accuracy of the model. This method introduces the binary cross entropy error (BCE Loss) as a core component of the objective function of the generator to strengthen the objective function of the generator. The objective function of the model generator A can be expressed by formula (5): in, represents the item rating matrix generated by the generator, e i represents the true rating vector, With E i The dimensions are the same, NS i represents the vector obtained by negative sampling, C i represents the conditional distribution vector, N i is the number of negative samples, λ is the regularization coefficient, and the regularization part consists of the reconstruction loss function of negative samples and the regularization proposed in Chapter 3.
6. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The discriminator module is used to measure the difference between the generated item rating matrix and the real item rating matrix. The model uses a multi-layer perceptron as a discriminator, extracts the features of the input data by stacking multiple fully connected layers, and uses ReLU and Sigmoid activation functions. Its input includes the masked matrix of the generator and the real item rating matrix, and the output is the authenticity judgment of these data. During the training process, the discriminator accepts input from the real data set and the generator, and tries to maximize the accuracy of the discrimination of these two types of data. The objective function of the discriminator and the overall objective function of the model are shown in formula (6) and formula (7), respectively: MinLoss(J)=J D +J A (7)。 7. The recommendation model based on improved autoencoder and generative adversarial network as claimed in claim 1, It is characterized in that The parameter update module is used to avoid errors in the model during training, and uses whether there is interaction between users and items as a constraint for updating model parameters. In order to avoid errors in the recommendation model during training, the update rules of the model parameters are designed as follows:
Citation Information
Patent Citations
Recommendation system implementation method for generating user representation based on adversarial learning
CN116662675A
Generative adversarial network-based score credible recommendation system
CN116910351A
Cited By
Recommendation model training method, recommendation method and related device
CN120806043A
Training method of recommendation model, recommendation method and related device
CN120806043B
