Collaborative filtering recommendation method, server and storage medium

Through the combination of dual automatic encoder and multi-layer perceptron, the user-project scoring information is fully utilized, and the problem of insufficient recommendation performance in the existing technology is solved, achieving better user-project representation and recommendation effects.

CN114647794BInactive Publication Date: 2024-11-08WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210245140.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing collaborative filtering recommendation method uses the user-project interaction matrix, it is difficult to make full use of the scoring information, resulting in insufficient recommendation performance and difficult to model complex user-project interaction relationships.

Method used

The dual automatic encoder is used to encode and decode the user and project vectors, generate potential representations, and combine multi-layer perceptrons to perform cascading inputs to learn the complex mapping between user-item representation and scores, making full use of scoring information.

Benefits of technology

It improves recommendation performance, can effectively learn user-project interaction functions, provide more accurate recommendation results, is highly adaptable, and is easy to solve optimization problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647794B_ABST
    Figure CN114647794B_ABST
Patent Text Reader

Abstract

The present invention discloses a collaborative filtering recommendation method, a server and a storage medium, and relates to the field of information recommendation technology. The method comprises the following steps: training samples to obtain a set of user and item vectors; using an autoencoder to encode and decode the vectors to obtain a set of potential representations; calculating the element product φ1 of the potential representation; cascading the user-item potential representations as the input of a multilayer perceptron to calculate the output value φ2; cascading φ1 and φ2, and calculating the predicted score #imgabs0# to construct a loss function, and optimizing the model parameters; iterating and repeating until the model converges, and outputting a collaborative filtering recommendation model. Compared with the prior art, the advantages of the present invention are as follows: the present invention makes full use of the user-item rating information to obtain a better user-item representation. It has the characteristics of high adaptability and easy solution of optimization problems, and can effectively solve the collaborative filtering recommendation problem and achieve better recommendation performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information recommendation, and in particular to a collaborative filtering recommendation method, a server and a storage medium based on a dual autoencoder. Background Art

[0002] With the rapid development of the Internet, the amount of information on the Internet has increased significantly, making it impossible for users to obtain the information that is truly useful to them when faced with a large amount of information, resulting in an increasingly serious problem of information overload. Recommendation systems play an important role in alleviating information overload. They recommend information and products that users are interested in to users based on their information needs and interests, and have been widely used in many online services. Collaborative filtering is an effective method for achieving personalized recommendations. It generally uses the nearest neighbor technology, uses the user's historical preference information to calculate the distance between users, and then uses the weighted evaluation value of the target user's nearest neighbor users' evaluation of the product to predict the target user's preference for a specific product, so that the system can recommend the target user based on this preference.

[0003] Matrix Factorization (MF) is the most commonly used collaborative filtering technique, which represents users and items in a shared latent space and reconstructs the user-item interactions using their latent vectors. MF uses a simple linear decomposition, which may not be sufficient to model complex user-item interactions. To address this issue, Neural Collaborative Filtering (NCF) uses a cascade of user embeddings and item embeddings as input to a multi-layer perceptron model for prediction, and the nonlinearity of deep neural networks is used to learn the complex mapping between user-item representations and scores. However, the NCF method does not fully utilize the user-item rating information. In reality, the user-item interaction matrix reflects the user's preference for the items, and the user-item rating information is important for providing accurate recommendations.

[0004] Therefore, a collaborative filtering recommendation method is needed that can retain the ability of neural network models to learn any user-item interaction function and obtain better latent user-item factors by making extensive use of rating information. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the above-mentioned background technology and provide a collaborative filtering recommendation method, server and storage medium based on dual autoencoders to improve recommendation performance.

[0006] In a first aspect, a collaborative filtering recommendation method is provided, comprising the following steps:

[0007] Step 1: Select samples from the data set, construct a user-item interaction matrix, select m user vectors and n item vectors from the user-item interaction matrix as training samples, and obtain a user vector set {U1,…,Um} and the set of item vectors {V1,…,V n};

[0008] Step 2: Use the autoencoder to encode and decode the user vector and the item vector respectively to obtain the user potential representation set {U′1,…,U′ m} and the set of potential representations of items {V′1,…,V′ n};

[0009] Step 3: Calculate the element product φ1 of the user's latent representation and the item's latent representation;

[0010] Step 4: Cascade the user potential representation and the item potential representation and use them as the input of the multilayer perceptron to calculate the output value φ2 of the multilayer perceptron;

[0011] Step 5: Cascade the element product φ1 and the output value φ2 of the multilayer perceptron and calculate the predicted score Construct loss function and optimize model parameters;

[0012] Step 6, iteratively repeating Step 3 to Step 5 until the model converges, and outputting a collaborative filtering recommendation model;

[0013] Step 7: Verify the classification effect, predict the sample label, compare it with the true label, and calculate the overall classification accuracy.

[0014] Furthermore, the objective function of the learning potential representation of the autoencoder in step 2 is as follows:

[0015]

[0016]

[0017] Among them, U i represents the original user vector, Represents the reconstructed user vector, V j represents the original item vector, represents the reconstruction item vector;

[0018] in,

[0019] U′ i =σ(W1U i +b1)

[0020]

[0021] V′ j =σ(W2V j +b2)

[0022]

[0023] Among them, W represents the weight matrix, b represents the bias vector, σ represents the activation function, and U′ i Represents the user's potential representation, V′ j Represents the potential representation of the project.

[0024] Furthermore, in step 3, the calculation formula of the element product φ1 is as follows:

[0025] φ1=U′ i ⊙V′ j

[0026] Among them, ⊙ represents the element-wise product operation.

[0027] Furthermore, the calculation formula of the output value φ2 of the multilayer perceptron in step 4 is as follows:

[0028]

[0029] Among them, a L , W L and b L Represent the activation function, weight matrix and bias vector of the L-th layer perceptron respectively.

[0030] Furthermore, the predicted score in step 5 The calculation formula is as follows:

[0031]

[0032] Among them, σ represents the Sigmoid function, h T Represents the weight matrix, and the loss function is constructed as follows,

[0033]

[0034] Among them, α and β are pre-set hyperparameters.

[0035] Furthermore, in step 6, when the difference between the loss function values ​​before and after two iterations is less than 10 -3 When , the model is considered to have converged and the collaborative filtering recommendation model is output.

[0036] In a second aspect, a server is provided, comprising a processor and a memory for storing a program executable by the processor, wherein when the processor executes the program stored in the memory, the collaborative filtering recommendation method is implemented.

[0037] According to a third aspect, a storage medium is provided, which stores a program, and when the program is executed by a processor, the collaborative filtering recommendation method is implemented.

[0038] Compared with the prior art, the advantages of the present invention are as follows:

[0039] (1) For the collaborative filtering recommendation problem, the user-item interaction matrix is ​​used as input during the training process, and user vectors and item vectors are extracted from it to represent users and items, thereby enhancing the representation ability of users and items.

[0040] (2) Use an autoencoder to encode and decode user vectors and item vectors to obtain the latent representations of users and items.

[0041] (3) Use a multi-layer perceptron to model the latent representations of users and items and learn a complex mapping between user-item representations and scores.

[0042] (4) The present invention makes full use of user-item rating information to obtain better user-item representation and learn linear features and nonlinear features at the same time.

[0043] (5) The present invention has the characteristics of high adaptability and easy to solve optimization problems, which can effectively solve the collaborative filtering recommendation problem and achieve better recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of the steps of the collaborative filtering recommendation method of the present invention. DETAILED DESCRIPTION

[0045] Reference will now be made in detail to specific embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Although the present invention will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the present invention to the embodiments described. On the contrary, it is intended to cover changes, modifications and equivalents included in the spirit and scope of the present invention as defined by the appended claims. It should be noted that the method steps described herein can all be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.

[0046] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0047] Note: The example to be introduced below is only a specific example, and is not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can apply the concept of the present invention to construct more embodiments not mentioned in this specification by reading this specification.

[0048] An autoencoder is an artificial neural network used for semi-supervised and unsupervised learning. Its function is to express the input information with the input information as the learning target. An autoencoder can learn latent feature representations. Therefore, it is widely used in computer vision and text processing. In order to make full use of the limited information in the user-item rating matrix, we use dual autoencoders to learn latent user-item factors.

[0049] Based on the success of deep learning latent feature representation for image and text data, this embodiment proposes a collaborative filtering recommendation method based on dual autoencoders. This method uses dual autoencoders to simultaneously learn the hidden representations of users and items, and minimizes the deviation of training data by learning user-item representations. The embeddings of users and items, as well as all available interactions for each user and item, are learned by using dual autoencoders. Then, based on the combination of user-item embeddings, a nonlinear layer is used to capture complex relationships and improve the recommendation performance of the model.

[0050] See also Figure 1 The collaborative filtering recommendation method based on dual autoencoders shown in FIG. 1 includes the following steps:

[0051] Step 1: Select samples from the data set, construct a user-item interaction matrix, select m user vectors and n item vectors from the user-item interaction matrix as training samples, and obtain a user vector set {U1,…,U m} and the set of item vectors {V1,…,V n};

[0052] Step 2: Use the autoencoder to encode and decode the user vector and the item vector respectively to obtain the user potential representation set {U′1,…,U′ m} and the set of potential representations of items {V′1,…,V′ n};

[0053] Step 3: Calculate the element product φ1 of the user's latent representation and the item's latent representation;

[0054] Step 4: Cascade the user potential representation and the item potential representation and use them as the input of the multilayer perceptron to calculate the output value φ2 of the multilayer perceptron;

[0055] Step 5: Cascade the element product φ1 and the output value φ2 of the multilayer perceptron and calculate the predicted score Construct loss function and optimize model parameters;

[0056] Step 6, iteratively repeating Step 3 to Step 5 until the model converges, and outputting a collaborative filtering recommendation model;

[0057] Step 7: Verify the classification effect, predict the sample label, compare it with the true label, and calculate the overall classification accuracy.

[0058] The specific steps are as follows:

[0059] Step 1: Select a certain proportion of samples from the data set and construct a user-item interaction matrix. If there is interaction between the user and the item, the corresponding score in the user-item interaction matrix is ​​1. If there is no interaction between the user and the item, the corresponding score in the user-item interaction matrix is ​​0. In the user-item interaction matrix, rows represent user vectors and columns represent item vectors. Select m user vectors and n item vectors as training samples to obtain the user vector set {U1,…,U m} and the set of item vectors {V1,…,V n}.

[0060] Step 2: Use the autoencoder to encode and decode the user vector and item vector respectively. The encoding and decoding process is as follows:

[0061] U′ ′ =σ(W1U i +b1)

[0062]

[0063] V′ j =σ(W2V j +b2)

[0064]

[0065] Among them, W represents the weight matrix, b represents the bias vector, σ represents the activation function, and U′ i Represents the user's potential representation, V′ j Represents the potential representation of the project. Given the input space and feature space, the autoencoder solves the mapping between the two to minimize the reconstruction error of the input feature:

[0066]

[0067]

[0068] Among them, U i represents the original user vector, Represents the reconstructed user vector, V j represents the original item vector, Represents the reconstructed item vector. After the solution is completed, the hidden layer features output by the encoder are regarded as the representation of the input data.

[0069] Step 3: Calculate the element-wise product φ1 of the user latent representation and the item latent representation as follows:

[0070] φ1=U′ i ⊙V′ j

[0071] Among them, ⊙ represents the element-wise product operation.

[0072] Step 4: The interactions between users and items can be very complex. Standard matrix factorization assumes linear relationships by decomposing the user-item matrix, which is not sufficient to model the effect of collaborative filtering. In order to have higher flexibility and nonlinearity, a multilayer perceptron is used to model the user-item interactions:

[0073]

[0074]

[0075] …

[0076]

[0077] Among them, a L , W L and b L Represent the activation function, weight matrix and bias vector of the Lth layer perceptron respectively. ReLu is selected as the activation function because it has the advantages of mimicking biological principles, more efficient gradient descent and back propagation, and simplified calculation process.

[0078] Step 5: Concatenate the element-wise product φ1 and the output value φ2 of the multilayer perceptron and calculate the predicted score as follows:

[0079]

[0080] Among them, σ represents the Sigmoid function, h T Represents the weight matrix. For implicit data, the true score y ui It is 1 or 0, indicating whether there is an interaction between the user and the item. represents the probability of interaction between users and items. In order to learn the model parameters, the likelihood function is defined as:

[0081]

[0082] Among them, Y + represents the positive sample set, Y - Represents the negative sample set, with the negative logarithm of the likelihood function as:

[0083]

[0084] In order to learn the parameters of the autoencoder at the same time, the optimization objective function (construction loss function) is expressed as follows:

[0085]

[0086] Among them, α and β are pre-set hyperparameters. The optimization of the objective function can be performed by performing stochastic gradient descent. By adopting probabilistic processing, implicit feedback recommendation is solved as a binary classification problem.

[0087] Step 6: Repeat steps 3 to 5 iteratively. When the model parameter optimization changes are small, for example, the difference between the two iterations of the corresponding objective function (loss function) value is less than 10 -3 , the model is considered to have converged and the collaborative filtering recommendation model is output.

[0088] Step 7: Verify the classification effect, predict the label of the test sample, compare it with the true label, and calculate the overall classification accuracy (the ratio of the number of correctly predicted samples to the number of all samples).

[0089] The implementation platform of the embodiment of the present invention is Pytorch. The foundations such as data reading and writing, basic mathematical operations, and optimization solutions are well-known technologies in the technical field and will not be elaborated here.

[0090] Based on the same inventive concept, an embodiment of the present application also provides a server, including a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, all or part of the method steps of the above method are implemented.

[0091] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the method steps of the above method are implemented.

[0092] The present invention implements all or part of the process in the above method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signal and telecommunication signal.

[0093] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, all or part of the method steps in the above method are implemented.

[0094] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0095] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Car rd), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0096] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, servers or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0097] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), servers, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0098] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0100] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A collaborative filtering recommendation method, characterized in that: The following steps are involved: Step 1: Select samples from the data set, construct a user-item interaction matrix, select m user vectors and n item vectors from the user-item interaction matrix as training samples, and obtain a user vector set. and items vector collection ; Step 2: Use the autoencoder to encode and decode the user vector and the item vector respectively to obtain a user potential representation set. and the set of potential representations of items ; Step 3: Calculate the element-wise product of the user latent representation and the item latent representation ; Step 4: Cascade the user potential representation and the item potential representation and use them as the input of the multilayer perceptron to calculate the output value of the multilayer perceptron ; Step 5: Cascade the element products and the output value of the multilayer perceptron , and calculate the prediction score , construct the loss function and optimize the model parameters; Step 6, iteratively repeating Step 3 to Step 5 until the model converges, and outputting a collaborative filtering recommendation model; Step 7: Verify the classification effect, predict the sample label, compare it with the true label, and calculate the overall classification accuracy; The objective function of the automatic encoder in step 2 for learning potential representation is as follows: in, represents the original user vector, represents the reconstructed user vector, represents the original item vector, represents the reconstruction item vector; in, Among them, W represents the weight matrix, b represents the bias vector, and σ represents the activation function. Represents the user's potential representation, Represents the potential representation of the project; The output value of the multilayer perceptron in step 4 The calculation formula is as follows: in, , and Represent the activation function, weight matrix and bias vector of the L-th layer perceptron respectively.

2. The collaborative filtering recommendation method according to claim 1, wherein: In step 3, the element product The calculation formula is as follows: in, Represents the element-wise product operation.

3. The collaborative filtering recommendation method according to claim 1, wherein: The prediction score in step 5 The calculation formula is as follows: Among them, σ represents the Sigmoid function, Represents the weight matrix, and the loss function is constructed as follows, Among them, α and β are pre-set hyperparameters.

4. The collaborative filtering recommendation method according to claim 3, characterized in that: In step 6, when the difference between the loss function values ​​before and after two iterations is less than When , the model is considered to have converged and the collaborative filtering recommendation model is output.

5. A server comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the collaborative filtering recommendation method according to any one of claims 1 to 4 is implemented.

6. A storage medium storing a program, characterized in that: When the program is executed by a processor, the collaborative filtering recommendation method according to any one of claims 1 to 4 is implemented.