CN115080861A - Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge - Google Patents

Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge Download PDF

Info

Publication number
CN115080861A
CN115080861A CN202210852889.0A CN202210852889A CN115080861A CN 115080861 A CN115080861 A CN 115080861A CN 202210852889 A CN202210852889 A CN 202210852889A CN 115080861 A CN115080861 A CN 115080861A
Authority
CN
China
Prior art keywords
subject
matrix
data
scoring
sample
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.)
Pending
Application number
CN202210852889.0A
Other languages
Chinese (zh)
Inventor
韩悦
夏彬
骆冰清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN202210852889.0A priority Critical patent/CN115080861A/en
Publication of CN115080861A publication Critical patent/CN115080861A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Software Systems (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a neural collaborative filtering bidirectional recommendation method based on migration head-tail knowledge. By constructing a bidirectional nearest neighbor feature matrix, combining the bilateral nearest neighbor features of the object and the subject with the features of the object and the subject corresponding to the neural collaborative filtering embedding layer, continuously inputting the features into a neural network for training, and fully mining local feature information between the bidirectional object and the subject. The change of parameters of the neural collaborative filtering network in the process of learning object-subject and object-subject head items from a few-sample model to a many-sample model through a full connection layer F () network is migrated and applied to long-tail items, and the recommendation of bidirectional long-tail items is improved.

Description

Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge
Technical Field
The invention belongs to the field of recommendation systems, and particularly relates to a neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge.
Background
The recommendation system is an information filtering system, finds the interests and hobbies of the users by analyzing the historical behavior data of the users and the characteristics of each user, and recommends the articles of interest for the users. The traditional recommendation system recommends articles to a user only by meeting the one-way preference of the user, such as shopping, singing, and the like, while the two-way recommendation system needs to consider the two-way preference relationship. In daily life, more and more scenes are needed for bidirectional recommendation, such as an online dating platform, a job hunting and recruitment service, a social network and the like. Successful two-way recommendation means that the recommended subject attracts both the target object, which in turn attracts the recommended subject. Bidirectional recommendations must also take into account other factors not present in traditional recommendation systems, such as the consequences of recommending a popular user to an unwelcome user, etc.
Building a recommendation system is challenging. One of the most notable problems is the ubiquitous long tail distribution in user-item interactions: for items, a small percentage of popular items receive a large portion of user feedback, while most items have little user feedback. Therefore, training the recommendation model on a data set with such a long-tailed distribution of items will easily cycle through "richest" and "worse". Compared with the popular commodity recommendation, the long-tail recommendation has the following advantages: 1) the market competitiveness of popular goods is strong and thus the profit is very limited. However, the long-tailed project contains a relatively large marginal profit; 2) recommending long-tailed products will surprise the user and improve customer loyalty and satisfaction; 3) for two-way recommendations, the head items are recommended too much, and in the case of a comparatively small number of head items, the number of recommendations that produce satisfaction in both directions is greatly reduced. Therefore, solving the problem of long-tailed item distribution of bidirectional recommendation is very important.
In the current two-way recommendation, the processing normalization of the two-way scoring data set is aggregated according to a unified standard, and the difference sampling aggregation is not carried out according to the popularity of a subject and an object in two-way interaction. The traditional neural collaborative filtering network for recommendation utilizes the information of user number ID and article number ID, adopts a single hot coding mode, and does not fully excavate the two-way local relationship between the user and the article; furthermore, some recent studies addressing long tail distributions may employ resampling to rebalance the data set, with the reweighting assigning higher costs to the tail terms in the loss function. However, these recommendations focus only on the end items, and do not consider the connection to the head item (popular item) -which contains rich user feedback information and migratable context information related to the end items-e.g., of the same type, while few people are concerned with long-ended item recommendations in a two-way recommendation scenario.
Disclosure of Invention
Based on the technical problems, the invention provides a neural collaborative filtering bidirectional recommendation method based on the knowledge of head and tail migration.
The idea of the invention for realizing the above purpose is as follows: the bilateral interaction popularity of the object and the subject is classified and sampled through the bilateral interaction popularity of the two-way scoring data, the scoring data is normalized, the condition that the long-tail project is expressed and the phenomenon of the long tail of the aggregated one-way scoring data is more serious is prevented, the bilateral nearest neighbor characteristics of the object and the subject are combined with the object and the subject characteristics corresponding to the nerve collaborative filtering embedding layer through constructing a two-way nearest neighbor characteristic matrix, the object and the subject characteristics are continuously input into a neural network for training, and the local characteristic information between the two-way object and the subject is fully mined. The change of parameters of the neural collaborative filtering network in the process of learning object-subject and object-subject head items from a few-sample model to a many-sample model through a full connection layer F () network is migrated and applied to long-tail items, and the recommendation of bidirectional long-tail items is improved.
In order to achieve the purpose, the method comprises the following specific implementation steps:
and collecting object-subject and subject-object bidirectional grading data, and performing normalization pretreatment.
And respectively calculating similarity matrixes of the object-object and subject-object scoring data to obtain two object similarity matrixes and two subject similarity matrixes.
And respectively carrying out matrix decomposition training on the object-subject and the subject-object scoring data to obtain a corresponding object characteristic matrix and a corresponding subject characteristic matrix. And according to a plurality of similarity matrixes obtained from the bidirectional data, forming an object nearest neighbor characteristic matrix by using vectors corresponding to each object nearest neighbor in the two object characteristic matrixes, and forming a subject nearest neighbor characteristic matrix by using vectors corresponding to each subject nearest neighbor in the two subject characteristic matrixes.
Respectively calculating the popularity of the object-subject and the popularity of the object-subject in the object-subject scoring data, sampling according to different popularity of the object-subject and a certain rule, and giving different weights to the two-way scoring data to form new object-subject and object-subject scoring data.
And dividing the new object-subject scoring data into a few sample data sets and a multi-sample data set for multiple times, inputting a neural collaborative filtering recommendation network to obtain respective objects, embedding features of the objects, splicing with the corresponding nearest neighbor feature vectors, and continuing inputting the objects into the neural network for training. And dividing the new subject-object scoring data into a few sample data sets and a multi-sample data set for multiple times, inputting a neural collaborative filtering recommendation network to obtain respective subject and object embedding characteristics, splicing with the corresponding nearest neighbor characteristic vector, and continuing inputting the characteristic vector into the neural network for training.
Learning the neural collaborative filtering recommends a change in network parameters from object-subject low-sample to multi-sample dataset training using a fully connected layer as a mapping network for F (). Learning the neural collaborative filtering recommends a change in network parameters from subject-object low-sample to multi-sample dataset training using a fully connected layer as a mapping network for F ().
And generating the scores of the object to the subject and the scores of the subject to the object by using the trained neural collaborative filtering recommendation network, aggregating the two-way scores, and evaluating the performance of the model.
Further, the normalizing preprocessing the bidirectional scoring data includes:
normalizing the object-subject score data and mapping the normalized object-subject score data to [0,1]]The formula used is as follows:
Figure BDA0003755334530000031
wherein rating max ,rating min The score maximum and minimum values, respectively.
Normalizing the subject-object score data, and mapping the subject-object score data to [0,1]]The formula used is as follows:
Figure BDA0003755334530000032
wherein rating max ,rating min Maximum and minimum score values, respectively.
Further, the calculating a similarity matrix of the object-subject score data includes:
and forming a scoring matrix of the object to the object by using the scoring data of the object and the object, wherein the row and column of the scoring matrix are the object number ID and the host number ID, and the row number and column number of the scoring matrix are respectively the total number of the object and the host.
And calculating the similarity among all objects by utilizing a cosine similarity formula to form an object similarity matrix, and then calculating the similarity among all the subjects to form a subject similarity matrix.
The calculating of the similarity matrix of the subject-object scoring data comprises:
and forming a subject-object scoring matrix by the subject-object scoring data, wherein the line of the scoring matrix is subject number ID, the column of the scoring matrix is object number ID, and the row number and the column number of the scoring matrix are respectively the total number of the subject and the objects.
And calculating the similarity among all the objects by utilizing a cosine similarity formula to form an object similarity matrix, and calculating the similarity among all the subjects to form a subject similarity matrix.
Further, the obtaining an object and subject feature matrix includes:
performing matrix decomposition on the object-subject scoring matrix, initializing an object feature matrix and a subject feature matrix, and enabling the objectMultiplying the feature matrix and the main feature matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula and a reconstruction loss formula
Figure BDA0003755334530000041
Calculating a reconstruction error of a reconstruction matrix, wherein Y i,u Denotes the score of the ith object on the u th subject, I i Indicates the characteristics of the ith object, U u Representing features of the u-th body, T being a transpose operation, λ being a regularization parameter, | |) F Is the F norm. And updating the object characteristic matrix and the subject characteristic matrix by gradient descent, and continuously iterating until convergence to obtain the implicit vectors of each object and subject.
Performing matrix decomposition on the subject-object scoring matrix, initializing a subject characteristic matrix and an object characteristic matrix, multiplying the subject characteristic matrix and the object characteristic matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula and a reconstruction loss formula by utilizing a reconstruction loss formula
Figure BDA0003755334530000042
Calculating a reconstruction error of a reconstruction matrix, wherein Y u,i Represents the score of the ith subject on the ith object, U is a subject feature matrix, U u Representing the characteristics of the u-th subject, I being a guest feature matrix, I i Representing features of the ith object, T being a transpose operation, λ being a regularization parameter, | |) F Updating a subject feature matrix and an object feature matrix by gradient descent for the F norm, and continuously iterating until convergence to obtain implicit feature vectors of each subject and object;
and respectively selecting nearest neighbors of each object from an object similarity matrix obtained from the object-object scoring data and an object similarity matrix obtained from the object-object scoring data, and splicing implicit vectors of the nearest neighbors of each object in the corresponding object feature matrix to form an object nearest neighbor feature matrix.
And respectively selecting nearest neighbors of each subject from a subject similarity matrix obtained from the subject-object score data and a subject similarity matrix obtained from the object-subject score data, and splicing implicit vectors of the nearest neighbors of each subject in the corresponding subject feature matrix to form a subject nearest neighbor feature matrix.
Further, the obtaining of new object-to-object score, object-to-object data, comprises:
calculating the popularity of each subject of the subject-subject scoring data and the popularity of each object of the subject-object scoring data, wherein the calculation formula is as follows:
popularity of the object: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein N is i Number of subjects for which the object is preferred, N u The number of objects preferred by the subject.
Ppz obtained from object-host scoring data u Regarding subjects with k values larger than or equal to k as head subjects, regarding subjects with k values smaller than k as long-tail subjects, and regarding the preferred subjects of each subject in the subject-object scoring data as ppk i Sorting from big to small, selecting the first k object interaction data of the long-tail subject in the subject-object scoring data, and selecting the front of the head subject in the subject-object scoring data
Figure BDA0003755334530000051
And (3) updating the object-subject score by weighted combination of individual object interaction data, wherein the calculation formula is as follows:
Figure BDA0003755334530000052
wherein,
Figure BDA0003755334530000053
scoring preference of an object for a subject, y ui And scoring the preference of the subject to the object, wherein alpha is a weight coefficient. Thus a new guest-host scoring matrix is obtained.
Calculating the popularity of each object of the object-object scoring data and the popularity of each object of the object-object scoring data, wherein the calculation formula is as follows:
popularity of the object: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein N is i Number of subjects for which the object is preferred, N u Is the number of objects preferred by the subject;
ppk derived from subject-object scoring data i Regarding the object with the value of k larger than or equal to the head object and the object with the value of k smaller than the head object as the long tail object, and regarding the object with the preference of each object in the object-object scoring data as the ppz u Sorting from big to small, selecting the first k host interactive data of the long-tail object in the object-host scoring data, and selecting the front of the head object in the object-host scoring data
Figure BDA0003755334530000054
The individual subject interaction data is weighted and combined to update the subject-object score, and the calculation formula is as follows:
Figure BDA0003755334530000055
wherein,
Figure BDA0003755334530000056
scoring preference of subject for object, y iu Scoring the preference of the object to the subject, wherein alpha is a weight coefficient; thus a new host-guest scoring matrix is obtained.
Further, the constructing a few-sample data set and a multiple-sample data set includes:
multi-sample object-host data set
Figure BDA0003755334530000057
Low sample object-host data sets including all object feedback from head and tail subjects
Figure BDA0003755334530000058
Full interaction recording by Long-tailed principal and Each head principalT records of volume random sampling.
Further, the training process of the neural collaborative filtering recommendation network on the subject-object data set includes:
given a target object i and a subject u, the neural collaborative filtering recommendation method may be expressed as:
Figure BDA0003755334530000061
wherein,
Figure BDA0003755334530000062
representing the predicted score between object i and subject u; θ represents a model parameter; g denotes a mapping function.
The object-host data set is used as original input and is converted into an input vector which can be directly processed by a model after being subjected to independent thermal coding, then a linear embedding layer is utilized to convert a high-dimensional and sparse input vector into a low-dimensional and dense expression vector so as to obtain embedding vectors of an object i and a host u, and an embedding integration layer is utilized to integrate the embedding vectors and the corresponding nearest neighbor vectors to form a final expression vector v of the object and the host i And v u
For the matrix decomposition MF part, v is i And v u Performing element product to obtain matrix decomposition output vector
Figure BDA0003755334530000063
For the multi-layer perceptron MLP part, v is i And v u Spliced to obtain an input vector v iu Then v is further determined iu Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure BDA0003755334530000064
By
Figure BDA0003755334530000065
Output vector combining two parts of matrix decomposition and multilayer perceptronSplicing, inputting the spliced objects into a full connection layer to obtain a prediction score between an object i and a subject u, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function. By using
Figure BDA0003755334530000066
As a function of the loss, wherein
Figure BDA0003755334530000067
θ is a model parameter, and preferences for subject-object are also trained as above.
The training process of the neural collaborative filtering recommendation network on the subject-object data set comprises the following steps:
given a target subject u and an object i, the neural collaborative filtering recommendation method is expressed as:
Figure BDA0003755334530000068
wherein,
Figure BDA0003755334530000069
representing a prediction score between subject u and object i; θ represents a model parameter; g represents a mapping function;
using the subject-object data set as an original input, converting the original input into an input vector which can be directly processed by a model after unique hot coding, converting a high-dimensional and sparse input vector into a low-dimensional and dense expression vector by using a linear embedding layer so as to obtain embedding vectors of a subject u and an object i, and integrating the embedding vectors and the corresponding two types of expression vectors of nearest neighbor vectors by using an embedding integration layer to form a final expression vector v of the subject and the object u And v i
For the matrix decomposition MF part, v is u And v i Performing element product to obtain matrix decomposition output vector
Figure BDA00037553345300000610
For the multi-layer perceptron MLP part, v is u And v i Spliced to obtain an input vector v ui Then v is further determined ui Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure BDA00037553345300000611
By
Figure BDA0003755334530000071
Splicing output vectors of two parts of matrix decomposition and a multilayer sensor, and inputting the output vectors into a full connection layer to obtain a prediction score between a subject u and an object i, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function, using
Figure BDA0003755334530000072
As a function of the loss, wherein
Figure BDA0003755334530000073
And theta is a model parameter.
Further, the obtaining model parameter changes by using F () includes:
using a full-connection layer as a mapping network of F () to learn the last layer parameter of the object-subject neural collaborative filtering recommendation network, and using the formula
Figure BDA0003755334530000074
And solving the parameters of the multi-sample model.
Then using the loss function
Figure BDA0003755334530000075
Learning the parameter change from the few sample model to the many sample model, wherein F (theta; omega) uses the parameter omega to learn the meta-mapping from the few sample model parameters to the many sample model parameters, the input of which is the neural collaborative filtering recommendation model
Figure BDA0003755334530000076
The trained parameters θ, λ are regularization parameters that balance the two terms. II F (theta; omega) -theta *2 The predicted multi-sample model parameters (via F (theta; omega)) and the multi-sample model parameters theta * The distance between them is minimized.
Figure BDA0003755334530000077
Based on training data sets
Figure BDA0003755334530000078
Training a neural collaborative filtering recommendation network to ensure
Figure BDA0003755334530000079
High recommendation performance for medium data, while helping to learn F (θ; ω).
Using a full-connection layer as a mapping network of F () to learn the parameters of the last layer of the subject-object neural collaborative filtering recommendation network, and using the formula
Figure BDA00037553345300000710
And solving the parameters of the multi-sample model.
Then using the loss function
Figure BDA00037553345300000711
Learning the parameter variation from a few sample model to a many sample model,
Figure BDA00037553345300000712
a sample data set is few for the subject-object,
Figure BDA00037553345300000713
a subject-object multi-sample dataset.
Further, the obtaining the bidirectional score includes:
obtaining a guest-host score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed as described
Figure BDA00037553345300000714
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 Is learning from
Figure BDA00037553345300000715
Data set to
Figure BDA00037553345300000716
Model parameter mapping of data sets by minimization
Figure BDA00037553345300000717
Figure BDA00037553345300000718
Thus obtaining the product. The final scoring data is given by the following formula,
Figure BDA0003755334530000081
wherein
Figure BDA0003755334530000082
θ * For the original multi-sample parameter, omega j,j+1 For full connection layer learning
Figure BDA0003755334530000083
To
Figure BDA0003755334530000084
Parameter of model variation, θ j Is composed of
Figure BDA0003755334530000085
Data set model parameters.
Obtaining a subject-object score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed as described
Figure BDA0003755334530000086
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 (. is learning from
Figure BDA0003755334530000087
Data set to
Figure BDA0003755334530000088
Model parameter mapping of data sets by minimization
Figure BDA0003755334530000089
Figure BDA00037553345300000810
Thus obtaining the compound. The final scoring data is given by the following formula,
Figure BDA00037553345300000811
wherein
Figure BDA00037553345300000812
θ * For the original multi-sample parameter, omega j,j+1 For full connection layer learning
Figure BDA00037553345300000813
To
Figure BDA00037553345300000814
Parameter of model variation, θ j Is composed of
Figure BDA00037553345300000815
Data set model parameters.
And aggregating the two-way scores through arithmetic mean values, matching with a test set, and verifying the accuracy, recall rate and f1 value of the model.
The invention has the beneficial effects that: according to the method, classification sampling is carried out according to the bilateral interactive popularity of the object and the subject of the two-way scoring data, and after the scoring data are normalized, certain two-way preference is blended into the one-way preference data, so that the condition that the long tail phenomenon of the aggregated one-way scoring data is more serious is prevented while the long tail item is represented.
According to the invention, by constructing a bidirectional nearest neighbor feature matrix, the two-way obtained nearest neighbor features are combined with the object and subject features of the neural collaborative filtering embedding layer and input into the fully-connected neural network for training, so that the subject preference and the subject preference information from the subject-subject scoring data can be further fused on the basis of learning the subject-subject scoring data, and the local feature information between the object and the subject can be fully mined.
The method provided by the invention has the advantages that the change of the parameters of the neural collaborative filtering network is migrated and applied to the long-tailed object/subject by using the full connection layer F () network to learn the change of the parameters of the object-subject and the subject-object head object/subject from the few-sample model to the multiple-sample model, so that the long-tailed object/subject with few-sample interaction is enriched, and the recommendation of the bidirectional long-tailed project is improved.
Drawings
Fig. 1 is a schematic flow chart of a neural collaborative filtering bidirectional recommendation method based on head-to-tail knowledge migration according to an embodiment of the present invention.
Fig. 2 is a method model of a neural collaborative filtering bidirectional recommendation method based on migrating head and tail knowledge according to an embodiment of the present invention.
Detailed Description
It is easily understood that according to the technical solution of the present invention, a person skilled in the art can propose various alternative structures and implementation ways without changing the spirit of the present invention. Therefore, the following detailed description and the accompanying drawings are merely illustrative of the technical aspects of the present invention, and should not be construed as all of the present invention or as limitations or limitations on the technical aspects of the present invention.
Fig. 2 is a method model provided by an embodiment of the present invention, and the flow of the present invention is illustrated by using a shallow, linear matrix decomposition and a deep, non-linear multi-layer sensor as an implementation manner, and the specific contents are as follows: given a target object i and a subject u, the object-subject recommendation method proposed by the present invention can be expressed as:
Figure BDA0003755334530000091
wherein,
Figure BDA0003755334530000092
representing the predicted score between object i and subject u; θ represents a model parameter; g denotes a mapping function. Given a target subject u and an object i, the subject-object recommendation method proposed by the present invention can be expressed as:
Figure BDA0003755334530000093
wherein,
Figure BDA0003755334530000094
representing a prediction score between subject u and object i; θ represents a model parameter; g denotes a mapping function.
According to an embodiment of the invention, a neural collaborative filtering bidirectional recommendation method based on head and tail knowledge migration is shown in combination with fig. 1, and includes the following steps:
s101, acquiring object-subject and subject-object two-way grading data, and performing normalization pretreatment.
Specifically, the step S101 is as follows:
s1011, firstly, carrying out normalization processing on the object-subject scoring data, and mapping the object-subject scoring data to [0,1], wherein the formula is as follows:
Figure BDA0003755334530000095
among them, rating max ,rating min Maximum and minimum score values, respectively.
S1012, normalizing the subject-object score data, and mapping the subject-object score data to [0,1], wherein the formula is as follows:
Figure BDA0003755334530000096
wherein, rating max ,rating min Maximum and minimum score values, respectively.
S102, similarity matrixes of the object-subject and subject-object grading data are calculated respectively, and two object similarity matrixes and two subject similarity matrixes are obtained.
Specifically, the step S102 is as follows:
s1021, forming a scoring matrix of the objects to the objects from scoring data of the objects and the objects, wherein the row and column of the scoring matrix are object number IDs and are object number IDs, the row number and column number of the scoring matrix are the objects respectively, the total number of the objects, the expression vector of the object i is the scoring of all the objects in the ith row, and the expression vector of the object u is the scoring of all the objects in the u th column;
and S1022, calculating the similarity among all the objects by utilizing a cosine similarity formula to form an object similarity matrix, and calculating the similarity among all the subjects to form a subject similarity matrix.
S1023, forming a scoring matrix of the subject to the object from the scoring data of the subject and the object, wherein the row of the scoring matrix is a subject number ID, the column is an object number ID, the row number and the column number of the scoring matrix are respectively the subject, the total number of the object, the expression vector of the subject u is the score of all the objects in the u-th row, and the expression vector of the object i is the score of all the subjects in the i-th column for the subject;
and S1024, calculating the similarity among all objects by utilizing a cosine similarity formula to form an object similarity matrix, and calculating the similarity among all subjects to form a subject similarity matrix.
And S103, respectively carrying out matrix decomposition training on the object-subject and the subject-object scoring data to obtain a corresponding object characteristic matrix and a corresponding subject characteristic matrix. And forming an object nearest neighbor feature matrix by using vectors corresponding to each object nearest neighbor in the two object feature matrices according to a plurality of similarity matrices obtained by the bidirectional data, and forming a subject nearest neighbor feature matrix by using vectors corresponding to each subject nearest neighbor in the two subject feature matrices.
If only object-subject and subject-object scores are input into the recommendation network, local feature information between the objects and the subjects cannot be sufficiently mined, so that object preferences obtained by learning object-subject score data and subject-object preference information are further fused on the basis of the subject-object preference by combining the neighbor matrices of the objects and the subjects and learning the neighbor matrices of the subject-object score data, and the subject-object preference information are enriched.
Specifically, the step S103 is as follows:
s1031, performing matrix decomposition on the object-subject scoring matrix, initializing an object feature matrix I (m f) and a subject feature matrix U (n f), wherein m and n are the numbers of objects and subjects respectively, and f is the dimension of an implicit vector, multiplying the object feature matrix and the subject feature matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula
Figure BDA0003755334530000111
Calculating a reconstruction error of a reconstruction matrix, wherein Y i,u Denotes the score of the ith object on the u th subject, I i Indicates the characteristics of the ith object, U u Representing features of the u-th body, T being a transpose operation, λ being a regularization parameter, | |) F Is the F norm. And updating the object characteristic matrix and the subject characteristic matrix by gradient descent, and repeating the steps for continuous iteration until convergence to obtain the implicit vectors of each object and subject.
S1032, performing matrix decomposition on the subject-object scoring matrix, initializing a subject feature matrix U (n f) and an object feature matrix I (m f), wherein m and n are the number of objects and subjects respectively, and f is the dimension of an implicit vector, multiplying the subject feature matrix and the object feature matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula to utilize the reconstruction loss formula
Figure BDA0003755334530000112
Calculating a reconstruction error of a reconstruction matrix, wherein Y u,i Represents the score of the ith subject on the ith object, U is a subject feature matrix, U u Representing the characteristics of the u-th subject, I is a guest characteristic matrix, I i Representing features of the ith object, T being a transpose operation, λ being a regularization parameter, | | F Updated by gradient descent for F normAnd continuously iterating the subject characteristic matrix and the object characteristic matrix until convergence is achieved, so as to obtain the implicit characteristic vectors of each subject and each object.
And S1033, respectively selecting nearest neighbors of each object from the object similarity matrix obtained from the object-subject scoring data and the object similarity matrix obtained from the subject-object scoring data, and splicing the implicit vectors of the nearest neighbors of each object in the corresponding object feature matrix to form an object nearest neighbor feature matrix.
S1034, selecting nearest neighbors of each subject from the subject similarity matrix obtained from the object-subject scoring data and the subject similarity matrix obtained from the subject-object scoring data, and splicing the implicit vectors of the nearest neighbors of each subject in the corresponding subject characteristic matrix to form a subject nearest neighbor characteristic matrix.
S104, respectively calculating popularity of the object-subject and subject-object scoring data, sampling according to different popularity of the object-subject and a certain rule, and giving different weights to the two-way scoring data to combine new object-subject and subject-object scoring data.
When one-way preference is trained, for example, the preference of an object to a subject, in order to add some factors of two-way selection to better realize two-way recommendation matching and enrich the representation of long tail data, the subject-object scoring data is sampled according to a certain rule and then fused with the object-subject scoring, in order to prevent the phenomenon that the one-way scoring data is more serious in long tail after aggregation, different strategies are sampled on the head and long tail items, and then the two-way scoring is given different weights for weighted fusion.
Specifically, the step S104 is as follows:
s1041, calculating each subject popularity of the subject-subject scoring data and each subject popularity of the subject-subject scoring data, wherein the calculation formula is as follows:
popularity of objects: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein N is i Number of subjects for which the object is preferred, N u The number of objects preferred for the subject.
S1042, obtaining ppz from object-host scoring data u Regarding subjects with k values larger than or equal to k as head subjects, regarding subjects with k values smaller than k as long-tail subjects, and regarding the preferred subjects of each subject in the subject-object scoring data as ppk i Sorting from big to small, selecting front k object interactive data of a long-tail object in the object-object scoring data, and selecting front of a head object in the object-object scoring data
Figure BDA0003755334530000121
Personal object interaction data
S1043, updating the object-subject score by weighted combination, wherein the calculation formula is as follows:
Figure BDA0003755334530000122
wherein,
Figure BDA0003755334530000123
scoring preference of an object for a subject, y ui And scoring the preference of the subject to the object, wherein alpha is a weight coefficient. Thus a new guest-host scoring matrix is obtained.
S1044, calculating the popularity of each object in the object-object scoring data and the popularity of each object in the object-object scoring data, wherein the calculation formula is as follows:
popularity of the object: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein N is i Number of subjects for which the object is preferred, N u Is the number of objects preferred by the subject;
s1045, obtaining ppk from subject-object scoring data i Regarding the object with the value of k larger than or equal to the head object and the object with the value of k smaller than the head object as the long tail object, and regarding the object with the preference of each object in the object-object scoring data as the ppz u Arranged from large to smallSelecting the first k host interactive data of the long-tail object in the object-host scoring data, and selecting the front of the head object in the object-host scoring data
Figure BDA0003755334530000124
Individual subjects interact with the data.
S1046, updating the subject-object score by weighted combination to obtain a new subject-object score matrix, wherein the calculation formula is as follows:
Figure BDA0003755334530000125
wherein,
Figure BDA0003755334530000131
scoring preference of the subject for the object, y iu Scoring the preference of the object to the subject, wherein alpha is a weight coefficient; thus, a new host-guest scoring matrix is obtained.
And S105, dividing the new object-subject scoring data into a few-sample data set and a multi-sample data set for multiple times, inputting the data into a neural collaborative filtering network to obtain respective objects, embedding features into the subjects, splicing the features with nearest neighbor feature vectors, and inputting the features into a multilayer perceptron. And dividing the new subject-object scoring data into a few sample data sets and a multi-sample data set for multiple times, inputting the data into a neural collaborative filtering network to obtain respective subject and object embedding characteristics, splicing the characteristics with nearest neighbor characteristic vectors, and inputting the characteristics into a multilayer perceptron.
The lack of data points results in insufficient representation of long-tailed items, while we have quite rich information and enough items with data points at the head. It is proposed to explore the links between models learned through only a few interaction examples and model parameters learned through enough interaction examples for the same project. For example, given an item with user feedback, F () learning implicitly adds model parameter changes in similar user processes that provide feedback for the same item, allowing us to improve representation quality even when there is insufficient data. Therefore, a small sample data set and a multi-sample data set need to be constructed to learn the application of parameter changes to the long tail data.
Specifically, the step S105 is as follows:
s1051, a multi-sample object-host data set
Figure BDA0003755334530000132
Sample-less object-object data set including all object feedback from head and tail subjects
Figure BDA0003755334530000133
The method is characterized by comprising all interaction records of a long-tail main body and t records randomly sampled by each head main body.
S1052, using the object-host data set as original input, converting the data set into an input vector which can be directly processed by a model after unique hot coding, then converting a high-dimensional and sparse input vector into a low-dimensional and dense expression vector by using a linear embedding layer so as to obtain embedding vectors of an object i and a host u, and integrating the embedding vectors and corresponding nearest neighbor vectors by using an embedding integration layer to form a final expression vector v of the object and the host i And v u
S1053, decomposing v for MF part of matrix in the neural collaborative filtering network i And v u Performing element product to obtain matrix decomposition output vector
Figure BDA0003755334530000134
E.g. v i =[a 1 ,a 2 ,…a f ] T ,v u =[b 1 ,b 2 ,…b f ] T Then, then
Figure BDA0003755334530000135
For the multi-layer perceptron MLP part, v is i And v u Spliced to obtain an input vector v iu E.g. v i =[a 1 ,a 2 ,…a f ] T ,v u =[b 1 ,b 2 ,…b f ] T Then v is iu =[a 1 ,a 2 ,…a f ,b 1 ,b 2 ,…b f ] T . Then v is converted into iu Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure BDA0003755334530000141
Using the following formula
Figure BDA0003755334530000142
Figure BDA0003755334530000143
And S1054, designing the multilayer sensor, and following a common tower-shaped structure. Specifically, the number of implicit elements in the next layer is half that of the previous layer. For example, if the number of layers L of the multilayer perceptron is 3 and the predictor dL is 64, the network structure is 256 → 128 → 64 and the embedding dimension is 64. In general, a multilayer sensor using three layers has been able to achieve very good results.
S1055, preparing a composition from
Figure BDA0003755334530000144
Splicing output vectors of two parts of matrix decomposition and a multilayer sensor, and inputting the output vectors into a full connection layer to obtain a prediction score between an object i and a subject u, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function. By using
Figure BDA0003755334530000145
As a function of the loss, wherein
Figure BDA0003755334530000146
Figure BDA0003755334530000147
Theta is a model parameter, and the optimization method is an Adam algorithm. It can adaptively adjust the size of its learning rate for different parameters.
S1056, multiple sample subject-object data set
Figure BDA0003755334530000148
Low sample subject-object data sets including all subject feedback from head and tail objects
Figure BDA0003755334530000149
The method is characterized by comprising all interaction records of long-tail objects and t records of random sampling of each head object.
S1057, using the subject-object data set as original input, converting the original input into an input vector capable of being directly processed by a model after being subjected to one-hot encoding, then converting a high-dimensional and sparse input vector into a low-dimensional and dense expression vector by using a linear embedding layer so as to obtain embedding vectors of a subject u and an object i, and integrating the embedding vectors and two types of expression vectors of corresponding nearest neighbor vectors by using an embedding integration layer to form a final expression vector v of the subject and the object u And v i
S1058, decomposing v for MF part of matrix in the neural collaborative filtering network u And v i Performing element product to obtain matrix decomposition output vector
Figure BDA00037553345300001410
E.g. v i =[a 1 ,a 2 ,…a f ] T ,v u =[b 1 ,b 2 ,…b f ] T Then, then
Figure BDA00037553345300001411
For the multi-layer perceptron MLP part, v is u And v i Spliced to obtain an input vector v ui E.g. v i =[a 1 ,a 2 ,…a f ] T ,v u =[b 1 ,b 2 ,…b f ] T Then v is ui =[b 1 ,b 2 ,…b f ,a 1 ,a 2 ,…a f ] T . Then v is measured ui Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure BDA0003755334530000151
Using the following formula
Figure BDA0003755334530000152
Figure BDA0003755334530000153
S1059, designing the multilayer perceptron, and following the common tower structure. Specifically, the number of implicit elements in the next layer is half that of the previous layer. For example, if the number of layers L of the multi-layer sensor is 3 and the predictor dL is 64, the network structure is 256 → 128 → 64, and the embedding dimension is 64. In general, a multilayer sensor using three layers has been able to achieve very good results.
S10510, preparation of
Figure BDA0003755334530000154
Splicing output vectors of two parts of matrix decomposition and a multilayer sensor, and inputting the output vectors into a full connection layer to obtain a prediction score between a subject u and an object i, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function. By using
Figure BDA0003755334530000155
As a function of the loss, wherein
Figure BDA0003755334530000156
Figure BDA0003755334530000157
Theta is a model parameter, and the optimization method is an Adam algorithm. It can adaptively adjust the size of its learning rate for different parameters.
S106, using a full connection layer as a mapping network of F (), and learning the training change of parameters of the neural collaborative filtering network from object-subject few samples to multi-sample data sets; using a fully connected layer as a mapping network for F (), learning the variation of the neural collaborative filtering network parameters from subject-object few-sample to multi-sample dataset training.
Specifically, the step S106 is as follows:
s1061, using a full connection layer as a mapping network of F () to learn the last layer parameter of the object-subject neural collaborative filtering recommendation network, and using the formula
Figure BDA0003755334530000158
And solving the parameters of the multi-sample model.
S1062, then using the loss function
Figure BDA0003755334530000159
Learning the parameter change from the few sample model to the many sample model, wherein F (theta; omega) uses the parameter omega to learn the meta-mapping from the few sample model parameters to the many sample model parameters, the input of which is the neural collaborative filtering recommendation model
Figure BDA00037553345300001510
The trained parameters θ, λ are regularization parameters that balance the two terms. II F (theta; omega) -theta *2 The predicted multi-sample model parameters (via F (theta; omega)) and the multi-sample model parameters theta * The distance between them is minimized. It ensures that F (theta; omega) learning prediction multi-sample model parameters can be well fitted
Figure BDA0003755334530000161
The data samples in (1); second item
Figure BDA0003755334530000162
Based onTraining data set
Figure BDA0003755334530000163
Training a neural collaborative filtering recommendation network to ensure
Figure BDA0003755334530000164
High recommendation performance for medium data, while helping to learn F (θ; ω). Therefore, training the few-sample model and the loss function of the F (theta; omega) simultaneously provides high-quality neural collaborative filtering recommendation and improves the accuracy of F (theta; omega) model mapping.
S1063, using a full connection layer as a mapping network of F () to learn the parameters of the last layer of the subject-object neural collaborative filtering recommendation network, and using the formula
Figure BDA0003755334530000165
And solving the parameters of the multi-sample model.
S1064, then using the loss function
Figure BDA0003755334530000166
Learning the parameter variation from a few sample model to a many sample model,
Figure BDA0003755334530000167
a sample data set is few for the subject-object,
Figure BDA0003755334530000168
a subject-object multi-sample dataset.
And S107, generating an object-subject score and a subject-to-object score by using the trained recommendation network, aggregating two-way scores, and evaluating the performance of the model.
In order to make the migration learning between projects smoother, the invention further changes the size of t to construct different data sets and recursively learns the dynamic trajectory of the model.
Specifically, the step S107 is as follows:
s1071, obtaining an object-subject score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed as described
Figure BDA0003755334530000169
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 Is learning from
Figure BDA00037553345300001610
Data set to
Figure BDA00037553345300001611
Model parameter mapping of data sets by minimization
Figure BDA00037553345300001612
Figure BDA00037553345300001613
Thus obtaining the product. The final scoring data is given by the following formula,
Figure BDA00037553345300001614
wherein
Figure BDA00037553345300001615
θ * For the original multi-sample parameter, omega j,j+1 For full connection layer learning
Figure BDA00037553345300001616
To
Figure BDA00037553345300001617
Parameter of model variation, θ j Is composed of
Figure BDA00037553345300001618
Data set model parameters.
S1072, obtaining subject-object score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed as described
Figure BDA00037553345300001619
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 Is learning from
Figure BDA0003755334530000171
Data set to
Figure BDA0003755334530000172
Model parameter mapping of data sets by minimization
Figure BDA0003755334530000173
Figure BDA0003755334530000174
Thus obtaining the product. The final scoring data is given by the following formula,
Figure BDA0003755334530000175
wherein
Figure BDA0003755334530000176
θ * For the original multi-sample parameter, omega j,j+1 For full connection layer learning
Figure BDA0003755334530000177
To
Figure BDA0003755334530000178
Parameter of model variation, θ j Is composed of
Figure BDA0003755334530000179
Data set model parameters.
The two-way scores are aggregated by arithmetic mean, matched with a test set, and verified for model accuracy, recall and f1 values.
The above description is only an embodiment of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge is characterized by comprising the following steps: the neural collaborative filtering bidirectional recommendation method comprises the following steps:
step 1: acquiring object-subject and subject-object two-way scoring data, and performing normalization pretreatment;
step 2: respectively calculating similarity matrixes of the object-object and subject-object scoring data to obtain two object similarity matrixes and two subject similarity matrixes;
and step 3: respectively carrying out matrix decomposition training on the object-subject and subject-object scoring data in the step 1 to obtain corresponding object feature matrices and corresponding subject feature matrices, forming an object nearest neighbor feature matrix by using vectors corresponding to each object nearest neighbor in the two object feature matrices according to the two object similarity matrices and the two subject similarity matrices obtained in the step 2, and forming a subject nearest neighbor feature matrix by using vectors corresponding to each subject nearest neighbor in the two subject feature matrices;
and 4, step 4: respectively calculating popularity of the object-subject and popularity of the object-subject in the object-subject scoring data, sampling according to different popularity of the object-subject, and giving different weights to the two-way scoring data to combine new object-subject scoring data and new subject-object scoring data;
and 5: dividing the new object-subject scoring data obtained in the step 4 into a few sample data sets and a multiple sample data set for multiple times, inputting the data into a neural collaborative filtering recommendation network to obtain respective objects, embedding features into the subjects, splicing the subject embedding features with the corresponding nearest neighbor feature vectors, and continuously inputting training parameters in the neural network; dividing the new subject-object scoring data obtained in the step 4 into a few-sample data set and a multi-sample data set for multiple times, inputting a neural collaborative filtering recommendation network to obtain respective subject and object embedding characteristics, splicing with the corresponding nearest neighbor characteristic vector, and continuously inputting training parameters in the neural network;
step 6: using a full connection layer as a mapping network of F (), learning neural collaborative filtering and recommending the change of network parameters from object-subject few-sample to multi-sample data set training; using a full connection layer as a mapping network of F (), learning neural collaborative filtering and recommending the change of network parameters from subject-object few-sample to multi-sample data set training;
and 7: and generating the subject-to-subject score and the subject-to-object score by using the trained neural collaborative filtering recommendation network, aggregating the two-way scores, and evaluating the performance of the model.
2. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: the normalization preprocessing of the collected bidirectional scoring data in the step 1 specifically comprises the following steps:
normalizing the object-subject score data and mapping the normalized object-subject score data to [0,1]]The formula used is as follows:
Figure FDA0003755334520000011
wherein rating max ,rating min Score maximum and minimum values, respectively;
normalizing the subject-object score data and mapping the subject-object score data to [0,1]]The formula used is as follows:
Figure FDA0003755334520000021
wherein rating max ,rating min Maximum and minimum score values, respectively.
3. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: in the step (2), the first step is that,
calculating a similarity matrix of the object-subject scoring data, comprising: forming a scoring matrix of the objects to the objects by the scoring data of the objects and the objects, wherein the row of the scoring matrix is an object number ID, the column of the scoring matrix is a object number ID, the row number and the column number of the scoring matrix are respectively the total number of the object objects, calculating the similarity among all the objects by utilizing a cosine similarity formula to form an object similarity matrix, and then calculating the similarity among all the objects to form a main body similarity matrix;
calculating a similarity matrix of subject-object scoring data, comprising: and forming a scoring matrix of the subject to the object by the subject-object scoring data, wherein the row of the scoring matrix is a subject number ID, the column of the scoring matrix is an object number ID, the row number and the column number of the scoring matrix are respectively the total number of the subject and the object, calculating the similarity between all subjects by using a cosine similarity formula to form a subject similarity matrix, and then calculating the similarity between all objects to form an object similarity matrix.
4. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: in the step 3, the step of the method is that,
the acquisition of the object characteristic matrix and the subject characteristic matrix in the object-subject scoring matrix specifically comprises the following steps: performing matrix decomposition on the object-subject scoring matrix, initializing an object characteristic matrix and a subject characteristic matrix, multiplying the object characteristic matrix and the subject characteristic matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula and a reconstruction loss formula by utilizing a reconstruction loss formula
Figure FDA0003755334520000022
Calculating a reconstruction error of a reconstruction matrix, wherein Y i,u Represents the score of the ith object on the u-th subject, I is an object feature matrix, I i Represents the characteristics of the ith object, U is a subject characteristic matrix, U u Representing features of the u-th body, T being a transpose operation, λ being a regularization parameter, | |) F Updating the object feature matrix and the subject feature matrix by gradient descent for F norm, and continuously iterating until convergence to obtain implicit feature vectors of each object and subject;
subject in the subject-object scoring matrixThe acquisition of the feature matrix and the guest feature matrix is specifically as follows: performing matrix decomposition on the subject-object scoring matrix, initializing a subject characteristic matrix and an object characteristic matrix, multiplying the subject characteristic matrix and the object characteristic matrix to form a reconstruction training matrix, and utilizing a reconstruction loss formula and a reconstruction loss formula
Figure FDA0003755334520000031
Calculating a reconstruction error of a reconstruction matrix, wherein Y u,i Represents the score of the ith subject on the ith object, U is a subject feature matrix, U u Representing the characteristics of the u-th subject, I being a guest feature matrix, I i Representing features of the ith object, T being a transpose operation, λ being a regularization parameter, | |) F Updating a subject feature matrix and an object feature matrix by gradient descent for the F norm, and continuously iterating until convergence to obtain implicit feature vectors of each subject and object;
the acquisition of the object nearest neighbor feature matrix specifically comprises the following steps: respectively selecting nearest neighbors of each object from an object similarity matrix obtained from object-object scoring data and an object similarity matrix obtained from the object-object scoring data, and splicing implicit vectors of the nearest neighbors of each object in corresponding object feature matrices to form an object nearest neighbor feature matrix;
the main body nearest neighbor feature matrix is obtained specifically as follows: and respectively selecting nearest neighbors of each subject from a subject similarity matrix obtained from the subject-subject scoring data and a subject similarity matrix obtained from the subject-subject scoring data, and splicing implicit vectors of the nearest neighbors of each subject in corresponding subject feature matrices to form a subject nearest neighbor feature matrix.
5. The neural collaborative filtering bidirectional recommendation method based on the head-tail knowledge migration according to claim 4, characterized in that: in the step 4:
obtaining new object-subject scoring data, comprising the steps of:
calculating the popularity of each subject of the subject-subject scoring data and the popularity of each object of the subject-object scoring data, wherein the calculation formula is as follows:
popularity of the object: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein N is i Number of subjects for which the object is preferred, N u Is the number of objects preferred by the subject;
subject popularity ppz from object-subject scoring data u Regarding subjects with k values larger than or equal to k as head subjects and subjects with k values smaller than k as long-tail subjects, and regarding the subjects preferred by each subject in the subject-object scoring data as object popularity ppk i Sorting from big to small, selecting the first k object interaction data of the long-tail subject in the subject-object scoring data, and selecting the front of the head subject in the subject-object scoring data
Figure FDA0003755334520000032
And (3) updating the object-subject score by weighted combination of individual object interaction data to obtain a new object-subject score matrix, wherein the calculation formula is as follows:
Figure FDA0003755334520000033
wherein,
Figure FDA0003755334520000041
scoring preference of an object for a subject, y ui Scoring the preference of the subject to the object, wherein alpha is a weight coefficient;
obtaining new subject-object scoring data, comprising the steps of:
calculating the popularity of each object of the object-object scoring data and the popularity of each object of the object-object scoring data, wherein the calculation formula is as follows:
popularity of the object: ppk i =ln(1+|N i |)
The popularity of the subject: ppz u =ln(1+|N u |)
Wherein, N i Number of subjects for which the object is preferred, N u Is the number of objects preferred by the subject;
object popularity ppk obtained from subject-object scoring data i Regarding the objects with the k value larger than or equal to the k value as head objects, regarding the objects with the k value smaller than the k value as long-tail objects, and regarding the objects with the preference of each object in the object-object scoring data as the popularity ppz of the object u Sorting from big to small, selecting the first k host interactive data of the long-tail object in the object-host scoring data, and selecting the front of the head object in the object-host scoring data
Figure FDA0003755334520000042
And (3) carrying out weighted combination on the interactive data of each subject to update the subject-object score to obtain a new subject-object score matrix, wherein the calculation formula is as follows:
Figure FDA0003755334520000043
wherein,
Figure FDA0003755334520000044
scoring preference of subject for object, y iu And alpha is a weight coefficient.
6. The neural collaborative filtering bidirectional recommendation method based on the head-tail knowledge migration according to claim 1, characterized in that: in the step 5, the step of processing the image,
the composition of the object-subject few-sample data set and the multi-sample data set comprises the following steps: multi-sample object-host data set
Figure FDA0003755334520000045
Low sample object-host data sets including all object feedback from head and tail subjects
Figure FDA0003755334520000046
The system consists of all interactive records of a long tail main body and t records of random sampling of each head main body;
the composition of the subject-object few sample data set and the multi-sample data set comprises: multi-sample subject-object data set
Figure FDA0003755334520000047
Low sample subject-object data sets including all subject feedback from head and tail objects
Figure FDA0003755334520000048
The method is characterized by comprising all interaction records of long-tail objects and t records of random sampling of each head object.
7. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: in the step 5, the process of training the object-host data set by the neural collaborative filtering recommendation network includes:
step 5-1-1: given a target object i and a subject u, the neural collaborative filtering recommendation method is expressed as:
Figure FDA0003755334520000049
wherein,
Figure FDA00037553345200000410
representing the predicted score between object i and subject u; θ represents a model parameter; g represents a mapping function;
step 5-1-2: the object-host data set is used as original input and is converted into an input vector which can be directly processed by a model after being subjected to independent thermal coding, then a linear embedding layer is utilized to convert a high-dimensional and sparse input vector into a low-dimensional and dense expression vector so as to obtain embedding vectors of an object i and a host u, and an embedding integration layer is utilized to integrate the embedding vectors and the corresponding nearest neighbor vectors to form a final expression vector v of the object and the host i And v u
Step 5-1-3: for the matrix decomposition MF part, v is i And v u Performing element product to obtain matrix decomposition output vector
Figure FDA0003755334520000051
For the multi-layer perceptron MLP part, v is i And v u Are spliced together to obtain an input vector v iu Then v is further determined iu Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure FDA0003755334520000052
Step 5-1-4: by
Figure FDA0003755334520000053
Splicing output vectors of two parts of matrix decomposition and a multilayer sensor, and inputting the output vectors into a full connection layer to obtain a prediction score between an object i and a subject u, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function, using
Figure FDA0003755334520000054
As a function of the loss, wherein
Figure FDA0003755334520000055
Figure FDA0003755334520000056
Theta is a model parameter.
8. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: the process of training the subject-object data set by the neural collaborative filtering recommendation network comprises the following steps:
step 5-2-1: given a target subject u and an object i, the neural collaborative filtering recommendation method is expressed as:
Figure FDA0003755334520000057
wherein,
Figure FDA0003755334520000058
representing a prediction score between subject u and object i; θ represents a model parameter; g represents a mapping function;
step 5-2-2: using the subject-object data set as an original input, converting the original input into an input vector which can be directly processed by a model after unique hot coding, converting a high-dimensional and sparse input vector into a low-dimensional and dense expression vector by using a linear embedding layer so as to obtain embedding vectors of a subject u and an object i, and integrating the embedding vectors and the corresponding two types of expression vectors of nearest neighbor vectors by using an embedding integration layer to form a final expression vector v of the subject and the object u And v i
Step 5-2-3: for the matrix decomposition MF part, v is u And v i Performing element product to obtain matrix decomposition output vector
Figure FDA0003755334520000059
For the multi-layer perceptron MLP part, v is u And v i Spliced to obtain an input vector v ui Then v is further determined ui Inputting the data into a multilayer perceptron to learn an interaction function between an object and a subject to obtain an output vector of the multilayer perceptron
Figure FDA00037553345200000510
Step 5-2-4: by
Figure FDA0003755334520000061
Splicing output vectors of two parts of matrix decomposition and a multilayer sensor, and inputting the output vectors into a full connection layer to obtain a prediction score between a subject u and an object i, wherein h is a weight vector of an output layer; b represents the bias term of the output layer; σ (-) is a Sigmoid function, using
Figure FDA0003755334520000062
As a function of the loss, wherein
Figure FDA0003755334520000063
Figure FDA0003755334520000064
And theta is a model parameter.
9. The neural collaborative filtering bidirectional recommendation method based on the migration head-tail knowledge according to claim 1, characterized in that: in the step 6, obtaining parameter changes of the neural collaborative filtering model in a training process of a data set from a few samples to a many samples by using F (), including:
step 6-1: using a full-connection layer as a mapping network of F () to learn the last layer parameter of the object-subject neural collaborative filtering recommendation network, and using the formula
Figure FDA0003755334520000065
Figure FDA0003755334520000066
For a multi-sample dataset, argmin is a minimization loss function, thus obtaining a multi-sample model parameter theta *
Step 6-2: using loss functions
Figure FDA0003755334520000067
Learning the variation of parameters from an object-subject few-sample model to a multiple-sample model, wherein,
Figure FDA0003755334520000068
a small sample data set for object-subject,
Figure FDA0003755334520000069
a multi-sample dataset for the object-subject; f (theta;ω) learning a meta-map from the few-sample model parameters to the many-sample model parameters using the parameter ω, whose input is a neural collaborative filtering recommendation model
Figure FDA00037553345200000610
The trained parameter theta, lambda is a regularization parameter for balancing the two terms, | F (theta; omega) -theta *2 Passing the predicted multi-sample model parameters through F (theta; omega) and the multi-sample model parameters theta * The distance between the two is minimized and,
Figure FDA00037553345200000611
based on training data sets
Figure FDA00037553345200000612
Training the neural collaborative filtering recommendation network to ensure
Figure FDA00037553345200000613
High recommendation performance of data while helping to learn F (theta; omega);
step 6-3: using a full-connection layer as a mapping network of F () to learn the parameters of the last layer of the subject-object neural collaborative filtering recommendation network, and using the formula
Figure FDA00037553345200000614
Obtaining a multi-sample model parameter;
step 6-4: then using the loss function
Figure FDA00037553345200000615
Learning the parameter change from a subject-object few-sample model to a multi-sample model,
Figure FDA00037553345200000616
a sample data set is few for the subject-object,
Figure FDA00037553345200000617
few sample data sets for subject-object.
10. The neural collaborative filtering bidirectional recommendation method based on the head-tail knowledge migration according to claim 1, characterized in that: the step 7 specifically includes:
step 7-1: obtaining a guest-host score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed of
Figure FDA0003755334520000071
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 Is learning from
Figure FDA0003755334520000072
Data set to
Figure FDA0003755334520000073
Model parameter mapping of data sets by minimization
Figure FDA0003755334520000074
The final scoring data is obtained by the following formula,
Figure FDA0003755334520000075
wherein
Figure FDA0003755334520000076
θ * For the original multi-sample parameter, omega j,j+1 For full connection layer learning
Figure FDA0003755334520000077
To
Figure FDA0003755334520000078
Parameter of model variation, θ j Is composed of
Figure FDA0003755334520000079
Data set neural collaborative filtering model parameters;
step 7-2: obtaining a subject-object score: select a series of t j Satisfy t 1 <t 2 <t 3 …<t m Constructed as described
Figure FDA00037553345200000710
Data set, simultaneous learning of a series of F 1,2 (·)…F j,j+1 (·)…F m-1,m (. wherein F) j,j+1 Is learning from
Figure FDA00037553345200000711
Data set to
Figure FDA00037553345200000712
Model parameter mapping of data sets by minimization
Figure FDA00037553345200000713
The final scoring data is obtained by the following formula,
Figure FDA00037553345200000714
wherein
Figure FDA00037553345200000715
θ * For the original multi-sample parameter, omega j,j+1 For full-link layer learning
Figure FDA00037553345200000716
To
Figure FDA00037553345200000717
Parameter of model variation, θ j Is composed of
Figure FDA00037553345200000718
Data set neural collaborative filtering model parameters;
And 7-3: aggregating two-way scores: the two-way scores are aggregated by arithmetic mean, matched with a test set, and verified for model accuracy, recall and f1 values.
CN202210852889.0A 2022-07-20 2022-07-20 Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge Pending CN115080861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210852889.0A CN115080861A (en) 2022-07-20 2022-07-20 Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210852889.0A CN115080861A (en) 2022-07-20 2022-07-20 Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge

Publications (1)

Publication Number Publication Date
CN115080861A true CN115080861A (en) 2022-09-20

Family

ID=83258890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210852889.0A Pending CN115080861A (en) 2022-07-20 2022-07-20 Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge

Country Status (1)

Country Link
CN (1) CN115080861A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166890A (en) * 2023-04-25 2023-05-26 中国科学技术大学 Recommendation method, system, equipment and medium based on shallow automatic encoder model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740655A (en) * 2018-12-26 2019-05-10 西安电子科技大学 Article score in predicting method based on matrix decomposition and neural collaborative filtering
US20220058489A1 (en) * 2020-08-19 2022-02-24 The Toronto-Dominion Bank Two-headed attention fused autoencoder for context-aware recommendation
CN114691973A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Recommendation method, recommendation network and related equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740655A (en) * 2018-12-26 2019-05-10 西安电子科技大学 Article score in predicting method based on matrix decomposition and neural collaborative filtering
US20220058489A1 (en) * 2020-08-19 2022-02-24 The Toronto-Dominion Bank Two-headed attention fused autoencoder for context-aware recommendation
CN114691973A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Recommendation method, recommendation network and related equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SEONGWON JANG 等: "CITIES: Contextual Inference of Tail-item Embeddings for Sequential Recommendation", ARXIV, 23 May 2021 (2021-05-23), pages 1 - 10 *
高飞 等: "基于图卷积网络的双向协同过滤推荐算法", 软件, vol. 42, no. 7, 31 December 2021 (2021-12-31), pages 1 - 7 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166890A (en) * 2023-04-25 2023-05-26 中国科学技术大学 Recommendation method, system, equipment and medium based on shallow automatic encoder model
CN116166890B (en) * 2023-04-25 2023-07-18 中国科学技术大学 Recommendation method, system, equipment and medium based on shallow automatic encoder model

