CN116340648A - Knowledge graph attention network recommendation method based on graph collaborative filtering - Google Patents
Knowledge graph attention network recommendation method based on graph collaborative filtering Download PDFInfo
- Publication number
- CN116340648A CN116340648A CN202310315798.8A CN202310315798A CN116340648A CN 116340648 A CN116340648 A CN 116340648A CN 202310315798 A CN202310315798 A CN 202310315798A CN 116340648 A CN116340648 A CN 116340648A
- Authority
- CN
- China
- Prior art keywords
- user
- collaborative filtering
- layer
- knowledge graph
- graph
- 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
- 238000001914 filtration Methods 0.000 title claims abstract description 85
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000004931 aggregating effect Effects 0.000 claims abstract description 7
- 239000013598 vector Substances 0.000 claims description 69
- 230000003993 interaction Effects 0.000 claims description 29
- 239000004973 liquid crystal related substance Substances 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 11
- 230000000644 propagated effect Effects 0.000 claims description 11
- 230000002776 aggregation Effects 0.000 claims description 10
- 238000004220 aggregation Methods 0.000 claims description 10
- 230000007246 mechanism Effects 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 6
- 230000001902 propagating effect Effects 0.000 claims description 5
- 230000004913 activation Effects 0.000 claims description 4
- 238000013461 design Methods 0.000 claims description 4
- 238000005096 rolling process Methods 0.000 claims description 4
- 238000013528 artificial neural network Methods 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000005065 mining Methods 0.000 abstract description 2
- 238000004364 calculation method Methods 0.000 description 2
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9536—Search customisation based on social or collaborative filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9537—Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention provides a knowledge graph attention network recommendation method based on graph collaborative filtering, which comprises the following steps: constructing a recommendation model; the building of the recommendation model comprises the following steps: constructing a collaborative filtering layer of a recommendation model; constructing a knowledge graph attention embedding layer of a recommendation model; aggregating a collaborative filtering layer and a knowledge graph attention embedding layer of the recommendation model to finish the recommendation model; and inputting the user into the recommendation model, and outputting the predicted click rate of the user. The invention can calculate the attention weight of the entity associated with the user and the object in the knowledge graph by utilizing the collaborative filtering information of the user and the object, thereby fully mining the similarity between the user and the object and between the objects.
Description
Technical Field
The invention relates to the technical field of information recommendation, in particular to a knowledge graph attention network recommendation method based on graph collaborative filtering.
Background
The basic assumption of collaborative filtering is that similar users will exhibit similar preferences for items, and since the full approach to the field of deep learning, it is generally mainly to learn about the embedding of users and items in hidden space first, then reconstruct the interaction of the two, such as matrix factoring for inner products, neural collaborative filtering to simulate higher order interactions, etc. The knowledge graph can effectively solve the problems of sparsity and cold start of collaborative filtering, so that the knowledge graph is widely studied and applied as side information in a recommendation system. The user representation is enhanced with a social network reflecting the user relationships, and the item representation is enhanced with a knowledge graph expressing relationships between items through attributes. Integrating knowledge graphs into recommendations can bring two benefits: (1) The rich semantic relations among the items in the knowledge graph are helpful for mining the relation among the items and improving the representation of the items; (2) The knowledge graph connects the historical interaction items of the user with the recommendation items, so that the interpretability of the result is enhanced. The prior knowledge graph attention network fuses knowledge graph relation information and a user-object interaction graph into a graph space, so that collaborative filtering information and knowledge graph information can be fused, and higher-order relation information can be discovered through collaborative knowledge graphs.
Most of the existing recommendation methods based on knowledge graphs focus on how to effectively encode knowledge correlations in the knowledge graphs, but do not highlight potential key collaborative signals in user-object interactions, and use the same strategy for both types of information, which can lead to learning that entity vectors cannot accurately represent the characteristics of an entity.
Disclosure of Invention
The invention aims to provide a knowledge graph attention network recommendation method based on graph collaborative filtering, which can calculate the attention weights of entities associated with users and objects in a knowledge graph by using collaborative filtering information of the users and the objects, so that the similarity between the users and the objects and between the objects is fully mined.
A knowledge graph attention network recommendation method based on graph collaborative filtering comprises the following steps:
constructing a recommendation model;
the building of the recommendation model comprises the following steps: constructing a collaborative filtering layer of a recommendation model;
constructing a knowledge graph attention embedding layer of a recommendation model;
aggregating a collaborative filtering layer and a knowledge graph attention embedding layer of the recommendation model to finish the recommendation model;
and inputting the user into the recommendation model, and outputting the predicted click rate of the user.
Constructing a collaborative filtering layer of a recommendation model includes:
constructing a user-article bipartite graph, and acquiring a related item set I of a user and an article u And I type v ;
Embedding user and item initial entities into vectorsAnd->The collaborative filtering vector u is converted into a collaborative filtering vector u of users and articles through collaborative filtering cf And v cf 。
The knowledge graph attention embedding layer for constructing the recommendation model comprises the following steps:
constructing a user-article bipartite graph, and acquiring a related item set I of a user and an article u And I type v ;
Related items I of user and article are collected u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 ;
Propagating collaborative signals through user item interactions and knowledge associations in a knowledge graph, obtaining representations U of users and objects after multi-layer recursion of an initial entity set l And V l ;
Generating a weighted representation of an entity based on an attention mechanismObtaining knowledge graph attribute vector u of user and article by hierarchical aggregation mechanism kg And v kg 。
Acquiring initial entity embedded vectors of users and articles in related item setsAnd->Comprising the following steps:
assuming that the set of users is I u ={u 1 ,u 2 ,...,u m Aggregation of items I v ={v 1 ,v 2 ,...,v n };
Obtaining a user-article interaction matrix Y E R according to the history interaction m×n Wherein y is uv =1 indicates that there is an observed interaction between user u and item v; if there is no interaction between the user and the item, y uv =0;
Embedding user and item initial entities into vectorsAnd->The collaborative filtering vector u is converted into a collaborative filtering vector u of users and articles through collaborative filtering cf And v cf Comprising the following steps:
the collaborative filtering layer aggregates the neighborhood information of the nodes in the user-object bipartite graph through simplified graph rolling operation to obtain collaborative filtering vector representation of the user and the object;
the graph convolution network can reach the convergence state of the model by skipping infinite layer message transfer, and when the convergence condition is reached, the graph convolution network is embedded and written as the following formula:
wherein e u For user feature vector after infinite layer iteration, d u And d v Representing the originality of the user and item nodes, following the design of a standard GCN,
deducing the following convergence state to obtain a collaborative filtering vector u cf 、v cf :
Related items I of user and article are collected u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 Comprising the following steps:
related item set I of user and article u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 ={u|u∈G,y uv =1 } and V 0 ={v|v∈G,y uv =1};
Wherein G represents the set of all entities and relations in the knowledge graph, y uv =1 means that user u has interacted with item v, if the user has not interacted with item y uv =0。
By use of knowledge graphsUser item interaction and knowledge association propagate collaboration signals, and the representation U of the user and the object is obtained after multi-layer recursion of the initial entity set l And V l Comprising the following steps:
the entity set definition of the l-layer of user u and item v is recursively expressed as:
U l ={t|(h,r,t)∈G,h∈U l-1 }
V l ={t|(h,r,t)∈G,h∈V l-1 }
wherein the triplet (h, r, t) is a triplet where a certain entity t is located in the first layer attribute entity set of the user u;
resulting in a layer i recursive triplet representation:
generating a weighted representation of an entity based on an attention mechanismObtaining knowledge graph attribute vector u of user and article by hierarchical aggregation mechanism kg And v kg Comprising the following steps:
assuming that the triplet (h, r, t) is a triplet where an entity t is in the l-layer attribute entity set of user u, a vector after defining t to add attention weight is expressed as a i :
a i =π(h i ,r i )t i
Wherein h is i Is head entity embedding, r i Is the embedding of the relation, t i Is tail entity embedding, pi (h i ,r i ) Controlling the attention weight generated by the head entity and the head-to-tail relation, and realizing pi (·) functions through a neural network of an attention mechanism, wherein the formula is as follows:
π(h i ,r i )=σ(W 2 ReLU(W 1 ReLU(W 0 (h i ||r i )+b 0 )+b 1 )+b 2 )
wherein, reLU is used as a nonlinear activation function, W and b are weight matrix to be learned and deviation, subscripts are different to indicate that the weight matrix and the deviation are parameters of different layers, and a softmax function is used for normalizing the coefficients of the whole triplet:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a general representation of a multi-layer recursive triplet representation, when calculating the triplet representation of the first layer, each triplet (h ', r ', t ') in the first layer is subjected to attention calculation, and multi-layer attribute information is aggregated to obtain a first layer attribute vector representation of the user/item:
wherein, the liquid crystal display device comprises a liquid crystal display device,and->A vector representation after attention weights representing the user and the item;
splicing the l-layer attribute vectors of the user u and the article v to obtain the knowledge graph attribute vectors of the user and the article:
wherein I is a series operation.
Aggregating the collaborative filtering layer and the knowledge graph attention embedding layer of the recommendation model, and completing the recommendation model comprises:
combining the embedding of the collaborative filtering layer and the knowledge graph attention layer to obtain the final vector representation of the user u and the object v:
u=σ(W·(u cf ||u kg )+b)
v=σ(W·(v cf ||v kg )+b)
the recommendation model vector inner product u with v to predict the probability of user u selecting item v:
a knowledge graph attention network recommendation system based on graph collaborative filtering, comprising:
the first data processing module is used for constructing a recommendation model;
and the second data processing module is used for inputting the user into the recommendation model and outputting the predicted click rate of the user.
According to the knowledge graph attention network recommendation model based on graph collaborative filtering, the collaborative filtering propagation layer and the knowledge graph attention propagation layer are utilized to ensure that the collaborative filtering information and the entity related information in the knowledge graph are effectively fused, so that the accuracy of a recommendation result is not affected, then the attention weights of the entities related to the user and the object in the knowledge graph are calculated by utilizing the collaborative filtering information of the user and the object in the knowledge graph attention embedding propagation layer, and therefore the similarity between the user and the object and between the object is fully mined.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of the present invention;
fig. 2 is a system architecture diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are merely used to explain the relative positional relationship, movement, etc. between the components in a particular posture (as shown in the drawings), and if the particular posture is changed, the directional indicator is changed accordingly.
Furthermore, the description of "first," "second," etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Most of the existing recommendation methods based on knowledge graphs focus on how to effectively encode knowledge correlations in the knowledge graphs, but do not highlight potential key collaborative signals in user-object interactions, and use the same strategy for both types of information, which can lead to learning that entity vectors cannot accurately represent the characteristics of an entity. And the graph convolution network is introduced into a recommendation algorithm, so that high-order connection information between the user and the object can be effectively extracted.
Therefore, the collaborative filtering propagation layer and the knowledge graph attention propagation layer are utilized in the knowledge graph attention network recommendation model based on graph collaborative filtering to ensure that the collaborative filtering information and the entity related information in the knowledge graph are effectively fused, so that the accuracy of a recommendation result is not influenced; and then, embedding the attention of the knowledge graph into a propagation layer, and calculating the attention weight of the entity associated with the user and the object in the knowledge graph by utilizing collaborative filtering information of the user and the object, so that the similarity between the user and the object and between the objects is fully mined.
Example 1
A knowledge graph attention network recommendation method based on graph collaborative filtering comprises the following steps:
s100, constructing a recommendation model;
the building of the recommendation model comprises the following steps: s101, constructing a collaborative filtering layer of a recommendation model;
s102, constructing a knowledge graph attention embedding layer of a recommendation model;
s103, aggregating a collaborative filtering layer and a knowledge graph attention embedding layer of the recommendation model to finish the recommendation model;
s200, inputting a user into the recommendation model, and outputting predicted click rate of the user.
S101, constructing a collaborative filtering layer of a recommendation model comprises the following steps:
s1011, constructing a user-object bipartite graph, and acquiring a related item set I of a user and an object u And I type v ;
S1012, obtaining initial entity embedded vectors of users and articles in the related project setAnd->
S1013 embedding user and article initial entity into vectorAnd->The collaborative filtering vector u is converted into a collaborative filtering vector u of users and articles through collaborative filtering cf And v cf 。
In a recommendation scenario, we often have historical user-item interactions (e.g., purchases and clicks). Taking the movieens dataset as an example, we assume that the set of users is I u ={u 1 ,u 2 ,...,u m Aggregation of } and movies I v ={v 1 ,v 2 ,...,v n }. From the historical interactions we can get a user-movie interaction matrix Y εR m×n Wherein y is uv =1 indicates that there is an observed interaction between user u and movie v; otherwise y uv =0。
And aggregating the neighborhood information of the nodes in the two-part graph of the user object by the collaborative filtering layer through simplified graph rolling operation to obtain collaborative filtering vector representation of the user and the film.
Graph convolution networks have been widely used in recommendation systems as an effective collaborative filtering method, but message propagation slows down the convergence speed of the graph convolution network during training. After the propagation of messages through the infinite layers, the end result tends to a fixed value, and the convergence state of the model can be approximated by skipping such infinite layer messaging. When convergence is reached, the embedding can be written as:
wherein e u To pass byInfinite layer iterated user feature vector, d u And d v Representing the originality of the user and movie nodes, following the design of a standard GCN,
with some simplification, the following convergence states are derived to obtain collaborative filtering vector u cf 、v cf :
In order to facilitate optimization, sigmoid activation and negative log likelihood are further combined, and although the model is greatly simplified, the current loss is still affected by excessive smoothing, and in order to ensure the effect of the model, after negative sampling, the loss function is as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,and->Representing a set of positive and randomly sampled negative pairs, σ is a sigmoid function.
BCE (binary cross entropy) is used as the main loss function:
both losses are based on the User-Item graph, so a basic form of loss function is now available, namely:
L=L o +λL c
where λ is a hyper-parameter that controls the importance weights of the two penalty terms.
S102, constructing a knowledge graph attention embedding layer of a recommendation model comprises the following steps:
s1021, constructing a user-article bipartite graph, and acquiring a related item set I of a user and an article u And I type v ;
S1022, the related items of the user and the article are collected I u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 ;
S1023, propagating the collaboration signal through user item interaction and knowledge association in the knowledge graph, and obtaining a representation U of the user and the object after multi-layer recursion of the initial entity set l And V l ;
S1024, generating a weighted representation of the entity based on the attention mechanismObtaining knowledge graph attribute vector u of user and article by hierarchical aggregation mechanism kg And v kg 。
Based on knowledge graph recommendation, based on the known interaction information of the user and the articles, the rich information in the knowledge graph is fully utilized, and the preference of the user on the articles is estimated by explicitly capturing the correlation between the articles.
Related project set I of user and film u And I type v By the alignment of the objects and the entities, the objects and the entities can be converted into an initial entity set U which is propagated in a knowledge graph 0 ={u|u∈G,y uv =1 } and V 0 ={v|v∈G,y uv =1}。
Wherein G represents a set of all entities and relationships in the knowledge graph; y is uv =1 means that user u has interacted with movie v, otherwise y uv =0。
S1012, acquiring initial entity embedded vectors of users and articles in related project setsAnd->Comprising the following steps:
assuming that the set of users is I u ={u 1 ,u 2 ,...,u m Aggregation of items I v ={v 1 ,v 2 ,...,v n };
Obtaining a user-article interaction matrix Y E R according to the history interaction m×n Wherein y is uv =1 indicates that there is an observed interaction between user u and item v; if there is no interaction between the user and the item, y uv =0;
S1023 embedding user and article initial entity into vectorAnd->The collaborative filtering vector u is converted into a collaborative filtering vector u of users and articles through collaborative filtering cf And v cf Comprising the following steps:
the collaborative filtering layer aggregates the neighborhood information of the nodes in the user-object bipartite graph through simplified graph rolling operation to obtain collaborative filtering vector representation of the user and the object;
the graph convolution network can reach the convergence state of the model by skipping infinite layer message transfer, and when the convergence condition is reached, the graph convolution network is embedded and written as the following formula:
wherein e u For user feature vector after infinite layer iteration, d u And d v Representing the originality of the user and item nodes, following the design of a standard GCN,
deducing the following convergence state to obtain a collaborative filtering vector u cf 、v cf :
S1022 sets I of related items of user and article u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 Comprising the following steps:
related item set I of user and article u And I type v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 ={u|u∈G,y uv =1 } and V 0 ={v|v∈G,y uv =1};
Wherein G represents the set of all entities and relations in the knowledge graph, y uv =1 means that user u has interacted with item v, if the user has not interacted with item y uv =0。
S1023, propagating the collaboration signals through user item interactions and knowledge associations in the knowledge graph, and obtaining a representation U of the user and the object after multi-layer recursion of the initial entity set l And V l Comprising the following steps:
the entity set definition of the l-layer of user u and item v is recursively expressed as:
U l ={t|(h,r,t)∈G,h∈U l-1 }
V l ={t|(h,r,t)∈G,h∈V l-1 }
wherein the triplet (h, r, t) is a triplet where a certain entity t is located in the first layer attribute entity set of the user u;
resulting in a layer i recursive triplet representation:
neighboring entities in the knowledge-graph always have strong associations. And the knowledge graph is taken as a unit to be propagated along the link, so that an extended entity set and a triple set with different distances from the initial entity set can be obtained, and potential vector representations of users and articles can be effectively extended. It is thus possible to obtain a representation of the user and the item after a multi-layer recursion, the tail entity t of the first layer, aggregated with information of the head entity h of the (l-1) th layer. The entity set definition of the l-layer of user u and movie v is recursively expressed as:
U l ={t|(h,r,t)∈G,h∈U l-1 }
V l ={t|(h,r,t)∈G,h∈V l-1 }
the triplet (h, r, t) is a triplet where a certain entity t is located in the first layer attribute entity set of the user u.
Similarly, a layer l recursive triplet representation is obtained:
users who interact with the same item can have similar behavioral preferences for the object they interact with, which preferences may contribute to the characteristic representation of the object. By definition, the initial set of entities for item v contains entities directly related to item v. The knowledge graph-based attention embedding method produces different attention weights for the tail entities to indicate the different meanings that they have when obtaining different head entities and relationships. Finally, the weighted average results in a representation of the tail entity (i.e., a representation of the user/item) and then propagates in multiple hops, generating a multi-level representation of the user and item.
S1024 generates a weighted representation of the entity based on the attention mechanismObtaining knowledge graph attribute vector u of user and article by hierarchical aggregation mechanism kg And v kg Comprising the following steps:
assuming that the triplet (h, r, t) is a triplet where an entity t is in the l-layer attribute entity set of user u, a vector after defining t to add attention weight is expressed as a i :
a i =π(h i ,r i )t i
Wherein h is i Is head entity embedding, r i Is the embedding of the relation, t i Is tail entity embedding, pi (h i ,r i ) Controlling the attention weight generated by the head entity and the head-to-tail relation, and realizing pi (·) functions through a neural network of an attention mechanism, wherein the formula is as follows:
π(h i ,r i )=σ(W 2 ReLU(W 1 ReLU(W 0 (h i ||r i )+b 0 )+b 1 )+b 2 )
wherein, reLU is used as a nonlinear activation function, W and b are weight matrix to be learned and deviation, subscripts are different to indicate that the weight matrix and the deviation are parameters of different layers, and a softmax function is used for normalizing the coefficients of the whole triplet:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a general representation of a multi-layer recursive triplet representation, when calculating the triplet representation of the first layer, each triplet (h ', r ', t ') in the first layer is subjected to attention calculation, and multi-layer attribute information is aggregated to obtain a first layer attribute vector representation of the user/item:
wherein, the liquid crystal display device comprises a liquid crystal display device,and->A vector representation after attention weights representing the user and the item;
splicing the l-layer attribute vectors of the user u and the article v to obtain the knowledge graph attribute vectors of the user and the article:
wherein I is a series operation.
S103, aggregating a collaborative filtering layer and a knowledge graph attention embedding layer of a recommendation model, wherein the step of completing the recommendation model comprises the following steps:
combining the embedding of the collaborative filtering layer and the knowledge graph attention layer to obtain the final vector representation of the user u and the object v:
u=σ(W·(u cf ||u kg )+b)
v=σ(W·(f cf ||v kg )+b)
the recommendation model vector inner product u with v to predict the probability of user u selecting item v:
example 2
A knowledge graph attention network recommendation system based on graph collaborative filtering, comprising:
the first data processing module is used for constructing a recommendation model;
and the second data processing module is used for inputting the user into the recommendation model and outputting the predicted click rate of the user.
According to the knowledge graph attention network recommendation model based on graph collaborative filtering, the collaborative filtering propagation layer and the knowledge graph attention propagation layer are utilized to ensure that the collaborative filtering information and the entity related information in the knowledge graph are effectively fused, so that the accuracy of a recommendation result is not affected, then the attention weights of the entities related to the user and the object in the knowledge graph are calculated by utilizing the collaborative filtering information of the user and the object in the knowledge graph attention embedding propagation layer, and therefore the similarity between the user and the object and between the object is fully mined.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. The knowledge graph attention network recommendation method based on graph collaborative filtering is characterized by comprising the following steps of:
constructing a recommendation model;
the building of the recommendation model comprises the following steps: constructing a collaborative filtering layer of a recommendation model;
constructing a knowledge graph attention embedding layer of a recommendation model;
aggregating a collaborative filtering layer and a knowledge graph attention embedding layer of the recommendation model to finish the recommendation model;
and inputting the user into the recommendation model, and outputting the predicted click rate of the user.
2. The knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 1, wherein constructing a collaborative filtering layer of a recommendation model comprises:
constructing a user-object bipartite graph, and acquiring a related item set I of a user and an object u And I v ;
3. The knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 1, wherein the knowledge graph attention embedding layer for constructing a recommendation model comprises:
constructing a user-object bipartite graph, and acquiring a related item set I of a user and an object u And I v ;
Set I of related items of user and article u And I v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 ;
Propagating collaborative signals through user item interactions and knowledge associations in a knowledge graph, obtaining representations U of users and objects after multi-layer recursion of an initial entity set 1 And V 1 ;
4. The knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 2, wherein the user and item initial entity embedding vectors are obtained in a related item setAnd->Comprising the following steps:
assuming that the set of users is I u ={u 1 ,u 2 ,...,u m Aggregation of items I v ={v 1 ,v 2 ,...,v n };
Obtaining a user-article interaction matrix Y E R according to the history interaction m×n Wherein y is uv =1 indicates that there is an observed interaction between user u and item v; if there is no interaction between the user and the item, y uv =0;
5. The knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 2, wherein the user and item initial entities are embedded in vectorsAnd->The collaborative filtering vector u is converted into a collaborative filtering vector u of users and articles through collaborative filtering cf And v cf Comprising the following steps:
the collaborative filtering layer aggregates the neighborhood information of the nodes in the user-object bipartite graph through simplified graph rolling operation to obtain collaborative filtering vector representation of the user and the object;
the graph convolution network can reach the convergence state of the model by skipping infinite layer message transfer, and when the convergence condition is reached, the graph convolution network is embedded and written as the following formula:
wherein e u For user feature vector after infinite layer iteration, d u And d v Representing the originality of the user and item nodes, following the design of a standard GCN,
deducing the following convergence state to obtain a collaborative filtering vector u cf 、v cf :
6. A knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 3, wherein the user and item related item set I is u And I v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 And V 0 Comprising the following steps:
related item set I of user and article u And I v By alignment of the object and the entity, the object is converted into an initial entity set U propagated in the knowledge graph 0 ={u|u∈G,y uv =1 } and V 0 ={v|v∈G,y uv =1};
Wherein G represents the set of all entities and relations in the knowledge graph, y uv =1 means that user u has interacted with item v, if the user has not interacted with item y uv =0。
7. A knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 3, wherein the propagating collaboration signals through user item interactions and knowledge associations in the knowledge graph, the initial entity set multi-layer recursion yields a representation U of users and items l And V l Comprising the following steps:
the layer 1 entity set definition for user u and item v is recursively expressed as:
U l ={t|(h,r,t)∈G,heU l-1 }
V l ={t|(h,r,t)∈G,h∈V l-1 }
wherein the triplet (h, r, t) is a triplet where a certain entity t is located in the layer 1 attribute entity set of the user u;
resulting in a layer 1 recursive triplet representation:
8. a knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 3, wherein the attention mechanism based generation of weighted representations of entitiesObtaining knowledge graph attribute vector u of user and article by hierarchical aggregation mechanism kg And v kg Comprising the following steps:
assuming that the triplet (h, r, t) is a triplet where an entity t is in the l-layer attribute entity set of user u, a vector after defining t to add attention weight is expressed as a i :
a i =π(h i ,r i )t i
Wherein h is i Is head entity embedding, r i Is the embedding of the relation, t i Is tail entity embedding, pi (h i ,r i ) Controlling the attention weight generated by the head entity and the head-to-tail relation, and realizing pi (·) functions through a neural network of an attention mechanism, wherein the formula is as follows:
π(h i ,r i )=σ(W 2 ReLU(W 1 ReLU(W 0 (h i ||r i )+b 0 )+b 1 )+b 2 )
wherein, reLU is used as a nonlinear activation function, W and b are weight matrix to be learned and deviation, subscripts are different to indicate that the weight matrix and the deviation are parameters of different layers, and a softmax function is used for normalizing the coefficients of the whole triplet:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a general representation of a multi-layer recursive triplet representation, when calculating the triplet representation of layer 1, each triplet (h ', r ', t ') in layer 1 is attentively calculated, and multi-layer attribute information is aggregated to obtain a layer 1 attribute vector representation of the user/item:
wherein, the liquid crystal display device comprises a liquid crystal display device,and->A vector representation after attention weights representing the user and the item;
splicing the 1-layer attribute vectors of the user u and the object v to obtain the attribute vectors of the knowledge graph of the user and the object v:
wherein I is a series operation.
9. The knowledge graph attention network recommendation method based on graph collaborative filtering according to claim 1, wherein the collaborative filtering layer and the knowledge graph attention embedding layer of the aggregate recommendation model complete recommendation model comprises:
combining the embedding of the collaborative filtering layer and the knowledge graph attention layer to obtain the final vector representation of the user u and the object v:
u=σ(W·(u cf ||u kg )+b)
v=σ(W·(v cf ||v kg )+b)
the recommendation model vector inner product u with v to predict the probability of user u selecting item v:
10. a knowledge graph attention network recommendation system based on graph collaborative filtering, comprising:
the first data processing module is used for constructing a recommendation model;
and the second data processing module is used for inputting the user into the recommendation model and outputting the predicted click rate of the user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310315798.8A CN116340648A (en) | 2023-03-27 | 2023-03-27 | Knowledge graph attention network recommendation method based on graph collaborative filtering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310315798.8A CN116340648A (en) | 2023-03-27 | 2023-03-27 | Knowledge graph attention network recommendation method based on graph collaborative filtering |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116340648A true CN116340648A (en) | 2023-06-27 |
Family
ID=86889112
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310315798.8A Pending CN116340648A (en) | 2023-03-27 | 2023-03-27 | Knowledge graph attention network recommendation method based on graph collaborative filtering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116340648A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116645174A (en) * | 2023-07-27 | 2023-08-25 | 山东省人工智能研究院 | Personalized recommendation method based on decoupling multi-behavior characterization learning |
CN116932923A (en) * | 2023-09-19 | 2023-10-24 | 江西财经大学 | Project recommendation method combining behavior characteristics and triangular collaboration metrics |
CN117786234A (en) * | 2024-02-28 | 2024-03-29 | 云南师范大学 | Multimode resource recommendation method based on two-stage comparison learning |
-
2023
- 2023-03-27 CN CN202310315798.8A patent/CN116340648A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116645174A (en) * | 2023-07-27 | 2023-08-25 | 山东省人工智能研究院 | Personalized recommendation method based on decoupling multi-behavior characterization learning |
CN116645174B (en) * | 2023-07-27 | 2023-10-17 | 山东省人工智能研究院 | Personalized recommendation method based on decoupling multi-behavior characterization learning |
CN116932923A (en) * | 2023-09-19 | 2023-10-24 | 江西财经大学 | Project recommendation method combining behavior characteristics and triangular collaboration metrics |
CN116932923B (en) * | 2023-09-19 | 2023-12-08 | 江西财经大学 | Project recommendation method combining behavior characteristics and triangular collaboration metrics |
CN117786234A (en) * | 2024-02-28 | 2024-03-29 | 云南师范大学 | Multimode resource recommendation method based on two-stage comparison learning |
CN117786234B (en) * | 2024-02-28 | 2024-04-26 | 云南师范大学 | Multimode resource recommendation method based on two-stage comparison learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112989064B (en) | Recommendation method for aggregating knowledge graph neural network and self-adaptive attention | |
CN116340648A (en) | Knowledge graph attention network recommendation method based on graph collaborative filtering | |
CN112364976B (en) | User preference prediction method based on session recommendation system | |
CN112464292B (en) | Method and device for training neural network based on privacy protection | |
CN111242283B (en) | Training method and device for evaluating self-encoder of interaction event | |
Cutler et al. | Extremal graphs for homomorphisms | |
CN115270001B (en) | Privacy protection recommendation method and system based on cloud collaborative learning | |
CN114637923B (en) | Data information recommendation method and device based on hierarchical attention-graph neural network | |
CN112541575B (en) | Method and device for training graph neural network | |
JP2013008221A (en) | Logic inference system, computation learning apparatus, and logic inference method | |
CN114065048A (en) | Article recommendation method based on multi-different-pattern neural network | |
CN115114542A (en) | Object recommendation method, system, training method, medium and computer equipment | |
CN115859793A (en) | Attention-based method and system for detecting abnormal behaviors of heterogeneous information network users | |
CN114579852A (en) | Recommendation method based on graph convolution network and attention mechanism | |
Chen et al. | Graph enhanced neural interaction model for recommendation | |
CN114239675A (en) | Knowledge graph complementing method for fusing multi-mode content | |
CN113240086A (en) | Complex network link prediction method and system | |
CN115618098B (en) | Cold-chain logistics recommendation method and device based on knowledge enhancement and cavity convolution | |
Shu et al. | Multi-task feature and structure learning for user-preference based knowledge-aware recommendation | |
CN115618235A (en) | Training method and device for recommendation model | |
CN115599990A (en) | Knowledge perception and deep reinforcement learning combined cross-domain recommendation method and system | |
CN113744023B (en) | Double-channel collaborative filtering recommendation method based on graph convolution network | |
US20220253688A1 (en) | Recommendation system with adaptive weighted baysian personalized ranking loss | |
CN114519600A (en) | Graph neural network CTR estimation algorithm fusing adjacent node variances | |
Du et al. | Geometric matrix completion via sylvester multi-graph neural network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |