Knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework
By adopting global information semantic reconstruction and multi-spec feature sharpening framework in the knowledge graph embedding method, the problem of insufficient overall attention to the feature graph is solved, and more efficient and accurate knowledge graph embedding is achieved.
Patent Information
- Application Number
- CN202510171465.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The existing knowledge graph embedding method has insufficient overall attention to the feature map, which affects the prediction results.
Using a framework based on global information semantic reconstruction and multi-spec feature sharpening, the entity and relationship are reconstructed through multi-layer expansion convolution, multi-angle and multi-scale features are extracted, and feature sharpening is performed through group normalization.
The learning efficiency and prediction accuracy of the knowledge graph embedding model are improved, and the accuracy and robustness of semantic representations of entities and relationships are enhanced.
Smart Images

Figure CN120067341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a knowledge graph embedding method based on a global information semantic reconstruction and multi-specification feature sharpening framework, and belongs to the technical field of knowledge graph embedding. Background Art
[0002] A knowledge graph (KG) is a knowledge representation method that represents entities and their relationships in the real world through a graph structure, and is applied in search engines, question answering systems, and recommendation systems. Existing knowledge graph repositories, such as WordNet, Freebase, YAGO, etc., all have a common problem: with the exponential growth of information, it has become increasingly challenging to keep the knowledge graph up-to-date, resulting in the problem that most real-world knowledge graphs are incomplete. The problem of incomplete graphs will have an impact on the above-mentioned application methods, such as inaccurate prediction and incorrect recommendation. Therefore, more and more research focuses on knowledge graph completion (KGC). Link prediction (LP) is an important knowledge graph completion method, which uses known facts in the knowledge graph to infer missing triple information. As Figure 1 shows an example of a simple incomplete knowledge graph, where the text represents existing facts and? represents the information that must be inferred. For example, we need to predict the missing entity in (Zhang San, born,?), or the missing relationship in (Li Si,?, Redmi).
[0003] Knowledge graph embedding (abbreviated as KGE) is a widely used link prediction method at present. It transforms the triple information in the knowledge graph into a continuous vector space, retains the logical relationship information in the knowledge graph, and then uses a certain model to infer the missing triple information (facts). The advantage of using a knowledge graph embedding model is that it can better utilize the structural information and semantic information in the knowledge graph, and can realize the semantic vectorization expression of the components of the knowledge graph. Generally, knowledge graph embedding models can be divided into three categories: translation-based embedding models, semantic matching-based embedding models, and neural network-based embedding models.
[0004] Translation-based embedding models are an important class of methods in the field of knowledge graph embedding. The core idea of this type of model is to view relations as translations from head entities to tail entities, and then evaluate the validity of candidate triples by defining a distance-based scoring function. The most classic translation-based embedding model is TransE, which maps entities and relations to a low-dimensional vector space to represent triples (entity-relation-entity). This simple assumption can achieve good results in knowledge graphs dealing with large-scale simple relations. However, in scenarios where complex relations and semantic information need to be captured, its performance is often unsatisfactory. To address this issue, TransH introduces a relation hyperplane based on TransE to distinguish different types of relations, enabling the semantic representation of entities to be adjusted according to relations, enhancing the expressive power for complex relations such as one-to-many and many-to-one; TransR further separates the entity space and the relation space based on TransH, introducing a mapping matrix for each relation, and projecting entities from the entity space to the relation-specific space for operations, which can adapt to complex and diverse relation types such as many-to-many. TransC solves the problems of parameter redundancy and poor handling of sparse data by introducing the concept of clustering, clustering relations with similar semantics to further enhance the representation ability and generalization ability of the model. Similar types of KGE models also include TransD, TransG, TransA, TranSparse, and so on.
[0005] Semantic matching-based embedding models are another important approach in the field of knowledge graph embedding. This type of model captures semantic information in the knowledge graph by designing appropriate similarity functions to measure the similarity between entities and relations. For example, RESCAL views relations as a second-order tensor through rank-three decomposition, and then represents entities and relations as the product of matrices and vectors to capture the representation and prediction between entities and relations; DistMult calculates the score of triples through dot product operations to predict entity embeddings in the knowledge graph; ComplEx represents entities and relations by using the real and imaginary parts of complex numbers and uses dot product to calculate the similarity between entities and relations; HolE combines the advantages of RESCAL and DisMult and uses the advantages of both models for complementarity; SimplE learns two independent embedding vectors for each entity and can incorporate certain types of background knowledge into these embeddings through weight binding; RotatE embeds entities and relations into the complex number space and operates on entities in the complex plane to represent triples in the knowledge graph. Compared with translation-based embedding models that use addition operations, semantic matching-based embedding models usually rely on similarity metrics (such as dot product, cosine similarity, or bilinear functions). Due to the need to calculate complex similarity functions, the computational complexity is relatively high, resulting in better performance than translation distance models, but their computational complexity is usually higher.
[0006] Neural network-based embedding models have been widely applied in the field of knowledge graph entity embedding. By designing complex network structures and feature extraction methods, they can capture complex relationships and semantic information in the knowledge graph, improving the accuracy and predictive ability of the embedding representation. For example, NTN uses a neural network layer and a tensor layer to map entities and relationships into a high-dimensional space, thereby learning the representations of entities and relationships; SLM uses the non-linear operation of a single fully-connected layer to implicitly link entity and relationship embeddings. Currently, due to the powerful ability of convolutional networks to extract semantic information hidden between entities and relationships, they have been widely used in knowledge embedding. Figure 2 Figure (a) shows the general flow chart of an embedding model based on a convolutional network. First, the vectors h and r are concatenated and reconstructed into a two-dimensional image; then the newly generated two-dimensional image is input into a module based on a convolutional neural network to obtain a new output feature map; finally, the obtained output feature map is used as the score corresponding to the candidate triple, where the score of the correct triple is higher than that of the incorrect triple. The most representative one is ConvE. Specifically, ConvE reconstructs entity and relationship embeddings into a two-dimensional matrix and uses filters to extract higher-level non-linear features, thereby capturing the complex interactions between entities and relationships; CoveKB uses a one-dimensional convolutional neural network as the feature extraction network, inputting the embeddings of the head entity, tail entity, and relationship, so as to capture the global relationships and transitional features between entities and relationships in the knowledge base; ConvR adaptively constructs convolutional filters from the relationship representation, uses a two-dimensional convolutional neural network as the feature extraction network, and applies these filters to the entity representation to generate convolutional features; JointE jointly uses a one-dimensional convolutional neural network and a two-dimensional convolutional neural network to improve the embedding effect of the model, where the one-dimensional convolutional neural network is used to extract surface and explicit knowledge and the two-dimensional convolutional neural network is used to promote the interaction between entities and relationships; M-DCN, based on ConvE, uses a method of stacking h and r at intervals during the recombination process to increase the interaction between entities and relationships; InteractE uses three shaping types (i.e., stack, alternate, and checkerboard) to extract convolutional kernels from entities as the input of a two-dimensional convolutional neural network to increase the degree of interaction between entities and relationships, as shown in Figure 2 Figure (b). In addition, some advanced graph learning methods have also received extensive attention. R-GCN extends the graph convolutional neural network to process knowledge graphs and can efficiently learn node representations in graphs with multiple relationship types; CLGAT-KGC introduces a graph attention mechanism, adding different entity representations for different relationships under the same entity, enhancing the entity-relationship interaction function.
[0007] The above three knowledge graph embedding methods each have their own advantages. The translation-based embedding model and the semantic matching-based embedding model use explicit relationship modeling methods such as addition and multiplication to embed entities and relationships in the knowledge graph into a low-dimensional vector space to extract shallow semantic information, and can quickly obtain the final score. However, the simple structures of these two methods make them unable to perform well in obtaining deep knowledge. The neural network-based embedding model can learn both shallow semantic information and deep knowledge. Therefore, most methods at present focus on the use of neural network methods. In the neural network-based embedding model, the fully connected-based model usually focuses on the linear combination of information layer by layer and lacks the ability to model multi-scale contexts. The semantic information of entities and relationships in the knowledge graph often involves different scales and levels, and the interaction of global and local features needs to be captured. At the same time, the graph neural network-based model learns features by aggregating neighbors, which may ignore the inherent directionality of the knowledge graph. In recent years, the neural network based on convolutional kernels has gradually become the mainstream model for knowledge graph embedding tasks. It uses convolutional kernels to extract the interaction features of entities and relationships and has achieved good performance. Currently, the relatively mainstream convolutional neural networks applied to the field of knowledge graph prediction are: ConvE, ConvR, JointE, and InteractE. However, these methods all focus on the local information in the feature map and often pay insufficient attention to the entire feature map. In fact, the features at relatively far positions in the feature map have practical influence on the final prediction result, and the combination of these far information and the current information will play an important role in helping the model understand the semantic information of entities and relationships. Summary of the Invention
[0008] Aiming at the problem that the existing knowledge graph embedding methods have poor overall attention to the feature map and affect the prediction result, the present invention provides a knowledge graph embedding method based on a global information semantic reconstruction and multi-specification feature sharpening framework.
[0009] A knowledge graph embedding method based on a global information semantic reconstruction and multi-specification feature sharpening framework of the present invention includes:
[0010] Randomly initialize the triples in the knowledge graph to obtain D-dimensional triple embeddings. Concatenate the head entity embedding and the relationship embedding in the D-dimensional triple embeddings dimension by dimension, and then reshape to obtain the initial features Figure X 0 ;
[0011] Use a semantic information reconstruction module based on global information capture to extract features from the initial features Figure X 0 Then combine with the initial features Figure X 0 Perform residual processing to obtain the post-residual featuresFigure X 1 ;
[0012] Select three relational convolutional kernels of different sizes to perform feature extraction on the post-residual features Figure X 1 respectively, and three groups of feature maps are obtained
[0013] Then, a feature sharpening module based on group normalization is used to sharpen the feature maps to obtain sharpened feature maps
[0014] Flatten the three sharpened feature maps respectively, connect them along the channel dimension, and use a fully connected layer to obtain a hidden layer vector, where the dimension of the hidden layer vector is the same as that of the tail entity embedding in the triple embedding; then perform matrix multiplication on the hidden layer vector and the tail entity embedding in the triple embedding, predict multiple scores, and use the tail entity embedding corresponding to the highest score value as the tail entity prediction result to achieve information reconstruction.
[0015] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the semantic information reconstruction module based on global information capture sequentially includes a depth convolution DW-Conv, two depth dilated convolutions DW-DConv with different dilation rates, and a normal convolution Conv; the initial features Figure X 0 are sequentially input into the depth convolution DW-Conv and the depth dilated convolution DW-DConv, and the feature extraction result is output by the normal convolution Conv.
[0016] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the post-residual features Figure X 1 are expressed as:
[0017] X 1 = A f + X 0 ,
[0018] where A f is the feature map output by the semantic information reconstruction module based on global information capture:
[0019]
[0020] where Conv 1 is a normal convolution Conv with a kernel size of 1×1, and DW-Conv 3 is a depth convolution DW-Conv with a kernel size of 3×3. It is the depth dilated convolution DW-Dconv with a convolution kernel size of 3×3 and a dilation rate of 3. It is the depth dilated convolution DW-Dconv with a convolution kernel size of 3×3 and a dilation rate of 9.
[0021] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the three different-sized relational convolution kernels are respectively selected as 1×2 2×2 and 3×1
[0022] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the three groups of feature maps are:
[0023]
[0024] where is the set of real numbers, C is the number of channels, H is the height of width of
[0025] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the process of feature sharpening of the feature map by the feature sharpening module based on group normalization includes normalizing, feature segmentation, feature enhancement and weakening, and recombination of the feature map
[0026] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, the method of normalization is to evaluate the importance of the feature map using the scaling factor in the group normalization layer:
[0027]
[0028] where is the normalization result obtained according to group normalization, μ i is the mean of i is the standard deviation of i is the adjustment parameter of i and β i are the two training adjustment parameters of the group normalization layer GN;
[0029] Based on the normalization result determine the training adjustment parameter λ i ; then based on the training adjustment parameter λ i Calculate the normalized weight It is:
[0030]
[0031] In the formula is the normalized weight of the k-th channel, is λ i the training adjustment parameter corresponding to the k-th channel, is λ i the training adjustment parameter corresponding to the j-th channel;
[0032] Then perform feature segmentation: The feature map weighted by the normalized weight is mapped to the range (0, 1) through the sigmoid function, and then the adjusted weight K is calculated: i :
[0033]
[0034] In the formula, GN represents the process of performing group normalization processing to obtain the training adjustment parameter λ i ; W() represents calculating the normalized weight Sigmoid() is a scaling function that scales the value to the range (0, 1); Threshold() is a threshold-adjustable function that sets the value greater than the set weight threshold to 1 and the value less than or equal to the set weight threshold to 0;
[0035] According to the adjusted weight K i Set the adjusted weight K greater than the set weight threshold i to 1 to obtain the weight K 1i , and set the adjusted weight K less than or equal to the set weight threshold i to 0 to obtain the weight K 2i .
[0036] According to the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention, based on the weight K 1i and the weight K 2i perform feature enhancement and weakening on to obtain the weighted feature and the weighted feature
[0037] Then recombine the weighted feature and the weighted feature to obtain the sharpened feature map
[0038]
[0039] For the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework according to the present invention, the method for calculating the score is as follows:
[0040]
[0041] In the formula, Scores(h, r, t) represents the score function of the D-dimensional triple embedding, where h represents the head entity embedding, r represents the relationship embedding, t represents the tail entity embedding, f(·) represents projecting the hidden layer vector into the space with the same dimension as the tail entity embedding, vec(·) represents flattening, GSR(·) represents the global feature enhancement operation, MSC(·) represents the neighbor feature enhancement operation, GNS(·) represents the feature reconstruction operation, and R() represents the shaping operation. W 0 is a randomly initialized parameter matrix.
[0042] For the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework according to the present invention, the 1-N scoring is selected to implement the calculation of the score function Scores(h, r, t); the cross-entropy loss function ψ(p, y) is calculated according to the score value, and the adjustment parameter ε i , the training adjustment parameter λ i and β i are adjusted; the cross-entropy loss function ψ(p, y) is as follows:
[0043]
[0044] In the formula, p represents the predicted triple embedding score, y represents the binary label vector, N is the total number of triples, p n is the triple embedding score of the nth prediction, and y n is the binary label vector corresponding to the nth prediction.
[0045] The beneficial effects of the present invention: The method of the present invention performs global information reconstruction based on the multi-specification feature sharpening framework - GIRMSF. It first performs global information reconstruction on the matrix composed of entities and relationships through multi-layer dilated convolution, fusing context information from a larger receptive field to reconstruct the semantic information of entities and relationships; secondly, a multi-specification feature capture mechanism for the reconstructed information is proposed, and by extracting convolution kernels of different specifications from the relationship vector, convolution operations are performed on the reconstructed information to extract different specifications of features, and a complete feature set is obtained as much as possible to provide a background feature set for subsequent feature sharpening; finally, a feature sharpening method based on group normalization is adopted to standardize the multi-specification features, and the standardized features are sharpened through the process of segmentation - enhancement / weakening - recombination, further improving the learning efficiency and prediction accuracy of the network model.
[0046] The method of the present invention performs semantic reconstruction based on entity relationships captured by global information: Existing translation models randomly generate a vector of length N to express the semantic information of the initial entity and relationship. It can be understood that each component (or several components) corresponds to expressing the semantics of each field of the entity (relationship) name. However, current semantic learning methods obtain the final semantic embedding by fusing and learning from the context of the sentence in which a character or word appears to obtain its semantics. To obtain accurate semantic information of entities and relationships, the information reconstruction method based on global information capture adopted by the present invention uses a multi-layer dilated convolutional kernel to capture global information of the matrix composed of entities and relationships, while expanding the information receptive field and reducing the complexity of information reconstruction;
[0047] The method of the present invention realizes multi-specification feature capture for reconstructing semantic information: The role of the relationship vector in the triple in the knowledge graph is to map and align the head entity to the tail entity. The mapping effects of different relationship vectors on the same head entity vector are different, which contains more information for semantic understanding of entities. To accurately realize the mapping of the head entity vector to the tail entity, the present invention extracts components of different specifications from the relationship vector to form a convolutional kernel, performs multi-specification feature capture on the reconstructed entity relationship semantic vector, obtains features from the entity relationship semantics from different angles, and provides a background feature set for subsequent feature sharpening.
[0048] The method of the present invention is based on group normalization for feature sharpening: After obtaining the entity relationship multi-specification feature set, in order to further "sharpen" the features: strengthen the contribution degree of strong features and weaken the interference of weak features. The method of the present invention performs standardization processing on the feature set based on group normalization, sets a "sharpening" threshold, divides the standardized feature set, amplifies the feature values higher than the threshold in one group, reduces the feature values lower than the threshold in one group, and adds the two groups of feature sets bit by bit and then recombines them into a "sharpened" feature set, further enhancing the significance of the entity relationship semantic features. Description of the Drawings
[0049] Figure 1 is an example diagram of a knowledge graph;
[0050] Figure 2 is a schematic diagram of the execution process of a knowledge graph embedding model based on a convolutional neural network; The black dashed box in the figure represents a 2×2 convolutional kernel; i) represents the feature shaping mode used in ConvE; ii) represents the feature shaping mode used in M-DCN; iii) represents the feature shaping mode used in InteractE;
[0051] Figure 3 is a flowchart of the knowledge graph embedding method based on the global information semantic reconstruction and multi-specification feature sharpening framework of the present invention;
[0052] Figure 4 It is the structural diagram of the entity relationship semantic reconstruction module GFE based on global information capture;
[0053] Figure 5 It is the schematic diagram of feature extraction of the semantic information reconstruction module GSR based on global information capture; where S, T, and U represent entity information, and a i represents the feature corresponding to the entity information. It can be seen that a 1 -a 6 The entity corresponding to the feature is S;
[0054] Figure 6 It is the schematic diagram of the specific convolution process of three different-sized relational convolution kernels;
[0055] Figure 7 It is the structural diagram of the feature sharpening module based on group normalization;
[0056] Figure 8 It is the comparison chart of the influence of different learning rates on FB15K-237 and WN18RR;
[0057] Figure 9 It is the comparison chart of the influence of different L2 regularizations on FB15K-237 and WN18RR;
[0058] Figure 10 It is the comparison chart of the influence of different convolution kernel sizes on FB15K-237 and WN18RR. Detailed implementation manner
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0060] The present invention will be further described below in conjunction with the accompanying drawings, but it is not a limitation of the present invention.
[0061] Detailed implementation manner 1. In combination with Figures 1 to 7 as shown, the present invention provides a knowledge graph embedding method based on a global information semantic reconstruction and multi-specification feature sharpening framework, including,
[0062] Randomly initialize the triples in the knowledge graph to obtain D-dimensional triple embeddings. Concatenate the head entity embeddings and relationship embeddings in the D-dimensional triple embeddings dimension by dimension, and then reshape to obtain the initial features Figure X 0 ;
[0063] Use the semantic information reconstruction module based on global information capture for the initial featuresFigure X 0 Perform feature extraction and then combine with the initial features Figure X 0 Perform residual processing to obtain post-residual features Figure X 1 ;
[0064] Select three relational convolutional kernels of different sizes to separately perform feature extraction on the post-residual features Figure X 1 to obtain three groups of feature maps
[0065] Then, use a feature sharpening module based on group normalization to perform feature sharpening on the feature maps to obtain sharpened feature maps
[0066] Flatten the three sharpened feature maps respectively and concatenate them along the channel dimension, and use a fully connected layer to obtain a hidden layer vector, where the dimension of the hidden layer vector is the same as that of the tail entity embedding in the triple embedding; then perform matrix multiplication on the hidden layer vector and the tail entity embedding in the triple embedding, predict to obtain multiple scores, and take the tail entity embedding corresponding to the highest score value as the tail entity prediction result to achieve information reconstruction.
[0067] This embodiment includes a semantic information reconstruction module based on global information capture (GSR), a multi-specification feature capture module for reconstructing semantic information (MSC), a feature sharpening module based on group normalization (GNS), and a scoring module. First, use multi-layer dilated convolution to reconstruct the semantic information of entity relationships, fuse context information to enhance the integrity of semantic expression, and reduce the reconstruction complexity. Then, by extracting convolutional kernels of different specifications from the relationship vectors, perform multi-dimensional feature capture on the reconstructed semantic information to obtain a feature set from the entity relationship semantics from different perspectives. After that, adopt a feature sharpening method based on group normalization to achieve feature sharpening through the processes of normalization - segmentation - enhancement / weakening - recombination. Finally, in the scoring module, calculate the scores of the triples.
[0068] Entity relationship semantic reconstruction module based on global information capture - GSR:
[0069] Combine Figure 3 as shown
[0070] First, entities and relationships in the knowledge graph are randomly initialized to a random D-dimensional embedding, where the embeddings of the triple (e1, rel, e2) composed of the head entity e1, the relationship rel, and the tail entity e2 are respectively To ensure that subsequent feature enhancement is not affected by the initial operation, only h and r are concatenated and reshaped, and the generated new feature matrix is:
[0071]
[0072] Among them, represents the splicing operation; R() represents performing feature shaping operation after the connection operation. It can be seen that the initial dimension becomes the feature belonging to through the splicing and shaping operations, where m×n = 2D, where m is the number of rows of X 0 , and n is the number of columns of X 0 .
[0073] Furthermore, as shown in combination with Figure 4 and Figure 5 , the semantic information reconstruction module based on global information capture sequentially includes depth convolution DW-Conv, depth dilated convolution DW-DConv with two different dilation rates, and ordinary convolution Conv; the initial feature Figure X 0 is sequentially input into the depth convolution DW-Conv and the depth dilated convolution DW-DConv, and the feature extraction result is output by the ordinary convolution Conv.
[0074] During the process of using the convolutional neural network CCN to perform semantic extraction on the splicing information composed of the head entity and the relationship, only when the convolutional kernel moves to a specific position in the information matrix can the convolutional operation capture the logical relationship between the head entity and the relationship at the same time. In other words, the inherent locality of the convolutional neural network CNN endows a limited degree of interaction between the information of the head entity and the relationship. To address this challenge, this embodiment designs a new type of semantic information reconstruction module (GSR) based on global information capture, which uses a combination of multiple convolutions to focus on features from different neighboring positions. As shown in Figure 4 , it can be seen that GSR consists of three parts: a depth convolution (DW-Conv), depth dilated convolutions (DW-DConv) with two different dilation rates, and an ordinary convolution (Conv). Through the combination of convolution and different dilation rates, the farthest features can be captured to the greatest extent, as shown in Figure 5 .
[0075] After the input information matrix is operated by GSR, a feature map with long-range dependence relationships can be obtained, and finally a residual is introduced to prevent overfitting.
[0076] In this embodiment, the feature Figure X 1 after the residual is expressed as:
[0077] X 1 = A f + X 0 (3)
[0078] where A f is the feature map output by the semantic information reconstruction module based on global information capture:
[0079]
[0080] where Conv 1 is a common convolution Conv with a kernel size of 1×1, and DW-Conv 3 is a depthwise convolution DW-Conv with a kernel size of 3×3, is a depthwise dilated convolution DW-Dconv with a kernel size of 3×3 and a dilation rate of 3, is a depthwise dilated convolution DW-Dconv with a kernel size of 3×3 and a dilation rate of 9.
[0081] Based on the design of global information capture, GSR can capture each position in the matrix during the calculation of the information matrix, ensuring that the information at each position can obtain the context global semantics through dilated convolution. Through multiple layers of dilated convolution, the model expands the receptive field, enabling the generated feature map to fuse the global information within the receptive field. This characteristic enables the feature accumulation process to maintain the integrity of the global information while providing sufficient support for subsequent multi-scale feature capture.
[0082] Multi-Specification Feature Capture Module for Reconstructed Semantic Information - MSC:
[0083] Combined with Figure 6 as shown, the three relation convolution kernels of different sizes are respectively selected as 1×2 2×2 and 3×1
[0084] To extract the features oriented to the tail entity alignment from the entity relation semantics based on global information capture, this embodiment adopts a multi-specification feature capture method for reconstructed semantic information. By extracting components of different specifications from the relation vector to form convolution kernels, multi-angle and multi-scale feature capture of the reconstructed entity relation semantics is performed, providing diverse and sufficient background information support for subsequent feature sharpening. This mechanism not only improves the efficiency of the head entity vector and tail entity mapping alignment but also lays a solid foundation for the global and local feature interaction of the knowledge graph embedding model.
[0085] In this embodiment, three convolution kernels of different sizes are respectively constructed based on the relation embedding r and Taking the construction process of the convolution kernel as an example, the relation embedding r is divided into blocks of the same size where each block Reorganized into the same convolutional kernels where n is the number of convolutional kernels, h l and w l represent the height and width of each convolutional kernel, and n, h l and w l maintain the following relationship: D = nh l w l . Figure 6 Shows a simple example of the MSC module, where a relationship vector of length 9 is split and reshaped into three different convolutional kernels and Using relationship embedding as the convolutional kernel is because relationships, as the connecting bridges, can understand the semantics of the head entity and project it to the correct tail entity. Therefore, the relationship embedding contains the decoded information of entity semantics, and extracting different convolutional kernels from it can accurately obtain the local features for correct alignment of the tail entity from entity semantics.
[0086] Subsequently, the three convolutional kernels are respectively used as the convolutional kernels of different convolutions to extract features from the entity semantic matrix at different scales, obtaining three groups of different feature maps.
[0087] Three groups of feature maps are:[[]]
[0088]
[0089] where is the set of real numbers, C is the number of channels, H is the height of and W is the
[0090] width of
[0091] Feature sharpening module based on group normalization - GNS:
[0092] Furthermore, in order to further reduce the interference of irrelevant features, as shown in Figure 7 , the process of feature sharpening the feature map using the feature sharpening module based on group normalization includes normalizing, feature segmentation, feature enhancement and weakening, and reorganization of the feature map .
[0093] Among them, the standardization step is to unify the quantity level of the feature set and use the scaling factor to constrain the importance of features in the set; the purpose of the segmentation step is to separate the features strongly associated with the alignment target from the weak features, so as to provide a clear processing target for subsequent operations; the enhancement / weakening step performs different processes on the two groups of features after segmentation: amplifying the strong features above the set threshold to strengthen their contribution in subsequent feature learning; attenuating the weak features below the threshold to reduce their interference with the model performance; the recombination step reintegrates the enhanced and weakened features into a feature set to generate a "sharpened" feature set. The finally generated feature set can better highlight the key semantic features and suppress redundant interference features, thus significantly improving the significance and embedding efficiency of entity relationship semantic features.
[0094] The method of the standardization is to evaluate the importance of the feature map using the scaling factor in the group normalization layer:
[0095]
[0096] In the formula is the normalization result obtained according to group normalization, μ i is the mean value of, σ i is the standard deviation of, ε i is the adjustment parameter of, λ i and β i are two training adjustment parameters of the group normalization layer GN;
[0097] It can be seen that by using the values of the trainable parameters in the GN layer, the spatial feature importance of each batch and channel can be measured. Based on the normalization result determine the training adjustment parameter λ i ; then based on the training adjustment parameter λ i calculate the normalization weight as:
[0098]
[0099] In the formula is the normalization weight of the k-th channel, is λ i the training adjustment parameter corresponding to the k-th channel, is λ i the training adjustment parameter corresponding to the j-th channel;
[0100] The normalization weight can reflect the importance of different features.
[0101] Then perform feature segmentation: use the normalized weights The weighted feature map is mapped to the range (0, 1) through the sigmoid function, and then the adjusted weight K is calculated i :
[0102]
[0103] In the formula, GN represents the process of performing group normalization processing on to obtain the training adjustment parameter λ i ; W() represents calculating the normalized weight Sigmoid() is a scaling function that scales the value to the range (0, 1); Threshold() is a threshold-adjustable function that sets values greater than the set weight threshold to 1 and values less than or equal to the set weight threshold to 0;
[0104] According to the adjusted weight K i Set the adjusted weight K greater than the set weight threshold i to 1 to obtain the weight K 1i , and set the adjusted weight K less than or equal to the set weight threshold i to 0 to obtain the weight K 2i .
[0105] Feature enhancement / weakening: Multiply the input feature by K 1i and K 2i respectively to obtain two weighted features: the feature with more information and the feature with less information At this point, the input elements are divided into two parts: Spatial content with strong informativeness and expressiveness, while has little or no information, which is considered redundant.
[0106] Based on the weight K 1i and the weight K 2i Perform feature enhancement and weakening on to obtain the weighted feature and the weighted feature
[0107] Feature recombination: Add and bit by bit to obtain the "sharpened" feature set In which the important features are more prominent and the weaker features are more weakened.
[0108] Then for the weighted feature and weighted features are recombined to obtain a sharpened feature map
[0109]
[0110] Among them, represents element-wise addition. Applying the model to the intermediate input features not only separates the features with large amounts of information from those with small amounts of information, but also performs a "sharpening" reconstruction on them to suppress redundant features in the global dimension with strongly representative features.
[0111] Score module:
[0112] In the score module, first, the "sharpened" feature sets are concatenated along the channel dimension, and a fully connected layer is applied to obtain a hidden layer vector with the same embedding dimension as that of the tail entity. Second, the vector is matrix-multiplied with the tail entity embedding to obtain a series of scores, and each score reflects the possibility that the head entity and relation embedding obtained by the model can correctly predict the triple. Finally, the largest score among the scores is selected as the prediction result.
[0113] Furthermore, the method for calculating the scores is as follows:
[0114]
[0115] In the formula, Scores(h, r, t) represents the score function of the D-dimensional triple embedding, where h represents the head entity embedding, r represents the relation embedding, t represents the tail entity embedding, f(·) represents projecting the hidden layer vector into the space with the same dimension as the tail entity embedding, vec(·) represents flattening the feature map, GSR(·) represents the global feature strengthening operation, MSC(·) represents the neighbor feature strengthening operation, GNS(·) represents the feature reconstruction operation, and R() represents the shaping operation. W 0 is a randomly initialized parameter matrix. After the feature map is flattened, it is projected into a k-dimensional space using the matrix W 0 parameterized linear transformation.
[0116] In this embodiment, 1-N scoring is selected to implement the calculation of the score function Scores(h, r, t); the cross-entropy loss function ψ(p, y) is calculated according to the score value, and the adjustment parameter ε i and the training adjustment parameter λ i and β i are adjusted; the cross-entropy loss function ψ(p, y) is:
[0117]
[0118] Where p represents the predicted triple embedding score, y represents the binary label vector, N is the total number of triplets, and p n is the triple embedding score of the nth prediction, y n is the binary label vector corresponding to the nth prediction.
[0119] In order to calculate the score more efficiently, 1-N scoring is selected in this embodiment to evaluate and calculate the correctness of the triple. 1-N scoring means that the model calculates the scores of an embedding generated by (e1, rel) and all tail entities e2 (that is, all possible candidate entities) at one time, selects the highest or lowest entity as the prediction result among all calculated scores, and generates a scoring vector. In addition, the ADAM optimizer is used to train the parameters according to the score, and batch normalization is used to stabilize and accelerate convergence during the training process, and dropout and L2 regularization are used to reduce overfitting and improve generalization. Finally, the model is trained through the cross entropy loss function.
[0120] The GIRMSF model program for knowledge graph embedding is as follows:
[0121]
[0122] Verification experiment:
[0123] First, the following introduces 7 commonly used data sets to facilitate the understanding and query of relevant data, ensure the transparency, repeatability of the experiment and the credibility of the results; secondly, the evaluation indicators and parameter settings of the experiment are introduced. The experimental evaluation indicators are used to evaluate the results of the experiment, which is helpful to comprehensively evaluate the performance of the model. The experimental parameter settings can optimize the model performance, ensure the reliability and repeatability of the experimental results, and help to reproduce the subsequent experiments; then, the adopted comparative baseline method is introduced; then, the results of the model corresponding to the present invention on 5 data sets are introduced, and the results are analyzed to reasonably analyze the advancedness and superiority of the model of the method of the present invention; verify the effectiveness of the model, and conduct ablation experiments for different modules respectively; finally, the influence of different hyperparameters on the performance of GIRMSF is discussed.
[0124] (I) Dataset
[0125] Seven standard knowledge graph datasets, namely FB15K, WN18, FB15K-237, WN18RR, YAGO3-10, KINSHIP and UMLS, are used to evaluate the model of the present invention. The specific information in these datasets is shown in Table 1.
[0126] The FB15K dataset is derived from the Freebase knowledge base. Freebase is a large open-source knowledge base led by Google, containing a vast amount of entity and relationship information. The WN18 dataset is extracted from the WordNet knowledge base. WordNet is a large, manually constructed lexical database. FB15K-237 is a subset of FB15K. In FB15K, the triples in the test set are obtained by inverting the triples in the training set, which means the relationships in the training set and the test set are the same (the case of relationship leakage). To address the situation where simple models can also achieve good prediction results on these two datasets due to relationship leakage, the relationships in the original training set are removed from the test set to obtain FB15K-237. WN18RR is a subset of WN18. Similarly, in WN18, the relationships in the original training set are removed from the test set to obtain WN18RR.
[0127] YAGO3-10 is a subset of YAGO3. YAGO (Yet Another Great Ontology) is developed by the Max Planck Institute for Computer Science, aiming to integrate information from different data sources such as Wikipedia, WordNet, and GeoNames, covering multilingual entries and descriptions, and also containing rich type information (type hierarchy).
[0128] The KINSHIP dataset was first collected by Denham, Warlpiri, etc. for studying the kinship structure of Australian aborigines. After being organized and extended, it is widely used in fields such as knowledge graphs, relation learning, and logical reasoning. It is usually used by academia and researchers to test the performance of algorithms when dealing with complex relational data.
[0129] The UMLS dataset is created by the U.S. National Library of Medicine (NLM) to unify the representation of different medical terms and coding systems. UMLS is a medical knowledge graph dataset that aggregates multiple medical terminology systems and taxonomies, aiming to promote the standardization and interoperability of medical information.
[0130] Table 1 Detailed descriptions of the seven datasets
[0131]
[0132] (II) Evaluation metrics
[0133] To evaluate the prediction performance of the model on different datasets, we adopted 4 different evaluation metrics, including MRR, Hit@1, Hit@5, and Hit@10.
[0134] MRR (Mean Reciprocal Rank) is an internationally common mechanism for evaluating search algorithms. That is, if the score of the first matching result is 1, the score of the second matching result is 0.5, the score of the nth matching result is 1 / n, and if there is no match, the score is 0. The final score is the average of all scores. The value range of MRR is MRR ∈ (0, 1]. For the triple (h, r, t), the calculation of MRR is shown in formula (14):
[0135]
[0136] Among them, T test represents the test set combination; rank r,t (h) represents the ranking position of the correct head entity in the sorted prediction list in the test set, and rank h,r (t) represents the ranking position of the correct tail entity in the sorted prediction list in the test set. When predicting the hidden head entity, the knowledge graph embedding model calculates the scores of all entities in the triple (?, r, t) of the head entity. Similarly, when predicting the hidden tail entity, the knowledge graph embedding model calculates the scores of all entities in the triple (h, r,?) of the tail entity.
[0137] Hit@h measures whether the model contains at least one relevant item among the first h returned results, that is, it evaluates how many of the first k entities predicted by the model are correct. The commonly used h values are 1 and 10 respectively. For the triple (h, r, t), the specific calculation of Hit@h is shown in formulas (15) and (16).
[0138]
[0139] Among them, rank r,t (h) ≤ h means whether the model contains the correct target head entity among the first h returned results. Similarly, rank h,r (t) ≤ h means whether the model contains the correct target tail entity among the first h returned results.
[0140] It can be seen that the larger the values of MRR and Hit@h, the better the obtained prediction results, indicating that the performance of the model is more superior.
[0141] (III) Experimental Settings
[0142] GIRMSF is implemented using PyTorch 1.21.1, and experiments are conducted on a personal server equipped with an Intel Core i9-1490K central processing unit (CPU), an NVIDIA GeForce RTX 4090 graphics processing unit (GPU), and 96GB of random access memory (RAM). All parameters are initialized with Javier normal distribution. If the training loss does not decrease within five epochs, the learning rate is decreased by a factor of 0.9. For all datasets, training is stopped if MRR and Hit@10 do not improve within 20 epochs, and the maximum epoch is predetermined to be 500. The specific hyperparameter selection is shown in Table 2.
[0143] Table 2 Parameter settings for each dataset
[0144]
[0145]
[0146] (IV) Comparison method: A large number of knowledge graph embedding models are selected as comparison methods. Classic translation-based embedding models include TransE and TransR, semantic matching-based embedding models include DisMult, ComplEx, RotatE, TorusE, and neural network-based embedding models include HypER, ConvE, R-GCN, InteractE, ConvR, CTKGC, etc. The currently more advanced methods ConvHL, MSHE, SDFormer, etc. are compared with existing models to verify the superiority of the model of the present invention.
[0147] (V) Main Results: FB15K-237 and WN18RR are two of the most widely used datasets for embedding prediction. A large number of research works have been proposed based on these two datasets. Table 3 shows the comparison results of GIRMSF with the baseline models on FB15K-237 and WN18RR, with the best results highlighted in bold and the second best results underlined.
[0148] Table 3 Embedding results on FB15k-237 and WN18RR
[0149]
[0150] The experimental results show that the performance of GIRMSF in the proposed method is better than the baseline method on two datasets. Among all the methods, the neural network-based methods are generally better than other types of methods. This is because the non-linear fitting ability of neural networks is very powerful. Even compared with the state-of-the-art neural network models, GIRMSF still shows significant performance advantages, especially on the WN18RR dataset. For example, GIRMSF exceeds SDFormer by 6.0%, 4.5%, 6.4%, and 7.7% respectively in terms of MRR, Hits@1, Hits@3, and Hits@10 metrics. However, the models based on translation or semantic matching have simple assumptions. The only way to improve the expressive power of these models is to increase the embedding dimension, which in turn imposes limitations on the expressive power of the models. InteractE, ConvR, CTKGC, and M-DCN are all methods that enhance the model performance by increasing the interaction between entities and relations. Among them, InteractE was the first to define the important impact of interaction on the performance of knowledge graph embedding models and increased the interactivity by reshaping the feature matrix. These methods have achieved relatively excellent performance among all the compared methods, which is sufficient to prove the key role of increasing entities and relations in the interaction.
[0151] A detailed comparison of GIRMSF and the knowledge graph embedding model based on convolutional neural network: For the newly proposed M-DCN, GIRMSF exceeds the MRR, Hits@1, Hits@3, and Hits@10 metrics of FB15k-237 by 3.6%, 4.5%, 4.5%, and 4.3% respectively, and exceeds the MRR, Hits@1, Hits@3, and Hits@10 metrics of WN18RR by 1.6%, 1.1%, 3.6%, and 5.6% respectively. These are all obvious performance improvements. The reason for the performance advantage of the proposed method is not only the use of the information reconstruction module based on global information capture and the multi-specification feature capture module for reconstructed information to maximize the interaction between entities and relations, but also the use of the information sharpening module based on group normalization to reduce the influence of irrelevant features. The combination of these advanced components promotes the improvement of the performance of GIRMSF in the present invention.
[0152] Secondly, apply the GIRMSF of the present invention to the large-scale knowledge graph datasets FB15K and WN18. The FB15K and WN18 datasets have been widely used in the early knowledge graph embedding research. Although the information leakage problem in the training sets of these two datasets greatly reduces the complexity of link prediction, conducting experiments on these two datasets also plays an important role in proving the effectiveness of the model of the present invention. Table 4 shows the comparison results between the GIRMSF of the present invention and the baseline models on FB15K and WN18.
[0153] Embedding Results on FB15k and WN18 in Table 4
[0154]
[0155]
[0156] For GIRMSF, the performance on FB15K and WN18 is significantly better than that of other comparison models. It can be seen that even if GIRMSF does not achieve the best results in a certain index, the difference compared with the best experimental results is very small. It is speculated that the reason is that the information reconstruction module based on global information capture in GIRMSF can extract more distant information, the multi-specification feature capture module for reconstructed information can dynamically adapt to and adjust the utilization rate of high-dimensional features, and the information sharpening module based on group normalization can adaptively extract redundant features, thus obtaining better performance.
[0157] Then, GIRMSF was applied to the large-scale knowledge graph dataset YAGO3-10 to further verify its embedding performance. The training set of YAGO3-10 has more than 1 million triples. The performance on the large dataset can test the fitting ability of the knowledge graph embedding model. Table 5 shows the comparison results between GIRMSF and the baseline models on YAGO3-10.
[0158] Table 5 Embedding Results on YAGO3-10
[0159]
[0160] It can be seen that GIRMSF outperforms other methods in all metrics on the large dataset, indicating the progress of the model of the present invention and its applicability to large knowledge graphs. Specifically, compared with the latest neural network-based model MSHE, GIRMSF shows very significant improvements, with increases of 2.0%, 2.1%, 2.3%, and 2.6% in MRR, Hits@1, Hits@3, and Hits@10 respectively. Generally, large knowledge graphs contain more knowledge information, and more knowledge information poses greater challenges to the learning ability and noise reduction ability of the model. It can be seen that GIRMSF has excellent results in large-scale, multi-relational datasets.
[0161] To verify the universality of the model of the present invention on small datasets, GIRMSF was applied to the small knowledge graph datasets KINSHIP and UMLS, which have 8,544 and 5,216 triples in their training sets respectively. Table 6 shows the comparison results between GIRMSF and the baseline models on KINSHIP and UMLS.
[0162] Table 6 Embedding Results on KINSHIP and UMLS
[0163]
[0164] From the experimental results, it can be found that HypER, which performs well on medium and large datasets, does not have a significant performance advantage on small datasets. This may be because its complex architecture is more likely to lead to overfitting on small datasets. GIRMSF uses an information reconstruction module (GIRM) based on global information capture, a reconstruction information multi-specification feature capture module (MSC), and an information sharpening module (GNS) based on group normalization to reduce the difficulty of model fitting, thereby improving the generalization ability of the model. Therefore, GIRMSF achieved the best performance in almost all indicators on these two datasets. Experiments on small datasets can also demonstrate the competitiveness of traditional methods. Even the ComplEx model, which performed poorly on medium and large datasets, showed good performance on these two datasets. This is because the scale of these datasets is small and the semantic matching model can achieve effective fitting.
[0165] (VI) Operational efficiency of GIRMSF
[0166] In addition to the performance of embedding prediction, time efficiency is also an important indicator of the knowledge graph embedding model. An overly complex model will make the model difficult to run and difficult to apply to large knowledge graphs. Many works are devoted to improving the efficiency of the model. For example, the parameter efficiency of ConvE is 17 times that of R-GCN and 8 times that of DisMult. In order to evaluate the model efficiency of GIRMSF, the running time of GIRMSF on each epoch is compared with the classic convolutional neural network-based knowledge graph embedding model ConvE and the newly proposed CTKGC and M-DCN. Experiments were carried out on the medium-scale dataset WN18RR and the large-scale dataset YAGO3-10 respectively. The experimental results are shown in Table 7.
[0167] Table 7 Comparison of running time of five models on two datasets
[0168]
[0169] It can be seen from the experimental results that the model training time of GIRMSF on the WN18RR dataset is much less than that of the other three models. On the YAGO3-10 dataset, CTKGC has the shortest running time, but the running time difference between GIRMSF and the other two methods is not significant. Through analysis, it is known that because GIRMSF adds an information reconstruction module based on global information capture, a multi-specification feature capture module for reconstructed information, and an information sharpening module based on group normalization, for complex datasets, more time is required for learning and reconstruction. For datasets with relatively simple structures, even if the data volume is large, GIRMSF can quickly reconstruct features while quickly learning important features, thus accelerating the training speed. Generally, GIRMSF shows high model efficiency and is very competitive compared with the current state-of-the-art CNN-based models. Therefore, it has good application prospects and can be widely applied to medium and large-scale datasets.
[0170] (VII) Ablation Experiments
[0171] Ablation experiments were conducted to verify the effectiveness of GSR, MSC, and GNS. Specifically, taking GIRMSF as the baseline model, GSR, MSC, and GNS were respectively deleted from the complete model, and three comparison methods were set up, including GIRMSF-GSR (without using GSR), GIRMSF-MSC (without using MSC), and GIRMSF-GNS (without using GNS). The FB15K-237 and WN18RR datasets were selected for the experiment. Each group of experiments was repeated 10 times under the optimal hyperparameters, and the average value was taken as the final experimental result. Finally, the results are shown in Table 8.
[0172] Table 8 Ablation Experiments Conducted on the WN18RR and FB15k-237 Datasets
[0173]
[0174] The experimental results show that during the training process of GIRMSF, regardless of which one of GSR, MSC, and GNS is ignored, it will lead to a significant decline in model performance, and the complete GIRMSF is better than all ablation models. It can be seen that each key module of the method of the present invention can play a certain role, and the complete model has strong generalization ability and shows better performance than the comparison methods on multiple datasets.
[0175] (VIII) Discussion on the Influence of Different Hyperparameters on the Performance of GIRMSF
[0176] Next, we evaluate the impact of some key hyperparameters on the performance of GIRMSF to determine its hyperparameter sensitivity. Specifically, the performance of GIRMSF is evaluated using different hyperparameters, namely convolutional kernel size, L2 regularization, and learning rate. The FB15K-237 and WN18RR datasets are selected for experiments.
[0177] Impact of different learning rates:
[0178] The learning rate is a crucial parameter in neural networks. It directly affects the convergence speed and performance of the model. Selecting an appropriate learning rate is essential for knowledge graph embedding models based on neural networks. The grid search method is adopted. This strategy helps to adjust the weights more finely, thus better fitting the combined data. At this time, an initial learning rate needs to be set. Experiments are conducted based on four different initial learning rates (0.0001, 0.0005, 0.001, and 0.005) to explore the impact of the learning rate on the performance of GIRMSF. The experimental results are shown in Table 9 and Figure 8 as follows. It can be seen from the results that for different datasets, selecting the corresponding learning rate is very important, which will significantly affect the performance of the model. On the FB15K-237 dataset, the best learning rate is 0.0005, while on the WN18RR dataset, the best learning rate is 0.001.
[0179] Table 9 Impact of different learning rates on FB15K-237 and WN18RR
[0180]
[0181] Impact of different L2 regularizations: L2 regularization adds a regularization term to the loss function. It penalizes large weight values and encourages the model to use smaller weights for prediction, which is an effective means to reduce the risk of model overfitting. L2 regularization introduces a hyperparameter, and by adjusting this hyperparameter, the impact of regularization can be controlled. The performance of GIRMSF is studied when the regularization coefficients are 5e-3, 5e-4, 5e-5, and 5e-6. The experimental results are shown in Table 10 and Figure 9 as follows. It can be found that when a too large L2 regularization coefficient is selected, such as 5e-3, the model does not fit well, and the resulting results will be very poor. On the FB15K-237 dataset, the best L2 regularization coefficient is 5e-4, while on the WN18RR dataset, the best L2 regularization coefficient is also 5e-4.
[0182] Table 10 Impact of different L2 regularizations on FB15K-237 and WN18RR
[0183]
[0184] Impact of different convolutional kernel sizes
[0185] The size of the convolutional kernel represents different receptive fields used for feature extraction within the model. The optimal combination of multi-scale convolutional kernel sizes is selected through sufficient experiments.
[0186] In the experiment, various combinations of different convolutional kernel sizes are selected, including [[1*3],[1*3],[1*3]], [[3*3],[1*3],[1*3]], [[1*3],[3*3],[1*3]], and [[1*3],[3*3],[3*3]], where the last two kernel combinations are single-scale. The experimental results are shown in Table 11 and Figure 10 as shown. It can be seen from the experimental results that different convolutional kernel sizes have little impact on the overall performance of the model. Therefore, the [[1*3],[3*3],[1*3]] multi-scale convolutional kernel group used in the test is selected.
[0187] Table 11 Impact of Different Convolutional Kernel Sizes on FB15K-237 and WN18RR
[0188]
[0189] In summary, the method of the present invention realizes the embedding representation of the knowledge graph based on the global information semantic reconstruction and multi-specification feature sharpening framework - GIRMSF. First, based on the entity-relationship semantic reconstruction method for global information capture, the global information of the semantic information matrix composed of entities and relationships is reconstructed through multi-layer dilated convolution to obtain the semantic information of entities and relationships with context logical association information. Second, to improve the efficiency of entity-relationship alignment in the knowledge graph, a multi-specification feature capture mechanism for semantic reconstruction information is proposed. By convolving different specifications of convolutional kernels extracted from the relationship vectors with the reconstruction information, the entity-relationship semantic information is captured from different angles. Finally, an information sharpening method based on group normalization is used to standardize and adjust the threshold of the set of multi-specification features, enhance key information, suppress redundant features, and further improve the learning efficiency and prediction accuracy of the model. Through this multi-level information processing strategy, GIRMSF can perform excellently in the knowledge graph embedding task, improving the accuracy and robustness of entity and relationship representations.
[0190] Experimental verification shows that GIRMSF has shown significant performance improvement in extensive experiments on seven benchmark datasets of different scales, especially performing outstandingly in medium and large datasets. These experimental results prove that GIRMSF can consistently provide high-quality embedding representations in knowledge graph datasets of different scales and complexities, improving the accuracy and efficiency of the completion task. Through these experimental verifications, GIRMSF fully demonstrates its potential as a powerful and general knowledge graph embedding method, laying a solid foundation for the further application of the knowledge graph.
[0191] Although the present invention has been described herein with reference to particular embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. Accordingly, it should be understood that numerous modifications may be made to the exemplary embodiments, and other arrangements may be devised, without departing from the spirit and scope of the present invention as defined by the appended claims.
Claims
1. A knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework, characterized in that: include, The triples in the knowledge graph are randomly initialized to obtain D-dimensional triple embeddings, the head entity embeddings and relationship embeddings in the D-dimensional triple embeddings are concatenated according to the dimensions, and then reshaped to obtain the initial feature graph X0; The initial feature map X0 is extracted by using a semantic information reconstruction module based on global information capture, and then residual processing is performed on the initial feature map X0 to obtain a residual feature map X1; Select three different sizes of relational convolution kernels to extract features from the residual feature map X1, and get three sets of feature maps. Then, the feature map is sharpened by the feature sharpening module based on group normalization. Perform feature sharpening to obtain the sharpened feature map The three sharpened feature maps The layers are flattened and connected along the channel dimension respectively, and a fully connected layer is used to obtain a hidden layer vector, wherein the hidden layer vector has the same dimension as the tail entity embedding in the triple embedding; matrix multiplication is then performed on the hidden layer vector and the tail entity embedding in the triple embedding to predict multiple scores, and the tail entity embedding corresponding to the highest score is used as the tail entity prediction result to achieve information reconstruction.
2. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 1 is characterized in that: The semantic information reconstruction module based on global information capture includes deep convolution DW-Conv, deep dilated convolution DW-DConv with two different dilation rates and ordinary convolution Conv in sequence; the initial feature map X0 is input into the deep convolution DW-Conv and the deep dilated convolution DW-DConv in sequence, and the ordinary convolution Conv outputs the feature extraction result.
3. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 2 is characterized in that: The residual feature map X1 is expressed as: X1=A f +X0, Where A f Feature map output by the semantic information reconstruction module based on global information capture: Where Conv1 is a common convolution Conv with a convolution kernel size of 1×1, and DW-Conv3 is a deep convolution DW-Conv with a convolution kernel size of 3×3. is a deep dilated convolution DW-Dconv with a convolution kernel size of 3×3 and a dilation rate of 3, It is a depth-dilated convolution DW-Dconv with a convolution kernel size of 3×3 and a dilation rate of 9.
4. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 3 is characterized in that: The three different sizes of relational convolution kernels are selected as 1×2 2×2 and 3×1 5. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 4 is characterized in that: Three sets of feature maps for: In the formula is a set of real numbers, C is the number of channels, and H is The height of Width.
6. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 5 is characterized in that: Feature sharpening module based on group normalization for feature maps The process of feature sharpening includes the feature map Perform standardization, feature segmentation, feature enhancement and weakening, and reorganization.
7. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 6 is characterized in that: The normalization method is to evaluate the importance of feature maps using the scaling factor in the group normalization layer: In the formula is the normalized result obtained by group normalization, μ i for The mean value, σ i for The standard deviation of i for The tuning parameter, λ i and β i are two training adjustment parameters of the group normalization layer GN; Based on the normalized results Determine the training adjustment parameter λ i ; Then adjust the parameter λ based on training i Calculate normalized weights for: In the formula is the normalized weight of the kth channel, is i The training adjustment parameters corresponding to the kth channel, is i The training adjustment parameters corresponding to the jth channel; Then perform feature segmentation: normalized weights will be used Weighted feature map Map it to the range (0, 1) through the sigmoid function, and then calculate the adjusted weight K i : In the formula, GN represents Perform group normalization to obtain the training adjustment parameter λ i The process; W() represents the calculation of normalized weights Sigmoid() is a scaling function that scales the value to the range of (0,1); Threshold() is a threshold adjustable function that sets the value greater than the set weight threshold to 1 and the value less than or equal to the set weight threshold to 0; According to the adjusted weight K i The adjusted weight K that is greater than the set weight threshold i Set to 1 to get the weight K 1i , the adjusted weight K that is less than or equal to the set weight threshold i Set to 0 to get the weight K 2i .
8. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 7 is characterized in that: Based on the weight K 1i and weight K 2i right Perform feature enhancement and weakening to obtain weighted features and weighted features Then weight the features and weighted features Reorganize to get the sharpened feature map 9. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 8 is characterized in that: The score is calculated as follows: where Scores(h,r,t) represents the score function of the D-dimensional triple embedding, where h represents the head entity embedding, r represents the relationship embedding, t represents the tail entity embedding, f(·) represents projecting the hidden layer vector into the space of the same dimension as the tail entity embedding, vec(·) represents flattening, GSR(·) represents the global feature enhancement operation, MSC(·) represents the neighbor feature enhancement operation, GNS(·) represents the feature reconstruction operation, and R() represents the reshaping operation. W0 is a randomly initialized parameter matrix.
10. The knowledge graph embedding method based on global information semantic reconstruction and multi-specification feature sharpening framework according to claim 9 is characterized in that: Select 1-N scoring to implement the calculation of the score function Scores(h,r,t); calculate the cross entropy loss function ψ(p,y) based on the score value, and adjust the adjustment parameter ε i , training adjustment parameter λ i and β i ; The cross entropy loss function ψ(p,y) is: Where p represents the predicted triple embedding score, y represents the binary label vector, N is the total number of triplets, and p n is the triple embedding score of the nth prediction, y n is the binary label vector corresponding to the nth prediction.
Citation Information
Patent Citations
Knowledge graph embedding method and system based on multi-scale dynamic convolutional network model
CN116431836A
Knowledge graph link prediction method based on multi-scale attention network
CN117891955A
Knowledge embedding method for automobile system fault knowledge graph
CN119067206A
Methods and Systems for Approximating Embeddings of Out-Of-Knowledge-Graph Entities for Link Prediction in Knowledge Graph
US20230132545A1