# A Novel Time Constraint-Based Approach for Knowledge Graph Conflict Resolution
## 3 Knowledge Conflict Resolution Model
### Knowledge Conflict Resolution Model  
In this section, the semantic embedding vector between entities, the graph structure embedding in the knowledge graph, and the time attributes of facts are integrated into the recurrent neural network. With the addition of new facts, the relationship of entities in knowledge graphs changes. The network compares the facts that are newly entered into the knowledge graph with the existing facts and selects a more accurate entity relationship to update the original knowledge graph. It uses the latent representation of the knowledge graph and the most recent event to predict the event. In the prediction model, the event tensor \(\mathbf{E}\) and TKG are used together to predict the relationship between the entities. Event tensor is composed with relationship embedding with time attribute. The general form is described as Equation (8):  
\[\beta_{s,p,\rho,\sigma,t}^{predict}=\beta_{p,\rho}^{predict}(a_{e_{s}},a_{e_{s },t},\ldots,a_{e_{s-T}}). \tag{8}\]  
The prediction is based on the subject (\(s\)), object (\(o\)), and predicate (\(p\)) of the knowledge graph tensor and the time-based representation of the event tensor. \(a_{es}\) represents the entity's attribute feature of time \(t\), which can be gained from the knowledge graph model. In the prediction model, the tuples in the knowledge graph are updated by events, the changes in the knowledge graph are first reflected in the event tensor, and the prediction of the events is also included in the prediction of the relationships between entities in the knowledge graph. The change in the event affects the change in the state of the knowledge graph and also affects the latent representation of the knowledge graph. The attribute information of the entity will change accordingly, and the relationship between the entities needs to be re-estimated. The facts that exist in the knowledge graph are positive examples. Therefore, we used the local closed world [14] hypothesis to get a negative example and a negative log-likelihood cost function for the Bernoulli likelihood estimation, which is described as -log \(\Gamma(x|\theta)=\log\left[1+\exp\{(1-2x)\theta\}\right]\), where \(x\) represents a subset of related facts in the training set:  
\[\mathrm{J}(\beta)^{predict}=-\sum_{e_{s,p,\alpha,t}\in E}\log P(e_{s,p,\rho, t}\big{|}\;\beta_{s,p,\rho,t}^{predict}(L,M,W)). \tag{9}\]  
The matrix \(M\) represents the relationship between entities, using the knowledge graph model to initialize the latent representation \(L\), the latent representation \(L\) and \(M\) mapping to describe the cost function, and \(W\) being the parameter of the function transformation. In the prediction task, the recurrent neural network is used to predict the event model. The cost function of the prediction model is described in Equation (9). [PERSON] et al. [15] found that the frequency distribution of node generated by the random walk method in the network is similar to the frequency of occurrence of word in our method. They all obey the power law distribution. Inspired by this phenomenon, we used the random walk method to sample the neighbors of the nodes in the knowledge graph (similar to the context of the word) so that the graph structure of the knowledge graph still maintained the relationship between the entities in the vector space. Nodes are entities in the knowledge graph, and entity nodes are also used in the following text. We used a semi-supervised approach to learn the structural features of graphs edge between two entity nodes in a knowledge graph. In the link prediction task between knowledge graph entities, the graph structure feature can be used to predict whether there is an edge of two entity nodes in the knowledge graph. Because the random walk method is based on the connected structure of the entity nodes in the knowledge graph, we used an iterative method to extend the features of a single entity node into a pair of entity nodes. Semantic embedding is acquired through training the relationships of the entities.