Recommendation algorithm based on knowledge graph

A knowledge graph and recommendation algorithm technology, applied in computing, neural learning methods, instruments, etc., can solve the problems of sparse interactive data and inaccurate recommendation results, and achieve the effect of enhancing recommendation performance and improving recommendation effect.

Active Publication Date: 2022-05-13
浙江辰时科技集团有限公司
13 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0005] The present invention provides a recommendation algorithm based on knowledge graphs, which solves the problem of ina...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention discloses a recommendation algorithm based on a knowledge graph. The recommendation algorithm comprises the following steps: constructing the knowledge graph based on an application scene; constructing a KGRN model based on the GNN; inputting the knowledge graph into a KGRN model to obtain an embedded vector, and outputting a recommendation index which expresses the preference degree of the user to the article according to the embedded vector; and performing recommendation operation to the user according to the recommendation index. According to the recommendation algorithm based on the knowledge graph, the recommendation performance is enhanced in a mode of fusing the knowledge graph and the recommendation system. And the embedding vectors of the nodes are introduced into the click rate prediction model, so that the recommendation effect is further improved.

Application Domain

Technology Topic

Image

  • Recommendation algorithm based on knowledge graph
  • Recommendation algorithm based on knowledge graph
  • Recommendation algorithm based on knowledge graph

Examples

  • Experimental program(1)

Example Embodiment

[0054] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] The present application discloses a recommendation algorithm based on knowledge graph, which includes the following steps: constructing a knowledge graph based on an application scenario; constructing a KGRN model based on GNN; inputting the knowledge graph into the KGRN model to obtain an embedding vector, and outputting the user's preference for items according to the embedding vector Recommendation index of the degree; recommend operation to users according to the recommendation index. The recommendation algorithm based on the knowledge graph of the present application constructs a high-quality knowledge graph according to the specific recommended scenario. After obtaining the historical data of the interaction between the user and the item, the relevant information of the user, and the relevant attributes of the item in the recommended scenario, we perform knowledge extraction to obtain the relationship between entities and entities to form a knowledge graph. Then, a Knowledge Graph Relational Network (KGRN) model is constructed based on the Graph Neural Network (GNN) to obtain the embedding vector of the user and the item, and then the item recommendation list corresponding to each user is obtained, that is, the recommendation index. In the whole process, the original GNN model was further optimized, and the relationship information was integrated into the model, which improved the quality of the node embedding vector, and the node embedding vector was introduced into the click-through rate (CTR) prediction model to improve the recommendation effect. The above steps are described in detail below.
[0056] The specific method of constructing a knowledge graph based on application scenarios is as follows:
[0057] The user-item interaction behavior and item attributes are unified to form a heterogeneous knowledge graph. likefigure 1 where the user node set is U, the item node set is I, the attribute node set is E, and the relationship set R={r i |i≥0}, r 0 Represents the positive feedback relationship between the user node and the item node, r i Represents the relationship between item nodes and attribute nodes. Using the method of graph embedding, the entities and relationships of the knowledge graph are represented by vectors, and then the feature information of the original items and users is expanded. After the embedding vector is obtained, it is processed by the click-through rate prediction model, and the recommendation index expressing the user's preference for the item is obtained.
[0058] In this application, the KGRN model is implemented based on a graph attention network (GAT). The goal of graph embedding is to obtain a low-dimensional vector representation of all nodes in the graph. N is the number of nodes in the graph, and d is the vector dimension. Specifically, the KGRN model includes: an embedding vector initialization module, a GAT module and a prediction module. The input of the model is the entire knowledge graph G, and the output is the prediction of user u's favorite value of item i.
[0059] As a preferred embodiment, the specific method for processing the knowledge graph by the KGRN model is as follows: vector initialization is performed on the knowledge graph through the embedding vector initialization module; and aggregation to obtain the embedding vector; the prediction module processes the embedding vector obtained by the GAT module to obtain the recommendation index.
[0060] Among them, the specific method of initializing the knowledge graph through the embedding vector initialization module is as follows: the embedding vector initialization module uses the TransR algorithm to initialize the knowledge graph vector. Each node in the knowledge graph G needs to be initialized and then input into the GAT model for information dissemination and aggregation. In this application, we use the TransR algorithm to initialize the vector to obtain H (0). The TransR algorithm maps entities and relations into two spaces respectively, and then transfers the entities in the entity space to the relation space through the transition matrix for vector representation. The optimization goal of TransR is to make two nodes that already exist in the graph that are directly connected to be closer after vectorization.
[0061] As a preferred embodiment, the GAT module uses different embedding methods for information dissemination and aggregation for the user nodes and item nodes of the knowledge graph.
[0062] The traditional GAT model regards all nodes as a class of nodes, and the information dissemination and aggregation between nodes are the same. In this application, however, the embedding methods of the user node u and the item node i are processed differently. Because the neighbors of the user node are all item nodes, the connection between the two is only a positive feedback relationship. There are many kinds of relationships between item nodes and attribute nodes, all of which need to be handled differently for these two types of nodes. The initialization vector of the user node is The vector after one layer of GAT is
[0063] As a preferred embodiment, the specific method for information dissemination and aggregation on the vector-initialized knowledge graph by means of graph embedding through the GAT module is:
[0064] Assuming that a user node in the knowledge graph G is u, for the user node u, the set of adjacent item nodes is N i , according to the following formula to calculate the set N of its adjacent item nodes i neighbor node information
[0065]
[0066] Among them, α(u,i) is the propagation coefficient from the item node i to the user node u. By setting the propagation coefficient, an attention mechanism is introduced. The propagation coefficient is used to measure the importance of information transmission between pairs of nodes. The information passed from this node to the target node is important. The propagation coefficient α(u,i) from item node i to user node u is calculated by the following formula:
[0067]
[0068] in, is a parameter matrix shared by all nodes, which form a single-layer Attention network. Neighbor node information and user node information h of user node u u Aggregation is required. In this application, the aggregation method in GraphSage is adopted. Specifically, the information of its neighbor nodes is calculated by the following formula and its own user node information h u to aggregate,
[0069]
[0070] in, are the training parameters of the network. The above is the information dissemination and aggregation process of one-layer GAT, and multi-layer GAT can be used to integrate higher-order information. like figure 2 As shown, the output of user node u through the GAT of layer l for,
[0071]
[0072] For item node i, the set of adjacent user nodes is N ui
[0073] Calculate the set N of its adjacent user nodes according to the following formula ui neighbor node information
[0074]
[0075] Among them, α(i, u) is the propagation coefficient from user node u to item node i,
[0076] α(i,u) has the same parameters as α(u,i), that is, a and W are parameter matrices shared by all nodes.
[0077] its neighbor node information and its own item node information h i For aggregation, the item node i passes through the output of the L-layer GAT for,
[0078]
[0079] According to the different relationships between the item node i and the attribute node e, the item attribute graph is split, and the information is propagated and aggregated between the nodes on different relationships r to get
[0080] For item node i, its adjacent attribute node set is N ri ,
[0081] Calculate the set N of its adjacent user nodes according to the following formula ri neighbor node information
[0082]
[0083] α(i,e) is the propagation coefficient from attribute node e to item node i,
[0084] its neighbor node information and its own item node information h i For aggregation, the item node i passes through the output of the L-layer GAT for,
[0085]
[0086] According to the following formula, the information on different relations Perform another aggregation to get the final
[0087]
[0088] where β(i,r) is the propagation coefficient from item node i to attribute node e,
[0089]
[0090] Among them, the new parameter a is used 1 and W 2 Calculation.
[0091] For the CTR prediction module, the current graph recommendation work based on graph neural network obtains the recommendation index directly by calculating the inner product after obtaining the embedded vector representation of all nodes in the graph. However, this prediction model is too simplistic and lacks sufficient crossover of features. In this application, as Figure 4 As shown, the graph neural network is used as the embedding layer, and the obtained embedding vector is used as the input of the subsequent prediction model. That is, the input of the GAT module is used as the input of the subsequent click-through rate prediction module. The click-through rate estimation module outputs the user's preference for items as a recommendation indicator.
[0092] The click-through rate prediction module can use two methods, namely, a multi-layer residual network (ResNet) model and an NCF model. Through the CTR prediction model, the various dimensions of the feature vector are fully cross-combined, so that the model can capture more information about nonlinear features and combined features, and then obtain more accurate and effective recommendation indicators. Finally, according to the recommendation indicators, accurate and effective recommendations are made to users.
[0093] The loss function of the KGRN model is:
[0094]
[0095] where O={(u,i,j)∣(u,i)∈R + ,(u,j)∈R - } is the training set, R + User node u and item node i in the knowledge graph G are directly connected, R - There is no direct connection between the user node u and the item node j in the knowledge graph G, R - Obtained by random sampling among negative samples. The meaning of minimizing the loss function is to make the vector representations of nodes with direct connections as close as possible, while the vector representations of nodes without direct connections are as different as possible. The training parameters of the entire model are
[0096] Our method is tested on public datasets under three different scenarios. As shown in Table 1, each dataset contains the number of users, items and attributes, and the connection information between users and items, items and attributes.
[0097] Table 1: Test dataset
[0098]
[0099] The effectiveness of our method is validated on the three datasets shown in Table 1. Taking Last-FM as an example, the dataset is a knowledge graph with 130,000 nodes and 3.5 million connections. We use edge sampling to take 80% of the data as the training set and 20% as the test set. The Adam optimizer is used to optimize the network, the initial learning rate is 0.0001, the batch size is 1024, the number of layers of KGRN is 3, and TransR is used to initialize the embedding vector of the node. The click-through rate estimation module uses residual network and multilayer perceptron respectively Implementation, the number of layers are three layers. In order to test the effectiveness of the method, we compare it with the traditional methods MF, FM, NFM and the more advanced KGAT [ on the test set.
[0100]Two metrics, recall@20 and ndcg, are used to test our method. recall@20 is the recall rate of recommended 20 items, that is, the proportion of the number of items we correctly recommend to the total number of items viewed or liked by users. ndcg is the normalized depreciated cumulative gain. The larger the recall@20 and ndcg values, the better the recommendation effect.
[0101] Table 2: Test Results
[0102]
[0103] The experimental results are shown in Table 2. It can be seen from the test results that the performance of the method of the present application is significantly improved compared with the traditional recommendation algorithms (MF, FM, NFM). Compared with KAGT, which also uses the graph attention network GAT, the overall improvement is about 5%.
[0104] The foregoing has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and all technical solutions obtained by means of equivalent replacement or equivalent transformation fall within the protection scope of the present invention.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Cross-domain recommendation method based on multi-view knowledge representation

PendingCN112541132AImprove recommendation performanceSolve data sparsity and cold startDigital data information retrievalMachine learningData miningData science
Owner:BEIJING JIAOTONG UNIV

Comment text-oriented graph neural network recommendation method

PendingCN114723522AImprove recommendation performanceEnhanced representationForecastingBuying/selling/leasing transactionsConvolutionData mining
Owner:HEFEI UNIV OF TECH

Classification and recommendation of technical efficacy words

  • Improve recommendation performance
  • Improve recommendation effect

Cross-domain recommendation method based on multi-view knowledge representation

PendingCN112541132AImprove recommendation performanceSolve data sparsity and cold startDigital data information retrievalMachine learningData miningData science
Owner:BEIJING JIAOTONG UNIV

Comment text-oriented graph neural network recommendation method

PendingCN114723522AImprove recommendation performanceEnhanced representationForecastingBuying/selling/leasing transactionsConvolutionData mining
Owner:HEFEI UNIV OF TECH

Content recommending method and system

ActiveCN103544212AImprove use valueImprove recommendation effectSpecial data processing applicationsTime factorHuman life
Owner:TCL CORPORATION

Method and system for recommending video resource

InactiveCN103686236ARealize groupingImprove recommendation effectSelective content distributionSpecific timeVideo eeg
Owner:LE SHI ZHI ZIN ELECTRONIC TECHNOLOGY (TIANJIN) LTD

Information recommendation method and device

InactiveCN108509466AImprove recommendation effectNeural architecturesNeural learning methodsComputer visionInformation object
Owner:TENCENT TECH (SHENZHEN) CO LTD

Resource recommendation method and apparatus

ActiveCN106656768ARefined recommended resourcesImprove recommendation effectData switching networksWorld Wide Web
Owner:TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products