CN110866145B - Co-preference-assisted deep single-class collaborative filtering recommendation method - Google Patents
Co-preference-assisted deep single-class collaborative filtering recommendation method Download PDFInfo
- Publication number
- CN110866145B CN110866145B CN201911080135.2A CN201911080135A CN110866145B CN 110866145 B CN110866145 B CN 110866145B CN 201911080135 A CN201911080135 A CN 201911080135A CN 110866145 B CN110866145 B CN 110866145B
- Authority
- CN
- China
- Prior art keywords
- user
- item
- constructing
- interaction
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000001914 filtration Methods 0.000 title claims abstract description 29
- 230000003993 interaction Effects 0.000 claims abstract description 64
- 238000012549 training Methods 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 10
- 238000013528 artificial neural network Methods 0.000 claims abstract description 7
- 230000008878 coupling Effects 0.000 claims abstract description 7
- 238000010168 coupling process Methods 0.000 claims abstract description 7
- 238000005859 coupling reaction Methods 0.000 claims abstract description 7
- 239000013598 vector Substances 0.000 claims description 51
- 230000006870 function Effects 0.000 claims description 22
- 239000011159 matrix material Substances 0.000 claims description 13
- 238000012360 testing method Methods 0.000 claims description 13
- 238000013135 deep learning Methods 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 7
- 238000005457 optimization Methods 0.000 claims description 6
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 4
- 230000004927 fusion Effects 0.000 claims description 3
- 230000003213 activating effect Effects 0.000 claims description 2
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000004913 activation Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000001808 coupling effect Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000007477 logistic regression Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000011524 similarity measure Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/70—Information retrieval; Database structures therefor; File system structures therefor of video data
- G06F16/73—Querying
- G06F16/735—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Databases & Information Systems (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a collaborative filtering recommendation method for a depth list class assisted by common preference, which comprises the following steps: data acquisition and processing; dividing the data set; constructing a common preference auxiliary model; training models and project recommendations. The personal depth potential factor representation network (DLFR) adopted by the invention can be independently used as the probability for predicting user item interaction, and can also be used as a sub-network in the depth single-class collaborative filtering recommendation model assisted by common preference to output the coupling relation of user item interaction. The method and the device use single-class collaborative filtering (OCCF) and deep neural network (MLP) to learn the common preference of the user neighbors on the item category and the interaction between the user and the item, are beneficial to learning the influence of the deeper user neighbor preference on the user item interaction, and have good recommendation accuracy and interpretation.
Description
Technical Field
The invention belongs to the technical field of computer artificial intelligence, and particularly relates to a co-preference-assisted deep single-class collaborative filtering recommendation method.
Background
The recommendation system plays an important role in helping users find items meeting personal preferences in a huge video library. To provide useful advice to the user, we capture and understand information that the user feedback. In a real scenario, explicit data is not well acquired, while implicit data is better available, such as page link clicks, video viewing, product purchases, and other user/item interaction histories. However, the implicit data has problems of uncertainty, quarter sparsity, unbalance and the like, and higher recommendation precision is difficult to obtain by using the implicit constraint.
Disclosure of Invention
Based on the defects in the prior art, the technical problem solved by the invention is to provide a co-preference-assisted depth single-class collaborative filtering recommendation method, which has good recommendation accuracy and interpretability.
In order to solve the technical problems, the invention is realized by the following technical scheme:
the invention combines the explicit characteristics of demographic information and the like with potential factors, predicts the user-item interaction probability and recommendation visibility influenced by the explicit characteristics by learning the preference of a user neighbor to a certain class of articles, and provides a depth single class collaborative filtering recommendation method assisted by the common preference, which comprises the following steps:
step S1: data acquisition and processing;
step S2: dividing a data set, taking the collected data set in a leave-one-out method, taking the latest user item interaction item as a test set of each user, taking the other items as a training data set, randomly extracting items except the user interaction item set, and forming a test data set of the user together with the test items;
step S3: constructing a common preference auxiliary model;
step S4: training a model and recommending items, wherein the training data set and the testing data set obtained in the step S2 are respectively used for training and evaluating the common preference auxiliary model constructed in the step S3, and the common preference is obtained by learning the interaction relation between the natural neighbor users with similar explicit characteristics with the current user and a certain class of objects and indirectly utilizing the explicit characteristics.
Preferably, the specific steps of the step S3 are as follows:
s301, constructing an input layer: the input layer comprises four input contents, namely a user natural neighbor vector, an item category vector and a user/item id;
s302, constructing a co-preference auxiliary single-class collaborative filtering model;
s303, constructing an output layer.
The specific steps of the step S302 are as follows:
s30201, constructing a personal depth latent factor representation network: predicting probability a of user-project interaction through web learning by inputting a single thermal vector of user identification u and project identification v L ,a L Is a 'with a neighbor-based common preference representation network output user neighbors highly abstract of item categories' L Is consistent in dimension;
s30202, constructing a neighbor-based public preference representation network: learning through full-connection layer user natural neighbor NB and project category VF to obtain a common preference representation a 'of high abstraction of user neighbor on project category' L ;
S30203, constructing a common preference-assisted deep learning network: output a 'of step S30202' L And output a of step S30201 L Merging into a serial vector, processing by a full connection layer, outputting the final interaction vector, and activating the final output by a Sigmoid function.
Further, the specific steps for constructing the personal depth latent factor representation network in the step S30201 are as follows:
s3020101, constructing a vector mapping layer: the single-hot vector full-connection layer for inputting the user identification u and the item identification v is converted into vectors p and q with specified dimensions, wherein the p and q represent potential vectors of the user u and the item v respectively;
s3020102, capturing interactions between user items: above the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the p and q corresponding elements, and then the output linear vector r represents the linear user-item interaction, expressed as:
s3020103, user item nonlinear interaction: through the processing of the full connection layer, the full connection layer can be converted into a non-linear interaction between the user and the object;
s3020104, outputting the user item interaction probability or the user item probability or the coupling relation of the user item interaction.
Optionally, the specific steps of constructing the common preference assisting deep learning network in step S30203 are as follows:
s3020301, selecting a natural neighbor method: calculating a user similarity matrix of a data set according to the explicit characteristics of the user, and then taking the first K similar users as natural neighbors NB of the user, wherein two similarity indexes and Hamming distances are respectively used;
s3020302, constructing a vector mapping layer: inputting natural neighbors and item categories of the layer active user;
s3020303 above the project category input layer, embedding sparse vectors into dense vectors of project categories using a fully connected layer, and then outputting the user neighbors and project category embedded fully connected layer as vector E c And inputs the same into a multi-layer fully connected neural network, and learns the high-level abstract common preference of neighbors to item categories.
Optionally, the specific steps of training the model and recommending the project in the step S4 are:
s401, constructing a loss function: calculating a loss value of the model using the cross entropy loss function;
s402, constructing an optimization function: using Adam as an optimization function of the model;
s403, project recommendation: and sending the information of one user and the project information into a common preference auxiliary single-class collaborative filtering model, outputting the predicted project interaction probability of the user, and judging whether to recommend the project to the user.
By the method, the depth single-class collaborative filtering recommendation method assisted by the common preference has at least the following beneficial effects:
(1) The invention provides a deep neural network model based on combination of explicit characteristics and preference expression of personal potential factors and implicit feedback, so as to improve the performance of single-class collaborative filtering OCCF.
(2) The invention indirectly learns the high-level relation between the explicit characteristics of the user and the article category by learning the interaction between the natural neighbors of the active user and the article of a certain class instead of directly using the explicit characteristics so as to fully play the role of the explicit characteristics.
(3) The personal depth potential factor representation network (DLFR) can be independently used for predicting the probability of user item interaction, and can also be used as a sub-network in a depth single-class collaborative filtering recommendation model assisted by common preference to output the coupling relation of user item interaction.
(4) The method and the device use single-class collaborative filtering (OCCF) and deep neural network (MLP) to learn the common preference of the user neighbors to the project category and the interaction between the user and the project, and are beneficial to learning the influence of the deeper user neighbor preference on the interaction of the user project.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention, as well as to provide further clarity and understanding of the above and other objects, features and advantages of the present invention, as described in the following detailed description of the preferred embodiments, taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings of the embodiments will be briefly described below.
FIG. 1 is a flow chart of a co-preference assisted deep single class collaborative filtering recommendation method of the present invention;
FIG. 2 is a flow diagram of the present invention for constructing a common preference assistance model;
FIG. 3 is a flow chart of the method for constructing a co-preference assisted single-class collaborative filtering model;
FIG. 4 is a flow chart of the present invention for constructing a personal depth latent factor representation network (DLFR);
FIG. 5 is a flow diagram of the present invention for constructing a common preference assisted deep learning network (NB-OCCF);
FIG. 6 is a block flow diagram of a training model and project recommendation of the present invention;
FIG. 7 is a block diagram of a method for constructing a co-preference assisted single class collaborative filtering recommendation in accordance with the present invention.
Detailed Description
The following detailed description of the invention, taken in conjunction with the accompanying drawings, illustrates the principles of the invention by way of example and by way of a further explanation of the principles of the invention, and its features and advantages will be apparent from the detailed description. In the drawings to which reference is made, the same or similar components in different drawings are denoted by the same reference numerals.
As shown in fig. 1 to 7, the common preference assisted depth single class collaborative filtering recommendation method of the present invention includes the following steps:
s1, data acquisition and processing: downloading Moielens 100K and Movielens 1M data sets on Grouplens website, and grading the original matrixThe binary preference matrix R epsilon {0,1} is translated, wherein each element is represented as either 0 or 1, indicating whether there is interaction between the user-item pair.
"UserID", "MovieID", "Rating", "time stamp" datasets in the scoring matrix after conversion are as follows:
UserID | MovieID | Rating | Timestamp |
1 | 1993 | 1 | 978300760 |
the feature data of the item includes "MovieID", "Title", "Genres", as follows:
MovieID | Title | Genres |
1 | Toy Story(1995) | Animation|Children's|Comedy |
the demographic information data of the user includes "userID", "Gender", "Age", "occupancy", "Zip-code", as follows:
UserID | Gender | Age | Occupation | Zip-code |
1 | F | 1 | 10 | 48067 |
s2, dividing a data set: the collected data set adopts a leave-one-out method, the latest user item interaction item (the score of the user on the item) is used as a test set of each user, the other items are used as training sets, 99 items except the user interaction item set are randomly extracted, and the 99 items and the test items form a test data set of the user. The training set data is used for training a model and learning and predicting the probability of user-project interaction; the test dataset data is used to evaluate the generalization ability of the model.
S3, constructing a common preference auxiliary model: personal depth latent factor represents network (DLFR) and neighbor-based co-preference represents network (NB-CPR); a common preference is given to assisted deep learning networks (NB-OCCF).
S4, training a model and recommending items: the training data set and the test data set obtained in the step S2 are respectively used for training and evaluating the common preference auxiliary model constructed in the step S3, and the common preference is obtained by indirectly utilizing the explicit characteristics through learning the interaction relation between the natural neighbor users with similar explicit characteristics with the current user and a certain class of objects, so that the collaborative filtering recommendation method is assisted to improve the recommendation accuracy.
As shown in fig. 2, the specific steps for modeling in the step S3 are as follows:
s301, constructing an input layer: the input layer includes four input contents, a user natural neighbor vector, an item category vector, and a user/item id. The input layer is in the form of (user_vec_input, item_attr_input, user_id_input, item_id_input).
For example, [2346 1195 2285 5247 5302 2202 2162 2155 2137 2133] for NB1 where UserID=1 of user_vec_input.
The movieid=1 input of item_attr_input is [ 00 00 00 010 00 00 00 00 0].
In Keras, the input layer may be implemented with the following code:
user_vector_input=Input(shape=(K,),dtype='float32',name='user_vector_input')item_attr_input=Input(shape=(18,),dtype='float32',name='item_attr_input')user_id_input=Input(shape=(1,),dtype='float32',name='user_id_input')item_id_input=Input(shape=(1,),dtype='float32',name='item_id_input')
where K is the number of natural neighbors of the user.
S302, constructing a common preference auxiliary single-class collaborative filtering model: personal depth latent factor represents a network (DLFR); the common preference based on neighbors represents a network (NB-CPR) and the common preference assisted deep learning network (NB-OCCF).
S303, constructing an output layer: the user-item interaction probabilities affected by the explicit features are predicted.
In Keras, the output layer can be implemented with the following code:
topLayer=Dense(1,activation='sigmoid',init='lecun_uniform',name='topLayer')(dense_1)
as shown in fig. 3, the step S302 builds a personal depth latent factor representation network (DLFR); the specific steps of the neighbor-based common preference representation network (NB-CPR) and the common preference assisted deep learning network (NB-OCCF) are as follows:
s30201, build personal depth latent factor representation network (DLFR): predicting probability a of user-project interaction through DLFR network learning by inputting one-hot vector (one-hot) of user identification u and project identification v L 。a L Is a 'with a highly abstract common preference representation of user neighbors to item categories output by a neighbor-based common preference representation network (NB-CPR)' L Is uniform in dimension.
S30202, constructing a neighbor-based public preference representation network (NB-CPR): learning through full-connection layer user natural neighbor NB and project category VF to obtain a common preference representation a 'of high abstraction of user neighbor on project category' L 。
S30203, constructing a common preference assisted deep learning network (NB-OCCF): output a 'of NB-CPR' L Output a from DLFR L Merging into a serial vector (denoted as r), and then processing by a full connection layer to output the final interaction vector. The final output of NB-OCCF is activated by a Sigmoid function to compress to the range 0,1]。
Thus, the training data set for NB-OCCF may be represented asy (i) > } i e {1, 2.,. The target of NB-OCCF can be expressed as a predictive probability:
P Θ (y=1|u,v,NB,v c )
NB-OCCFThe final output expression is:
the same loss function as the DLFR was used to train the NB-OCCF model.
In Keras, the output layer implementation code is as follows:
merge_attr_id_embedding=merge([attr_2,id_2],mode='concat')
dense_1=Dense(256)(merge_attr_id_embedding)
dense_1=Activation('relu')(dense_1)
as shown in fig. 4, the specific steps for constructing the personal depth latent factor representation network (DLFR) in the step S30201 are as follows:
s3020101, constructing a vector mapping layer: the one-hot full connection layer of the input user identification u and the item identification v is converted into vectors p and q with specified dimensions, wherein p and q respectively represent potential vectors of the user u and the item v and are expressed as follows by a formulaWherein the weight matrix W u òR k×|U| And W is v òR k×|v| The same is true among the input layer and the embedded layer.
In Keras, the code to construct the vector mapping layer of the personal depth latent factor representation network is as follows:
user_id_input=Input(shape=(1,),dtype='float32',name='user_id_input')user_id_Embedding=Embedding(input_dim=num_users,output_dim=64,name='user_id_Embedding',embeddings_initializer=RandomNormal(mean=0.0,stddev=0.01,seed=None),W_regularizer=l2(0),input_length=1)user_id_Embedding=Flatten()(user_id_Embedding(user_id_input))item_id_inputInput(shape=(1,),dtype='float32',name='item_id_input')item_id_Embedding=Embedding(input_dim=num_items,output_dim=64,name='item_id_Embedding',embeddings_initializer=RandomNormalmean=0.0,stddev=0.01,seed=None),W_regularizer=l2(0),input_length=1)item_id_EmbeddingFlatten()(item_id_Embedding(item_id_input))
s3020102, capturing interactions between user items: above the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the p and q corresponding elements, and then the output linear vector r represents the linear user-item interaction, expressed as:unlike the basic matrix silver-sub decomposition model, where the user-project interactions are modeled using inner products, in a multi-layer fully connected neural network, the abstract user-project interactions at a learning depth are trained to represent all user and project latent factors, since the user and item codes are represented as one-hot codes, and each column of Wu and Wv represents a certain user or project latent factor p and q, respectively. For a given item v, each dimension of v measures the extent to which the item has these factors. For a given user u, each dimension of u measures the user's interest level in the item's corresponding factors. Therefore, the element productThe output vector r of the layer captures the linear interaction between the user and the item.
In Keras, code to construct interactions between captured user items of a personal depth latent factor representation network is as follows:
merge_id_embedding=merge([user_id_Embedding,item_id_Embedding],mode='mul')
s3020103, user item nonlinear interaction: through the processing of the fully connected layer, it can be converted into a non-linear interaction between the user and the object, expressed as:
...
wherein W is 1 ,W 2 ,...,W L And b 1 ,b 2 ,...,b L Representing weight matrix and bias for each layer, a 1 ,a 2 ,...,a L Representing the output of each layer activated by the ReLU activation function.
In Keras, the code for constructing a user item interaction to convert a personal depth latent factor representation network to a nonlinear interaction is as follows:
id_1=Dense(64)(merge_id_embedding)
id_1=Activation('relu')(id_1)
id_2=Dense(32)(id_1)
id_2=Activation('relu')(id_2)
s3020104, outputting a user item interaction probability or a coupling relationship of the user item probability or the user item interaction: the purpose of DLFR as a single network is to predict the probability of user-project interactionsThe invention uses a logistic regression sigmoid function to compress the output of the model to interval [0,1 ]]And interprets the objective problem as probability p Θ (y=1|u, v|) usingAs a prediction output: />Wherein W is 0 Is the weight matrix of the last layer, a L Is the output of the upper layer, b 0 Is the bias vector of the last layer. For the OCCF problem, there is no negative sample, so some negative sample needs to be extracted with a negative sample strategy. In the present invention, a uniform negative sampling strategy is employed, and counterexamples are extracted from interactions not observed in matrix Y. For example one example d= { < (u) in a given training dataset (i) ,v (i) ),y (i) > -and corresponding prediction output->(i represents the ith example and i e {1,2,3,., |D| } in the case of DLFR as a subnetwork of NB-OCCF, the final output is a) L I.e. the non-linear interactions of the user items are coupling relations of the interactions of the user items.
In Keras, the code to construct a personal depth latent factor representing the user item interaction probability of the network is as follows:
topLayer=Dense(1,activation='sigmoid',init='lecun_uniform',name='topLayer')(id_2)
as shown in fig. 5, the specific steps for constructing the common preference-assisted deep learning network (NB-OCCF) in step S30203 are as follows:
s3020301, selecting a natural neighbor method: and calculating a user similarity matrix of one data set according to the explicit characteristics of the user, and then taking the first K similar users as natural neighbors NB of the user, wherein two similarity indexes COS and Hamming distance are respectively used. For COS, it is a measure of similarity of coupling properties for classified objects that takes into account coupling between properties. Hamming distance is a simple and common method of computing similarity using classification attributes. This was set up to observe the effect of different similarity measures on OCCF performance.
For example: the implementation code for obtaining 10, 20.30, 40, 50, 100 natural neighbors of a user using hamming distances is as follows:
mat=loadCrossDistanceMat()
argsortmat=argSortMatrix(mat)
for i in[10,20,30,40,50,100]:
getNeighbors(argsortmat,i)
s3020302, constructing a vector mapping layer: the input layer is active the user's natural neighbors and item categories. For example, training example (u, v) at DLFR, neighbor users u and v will be entered into items of the NB-CPR category. Representing the natural neighbors of all users as T vectors NB 1 ,NB 2 ,...,NB T . T is the number of neighbors, each neighbor NB i (i e {1,2,., T }) is a one-hot code containing |u| natural neighbor identities. Thus, for each training example, each active user has |U| natural neighbors. The embedded vector of each natural neighbor is learned by the embedded layer. Thus, obtaining user neighbor E through the embedding layer for all user neighbors NB ,E NB(i) Representing the embedding of each neighbor.
When (when)The combining weights are assigned different values depending on the particular application. In the present invention, for each +.>The same value is assigned. The effect of the more similar neighbors on the hybrid embedding is not necessarily absolutely high. Thus, the mean of all neighborhood embedding is calculated as hybrid embedding.
Another input to NB-CPR is the category of items in the DLFR model. The item categories are obtained by category attributes of the item (e.g., movie type) or clustering methods (e.g., K-Means algorithm). In the present invention, the item type attribute is taken as the item category and is encoded into a multiple thermal vector v c =(v c1 ,v c2 ,...,v |c| ),c i ∈{c 1 ,c 2 ,...,c |c| Expressed as a set of categories for all items. Each of which isThe value of (2) may be 1 or 0 depending on whether the item has c or not i Is a category of (2). This representation method can maintain the versatility of encoding categories of items belonging to a plurality of categories.
The implementation code is as follows:
user_vector_input=Input(shape=(20,),dtype='float32',name='user_vector_input')user_vector_embedding=Embedding(input_dim=6041,output_dim=64,name='user_vector_embedding',embeddings_initializer=RandomNormal(mean=0.0,stddev=0.01,seed=None),W_regularizer=l2(0),input_length=10)user_vector_embedding=user_vector_embedding(user_vector_input)user_vector_embedding=Lambda(lambda x:K.mean(x,axis=1))(user_vector_embedding)item_attr_input=Input(shape=(18,),dtype='float32',name='item_attr_input')item_attr_embedding=Dense(18,activation='relu',name='item_attr_embedding')(item_attr_input)
s3020303, above the project category input layer, embedding sparse vectors into dense vectors of the project categories using a fully connected layer. Then the user neighbors and item categories are embedded into the full connection layer to be output as a vector E c And inputs the same into a multi-layer fully connected neural network, and learns the high-level abstract common preference of neighbors to item categories. It is expressed as:
...
wherein W' 1 ,W′ 2 ,...,W′ L And b' 1 ,b′ 2 ,...,b′ L Weight matrix and bias representing each layer, a' 1 ,a′ 2 ,...,a′ L Representing the output of the layers activated by the ReLU activation function.
The implementation code is as follows:
merge_attr_embedding=merge([user_vector_embedding,item_attr_embedding],mode='concat')
attr_1=Dense(32)(merge_attr_embedding)
attr_1=Activation('relu')(attr_1)
attr_2=Dense(16)(attr_1)
attr_2=Activation('relu')(attr_2)
as shown in fig. 6, the specific steps of training the model and recommending the project in the step S4 are as follows:
s401, constructing a loss function: the loss value of the model is calculated using a cross entropy loss function, the loss function formula is as follows:
parameters Θ of the loss function that can then be learned:
in Keras, the cross entropy loss function implementation code is as follows:
model.compile(optimizer=Adam(lr=learning_rate),
loss='binary_crossentropy',metrics=['accuracy','mae'])
s402, constructing an optimization function: using Adam as an optimization function of the model; wherein, the learning rate parameter is set to 0.001, and other parameters are only required to be the default value of the keras.
S403, project recommendation: and sending the information of one user and the project information (user id and project id) into a common preference auxiliary single-class collaborative filtering model, outputting predicted project interaction probability of the user, and judging whether to recommend the project to the user.
In summary, the co-preference assisted depth list collaborative filtering recommendation method (NB-OCCF, one-class Collaborative Filtering) of the present invention comprises the steps of: s1, data acquisition; s2, dividing a data set; s3, constructing a model: (1) Neighbor-based public preference indicates network (NB-CPR, neighborhood based common preference representation): calculating a user similarity matrix through the distance of similarity indexes (cosine similarity COS and Hamming) by using the explicit characteristics of the user to obtain natural neighbors of the user; the natural neighbors of the user and the categories of the predicted items are input into a fully connected neural network, and a highly abstract common preference representation of the user neighbors for the item categories is learned. (2) Personal depth latent factor represents a network (DLFR, deep latent factors representation): inputting ids of a user and a project respectively to obtain tensors with the same dimension, learning interaction between the user and the project through the MLP, and predicting the probability of user-project interaction; (3) Common preference assisted deep learning network (NB-OCCF): the probability of interacting with the user-project is represented by the high-level abstract common preference of the user neighbor to the project category and is input to the full-connection layer to output the final interaction vector; s4, training a model and recommending items: the five-level scores of the user items are used as the input of the model, and the model continuously updates parameters in the training process, so that the relationship between the common preference of the user on natural neighbors and predicted item categories and potential factors of the user interaction with the items is better learned.
While the invention has been described with respect to the preferred embodiments, it will be understood that the invention is not limited thereto, but is capable of modification and variation without departing from the spirit of the invention, as will be apparent to those skilled in the art.
Claims (4)
1. The common preference assisted depth single-class collaborative filtering recommendation method is characterized by comprising the following steps of:
step S1: data acquisition and processing;
step S2: dividing a data set, taking the collected data set in a leave-one-out method, taking the latest user item interaction item as a test set of each user, taking the other items as a training data set, randomly extracting items except the user interaction item set, and forming a test data set of the user together with the test items;
step S3: constructing a common preference auxiliary model;
step S4: training a model and recommending items, wherein the training data set and the testing data set obtained in the step S2 are respectively used for training and evaluating the common preference auxiliary model constructed in the step S3, and the common preference is obtained indirectly by utilizing the explicit characteristics through learning the interaction relationship between the natural neighbor users with similar explicit characteristics with the current user and a certain class of objects;
the specific steps of the step S3 are as follows:
s301, constructing an input layer: the input layer comprises four input contents, namely a user natural neighbor vector, an item category vector and a user/item id;
s302, constructing a co-preference auxiliary single-class collaborative filtering model;
s303, constructing an output layer;
the specific steps of the step S302 are as follows:
s30201, constructing a personal depth latent factor representation network: prediction by learning a unique heat vector through the network by inputting a user identifier u and an item identifier vProbability of user-item interaction a L ,a L Is a 'with a neighbor-based common preference representation network output user neighbors highly abstract of item categories' L Is consistent in dimension;
s30202, constructing a neighbor-based public preference representation network: learning through full-connection layer user natural neighbor NB and project category VF to obtain a common preference representation a 'of high abstraction of user neighbor on project category' L ;
S30203, constructing a common preference-assisted deep learning network: output a 'of step S30202' L And output a of step S30201 L Merging into a serial vector, processing by a full connection layer, outputting the final interaction vector, and activating the final output by a Sigmoid function.
2. The collaborative filtering recommendation method for deep singleton assisted by common preferences according to claim 1, wherein the specific steps of constructing a personal depth latent factor representation network in step S30201 are as follows:
s3020101, constructing a vector mapping layer: the single-hot vector full-connection layer for inputting the user identification u and the item identification v is converted into vectors p and q with specified dimensions, wherein the p and q represent potential vectors of the user u and the item v respectively;
s3020102, capturing interactions between user items: above the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the p and q corresponding elements, and then the output linear vector r represents the linear user-item interaction, expressed as:
s3020103, user item nonlinear interaction: through the processing of the full connection layer, the full connection layer can be converted into a non-linear interaction between the user and the object;
s3020104, outputting the user item interaction probability or the user item probability or the coupling relation of the user item interaction.
3. The method for collaborative filtering recommendation of a common preference-assisted deep list class according to claim 1, wherein the specific steps of constructing a common preference-assisted deep learning network in step S30203 are as follows:
s3020301, selecting a natural neighbor method: calculating a user similarity matrix of a data set according to the explicit characteristics of the user, and then taking the first K similar users as natural neighbors NB of the user, wherein two similarity indexes and Hamming distances are respectively used;
s3020302, constructing a vector mapping layer: inputting natural neighbors and item categories of the layer active user;
s3020303 above the project category input layer, embedding sparse vectors into dense vectors of project categories using a fully connected layer, and then outputting the user neighbors and project category embedded fully connected layer as vector E c And inputs the same into a multi-layer fully connected neural network, and learns the high-level abstract common preference of neighbors to item categories.
4. The collaborative filtering recommendation method for deep singleton assisted by common preferences according to claim 1, wherein the specific steps of training the model and recommending the items in the step S4 are as follows:
s401, constructing a loss function: calculating a loss value of the model using the cross entropy loss function;
s402, constructing an optimization function: using Adam as an optimization function of the model;
s403, project recommendation: and sending the information of one user and the project information into a common preference auxiliary single-class collaborative filtering model, outputting the predicted project interaction probability of the user, and judging whether to recommend the project to the user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911080135.2A CN110866145B (en) | 2019-11-06 | 2019-11-06 | Co-preference-assisted deep single-class collaborative filtering recommendation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911080135.2A CN110866145B (en) | 2019-11-06 | 2019-11-06 | Co-preference-assisted deep single-class collaborative filtering recommendation method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110866145A CN110866145A (en) | 2020-03-06 |
CN110866145B true CN110866145B (en) | 2023-10-31 |
Family
ID=69653790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911080135.2A Active CN110866145B (en) | 2019-11-06 | 2019-11-06 | Co-preference-assisted deep single-class collaborative filtering recommendation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110866145B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111598644B (en) * | 2020-04-01 | 2023-05-02 | 华瑞新智科技(北京)有限公司 | Article recommendation method, device and medium |
CN112015894B (en) * | 2020-08-19 | 2024-03-26 | 银江技术股份有限公司 | Text single class classification method and system based on deep learning |
CN112084415B (en) * | 2020-09-17 | 2024-02-02 | 辽宁工程技术大学 | Recommendation method based on analysis of long-term and short-term time coupling relation between user and project |
CN112269927B (en) * | 2020-10-22 | 2024-05-28 | 辽宁工程技术大学 | Recommendation method based on session sequence dynamic behavior preference coupling relation analysis |
CN112256980A (en) * | 2020-10-23 | 2021-01-22 | 辽宁工程技术大学 | Dynamic graph attention network-based multi-relation collaborative filtering recommendation |
CN112765474B (en) * | 2021-01-28 | 2023-05-02 | 武汉大学 | Recommendation method and system based on depth collaborative filtering |
CN113011942B (en) * | 2021-03-10 | 2023-11-03 | 浙江大学 | Customized product demand collaborative filtering recommendation method based on three-layer neighbor selection framework |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110348968A (en) * | 2019-07-15 | 2019-10-18 | 辽宁工程技术大学 | A kind of recommender system and method analyzed based on user and project coupled relation |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7624095B2 (en) * | 2005-11-15 | 2009-11-24 | Microsoft Corporation | Fast collaborative filtering through sketch function based approximations |
US8037080B2 (en) * | 2008-07-30 | 2011-10-11 | At&T Intellectual Property Ii, Lp | Recommender system utilizing collaborative filtering combining explicit and implicit feedback with both neighborhood and latent factor models |
US10932003B2 (en) * | 2015-01-27 | 2021-02-23 | The Toronto-Dominion Bank | Method and system for making recommendations from binary data using neighbor-score matrix and latent factors |
-
2019
- 2019-11-06 CN CN201911080135.2A patent/CN110866145B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110348968A (en) * | 2019-07-15 | 2019-10-18 | 辽宁工程技术大学 | A kind of recommender system and method analyzed based on user and project coupled relation |
Non-Patent Citations (4)
Title |
---|
Quangui Zhang 等.A Generic Framework for Learning Explicit and Implicit User-Item Couplings in Recommendation.IEEE Access.2019,第7卷123944-123957. * |
周高云 ; 张雅云 ; 陈冬隐 ; 程红举 ; .一种神经网络与用户偏好相结合的协同过滤推荐算法.福建电脑.2016,(第01期),全文. * |
张全贵 等,.融合元数据及Attention 机制的深度联合学习推荐.计算机应用研究.2018,第36卷(第11期),全文. * |
张全贵 等,.融合元数据及隐式反馈信息的多层次联合学习推荐方法.计算机应用研究.2018,第35卷(第12期),第3635-3639页. * |
Also Published As
Publication number | Publication date |
---|---|
CN110866145A (en) | 2020-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110866145B (en) | Co-preference-assisted deep single-class collaborative filtering recommendation method | |
Cen et al. | Representation learning for attributed multiplex heterogeneous network | |
Ma et al. | Deep graph similarity learning: A survey | |
Luo et al. | Personalized recommendation by matrix co-factorization with tags and time information | |
Salehi et al. | Hybrid attribute-based recommender system for learning material using genetic algorithm and a multidimensional information model | |
Panagiotakis et al. | Improving recommender systems via a dual training error based correction approach | |
Antelmi et al. | A survey on hypergraph representation learning | |
He et al. | HI2Rec: Exploring knowledge in heterogeneous information for movie recommendation | |
Li et al. | Hypergraph transformer neural networks | |
Lu et al. | Learning from multi-view multi-way data via structural factorization machines | |
Wang et al. | Mrp2rec: Exploring multiple-step relation path semantics for knowledge graph-based recommendations | |
Huang et al. | Meta-path augmented sequential recommendation with contextual co-attention network | |
Deng et al. | Knowledge-aware sequence modelling with deep learning for online course recommendation | |
Hossain et al. | A neural engine for movie recommendation system | |
Liu et al. | TCD-CF: Triple cross-domain collaborative filtering recommendation | |
Li et al. | Capsule neural tensor networks with multi-aspect information for Few-shot Knowledge Graph Completion | |
Xi et al. | Graph factorization machines for cross-domain recommendation | |
Han et al. | GA-GWNN: Detecting anomalies of online learners by granular computing and graph wavelet convolutional neural network | |
CN115545833A (en) | Recommendation method and system based on user social information | |
Lu | Design of a music recommendation model on the basis of multilayer attention representation | |
Rawat et al. | An embedding-based deep learning approach for movie recommendation | |
Chuanyan et al. | Neural graph filtering for context-aware recommendation | |
Salamat | Heterogeneous Graph-Based Neural Network for Social Recommendations with Balanced Random Walk Initialization | |
Wang | Proactive Push Research on Personalized Learning Resources Based on Machine Learning | |
Vivek et al. | Personalized Outfit Compatibility Prediction Using Outfit Graph Network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |