CN110866145A - 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
- CN110866145A CN110866145A CN201911080135.2A CN201911080135A CN110866145A CN 110866145 A CN110866145 A CN 110866145A CN 201911080135 A CN201911080135 A CN 201911080135A CN 110866145 A CN110866145 A CN 110866145A
- Authority
- CN
- China
- Prior art keywords
- user
- item
- preference
- vector
- interaction
- 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.)
- Granted
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 31
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000003993 interaction Effects 0.000 claims abstract description 63
- 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 61
- 230000006870 function Effects 0.000 claims description 21
- 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
- 230000002452 interceptive effect Effects 0.000 claims description 4
- 230000000694 effects Effects 0.000 claims description 3
- 230000004927 fusion Effects 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000004913 activation Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 3
- 238000011524 similarity measure Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- BQCADISMDOOEFD-UHFFFAOYSA-N Silver Chemical compound [Ag] BQCADISMDOOEFD-UHFFFAOYSA-N 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000006243 chemical reaction Methods 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
- 238000003062 neural network model Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 239000004332 silver Substances 0.000 description 1
Images
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)
- Computational Linguistics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a co-preference assisted deep single-class collaborative filtering recommendation method, which comprises the following steps: data acquisition and processing; dividing a data set; constructing a co-preference auxiliary model; training models and item recommendations. The method adopts the personal depth latent factor to express that the network (DLFR) can be used for predicting the probability of user item interaction independently, and also can be used as a sub-network in a co-preference assisted deep single-class collaborative filtering recommendation model to output the coupling relation of user item interaction. The method and the system use single-class collaborative filtering (OCCF) and the deep neural network (MLP) to learn the common preference of the user neighbors to the item categories and the interaction between the users and the items, are beneficial to learning the influence of the deeper user neighbor preference on the user item interaction, and have good recommendation accuracy and interpretability.
Description
Technical Field
The invention belongs to the technical field of computer artificial intelligence, and particularly relates to a co-preference assisted depth single-class collaborative filtering recommendation method.
Background
The recommendation system plays an important role in helping users find items which are in line with personal preferences in a huge video-audio library. To provide useful suggestions to the user, we capture and understand the information that the user feeds back. In practical scenarios, explicit data is not well captured, while implicit data is better captured, such as page link clicks, video viewing, product purchases, and other user/item interaction history. However, the implicit data has the problems of uncertainty, quarterly sparsity, imbalance and the like, and high recommendation precision is difficult to obtain only by using implicit constraints.
Disclosure of Invention
Based on the defects of the prior art, the technical problem solved by the invention is to provide a common preference assisted deep 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 explicit characteristics such as 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 preferences of the neighbors of users to the preferences of certain type of articles, and provides a co-preference assisted deep single-type collaborative filtering recommendation method, which comprises the following steps:
step S1: data acquisition and processing;
step S2: dividing a data set, using the collected data set in a leave-one-out mode, using the latest user item interaction item as a test set of each user, using the other items as training data sets, randomly extracting items except the user interaction item set, and forming the test data set of the user together with the test items;
step S3: constructing a co-preference auxiliary model;
step S4: training models and item recommendation, wherein the training data set and the testing data set obtained in the step S2 are respectively used for training and evaluating the co-preference assisted model constructed in the step S3, and the co-preference is obtained by indirectly utilizing the explicit characteristics through learning the interaction relation between natural neighbor users having similar explicit characteristics with the current user and a certain class of articles.
Preferably, the specific step of step S3 is:
s301, constructing an input layer: the input layer comprises four input contents, namely a user natural neighbor vector, a project category vector and a user/project id;
s302, constructing a co-preference auxiliary single-type collaborative filtering model;
and S303, constructing an output layer.
The specific steps of step S302 are as follows:
s30201, constructing a personal depth potential factor representation network: predicting probability a of user-item interaction through network learning by inputting one-hot vectors of user identification u and item identification vL,aLIs represented by a highly abstract common preference representation a 'of user neighbors to item categories output by the network'LThe dimensions of the data are consistent;
s30202, constructing a public preference representation network based on the neighbor: highly abstract common preference representation a 'of user neighbors to item categories is obtained through learning through full-connection layer user natural neighbors NB and item categories VF'L;
S30203, constructing a co-preference assisted deep learning network: output a 'of step S30202'LAnd output a of step S30201LAnd combining the vectors into a vector connected in series, processing the vector by a full connection layer, outputting a final interactive vector, and finally outputting the interactive vector activated by a Sigmoid function.
Further, the specific steps of constructing the personal depth latent factor representation network in step S30201 are as follows:
s3020101, constructing a vector mapping layer: inputting a single-hot vector full-connection layer of a user identifier u and a project identifier v, converting the single-hot vector full-connection layer into vectors p and q of specified dimensions, wherein the p and the q respectively represent potential vectors of the user u and the project v;
s3020102, capturing interaction among user items: on top of the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the corresponding elements of p and q, and then outputs a lineThe sexual vector r represents a linear user-item interaction, represented as:
s3020103, user item nonlinear interaction: through the processing of the full connection layer, the non-linear interaction between the user and the article can be converted into a representation;
and 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 co-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 user explicit characteristics, and then taking the first K similar users as natural neighbors NB of the users, and respectively using two similarity indexes and a Hamming distance;
s3020302, constructing a vector mapping layer: inputting natural neighbors and item categories of layer activity users;
s3020303, embedding the sparse vector into the dense vector of the item category by using a full connection layer on the item category input layer, and then outputting the user neighbor and the item category embedded full connection layer as a vector EcAnd inputting the parameters into a multilayer fully-connected neural network to learn the highly abstract common preference of the neighbors to the item categories.
Optionally, the specific steps of training the model and recommending the item in step S4 are:
s401, constructing a loss function: calculating a loss value of the model by using a cross entropy loss function;
s402, constructing an optimization function: using Adam as an optimization function for the model;
s403, item recommendation: and sending the information of one user and the item information into a co-preference auxiliary single-type collaborative filtering model, outputting and predicting the interaction probability of the user to the item, and judging whether the item is recommended to the user.
Therefore, the co-preference assisted deep single-class collaborative filtering recommendation method has at least the following beneficial effects:
(1) the invention provides a deep neural network model combining preference representation and implicit feedback based on explicit characteristics and personal potential factors so as to improve the performance of single-class collaborative filtering of OCCF.
(2) The invention does not directly use the explicit characteristics, but indirectly learns the high-level relation between the explicit characteristics of the user and the object types by learning the interaction between the natural neighbors of the active user and a certain class of objects so as to fully play the role of the explicit characteristics.
(3) The individual depth latent factor representation network (DLFR) can be used for predicting the probability of user item interaction independently, and can also be used as a sub-network in a co-preference assisted depth single-class collaborative filtering recommendation model to output the coupling relation of user item interaction.
(4) The method and the system use single-class collaborative filtering (OCCF) and a deep neural network (MLP) to learn the common preference of the user neighbors on the item categories and the interaction between the users and the items, and are beneficial to learning the influence of the deeper user neighbor preference on the user item interaction.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following detailed description is given in conjunction with the preferred embodiments, together with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments will be briefly described below.
FIG. 1 is a block flow diagram of a co-preference assisted deep single-class collaborative filtering recommendation method of the present invention;
FIG. 2 is a block flow diagram of the present invention for constructing a co-preference assisted model;
FIG. 3 is a block diagram of a process for constructing a co-preference assisted single-class collaborative filtering model according to the present invention;
FIG. 4 is a block flow diagram of the present invention for constructing a personal depth latent factor representation network (DLFR);
FIG. 5 is a block diagram of a process for constructing a co-preference assisted deep learning network (NB-OCCF) according to the present invention;
FIG. 6 is a block flow diagram of a training model and item recommendation of the present invention;
FIG. 7 is a block diagram illustrating a structure of a collaborative filtering recommendation method for constructing a co-preference auxiliary single category according to the present invention.
Detailed Description
Other aspects, features and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, which form a part of this specification, and which illustrate, by way of example, the principles of the invention. In the referenced drawings, the same or similar components in different drawings are denoted by the same reference numerals.
As shown in fig. 1 to 7, the method for recommending deep single-class collaborative filtering assisted by common preference according to the present invention includes the following steps:
s1, data acquisition and processing: downloading MoieLens 100K and MovieLens 1M data sets in a Grouplens website, and using the original scoring matrixThe conversion is to a binarization preference matrix R e {0,1}, where each element is represented as 0 or 1, indicating whether there is an interaction between the user-item pair.
The "UserID", "MovieID", "Rating", "Timestamp" datasets in the scoring matrix after transformation are as follows:
UserID | MovieID | Rating | Timestamp |
1 | 1993 | 1 | 978300760 |
the characteristic data of the project include "MovieID", "Title", "Genres", as follows:
MovieID | Title | Genres |
1 | Toy Story(1995) | Animation|Children's|Comedy |
demographic information data of the user includes "user id", "genter", "Age", "occupancy", "Zip-code", as follows:
UserID | Gender | Age | Occupation | Zip-code |
1 | F | 1 | 10 | 48067 |
s2, dividing the data set: and (3) adopting a leave-one-out method for the collected data set, taking the latest user item interaction items (the scores of the user on the items) as a test set of each user, taking the other items as a training set, randomly extracting 99 items except the user interaction item set, and forming the test data set of the user together with the test items. The training set data is used for training the model and learning and predicting the probability of user-item interaction; the test data set data is used to evaluate the generalization ability of the model.
S3, constructing a co-preference assisted model: personal depth latent factor representation network (DLFR) and neighbor-based co-preference representation network (NB-CPR); a co-preference assisted deep learning network (NB-OCCF).
S4, training the model and recommending the item: the training data set and the testing data set obtained in the step S2 are respectively used for training and evaluating the co-preference assisted model constructed in the step S3, and the co-preference is obtained indirectly by using the explicit feature by learning the interaction relationship between the natural neighbor user having the similar explicit feature to the current user and a certain kind of articles, so that the collaborative filtering recommendation method is assisted to improve the recommendation accuracy.
As shown in fig. 2, the specific steps of establishing the model in step S3 are as follows:
s301, constructing an input layer: the input layer includes four input contents, a user natural neighbor vector, a project category vector, and a user/project id. The input layers are in the form of (user _ vec _ input, item _ attr _ input, user _ id _ input, item _ id _ input).
For example, NB1 with user _ vec _ input having a UserID of 1 is [ 2346119522855247530222022162215521372133 ].
The MovieID of item _ attr _ input is [ 000000010000000000 ] 1.
In Keras, the input layer can 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')
wherein K is the number of natural neighbors of the user.
S302, constructing a co-preference auxiliary single-type collaborative filtering model: personal depth latent factor representation network (DLFR); neighbor-based co-preference representation networks (NB-CPR) and co-preference assisted deep learning networks (NB-OCCF).
S303, constructing an output layer: 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 is to construct 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, constructing a personal depth latent factor representation network (DLFR): predicting probability a of user-item interaction through DLFR network learning by inputting one-hot vectors (one-hot) of user identification u and item identification vL。aLAnd a highly abstract common preference representation of user neighbor-to-item categories output by a neighbor-based common preference representation network (NB-CPR)a′LAre consistent in dimension.
S30202, constructing a neighbor-based public preference representation network (NB-CPR): highly abstract common preference representation a 'of user neighbors to item categories is obtained through learning through full-connection layer user natural neighbors NB and item categories VF'L。
S30203, constructing a co-preference assisted deep learning network (NB-OCCF): output a 'of NB-CPR'LAnd output a of DLFRLAnd combining the vectors into a vector (denoted as r) connected in series, and then processing the vector by a full connection layer to output a final interaction vector. The final output of NB-OCCF is activated by a Sigmoid function and is thus compressed to the range 0,1]。
Thus, the training data set for NB-OCCF may be represented asy(i)The target of > - < i ∈ {1, 2., | D | } and NB-OCCF can be expressed as a predicted probability:
PΘ(y=1|u,v,NB,vc)
the NB-OCCF model was trained using the same loss function as DLFR.
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 of constructing the personal depth latent factor representation network (DLFR) in step S30201 are as follows:
s3020101, constructing a vector mapping layer:converting a one-hot full-connection layer of input user identifications u and item identifications v into vectors p and q of specified dimensions, wherein p and q respectively represent potential vectors of the user u and the item v and are formulated asWherein the weight matrix WuòRk×|U|And WvòRk×|v|The same is true in the input layer and the embedding layer.
In Keras, the code that constructs 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 interaction among user items: above the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the corresponding elements of p and q, then the output linear vector r represents a linear user-item interaction, represented as:unlike the basic matrix silver decomposition model, in which the user-item interactions are modeled by inner products, in the multilayer fully-connected neural network, deep abstract user-item interactions are learned, Wu and Wv are trained to represent potential factors of all users and items, and since the codes of users and items are expressed as unique hot codes, the codes of Wu and WvEach column 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 level of interest in the item's corresponding factor. Thus, the output vector r of the element layer captures the linear interaction between the user and the item.
In Keras, the code building the personal depth latent factor to represent the interaction between the captured user items of the 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 representation of the non-linear interaction between the user and the article, represented as:
...
wherein, W1,W2,...,WLAnd b1,b2,...,bLWeight matrix and bias representing layers, a1,a2,...,aLThe output of each layer activated by the ReLU activation function is represented.
In Keras, the code that constructs the transformation of user item interactions into non-linear interactions of the personal depth latent factor representation network 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 the user item interaction probability or the user item probability or the coupling relation of the user item interaction: the purpose of DLFR as a single network is to predict the probability of user-item interaction, the invention uses the logistic regression sigmoid function to compress the output of the model to the interval [0, 1]And interpreting the target problem as a probability pΘ(y 1| u, v |), usingAs the prediction output:wherein W0Is the weight matrix of the last layer, aLIs the output of the previous layer, b0Is the bias weight vector of the last layer. For the OCCF problem, there are no negative samples, so a negative sample strategy is needed to extract some negative samples. In the present invention, a uniform negative sampling strategy is employed, and some counter-examples are drawn from the interactions not observed in matrix Y. E.g., one example in a given training dataset, D { < (u) } {(i),v(i)),y(i)> and corresponding prediction output(i represents the ith example and i ∈ {1,2, 3., | D | }. if DLFR is used as the sub-network of NB-OCCF, the final output is aLThat is, the non-linear interaction of the user item is the coupling relationship of the user item interaction.
In Keras, the code that constructs the probability that a person-deep latent factor represents a user-item interaction with a network is as follows:
topLayer=Dense(1,activation='sigmoid',init='lecun_uniform',name='topLayer')(id_2)
as shown in fig. 5, the specific steps of constructing the co-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 a data set according to the explicit characteristics of the users, and then taking the first K similar users as natural neighbors NB of the users, and respectively using two similarity indexes COS and Hamming distance. For COS, it is a coupled attribute similarity measure for classification objects that considers coupling between attributes. Hamming distance is a simple and common method of computing similarity using classification attributes. This setup was to observe the impact of different similarity measures on the OCCF performance.
For example: the implementation code for obtaining 10, 20.30, 40, 50, 100 natural neighbors of a user using hamming distance 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 natural neighbors and item categories of the layer active users are entered. For example, training example (u, v) in DLFR, neighbor users u and v will be entered into the entry of the NB-CPR category. Representing the respective natural neighbors of all users as T vectors NB1,NB2,...,NBT. T is the number of neighbors, each neighbor NBi(i e {1, 2.,. T }) is a one-hot code that contains | U | natural neighbor identifications. Thus, for each training example, each active user has | U | natural neighbors. The embedding vector of each natural neighbor is learned by the embedding layer. Thus, all user neighbors are passed through the embedding layer to obtain user neighbor ENB,ENB(i)Representing the embedding of each neighbor.
When in useThe combining weights are assigned different values depending on the particular application. In the present invention, for eachThe same values are assigned. The more hypothesisThe effect of being similar neighbors on hybrid embedding is not absolutely high. Thus, the mean of all neighborhood embeddings is calculated as a hybrid embeddings.
Another input to NB-CPR is the category of the item in the DLFR model. The item category is obtained by a category attribute of the item (e.g., movie type) or a clustering method (e.g., K-Means algorithm). In the present invention, item type attributes are treated as item categories and encoded as multiple heat vectors vc=(vc1,vc2,...,v|c|),ci∈{c1,c2,...,c|c|Denoted as a set of categories for all items. Each one of which isMay be 1 or 0 depending on whether the item has c or notiThe category (2). This representation method can maintain the versatility of encoding the categories of items belonging to multiple 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, embedding the sparse vector into the dense vector of the item category by using a full connection layer on the item category input layer. Then embedding user neighbors and item categories into a full connection layer and outputting the vector EcAnd inputting the parameters into a multilayer fully-connected neural network to learn the highly abstract common preference of the neighbors to the item categories. It is expressed as:
...
wherein, W'1,W′2,...,W′LAnd b'1,b′2,...,b′LRepresenting weight matrix and offset, a 'of each layer'1,a′2,...,a′LRepresenting 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 item in step S4 are as follows:
s401, constructing a loss function: the loss value of the model is calculated using a cross entropy loss function, which is formulated as follows:
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 for the model; the learning rate parameter is set to 0.001, and the default values of the keras are used for other parameters.
S403, item recommendation: and (3) sending information of one user and item information (user id and item id) into a common preference auxiliary single-type collaborative filtering model, outputting and predicting the interaction probability of the user to the item, and judging whether the item is recommended to the user.
In summary, the co-preference assisted depth-single-class collaborative Filtering recommendation method (NB-OCCF, One-class collaborative Filtering) of the present invention includes the following steps: s1, data acquisition; s2, dividing the data set; s3, constructing a model: (1) neighbor-based common preference representation network (NB-CPR), neighbor-based common prediction: calculating a user similarity matrix according to the explicit characteristics of the user through similarity index (cosine similarity COS and Hamming) distance to obtain a natural neighbor of the user; the natural neighbors of the user and the categories of the predicted items are input into the fully connected neural network, and highly abstract common preference expression of the user neighbors on the categories of the items is learned. (2) Personal depth potential factor representation networks (DLFR), Deep versus factors representation: respectively inputting the ids of the user and the item to obtain tensors with the same dimensionality, then learning the interaction between the user and the item through MLP, and predicting the probability of user-item interaction; (3) common preference assisted deep learning network (NB-OCCF): the probability of interacting with the user-project is input to a full-connection layer through the highly abstract common preference representation of the user neighbors on the project categories, and a final interaction vector is output; s4, training the model and recommending the item: 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 relation between the common preference of the user on natural neighbors and predicted item categories and potential factors of user-item interaction is better learned.
While the foregoing is directed to the preferred embodiment of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.
Claims (6)
1. A co-preference assisted deep single-class collaborative filtering recommendation method is characterized by comprising the following steps:
step S1: data acquisition and processing;
step S2: dividing a data set, using the collected data set in a leave-one-out mode, using the latest user item interaction item as a test set of each user, using the other items as training data sets, randomly extracting items except the user interaction item set, and forming the test data set of the user together with the test items;
step S3: constructing a co-preference auxiliary model;
step S4: training models and item recommendation, wherein the training data set and the testing data set obtained in the step S2 are respectively used for training and evaluating the co-preference assisted model constructed in the step S3, and the co-preference is obtained by indirectly utilizing the explicit characteristics through learning the interaction relation between natural neighbor users having similar explicit characteristics with the current user and a certain class of articles.
2. The co-preference assisted deep single-class collaborative filtering recommendation method according to claim 1, wherein the specific steps of the step S3 are:
s301, constructing an input layer: the input layer comprises four input contents, namely a user natural neighbor vector, a project category vector and a user/project id;
s302, constructing a co-preference auxiliary single-type collaborative filtering model;
and S303, constructing an output layer.
3. The method for deep single-class collaborative filtering recommendation with assistance of common preference according to claim 2, wherein the specific steps of the step S302 are as follows:
s30201, constructing a personal depth potential factor representation network: predicting probability a of user-item interaction through network learning by inputting one-hot vectors of user identification u and item identification vL,aLIs represented by a highly abstract common preference representation a 'of user neighbors to item categories output by the network'LThe dimensions of the data are consistent;
s30202, constructing a public preference representation network based on the neighbor: highly abstract common preference representation a 'of user neighbors to item categories is obtained through learning through full-connection layer user natural neighbors NB and item categories VF'L;
S30203, constructing a co-preference assisted deep learning network: output a 'of step S30202'LAnd output a of step S30201LAnd combining the vectors into a vector connected in series, processing the vector by a full connection layer, outputting a final interactive vector, and finally outputting the interactive vector activated by a Sigmoid function.
4. The co-preference assisted deep single-class collaborative filtering recommendation method according to claim 3, wherein the specific steps of constructing the personal deep latent factor representation network in the step S30201 are as follows:
s3020101, constructing a vector mapping layer: inputting a single-hot vector full-connection layer of a user identifier u and a project identifier v, converting the single-hot vector full-connection layer into vectors p and q of specified dimensions, wherein the p and the q respectively represent potential vectors of the user u and the project v;
s3020102, capturing interaction among user items: above the embedding layer, the embedding vectors p and q are input into a fusion layer that multiplies the corresponding elements of p and q, then the output linear vector r represents a linear user-item interaction, represented as:
s3020103, user item nonlinear interaction: through the processing of the full connection layer, the non-linear interaction between the user and the article can be converted into a representation;
and S3020104, outputting the user item interaction probability or the user item probability or the coupling relation of the user item interaction.
5. The co-preference assisted deep single-class collaborative filtering recommendation method according to claim 3, wherein the step S30203 of constructing the co-preference assisted deep learning network comprises the following specific steps:
s3020301, selecting a natural neighbor method: calculating a user similarity matrix of a data set according to the user explicit characteristics, and then taking the first K similar users as natural neighbors NB of the users, and respectively using two similarity indexes and a Hamming distance;
s3020302, constructing a vector mapping layer: inputting natural neighbors and item categories of layer activity users;
s3020303, embedding the sparse vector into the dense vector of the item category by using a full connection layer on the item category input layer, and then outputting the user neighbor and the item category embedded full connection layer as a vector EcAnd inputting the parameters into a multilayer fully-connected neural network to learn the highly abstract common preference of the neighbors to the item categories.
6. The co-preference assisted deep single-class collaborative filtering recommendation method according to claim 1, wherein the training models and item recommendations in step S4 are specifically performed by:
s401, constructing a loss function: calculating a loss value of the model by using a cross entropy loss function;
s402, constructing an optimization function: using Adam as an optimization function for the model;
s403, item recommendation: and sending the information of one user and the item information into a co-preference auxiliary single-type collaborative filtering model, outputting and predicting the interaction probability of the user to the item, and judging whether the item is recommended 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 true CN110866145A (en) | 2020-03-06 |
CN110866145B 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) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111598644A (en) * | 2020-04-01 | 2020-08-28 | 华瑞新智科技(北京)有限公司 | Article recommendation method, device and medium |
CN111881363A (en) * | 2020-06-23 | 2020-11-03 | 北京工业大学 | Recommendation method based on graph interaction network |
CN112015894A (en) * | 2020-08-19 | 2020-12-01 | 银江股份有限公司 | Text single classification method and system based on deep learning |
CN112084415A (en) * | 2020-09-17 | 2020-12-15 | 辽宁工程技术大学 | Recommendation method based on analysis of long-term and short-term coupling relationship between user and project |
CN112256980A (en) * | 2020-10-23 | 2021-01-22 | 辽宁工程技术大学 | Dynamic graph attention network-based multi-relation collaborative filtering recommendation |
CN112269927A (en) * | 2020-10-22 | 2021-01-26 | 辽宁工程技术大学 | Recommendation method based on session sequence dynamic behavior preference coupling relation analysis |
CN112765474A (en) * | 2021-01-28 | 2021-05-07 | 武汉大学 | Deep collaborative filtering-based recommendation method and system |
CN113011942A (en) * | 2021-03-10 | 2021-06-22 | 浙江大学 | Customized product demand collaborative filtering recommendation method based on three-layer neighbor selection framework |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070124698A1 (en) * | 2005-11-15 | 2007-05-31 | Microsoft Corporation | Fast collaborative filtering through approximations |
US20100030764A1 (en) * | 2008-07-30 | 2010-02-04 | At&T Corp. | Recommender System Utilizing Collaborative Filtering Combining Explicit and Implicit Feedback with both Neighborhood and Latent Factor Models |
US20160217374A1 (en) * | 2015-01-27 | 2016-07-28 | Milq Inc. | Method and system utilizing collaborative filtering |
CN110348968A (en) * | 2019-07-15 | 2019-10-18 | 辽宁工程技术大学 | A kind of recommender system and method analyzed based on user and project coupled relation |
-
2019
- 2019-11-06 CN CN201911080135.2A patent/CN110866145B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070124698A1 (en) * | 2005-11-15 | 2007-05-31 | Microsoft Corporation | Fast collaborative filtering through approximations |
US20100030764A1 (en) * | 2008-07-30 | 2010-02-04 | At&T Corp. | Recommender System Utilizing Collaborative Filtering Combining Explicit and Implicit Feedback with both Neighborhood and Latent Factor Models |
US20160217374A1 (en) * | 2015-01-27 | 2016-07-28 | Milq Inc. | Method and system utilizing collaborative filtering |
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" * |
周高云;张雅云;陈冬隐;程红举;: "一种神经网络与用户偏好相结合的协同过滤推荐算法" * |
张全贵 等,: "融合元数据及Attention 机制的深度联合学习推荐" * |
张全贵 等,: "融合元数据及隐式反馈信息的多层次联合学习推荐方法" * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111598644A (en) * | 2020-04-01 | 2020-08-28 | 华瑞新智科技(北京)有限公司 | Article recommendation method, device and medium |
CN111598644B (en) * | 2020-04-01 | 2023-05-02 | 华瑞新智科技(北京)有限公司 | Article recommendation method, device and medium |
CN111881363A (en) * | 2020-06-23 | 2020-11-03 | 北京工业大学 | Recommendation method based on graph interaction network |
CN112015894A (en) * | 2020-08-19 | 2020-12-01 | 银江股份有限公司 | Text single classification method and system based on deep learning |
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 |
CN112084415A (en) * | 2020-09-17 | 2020-12-15 | 辽宁工程技术大学 | Recommendation method based on analysis of long-term and short-term coupling relationship between user and project |
CN112269927A (en) * | 2020-10-22 | 2021-01-26 | 辽宁工程技术大学 | Recommendation method based on session sequence dynamic behavior preference coupling relation analysis |
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 |
CN112765474A (en) * | 2021-01-28 | 2021-05-07 | 武汉大学 | Deep collaborative filtering-based recommendation method and system |
CN113011942B (en) * | 2021-03-10 | 2023-11-03 | 浙江大学 | Customized product demand collaborative filtering recommendation method based on three-layer neighbor selection framework |
CN113011942A (en) * | 2021-03-10 | 2021-06-22 | 浙江大学 | Customized product demand collaborative filtering recommendation method based on three-layer neighbor selection framework |
Also Published As
Publication number | Publication date |
---|---|
CN110866145B (en) | 2023-10-31 |
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 | |
Jin et al. | A survey of community detection approaches: From statistical modeling to deep learning | |
Ni et al. | A two-stage embedding model for recommendation with multimodal auxiliary information | |
Cheng et al. | Learning transferable user representations with sequential behaviors via contrastive pre-training | |
CN113918832B (en) | Graph convolution collaborative filtering recommendation system based on social relationship | |
CN111949885B (en) | Personalized recommendation method for scenic spots | |
Lu et al. | Learning from multi-view multi-way data via structural factorization machines | |
Vaida et al. | Hypergraph link prediction: learning drug interaction networks embeddings | |
CN113918834A (en) | Graph convolution collaborative filtering recommendation method fusing social relations | |
CN116386899A (en) | Graph learning-based medicine disease association relation prediction method and related equipment | |
Sridhar et al. | Content-Based Movie Recommendation System Using MBO with DBN. | |
CN113342994B (en) | Recommendation system based on non-sampling cooperative knowledge graph network | |
Deng et al. | Knowledge-aware sequence modelling with deep learning for online course recommendation | |
Liu et al. | TCD-CF: Triple cross-domain collaborative filtering recommendation | |
Xi et al. | Graph factorization machines for cross-domain recommendation | |
CN115310004A (en) | Graph nerve collaborative filtering recommendation method fusing project time sequence relation | |
CN115658936A (en) | Personalized program recommendation method and system based on double-layer attention model | |
Zhang et al. | Behavioral data assists decisions: exploring the mental representation of digital-self | |
CN115545833A (en) | Recommendation method and system based on user social information | |
CN115391555A (en) | User-perceived knowledge map recommendation system and method | |
CN115408605A (en) | Neural network recommendation method and system based on side information and attention mechanism | |
He et al. | AAIN: Attentional aggregative interaction network for deep learning based recommender systems | |
Xue et al. | An Explicit Feedback Recommendation Algorithm Based on Subjective and Objective Evaluation Transformation Model | |
Pourhojjati-Sabet et al. | A soft recommender system for social networks |
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 |