A temporal knowledge graph alignment method
By establishing a new data set BETA and providing MGTEA methods, the problem of simplification and lack of multi-grained time information of existing timing knowledge graph alignment data sets is solved, and more realistic alignment scenarios and more efficient alignment performance are achieved.
Patent Information
- Application Number
- CN202411096243.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The existing timing knowledge graph alignment data set is too simplified to effectively reflect the challenges in reality, which has hindered the fair evaluation and development of timing knowledge graph alignment algorithms, and lacks multi-grained time information and complex time relationships, which cannot meet time sensitivity. downstream application requirements.
A new data set BETA was established, filtering a subset of knowledge graphs and adding time and non-time facts through pre-mapping of PromptCBLUE and NEJM-AI Benchmarking data entities, providing the MGTEA method, which is based on the encoder-decoder pipeline, through The similarity matrix combines structural features and time features to process multi-grained time information and complex time relationships.
The BETA dataset better reflects the challenges in real life. The MGTEA method effectively simulates complex structures and multi-grained time characteristics, improves the performance of timing knowledge graph alignment, and verifies its effectiveness under multi-grained time information and complex relationships. .
Smart Images

Figure CN118643895B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical information technology, and in particular relates to a temporal knowledge graph alignment method. Background Art
[0002] Temporal knowledge graph alignment (TKGA) discovers equivalent elements between heterogeneous temporal knowledge graphs, thereby increasing the coverage of a given temporal knowledge graph. However, existing TKGA datasets fail to reflect real-world challenges, and overly simplified scenarios may even hinder fair comparison and development of solutions.
[0003] To increase the coverage of TKGs and eliminate outdated facts between different medical knowledge graph datasets, a key step is TKGA, which aims to match TKGs built from different sources and use aligned entities as anchors to merge related facts. TKGA focuses on entity alignment (TEA) because the number of entities (usually more than 10,000) is much larger than the number of relations (usually hundreds).
[0004] To solve the TEA problem, some methods inject temporal information into entity representation, but some methods directly use temporal information for alignment. These methods are evaluated and compared on datasets. However, these datasets deviate from reality and are relatively easy, with state-of-the-art methods reaching more than 90% in terms of Hits@1 metric, so they may not provide a fair evaluation of existing models and even hinder the development of effective TEA algorithms. More specifically, DICEWS is built by dividing the temporal knowledge graph icews into two partially overlapping knowledge graph subsets, which weakens the difficulty of TKGA because the knowledge graphs to be aligned come from the same source with shared semantics. For example, the two real-world knowledge graphs, PromptCBLUE Chinese Medical Large Model Evaluation Benchmark Dataset (QA, 97912 cases) and NEJM-AI Benchmarking Nephrology Medical Question Answering (QA, 858 cases), are composed of quadruplets (i.e., playsFor) containing the most frequently occurring temporal relations. Therefore, the knowledge graph entity pairs to be aligned are essentially to build a knowledge graph about drugs and their therapeutic effects, which is limited to a specific domain and cannot reflect real-life TKGA cases.
[0005] As factual knowledge is constantly updated and evolved, the static structure of existing knowledge graphs can no longer meet the needs of time-sensitive downstream applications. For example, in time-series knowledge graph question answering, it is necessary to consider the dynamic changes of knowledge over time in order to provide accurate and relevant answers. Therefore, time-series knowledge graphs have begun to receive more and more attention. In a time-series knowledge graph, a piece of knowledge is represented by a quadruple. It is expressed in the form of Represents time information with a start time tag and an end time tag. If the time information is not empty, then the quad is considered a valid quad or temporal fact. Summary of the invention
[0006] In view of this, the goal of the present invention is to establish a new dataset (i.e., BETA) to test the challenges of temporal knowledge graph alignment, which has multi-granularity temporal information, more realistic quadruple distribution, and new challenging alignment scenarios. In addition, this application also provides a simple and effective solution MGTEA to address the above challenges, which effectively simulates complex structures and multi-granularity temporal features to facilitate alignment. A large number of experiments have shown that BETA does better reflect real-life challenges, and although MGTEA achieves excellent performance, there is still room to develop more advanced solutions to address these difficulties.
[0007] In summary, the outstanding problems of existing benchmark datasets are:
[0008] (1) Simplify the quadruple distribution of temporal knowledge graphs. In existing datasets, most entities are associated with only one temporal relation (the relation involved in a temporal fact), which is an oversimplification of the real situation, where an entity may involve facts with multiple temporal relations;
[0009] (2) Lack of multi-granularity time information. Existing datasets maintain a uniform representation of time intervals by discarding non-year time information, which makes the temporal knowledge graph oversimplified and impractical. In fact, timestamps may involve multiple granularities, such as year, month, and day, and this multi-granularity time information is an important asset of the temporal knowledge graph.
[0010] In response to the above problems, this application benchmarks the challenges of temporal knowledge graph alignment and establishes a new dataset, namely BETA, to better demonstrate the difficulty of TKGA. Specifically, this application creates preliminary seeds by adopting pre-mapping between PromptCBLUE and NEJM-AI Benchmarking data entities, thereby avoiding resource-consuming manual labeling. Then, this application screens the two knowledge graphs and adds temporal and non-temporal facts to establish a subset of knowledge graphs to be aligned. The new dataset BETA has multi-granularity temporal information, more realistic quadruple distribution, and new challenging alignment scenarios. In addition, this application also provides a simple and effective solution MGTEA to address the above challenges. MGTEA is built on an encoder-decoder pipeline, in which complex structures and multi-granularity temporal features are first encoded and then decoded through an alignment reasoning algorithm. This application examines existing solutions and MGTEA based on BETA and traditional benchmarks, and the results show that BETA does better reflect real-life challenges, and there is still room to develop more advanced solutions to address these difficulties.
[0011] To achieve the above purpose, the time series knowledge graph alignment method disclosed in the present invention includes the following steps:
[0012] Obtain medical knowledge graph with temporal knowledge;
[0013] The entities in the medical knowledge graph are generated into entity structure representations to obtain structural features, including: obtaining entity representations through relational projection of adjacent information; representations of different layers are connected to generate entity structure representations; generating embeddings Aggregate relation representation, aggregate time representation and adjacent time embedding;
[0014] Construct a time relationship graph for each entity to further encode time information and obtain time features. In the time relationship graph, the core node is the entity , the edge is the relationship associated with the entity, and the node on the other side of the edge is the time interval label;
[0015] The structural features and temporal features are converted into similarity matrices, and then the multi-channel similarity matrices are fused to obtain the final result;
[0016] Output the aligned medical knowledge graph.
[0017] Furthermore, the generation process of entity structure representation is as follows:
[0018] First, the entity representation is obtained through the relational projection of adjacent information:
[0019] ;
[0020] in, and Is Entity In the Layer and +1 layer representation, Is Entity In the The layer representation, It's a relationship , T represents the transpose operation, and are the initial entity and relation features, respectively, which are randomly initialized; Is Entity The adjacent entities of Representing Entities and A set of relationships between The calculation formula is:
[0021] ;
[0022] is the carrier of attention, which selects the most critical relationship from all edges connected to the entity, It's a relationship The expression, Representing Entities ;
[0023] Representations at different layers are concatenated to generate entity structure representations ,in Indicates splicing, is the number of layers;
[0024] Embed The aggregation relationship is expressed as:
[0025] ;
[0026] in Representing Entities exist The set of relations within is the corresponding relation embedding, and the final adjacent relation embedding is expressed as ,in is the first hop count;
[0027] Embed The aggregation time within is expressed as:
[0028] ;
[0029] in, Representing Entities exist The time information set within is the time label embedding, which is randomly initialized;
[0030] The final adjacent temporal embedding is represented as
[0031] ;
[0032] in, is the second hop number.
[0033] Furthermore, the time information is characterized as year granularity and date granularity; the year granularity is intended to capture the similarity between entities in a larger range, while the date granularity models the precise time similarity;
[0034] According to the formula of adjacent time embedding, we can get the year granularity representation and date granularity representation, that is, and , which fuse to produce :
[0035] ;
[0036] in and is a trainable parameter;
[0037] The entity representation is fused with neighboring relations and temporal information to generate the final representation:
[0038] ;
[0039] Trained Embeddings is forwarded to the decoding stage.
[0040] Furthermore, a temporal relationship graph is constructed for each entity to encode temporal information more accurately;
[0041] In the time relationship graph, the core node is the entity , the edge is the relationship associated with the entity, and the node on the other side of the edge is the time interval label; the time relationship graph is directional, where the outward edge indicates that the core node is the head entity of the original quadruple, and the inward edge indicates that the core node is the tail entity of the quadruple;
[0042] For entities , each edge All with a weight Related:
[0043] ;
[0044] in Indicates the entity involved ,relation and time interval The number of quadruplets, weight express The constructed time relationship diagram is represented as ;
[0045] In order to represent multi-granularity time information, the year time interval is abstracted from the original date interval. Therefore, each entity is associated with two time relationship graphs, namely, and .
[0046] Furthermore, an automatic relationship alignment algorithm is used to make the relationships in different temporal knowledge graphs comparable:
[0047] First, for every two entity pairs in the labeled data , , respectively retrieve the quadruple involving entities in the two temporal knowledge graphs, namely and ;
[0048] Then, extract the relations in the quadruple and obtain and , forming a pair of pseudo alignment relationships ;
[0049] By enumerating all , and obtain a set of pseudo-alignment relationships ;
[0050] Next, statistics exist co-occurrences, and if the number of co-occurrences exceeds a given threshold , and at the same time respectively or If it is more than 30% of the total occurrences of are aligned, thus obtaining a set of alignment relationships .
[0051] Furthermore, each entity The time relationship diagram is represented as a matrix , the dimension is , where the row index is the relationship and the column index is the time interval; if the entity exist , the pixel value is set as the weight , if it does not exist, the value is set to 0; the entire time matrix of the knowledge graph is represented as a three-dimensional matrix , whose dimension is , in order to make the temporal relationship graphs in the source and target temporal knowledge graphs comparable, only the aligned relationship sets are considered and the temporal matrix is converted to the dimension , when distinguishing between year and date granularity, the year matrix and date matrix are expressed as and ;
[0052] For entities that lack temporal information, the network structure of the graph is used to aggregate the temporal information of the multi-hop neighbors of the entity.
[0053] Furthermore, in the decoding stage, the encoded structural and temporal features are first converted into a cross-graph similarity matrix, and then the multi-channel similarity matrix is fused to obtain the final result; specifically, the similarity matrix is expressed as:
[0054] ;
[0055] in Represents structural features, Represents time characteristics, and Represent the source and target temporal knowledge graphs respectively, and is a hyperparameter that weighs the weights. is the alignment inference algorithm. Since the time matrix is three-dimensional, for each The obtained similarity matrix is averaged to obtain a dimension of Entity similarity matrix of ;
[0056] based on ,For each source entity, the target entity with the maximum similarity score is retrieved and taken as the alignment.
[0057] Furthermore, the steps for generating a medical knowledge graph with temporal knowledge are as follows:
[0058] From the existing knowledge graph, integrate facts, tense facts, start and end times of facts and create quadruples;
[0059] Select entities associated with multi-temporal relations from the knowledge graph to generate several entity pairs, which are called preliminary seeds;
[0060] Extracting quadruplets related to these preliminary seeds from the respective knowledge graphs, selecting entities present in the mapping to filter the quadruplets, and obtaining a number of pairs, which are used to retrieve facts from the respective KGs to form the final knowledge graph subset on each side;
[0061] In the beta version, 28% and 14% of the temporal facts contain month-day information for subsets of the knowledge graph, respectively;
[0062] Create a new time-aligned scene:
[0063] Many-to-many or many-to-one alignments, where at least one entity to be aligned is associated with multiple temporal relations;
[0064] Many-to-none or one-to-one alignments, where at least one of the entities to be aligned is not associated with any temporal relationship;
[0065] No alignment, where neither entity is associated with any temporal relationship.
[0066] The beneficial effects of this application are as follows:
[0067] This application first discovered the problems of the existing TKGA dataset. In response, this application benchmarked the challenges of TKGA, namely multi-granularity temporal information and complex temporal relationships, and established a new TKGA dataset BETA to inspire subsequent research;
[0068] This application designs a new baseline TEA method MGTEA to handle the multi-granularity temporal information and complex temporal relations in the TKGA dataset;
[0069] This application conducts extensive experiments on BETA and current datasets using MGTEA and existing solutions. The experimental results verify the difficulty of BETA and the effectiveness of MGTEA. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 Framework diagram of the present invention. DETAILED DESCRIPTION
[0071] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.
[0072] Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0073] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
[0074] The technical solutions provided in the embodiments of the present application involve technologies such as machine learning and natural language processing of artificial intelligence, which are specifically introduced and explained through the following embodiments.
[0075] Before introducing the embodiments of the present application, some terms involved in the present application are explained first;
[0076] 1. Temporal Knowledge Graph Alignment. Xu et al. first studied the problem of temporal knowledge graph alignment. Unlike the temporal GNN model that discretizes the temporal graph into multiple snapshots, they regard timestamps as attributes of the links between entities. Entities, relations, and timestamps are first mapped into an embedding space, where time-aware attention is used to incorporate relational and temporal information into the GNN structure. They further improved model training by using neighborhood aggregation and edge-based multi-class log-loss. Tem-EA adopts a long short-term memory neural network (LSTM) to encode time series information, which is combined with the structural embedding learned by GCN to produce alignment results. Sun et al. enhanced graph attention with temporal modeling to learn temporal relational entity embeddings for TKG alignment.
[0077] This application aims to build a dataset to reflect the challenges of TKGA multi-granularity temporal information and complex temporal relationships.
[0078] Data source. The dataset of this application is based on the PromptCBLUE Chinese Medical Large Model Evaluation Benchmark Dataset (QA, 97912 cases) and the NEJM-AI Benchmarking Nephrology Medical Question Answering (QA, 858 cases). Specifically, in PromptCBLUE, facts and temporal facts are stored in different files, and the start and end times of facts are independent. Therefore, this application integrates them to create quadruples.
[0079] Initial seed generation. We first select entities associated with multi-temporal relations from the two knowledge graphs. We retain those QIDs that exist in the previous mapping of PromptCBLUE entities to , resulting in 26,594 entity pairs, which are called initial seeds.
[0080] Knowledge graph subset generation. The application then extracts the tetragrams associated with these preliminary seeds from the respective knowledge graphs, resulting in 131,853 tetragrams in the PromptCBLUE data and 89,702 tetragrams in the NEJM-AI BENCHMARKING. The application screens the tetragrams by selecting entities present in the mapping, resulting in 40,364 pairs, which are used to retrieve facts from the respective KGs to form the final KG subsets on each side, of which the PromptCBLUE data contains 199,879 tetragrams and the NEJM-AI BENCHMARKING contains 162,320 tetragrams. It is worth noting that in the final seed entity alignment pairs, 4,235 entities do not match, indicating that there is no corresponding entity on the other side of the KG.
[0081] Next, this application provides a deeper analysis of BETA on temporal information, entity and relationship distribution:
[0082] Multi-granularity time information distribution. Contrary to PromptCBLUE’s practice of unifying timestamps by retaining only year information, in the beta version, 28% and 14% of time facts contain month-day information for the PromptCBLUE data subset and NEJM-AIBenchmarking subset, respectively;
[0083] Entity distribution. Compared with PromptCBLUE, where most entities are associated with a specific temporal relation, for example, the entity BETA distribution is more diverse and more in line with the actual situation. Specifically, it can be observed that in the two KG subsets in BETA, there are entities without temporal facts, as well as entities associated with multiple temporal relations. This diverse distribution brings more difficulties to TKGA because the heterogeneity between the two KGs is enlarged. This also leads to five new alignment scenarios, in addition to the current alignment scenario, in which the entities to be aligned are only associated with one specific temporal relation;
[0084] Relationship distribution. This application further reports the top 5 frequent relations in NEJM-AI Benchmarking and BETA and the proportion of quadruplets containing them. It can be observed that while the relations member_of_sports_team and plays_for dominate the kg of PromptCBLUE, accounting for 98% and 98.4% respectively, the relationship distribution is more diverse in BETA. This is because the construction of PromptCBLUE pays special attention to the most frequent time relationship quadruplets, namely medication and treatment time. The knowledge groups in the resulting TKGA dataset are basically knowledge groups about medication and treatment time, which is different from the general knowledge groups in the real world that involve multiple types of facts. In contrast, the distribution in BETA is more uniform and diverse, with the most frequent relations accounting for less than 35%.
[0085] New alignment scenes:
[0086] For the existing dataset, the TEA algorithm only needs to align football players and teams between two kg, because most of the relations are member_of_sports_team and plays_for. In the beta version, due to the introduction of more realistic quadruplets, in addition to the current alignment scenario where the entities to be aligned are only associated with one specific temporal relationship, new temporal alignment scenarios emerge:
[0087] Many-to-many / many-to-one alignment, where at least one entity to be aligned is associated with multiple temporal relations. In both cases, entities involve multiple temporal quads, and it is important to mine useful signals from complex structures and reduce the noise brought by the heterogeneity of relational and temporal information;
[0088] Many-to-none / one-to-one alignments, where at least one of the entities to be aligned is not associated with any temporal relationship. In these cases, it is critical to properly handle the differences in temporal information and fully exploit features modeled from other aspects;
[0089] No alignment, where neither entity is associated with any temporal relation. In this case, temporal entity alignment is reduced to the general entity alignment task;
[0090] In order to solve the above problems, this application proposes a new method MGTEA. The overall framework is as follows Figure 1 As shown. In the encoding stage, the goal of the structured encoding module is to generate entity representations based mainly on the structure of tkg, while the temporal encoding module focuses on modeling temporal information. The features learned from the two channels are then forwarded to the decoding stage, where similarity matrices are generated and fused to produce aligned entity pairs. Table 1 gives the main symbols used.
[0091] Structural coding module:
[0092] Traditional works on entity alignment have pointed out that structural information is crucial for inferring equivalent entities, since they are likely to have similar neighboring information. Therefore, in this work, we also encode structural information.
[0093] Entity structure representation. First, the entity representation is obtained through the relational projection of adjacent information:
[0094] ;
[0095] in Representing Entities In the The layer representation, Representing relationships Representation. and are the initial entity and relation features, respectively, which are randomly initialized. Representing Entities The adjacent entities of Representing Entities and A set of relationships between . The calculation formula is:
[0096] ;
[0097] is the carrier of attention. This operation selects the most critical relations from all edges connected to the entity.
[0098] Table 1 Main symbols used in this application:
[0099] ;
[0100] Representations at different layers are concatenated to generate entity structure representations ,in Indicates splicing, It is the number of layers.
[0101] Since entity embedding only contains topological information, this application also considers the relationship and temporal relationship around the entity to enrich the entity embedding. ) is expressed as:
[0102] ;
[0103] in Representing Entities exist The set of relationships within. is the corresponding relation embedding. The final adjacent relation embedding is expressed as ,in is the number of hops considered.
[0104] The neighboring time representation. Similarly, the embedding The aggregation time within is expressed as:
[0105] ;
[0106] in, Representing Entities exist The time information set within. is the time label embedding, which is randomly initialized. The final adjacent time embedding is represented as
[0107] ;
[0108] in, is the number of hops considered.
[0109] It is worth noting that this application considers the multiple granularities of time information and characterizes time information into year granularity and date granularity. The year granularity aims to capture the similarity between entities in a larger range, while the date granularity models the precise time similarity. Therefore, two representations are obtained according to the above formula, namely and , which fuse to produce :
[0110] ;
[0111] in and is a trainable parameter.
[0112] The entity representations are then fused with neighboring relations and temporal information to generate the final representation:
[0113] ;
[0114] The loss function of this application uses seed entity pairs to train the above parameters, with the goal of placing equivalent entities close to each other in the embedding space while pushing away negative samples. The trained embedding (denoted as ) is forwarded to the decoding stage.
[0115] The loss function is as follows:
[0116] ;
[0117] in, , , is a smoothing factor and LSE is an operator that generates hard negative samples.
[0118] Time coding module:
[0119] Since the temporal information between different entities is usually represented in a unified way, if two entities have many overlapping time intervals between their connected quadruplets, they are likely to represent the same real-world object. Specifically, they capture temporal features through statistics of different entities, which are then directly compared to infer equivalence. However, directly comparing the temporal information associated with entities may produce incorrect results. For example, given the quadruplets (A, worksFor, C, [2020, 2020]) and (B, award, D, [2020, 2020]), directly comparing the time intervals associated with the entities may lead to incorrect alignment of entity A and entity B. Therefore, this application constructs a temporal relationship graph for each entity to more accurately encode temporal information.
[0120] Time relationship graph construction. In the time relationship graph, the core node is the entity , the edge is the relationship associated with the entity, and the node on the other side of the edge is the time interval label. Note that the time relationship graph is directional, where the outward edge indicates that the core node is the head entity of the original quadruple, and the inward edge indicates that the core node is the tail entity of the quadruple. , each edge All with a weight Related:
[0121] ;
[0122] in Indicates the entity involved ,relation and time interval The weight represents the number of quadruplets. The constructed time relationship graph is represented as .
[0123] In order to represent multi-granularity time information, this application abstracts the year time interval from the original date interval. Therefore, each entity is associated with two time relationship graphs, namely and .
[0124] Automatic Relation Alignment. It is worth noting that in order to make the relations in different temporal knowledge graphs comparable, this application proposes an automatic relationship alignment algorithm.
[0125] First, for every two entity pairs in the labeled data (used for training) , , this application retrieves the quadruplets involving these entities in two temporal knowledge graphs, namely and Then, the application extracts the relations in the quadruple and obtains and , forming a pair of pseudo alignment relationships By enumerating all , this application obtains a set of pseudo-alignment relationships Next, this application statistics exist co-occurrences, and if the number of co-occurrences exceeds a given threshold , and at the same time respectively or If the total occurrence of Therefore, this application obtains a set of alignment relations .
[0126] Time matrix generation. Each entity The time relationship diagram can be expressed as a matrix , the dimension is , where the row index is the relationship and the column index is the time interval. If the entity exist , the pixel value is set as the weight If it does not exist, the value is set to 0. The entire time matrix of the knowledge graph is represented as a three-dimensional matrix , whose dimension is In order to make the temporal relationship graphs in the source and target temporal knowledge graphs comparable, this application only considers the aligned relationship sets and converts the temporal matrix into the dimension When the application distinguishes between year and date granularity, the year matrix and date matrix are represented as and .
[0127] Considering that some entities lack time information, the network structure of the present application graph is used to aggregate the time information of the multi-hop neighbors of the entity.
[0128] Feature decoding:
[0129] In the decoding stage, this application first converts the encoded structural and temporal features into a cross-graph similarity matrix, and then fuses the multi-channel similarity matrix to obtain the final result. Specifically, the similarity matrix is expressed as:
[0130] ;
[0131] in Represents structural features, Represents time characteristics, and Represent the source and target temporal knowledge graphs respectively. and is a hyperparameter that weighs the weights. is an alignment inference algorithm. This application uses the Sinkhorn algorithm. It is worth noting that since the time matrix is three-dimensional, this application uses The obtained similarity matrix is averaged to obtain a dimension of Entity similarity matrix.
[0132] based on ,For each source entity, the application retrieves the target entity with the maximum similarity score and uses it as the alignment.
[0133] This application conducted a large number of experiments to verify the usefulness and difficulty of BETA and to prove the effectiveness of the method proposed in this application.
[0134] Baseline. Baselines can be divided into two groups, namely TEA model and EA model. About TEA model:
[0135] TEA-GNN, which adopts a time-aware attention mechanism to assign weights to nodes based on relational and temporal information;
[0136] STEA, which exploits the comparability of temporal information using a temporal information matching mechanism;
[0137] LightTEA, which introduces two-way three-view label propagation to incorporate temporal information and learn vector representations of entities;
[0138] DualMatch, which uses dual encoders to learn relational and temporal information.
[0139] Regarding EA models, this application compares:
[0140] MTranse, which provides a translation of each embedding vector to its cross-lingual counterpart;
[0141] AlignE, which uses a neural relation extractor to detect primary relations from the input;
[0142] GCN-Align, which trains GCNs to embed entities in each language into a unified vector space
[0143] MRAEA, which models cross-lingual entity embeddings by focusing on the meta-semantics of a node’s incoming and outgoing neighbors and their connection relations;
[0144] RREA, which exploits relational reflective transformations to obtain relation-specific embeddings;
[0145] Dual-AMN,models both within-graph and across-graph information for alignment.
[0146] Hyperparameter settings. The default configuration is: embedding dimension =100, learning rate =0.005, batch , GNN layer = 2, = 1, is 0.3. Set to 0.85, Set to 1.25. Set to 100. , and is set to 2.
[0147] Evaluation metrics. Following previous work, this application uses Hits@N (where N=1, 10) and mean reciprocal rank (MRR) as basic evaluation metrics. Hits@N (expressed as a percentage) represents the percentage of correctly aligned entities within the first N positions in the sorted list for each entity to be aligned. MRR is calculated as the average of the reciprocals of the ranks of correctly aligned entities. It provides a measure of alignment accuracy by reporting the reciprocal of the average rank at which the correct alignments are located. Similar to the prior art, in the experiment, two different versions of the BETA dataset, namely BETA-10% and BETA-30%, were created using 10% and 30% training data ratios, respectively. This aims to investigate the impact of the amount of training data on model performance.
[0148] Table 2 shows the performance of all baseline models and the proposed model MGTEA on the fundus image datasets ODIR-5K and RFMiD with 10% and 30% training data. Experimental results show that MGTEA consistently outperforms other models, especially two state-of-the-art TKGA models LightTEA and DualMatch, under different proportions of training data. Specifically, the Hits@1 metric is improved by more than 3.5% for 10% of seed entity pairs, and by 2.1% for 30% of pre-aligned seed pairs. The superior performance can be attributed to the fact that the proposed model considers the alignment signals of different temporal granularities and effectively solves the heterogeneity caused by different temporal granularities and different time records. In contrast, the existing state-of-the-art models (such as LightTEA and DualMatch) ignore different temporal granularities; when the temporal granularities are different or the temporal values are inconsistent, these models have difficulty in determining whether two entities are similar and cannot provide effective signals for entity alignment. In addition, the proposed model distinguishes the temporal information under different relations based on the automatic relation alignment algorithm, thereby further strengthening the modeling of temporal relational features related to entities.
[0149] By comparing the alignment solutions that model temporal information and those that do not, this application can observe that using temporal information significantly improves performance. This is because there is a certain degree of heterogeneity in the structure, relationship, and temporal information of the same entity across different temporal knowledge graphs, and temporal information can effectively compensate for the feature loss caused by the heterogeneity of other dimensions. Therefore, modeling temporal information and fusing it with other features can learn better vector representations of entities and provide more effective signals.
[0150] In summary, we can conclude that the model proposed in this application achieves the best performance under multi-granularity temporal information and complex relationships.
[0151] Table 2 Overall experimental results:
[0152] ;
[0153] This application establishes a new TKGA benchmark that better reflects the challenges of multi-granular temporal features and complex temporal relations in TKGs. Accordingly, this application also provides a solution MGTEA to try to address the above challenges. The results demonstrate the difficulty of the new benchmark and the effectiveness of the proposed solution.
[0154] As used herein, the word "preferred" is intended to be used as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as being more advantageous than other aspects or designs. On the contrary, the use of the word "preferred" is intended to present concepts in a specific way. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X uses A or B" means any one of the naturally included permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
[0155] Moreover, although the present disclosure has been shown and described with respect to one or implementations, those skilled in the art will think of equivalent variations and modifications based on the reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations, and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (such as it is functionally equivalent), even if the structure is not equivalent to the disclosed structure of the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that may be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".
[0156] The functional units in the embodiments of the present invention may be integrated into a processing module, or each unit may exist physically separately, or multiple or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc. The above-mentioned devices or systems may execute the storage method in the corresponding method embodiment.
[0157] To sum up, the above embodiment is an implementation mode of the present invention, but the implementation mode of the present invention is not limited by the embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A temporal knowledge graph alignment method, characterized in that: The following steps are involved: Obtain medical knowledge graph with temporal knowledge; The entities in the medical knowledge graph are generated into entity structure representation to obtain structural features, including: obtaining entity representation through relational projection of adjacent information; connecting representations of different layers to generate entity structure representation; generating aggregation relation representation, aggregation time representation and adjacent time embedding of l hop embedding; A time relationship graph is constructed for each entity to further encode the time information and obtain the time feature. In the time relationship graph, the core node is the entity , the edge is the relationship associated with the entity, and the node on the other side of the edge is the time interval label; The structural features and temporal features are converted into similarity matrices, and then the multi-channel similarity matrices are fused to obtain the final result; Output the aligned medical knowledge graph.
2. The temporal knowledge graph alignment method according to claim 1, characterized in that: The entity representation is obtained by relational projection of adjacent information, and is specifically described as follows: ; in, and Is Entity In the Layer and +1 layer representation, Is Entity In the The layer representation, It's a relationship , T represents the transposition operation, and are the initial entity and relationship features, and are randomly initialized; Is Entity The adjacent entities of Representing Entities and A set of relationships between The calculation formula is: ; is the carrier of attention, which selects the most critical relationship from all edges connected to the entity, It's a relationship The expression, Representing Entities ; The entity structure is represented as ,in Indicates splicing, is the number of layers; The embedding l-hop aggregation relationship is expressed as: ; in Representing Entities The set of relations within l hops, is the corresponding relation embedding, and the final adjacent relation embedding is expressed as ,in is the number of hops; The aggregation time embedded in l hop is expressed as: ; in, Representing Entities The time information set within l hops, is the time label embedding, which is randomly initialized; The adjacent time embedding is expressed as: , in, is the second hop number.
3. The temporal knowledge graph alignment method according to claim 2, characterized in that: Representing time information into year granularity and date granularity; According to the formula of adjacent time embedding representation, the year granularity representation and date granularity representation are obtained, that is, and , which fuse to produce : ; ; in and is a trainable parameter; The entity representation is fused with neighboring relations and temporal information to generate the final representation: ; Trained Embeddings is forwarded to the decoding stage.
4. The temporal knowledge graph alignment method according to claim 3 is characterized in that: The temporal relationship graph is directional, wherein an outward edge indicates that the core node is the head entity of the original quadruple, and an inward edge indicates that the core node is the tail entity of the quadruple; For entities , each edge All with a weight Related: ; in Indicates the entity involved ,relation and the number of quadruplets in time interval t, weight express The constructed time relationship diagram is represented as ; In order to represent multi-granularity time information, the year time interval is abstracted from the original date interval. Therefore, each entity is associated with two time relationship graphs, namely, and .
5. The temporal knowledge graph alignment method according to claim 4, characterized in that: Use an automatic relationship alignment algorithm to make the relationships in different temporal knowledge graphs comparable: First, for every two entity pairs in the labeled data , , respectively retrieve the quadruple involving entities in the two temporal knowledge graphs, namely and , and Represent the source and target temporal knowledge graphs respectively; Then, extract the relations in the quadruple and , forming a pair of pseudo alignment relationships ; By enumerating all , and obtain a set of pseudo-alignment relationships: ; statistics exist co-occurrences, and if the number of co-occurrences exceeds a given threshold , and at the same time respectively or If it is more than 30% of the total occurrences of are aligned, thus obtaining a set of alignment relationships .
6. The temporal knowledge graph alignment method according to claim 5, characterized in that: Each entity The time relationship diagram is represented as a matrix , the dimension is , where the row index is the relationship and the column index is the time interval; if the entity exist , then set the weight to , if it does not exist, the value is set to 0; the entire time matrix of the knowledge graph is represented as a three-dimensional matrix , whose dimension is , in order to make the temporal relationship graphs in the source and target temporal knowledge graphs comparable, only the aligned relationship sets are considered and the temporal matrix is converted to the dimension , when distinguishing between year and date granularity, the year matrix and date matrix are expressed as and ; For entities that lack temporal information, the network structure of the graph is used to aggregate the temporal information of the multi-hop neighbors of the entity.
7. The temporal knowledge graph alignment method according to claim 6, characterized in that: The similarity matrix is expressed as: ; in Represents structural features, Represents time characteristics, and Represent the source and target temporal knowledge graphs respectively, and is a hyperparameter that weighs the weights. is the alignment inference algorithm. Since the time matrix is three-dimensional, for each The obtained similarity matrix is averaged to obtain a dimension of The multi-channel entity similarity matrix of is the dimension of the source temporal knowledge graph similarity matrix, is the dimension of the target temporal knowledge graph similarity matrix; based on ,For each source entity, the target entity with the maximum similarity score is retrieved and taken as the alignment.
8. The temporal knowledge graph alignment method according to claim 7, characterized in that: The steps for generating a medical knowledge graph with temporal knowledge are as follows: From the existing knowledge graph, integrate facts, tense facts, start and end times of facts and create quadruples; Select entities associated with multi-temporal relations from the knowledge graph to generate several entity pairs, which are called preliminary seeds; Extracting quadruplets related to these preliminary seeds from the respective knowledge graphs, selecting entities present in the mapping to filter the quadruplets, and obtaining a number of pairs, which are used to retrieve facts from the respective knowledge graphs to form the final knowledge graph subsets on each side; In the beta version, 28% and 14% of the temporal facts contain month-day information, respectively, for subsets of the knowledge graph; To create a new time-aligned scene: Many-to-many or many-to-one alignments, where at least one entity to be aligned is associated with multiple temporal relations; Many-to-none or one-to-one alignments, where at least one of the entities to be aligned is not associated with any temporal relationship; No alignment, where neither entity is associated with any temporal relationship.
9. The temporal knowledge graph alignment method according to claim 1, characterized in that: The time series knowledge graph includes at least one of the PromptCBLUE Chinese medical large model evaluation benchmark dataset and the NEJM-AI Benchmarking nephrology medical question-and-answer dataset.