Similar Documents

Publication Publication Date Title
Zhang et al. Scalable multiplex network embedding.
CN110795619B (en) Multi-target-fused educational resource personalized recommendation system and method
CN112529168B (en) GCN-based attribute multilayer network representation learning method
CN112364976B (en) User preference prediction method based on session recommendation system
CN111062775A (en) Recommendation system recall method based on attention mechanism
CN109325875B (en) Implicit group discovery method based on hidden features of online social users
CN111143705B (en) Recommendation method based on graph convolution network
Sun et al. Compositional metric learning for multi-label classification
CN110781401A (en) Top-n project recommendation method based on collaborative autoregressive flow
CN113128667B (en) Cross-domain self-adaptive graph rolling balance migration learning method and system
CN115080861A (en) Neural collaborative filtering bidirectional recommendation method based on migration head and tail knowledge
CN112861006A (en) Recommendation method and system fusing meta-path semantics
CN113704438B (en) Conversation recommendation method of abnormal picture based on layered attention mechanism
Ciocca et al. Evaluation of automatic image color theme extraction methods
CN115525819A (en) Cross-domain recommendation method for information cocoon room
CN111597428A (en) Recommendation method for splicing user and article with q-separation k sparsity
Liu et al. TCD-CF: Triple cross-domain collaborative filtering recommendation
CN117763373A (en) Semantic tag alignment system based on deep learning of graph
Chen et al. Integration of genetic algorithms and neural networks for the formation of the classifier of the hierarchical Choquet integral
CN111241372B (en) Method for predicting color harmony degree according to user preference learning
Bu et al. Unsupervised face-name association via commute distance
CN112818256A (en) Recommendation method based on neural collaborative filtering
Dutta et al. Clustering by multi objective genetic algorithm
CN110942082B (en) Talent value evaluation method
Singh et al. Effective key‐frame extraction approach using TSTBTC–BBA

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