TMGAT:Graph Attention Network with Type Matching Constraint
The graph structure has recently been employed to solve the KGC problem of knowledge graph completion.The graph neural network(GNNs)constantly updates the representation of the central entity by aggregating the entity's local neighborhood information,whereas the graph attention network(GATs)focuses on aggregating the neighbors to obtain a more accurate repre-sentation of the central entity by using the attention mechanism.Although these models performed well in KGC,they all neglect the central entity's type information and only use neighborhood information to calculate attention,resulting in inaccurately mea-sured attention.This paper proposes a type-matching constrained graph attention network(TMGAT)to address these issues.The entity type-relation level of attention is derived by calculating the attention of the central entity type to each neighborhood rela-tionship,and the type matching degree between the central entity and each neighborhood connection is further determined.The entity-relation level attention is then determined by combining the type matching degree through the neighborhood relation and the corresponding neighbor entity,and the final attention of the neighborhood node to the central entity is obtained.The type matching degree is utilized to constrain the traditional attention mechanism,increase attention mechanism accuracy,obtain more accurate central entity embedding,and subsequently improve knowledge graph completion accuracy.The proposed TMGAT is the first model of knowledge graph completion task combined with explicit type in GATs up to this point.To validate the TMGAT model's performance,two existing data sets are processed so that each entity in the data set has several types.Finally,experiment demonstrates TMGAT's high competitiveness in knowledge completion tasks and the effect of the number of types on the model's performance analyzed.