CN116610874A - Cross-domain recommendation method based on knowledge graph and graph neural network - Google Patents
Cross-domain recommendation method based on knowledge graph and graph neural network Download PDFInfo
- Publication number
- CN116610874A CN116610874A CN202310660348.2A CN202310660348A CN116610874A CN 116610874 A CN116610874 A CN 116610874A CN 202310660348 A CN202310660348 A CN 202310660348A CN 116610874 A CN116610874 A CN 116610874A
- Authority
- CN
- China
- Prior art keywords
- domain
- graph
- embedding
- cross
- user
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 24
- 238000004364 calculation method Methods 0.000 claims abstract description 31
- 230000000644 propagated effect Effects 0.000 claims abstract description 6
- 230000006870 function Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 9
- 239000011159 matrix material Substances 0.000 claims description 8
- 230000009466 transformation Effects 0.000 claims description 8
- 230000004913 activation Effects 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 7
- 230000003993 interaction Effects 0.000 claims description 6
- 230000002776 aggregation Effects 0.000 claims description 4
- 238000004220 aggregation Methods 0.000 claims description 4
- 239000013598 vector Substances 0.000 claims description 4
- 101100134058 Caenorhabditis elegans nth-1 gene Proteins 0.000 claims description 2
- 238000001914 filtration Methods 0.000 claims description 2
- 238000012163 sequencing technique Methods 0.000 abstract 1
- 239000002131 composite material Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- 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
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a cross-domain recommendation method based on a knowledge graph and a graph neural network, which is characterized by comprising the following steps of: the method comprises the following steps: s1: normalizing the initial parameters; s2: distributing intra-domain embedding for users and items; s3: calculating the inter-domain initial embedding of the user and the item; s4: calculating information embedding propagated on the graph based on the cross-domain graph; s5: computing information embedding aggregated on the graph based on the cross-domain graph; s6: calculating the final inter-domain embedding of the user and the item; s7: and calculating a matching value between the user and the project and recommending. The invention can integrate multi-domain information to carry out cross-domain graph modeling, carries out feature learning from the semantic information and structure information layers of the graph, carries out matching value calculation by learning intra-domain embedding and inter-domain embedding of users and projects, and finally carries out project recommendation on the users by using Bayesian pairwise sequencing. The method and the device can be applied to various cross-domain recommendation scenes, such as e-commerce recommendation and the like.
Description
Technical field
The invention provides a cross-domain recommendation method based on a knowledge graph and a graph neural network, which aims at the problems of sparse data and cold start widely existing in the traditional recommendation method, and performs cross-domain recommendation in a combined guidance mode by utilizing composite graph information of the knowledge graph and the graph neural network, so that the method has a good recommendation effect.
Background
The recommendation system is used as a method for screening information, can provide items possibly needed for users by using user data, effectively solves the problem of information overload, and is widely used in a plurality of fields such as electronic commerce, advertisements, movies and the like. The knowledge graph is a general formal description framework of semantic knowledge, and a recommendation system based on the knowledge graph utilizes entities in the real world and utilizes a triplet structure of the knowledge graph to construct links for recommendation items, so that interpretability is provided for recommendation. The recommendation system based on deep learning can learn deep representation of more abstract and dense users and projects by using a deep learning model, and simultaneously build a prediction model by using a deep neural network structure, can learn cross features better, and enhances the expression capability and generalization performance of the recommendation model. The cross-domain recommendation method can utilize the information rich in source domain to help improve the recommendation accuracy of users in destination domain, can generally relieve the problems of data sparseness and cold start, and can also better improve the problem of information cocoons.
Disclosure of Invention
The invention aims to: for a recommendation system, the existing auxiliary information has the characteristics of large scale, heterogeneous data, sparse data, uneven distribution and the like, and the application of the existing recommendation method to the auxiliary information is generally limited to a text learning stage, and the application of knowledge in the auxiliary information is insufficient, so that the recommendation result is inaccurate. Aiming at the problems, a cross-domain recommendation model based on the fusion of the composite graph information of the knowledge graph and the graph neural network and the multiple domains is provided, and the cross-domain recommendation on the multiple domains is realized by combining the semantic information and the structural information of the graph.
To achieve the above object, as shown in fig. 1, which is a basic flowchart of the present invention, the method includes the steps of:
s1: normalizing the initial parameters;
s2: distributing intra-domain embedding for users and items;
s3: calculating the inter-domain initial embedding of the user and the item;
s4: calculating information embedding propagated on the graph based on the cross-domain graph;
s5: computing information embedding aggregated on the graph based on the cross-domain graph;
s6: calculating the final inter-domain embedding of the user and the item;
s7: and calculating a matching value between the user and the project and recommending.
The initial parameters in the step S1 include an entity embedding dimension D, a regularization parameter λ, a number m of samples of batch gradient descent, a training iteration number T, a depth of attention layer D of the graph neural network, a dimension D' of each layer of the graph neural network, and a parameter W of the graph neural network.
In step S2, for each domain, a domain-by-domain insert is assigned to the user and the item in the domain according to the user and the item ID, and for domain x, the domain-by-domain insert of the user and the item in the domain is denoted as E u(x) and Ei(x) Where x= { a, B,..x }.
In the step S3, domain knowledge graphs are constructed by using domain project information, a graph is constructed by using the user, the project and the inter-project knowledge graphs together, and a triplet score is used for entities in the graph to obtain inter-domain initial embedding of the entities in the triplet (h, r, t), wherein the calculation formula is as follows
wherein ,Wr ∈R k×d Is a transformation matrix of the relation r,represents L 2 Regularization to prevent over-fitting problems;
the calculation formula of the inter-domain knowledge graph loss function of the definition domain x is as follows
L KG(x) =∑ (h,r,t,t')∈T -lnσ(g(h,r,t')-g(h,r,t)) (2)
wherein ,(h, r, t') is a pseudo triplet constructed by randomly replacing tail entities, G is a constructed cross-domain map, σ is non-The function is activated linearly.
In the information embedding propagated on the cross-domain graph in the step S4, the information embedding calculation formula of the neighbor nodes is as follows
Where pi (h, r, t) is the attention coefficient embedded in the propagation layer, N h = { (h, R, t) | (h, R, t) ∈g } represents all triplet sets with node h as head entity, head entity h and tail entity t satisfy { h, t|h, t E '}, E' is all entity sets in cross-domain graph G, relationship R satisfies { r|r E R }, R is all relationship sets in cross-domain graph G;
the initial attention coefficient calculation formula is defined as follows
π(h,r,t)=(W r e t ) T tanh(W r e h +e r ) (4)
Wherein tanh is a nonlinear activation function, W r Is a transformation matrix on the relation r in the embedded layer;
the normalized attention coefficient calculation formula is defined as follows
Where (h, r ', t') is the set of all triples.
In the step S5 of embedding the aggregated information in the cross-domain map, the calculation formula of the entity aggregation embedding is as follows
Wherein the superscript (n) indicates that the embedding is an nth order embedding, the superscript (n-1) indicates that the embedding is an nth-1 order embedding, and f (·) represents an aggregator;
the aggregator calculation formula is defined as follows
Wherein LeakyReLU is an activation function, W r ∈R d'×d Is a trainable weight matrix, d' is the vector dimension after linear transformation.
The final inter-domain embedded calculation formula of the user and the item in the step S6 is as follows
Wherein || represents a stitching operation;
the inter-domain collaborative filtering loss function calculation formula defining the domain x is as follows
Wherein Ω= { (u, I, j) | (u, I) ∈i+, (u, j) ∈i- } represents the training set, i+ represents the positive sample of the user u's interactions with item I, I-represents the negative sample of no interactions, σ is a nonlinear activation function,is the scoring value between user u and item i in field x.
The calculation formula of the matching value between the user and the item in the step S7 is as follows
Wherein x= { a, B, C,. -%, X };
the final loss function of domain x is defined as follows
wherein ,is the set of parameters of the model, E is the embedded vector of all entities and relationships, W r Is a transformation matrix in a specific relation r, lambda is L 2 Regularization parameters.
Drawings
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a diagram of intra-domain embedding acquisition in accordance with an embodiment of the present invention
Fig. 3 is a process of obtaining inter-domain embedding in an embodiment of the present invention.
Detailed description of the preferred embodiments
In order to make the technical solution in the embodiments of the present invention clear and completely described, the present invention is further described in detail below.
Taking a double data set as an example, the double data set contains user project interaction data and project data of three domains of films, music and books, and a sharing user exists in each domain, so that the data set is selected for model training and testing.
Step one: the model initial parameters are normalized. The value of the physical embedding dimension D is 64, the value of the regularization parameter lambda is 0.00001, the value of the number m of samples with batch gradient descent is 1024, the value of the training iteration round number T is 100, the value of the attention layer depth D of the graph neural network is 3, the value of the dimension D' of each layer of the graph neural network is [64,32,16], and the parameter W of the graph neural network is an initialization random value.
Step two: intra-domain embedding is allocated for users and items.
For each domain in the Douban dataset, a domain insert is assigned to the user and item in that domain based on the user and item ID. For the movie domain, the intra-domain embedding of users and items on that domain is denoted as E u(A) and Ei(A) For the music domain, the intra-domain embeddings of users and items on that domain are denoted as E u(B) and Ei(B) For the book domain, the intra-domain embeddings of users and items on that domain are denoted as E u(C) and Ei(C) 。
Step three: the initial embedding of users and items between domains in three domains of movies, music and books is calculated.
For a movie domain, entity extraction and relationship construction are carried out on movie names, directors, brief introduction, drama, publishing countries, languages and actors; for a music domain, extracting entities and constructing relations of song names, singers, publishing companies and labels; and for the book domain, entity extraction and relation construction are carried out on the book name, the author, the brief introduction, the translator and the publishing company, and finally, the project knowledge maps of three projects are constructed.
Combining the project knowledge graph and the user project interaction information, constructing a graph structure depending on the sharing user, calculating scores for triples on the graph, and training by using loss functions. As shown in fig. 3, user u 1 The resulting inter-domain initial embedding isItem i 5 The resulting inter-domain initial embedding is +.>
Step four: information embedding propagated on the graph is calculated based on the cross-domain graph, as shown in part in fig. 3.
For user node u 1 The neighbor nodes of the node include i 2 、i 3 Calculate u 1 Neighbor embedding of (c) is as follows
Two initial attention coefficients are calculated, the calculation process is as follows
π(u 1 ,r 1 ,i 2 )=(W r i 2 ) T tanh(W r u 1 +r 1 ) (2)
π(u 1 ,r 1 ,i 3 )=(W r i 3 ) T tanh(W r u 1 +r 1 ) (3)
Then, the normalization calculation is carried out, and the calculation process is as follows
For item node i 5 The neighbor nodes of the node include u 3 、u 4 、e 3 Calculate i 5 Neighbor embedding of (c) is as follows
Three initial attention coefficients were calculated, the calculation procedure being as follows
v(i 5 ,r 2 ,e 3 )=(W r e 3 ) T tanh(W r i 5 +r 2 ) (7)
π(i 5 ,r 3 ,u 3 )=(W r u 3 ) T ranh(W r i 5 +r 3 ) (8)
π(i 5 ,r 3 ,u 4 )=(W r u 4 ) T tanh(W r i 5 +r 3 ) (9)
Then, the normalization calculation is carried out, and the calculation process is as follows
Step five: the information embedding aggregated on the graph is calculated based on the cross-domain graph, as partially shown in fig. 3.
For user node u 1 Information embedding after aggregation of the neighbor nodes is calculated, and the calculation process is as follows
For item node i 5 Information embedding after aggregation of the neighbor nodes is calculated, and the calculation process is as follows
Step six: the final inter-domain embedding of the user and the item is calculated as partially shown in fig. 3.
For user node u 1 And item node i 5 The final inter-domain embedding calculation process is as follows
Step seven: and calculating a matching value between the user and the project and recommending. For user node u 1 And item node i 5 The matching value calculation process of (2) is as follows
And finally, sorting according to the matching value between the user and the item to obtain a final recommendation result.
The present invention is not limited to the specific embodiments described above, but is to be construed as being limited to the preferred embodiments of the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention are intended to be included in the scope of the present invention.
Claims (8)
1. The cross-domain recommendation method based on the knowledge graph and the graph neural network is characterized by comprising the following steps of: the method comprises the following steps:
s1: normalizing the initial parameters;
s2: distributing intra-domain embedding for users and items;
s3: calculating the inter-domain initial embedding of the user and the item;
s4: calculating information embedding propagated on the graph based on the cross-domain graph;
s5: computing information embedding aggregated on the graph based on the cross-domain graph;
s6: calculating the final inter-domain embedding of the user and the item;
s7: and calculating a matching value between the user and the project and recommending.
2. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: the initial parameters in the step S1 include an entity embedding dimension D, a regularization parameter λ, a number m of samples of batch gradient descent, a training iteration number T, a depth of attention layer D of the graph neural network, a dimension D' of each layer of the graph neural network, and a parameter W of the graph neural network.
3. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: each domain in the step S2 allocates a domain-embedded to the user and the item in the domain according to the user and the item ID, and for the domain x, the domain-embedded of the user and the item in the domain is denoted as E u(x) and Ei(x) Where x= { a, B,..x }.
4. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: in the step S3, the inter-domain initial embedding process for calculating the user and the project is performed by firstly constructing a domain knowledge graph by using project information of the domain, constructing a graph by using the user, the project and the inter-project knowledge graph together, and obtaining the inter-domain initial embedding of the entity by using the triplet score for the entity in the graph, wherein the calculation formula is as follows
wherein ,Wr ∈R k×d Is a transformation matrix of the relation r,represent L2 regularization to prevent overfitting issues;
the calculation formula of the inter-domain knowledge graph loss function of the definition domain x is as follows
L KG(x) =∑ (h,r,t,t′)∈T -lnσ(g(h,r,t′)-g(h,r,t)) (2)
wherein ,(h, r, t') is a pseudo triplet of randomly substituted tail entity constructs, G is a constructed cross-domain map, σ is a nonlinear activation function.
5. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: in the information embedding propagated on the cross-domain graph in the step S4, the information embedding calculation formula of the neighbor node is as follows
Where pi (h, r, t) is the attention coefficient embedded in the propagation layer, N h = { (h, R, t) | (h, R, t) ∈g } represents all triplet sets with node h as head entity, head entity h and tail entity t satisfy { h, t|h, t E '}, E' is all entity sets in cross-domain graph G, relationship R satisfies { r|r E R }, R is all relationship sets in cross-domain graph G;
the initial attention coefficient calculation formula is defined as follows
π(h,r,t)=(W r e t ) T tanh(W r e h +e r ) (4)
Wherein tanh is a nonlinear activation function, W r Is a transformation matrix on the relation r in the embedded layer;
the normalized attention coefficient calculation formula is defined as follows
Where (h, r ', t') is the set of all triples.
6. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: in the step S5 of embedding the aggregated information in the cross-domain map, the calculation formula of the entity aggregation embedding is as follows
Wherein the superscript (n) indicates that the embedding is an nth order embedding, the superscript (n-1) indicates that the embedding is an nth-1 order embedding, and f (·) represents an aggregator;
the aggregator calculation formula is defined as follows
Wherein LeakyReLU is an activation function, W r ∈R d'×d Is a trainable weight matrix, d' is the vector dimension after linear transformation.
7. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: the final inter-domain embedded calculation formula of the user and the item in the step S6 is as follows
Wherein || represents a stitching operation;
the inter-domain collaborative filtering loss function calculation formula defining the domain x is as follows
Wherein Ω= { (u, I, j) | (u, I) ∈i + ,(u,j)∈I - The training set, I + A positive sample representing the interaction between user u and item I, I - Representing a negative sample of no interaction, sigma is a nonlinear activation function,is the scoring value between user u and item i in field x.
8. The knowledge-graph and graph neural network-based cross-domain recommendation method as claimed in claim 1, wherein: the calculation formula of the matching value between the user and the item in the step S7 is as follows
Wherein x= { a, B, C,. -%, X };
the final loss function of domain x is defined as follows
wherein ,is a set of parameters of the model, E is all entities and relationshipsEmbedding vectors, W r Is a transformation matrix in a specific relation r, lambda is L 2 Regularization parameters.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310660348.2A CN116610874A (en) | 2023-06-06 | 2023-06-06 | Cross-domain recommendation method based on knowledge graph and graph neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310660348.2A CN116610874A (en) | 2023-06-06 | 2023-06-06 | Cross-domain recommendation method based on knowledge graph and graph neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116610874A true CN116610874A (en) | 2023-08-18 |
Family
ID=87683523
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310660348.2A Pending CN116610874A (en) | 2023-06-06 | 2023-06-06 | Cross-domain recommendation method based on knowledge graph and graph neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116610874A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117648493A (en) * | 2023-12-13 | 2024-03-05 | 南京航空航天大学 | Cross-domain recommendation method based on graph learning |
-
2023
- 2023-06-06 CN CN202310660348.2A patent/CN116610874A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117648493A (en) * | 2023-12-13 | 2024-03-05 | 南京航空航天大学 | Cross-domain recommendation method based on graph learning |
CN117648493B (en) * | 2023-12-13 | 2024-05-31 | 南京航空航天大学 | Cross-domain recommendation method based on graph learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111488734B (en) | Emotional feature representation learning system and method based on global interaction and syntactic dependency | |
CN108492200B (en) | User attribute inference method and device based on convolutional neural network | |
CN111428147B (en) | Social recommendation method of heterogeneous graph volume network combining social and interest information | |
CN112529168B (en) | GCN-based attribute multilayer network representation learning method | |
CN111881363B (en) | Recommendation method based on graph interaction network | |
CN111143672B (en) | Knowledge graph-based professional speciality scholars recommendation method | |
Zhang et al. | KGAN: Knowledge grouping aggregation network for course recommendation in MOOCs | |
CN116610874A (en) | Cross-domain recommendation method based on knowledge graph and graph neural network | |
Liu et al. | TCD-CF: Triple cross-domain collaborative filtering recommendation | |
Rahman et al. | Knowledge graph embedding via entities’ type mapping matrix | |
Abbas et al. | A deep learning approach for context-aware citation recommendation using rhetorical zone classification and similarity to overcome cold-start problem | |
Sangeetha et al. | Predicting personalized recommendations using GNN | |
CN115840853A (en) | Course recommendation system based on knowledge graph and attention network | |
CN113159976B (en) | Identification method for important users of microblog network | |
Zeng | Application of conditional random field model based on machine learning in online and offline integrated educational resource recommendation | |
Xu et al. | ICANE: Interaction content-aware network embedding via co-embedding of nodes and edges | |
Hu et al. | Scientific paper recommendation using author’s dual role citation relationship | |
Wang et al. | MOOC resources recommendation based on heterogeneous information network | |
Boudiba et al. | Tag-based embedding representations in neural collaborative filtering approaches. | |
Burke et al. | Recommendation in the social web | |
Ning et al. | Nonlinear structural fusion for multiplex network | |
Ostrowski | Predictive semantic social media analysis | |
Alali | A novel stacking method for multi-label classification | |
Zhang et al. | A deep recommendation framework for completely new users in mashup creation | |
Li et al. | Rw-gcn: Training graph convolution networks with biased random walk for semi-supervised classification |
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 |