Time sequence knowledge graph double-layer tensor decomposition method for cognitive impairment after stroke
Through the three-stage completion method of dynamic timing knowledge graph, combined with Tucker decomposition and tensor ring decomposition, a two-layer tensor decomposition model was constructed, which solved the problem of insufficient prediction accuracy of post-stroke cognitive dysfunction in large-scale and complex stroke scenarios, and achieved efficient data characterization and prediction.
Patent Information
- Application Number
- CN202510379001.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art is difficult to have both strong expression ability and low complexity timing knowledge graph prediction models in large-scale and complex large-scale stroke scenarios, resulting in insufficient prediction accuracy of cognitive dysfunction after stroke.
A three-stage completion method based on dynamic timing knowledge graph is adopted, and a two-layer tensor decomposition model is constructed through time dimension analysis, Tucker decomposition and tensor ring decomposition, a vectorized representation with spatiotemporal correlation characteristics is generated, and candidate knowledge is screened through confidence thresholds for graph completion.
It significantly improves the data characterization and prediction accuracy of post-stroke cognitive dysfunction, reduces model complexity, solves the parameter expansion bottleneck of traditional models, and is suitable for medical data analysis with strong timing dependence.
Smart Images

Figure CN120338065A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for two-layer tensor decomposition of a temporal knowledge graph for post-stroke cognitive impairment, which can effectively improve data representation and the accuracy of predicting post-stroke cognitive impairment in large-scale complex stroke scenarios. Technical Background
[0002] With the rapid development of China's economy, the improvement of people's living standards, and the change of lifestyle, the risk factors for stroke, such as disease factors like hypertension, diabetes, hyperlipidemia, and atrial fibrillation, behavioral factors like smoking, drinking, and exercise, and environmental factors like air pollution, are increasing day by day, resulting in an upward trend in the incidence and mortality of stroke. As early as in 1997, stroke had surpassed malignant tumors to become the leading cause of death among Chinese residents. At the same time, stroke is also the disease with the highest disability rate for a single disease. However, in the treatment of stroke, people mainly focus on the rehabilitation of physical function and easily ignore the rehabilitation of cognitive impairment caused by stroke. A series of syndromes that meet the diagnostic criteria for cognitive impairment within 6 months after stroke are post-stroke cognitive impairment, which is one of the common complications of stroke.
[0003] During the treatment of post-stroke cognitive impairment, about 25% of stroke survivors will have a recurrence within 2 years, and about 40% of patients will have a recurrence within 5 years. After the first stroke, the risk of secondary recurrence is 9 times higher than that of the healthy population, and the prognosis is worse. 70%-80% often leads to severe disability or death, and the risk of dementia after secondary recurrence is at least 2 times higher than that of the first stroke. Therefore, accurately identifying the occurrence time of post-stroke cognitive impairment and predicting the occurrence probability can greatly reduce the impact of post-stroke cognitive impairment and ensure the quality of life and life health of patients.
[0004] The emergence of knowledge graphs brings possibilities to this field. By structured expression, the mutual relationship between patients and post-stroke cognitive impairment can be effectively combined. Each fact can be represented as a triple (head entity, relation, tail entity), such as (Zhang San, suffering from, stroke). A temporal knowledge graph is a graph-structured expression of time-sensitive facts, and each fact can be represented as a quadruple (head entity, relation, tail entity, [timestamp]), such as "(Zhang San, suffering from, stroke, [2000 - 2021])". Temporal knowledge graph prediction aims to answer queries about missing facts, mainly in the form of (head entity, relation, *, [timestamp]), such as (Zhang San, suffering from, *, [2000 - 2021]).
[0005] To effectively improve data representation and the accuracy of predicting post-stroke cognitive impairment in large-scale complex stroke scenarios, tensor decomposition models have been widely explored due to their light weights, ease of training, and good mathematical interpretability, showing good results in temporal knowledge graph prediction. Despite the relative success of such models in the early stage, it is still difficult to simultaneously have strong expressive power and low complexity (in terms of space complexity). Weak expressive power and low complexity: ComplEX and TComplEx respectively apply CP decomposition in static knowledge graphs and temporal knowledge graphs. However, such models are not fully expressive, that is, they can only represent all relationships under time series, which means poor performance. Strong expressive power and high complexity: Tucker and TuckerT respectively use Tucker decomposition in static knowledge graphs and temporal knowledge graphs. Although such models are proven to be fully expressive, the core tensor will face the curse of dimensionality problem, that is, as the entity embedding dimension increases, the complexity (or computational cost) grows exponentially. Too complex models usually overfit, which is not applicable in practical applications. Other commonly used tensor ring decomposition models also have the same disadvantages, such as RT, LowFER, S2S. Therefore, the problem of a temporal knowledge graph prediction model that simultaneously has strong expressive power and low complexity remains unsolved. Summary of the Invention
[0006] To solve the above deficiencies in the prior art, different from the high-complexity and low-expressive power modeling of existing methods, the present invention addresses the above two challenges from the perspective of low complexity and high expressive power. The innovation of the present invention lies in: the present invention proposes a three-stage completion method based on a dynamic temporal knowledge graph. First, the temporal graph structure is analyzed in the time dimension, the knowledge metadata is clustered into discrete sets through temporal tags, multi-level subgraph units are constructed based on the knowledge elements within each set, and a dependency network across subgraphs is established to support knowledge reasoning; secondly, a tensor decomposition architecture is used to process the subgraph units, and through two tensor decompositions, Tucker decomposition and tensor ring, vectorized representations with spatio-temporal correlation characteristics are generated; in the final stage, through the similarity analysis of the vectorized representations, the candidate knowledge with the highest confidence threshold is selected for graph completion, so as to achieve accurate prediction of missing facts.
[0007] To achieve the above invention purpose, a technical solution adopted by the present invention is: a temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment, including the following steps:
[0008] Step 1: Construct a dynamic knowledge subgraph system. A temporal knowledge graph is constructed according to post-stroke cognitive impairment, and the original temporal knowledge graph is cut into a set of continuous knowledge units Graph = {G1, G2,... G t} based on timestamp features, and each subgraph unit contains four-dimensional structural features G t={s, r, o, τ}, where the head entity s ∈ S, the relation r ∈ R, the tail entity o ∈ O, and the time stamp τ ∈ T. S is the set of the head entities s, R is the set of the relations r, O is the set of the tail entities o, and T is the set of the time stamps τ. Through the slicing operation in the time dimension, a sequence of subgraphs with time correlation is formed, providing an input topological structure with time series characteristics for subsequent tensor modeling.
[0009] Step 2: Implement the outer Tucker tensor decoupling operation. Input the post-stroke cognitive impairment knowledge subgraph in Step 1 into the double-layer tensor decomposition model. In the outer layer, to ensure strong expressive ability, a Tucker decomposition is constructed to decompose the temporal knowledge graph of the original quadruple into a core tensor and factor matrices, and the quadruple knowledge unit is decomposed into {G1, G2,... G n}, where each member tensor is composed of a core tensor and three factor matrices, that is, G ≈ g × 1S × 2R × 3O, where is the core tensor, represents the factor matrix of the head entity, represents the factor matrix of the relation, represents the factor matrix of the tail entity, and × n represents the n-mode product. The factor matrix can be regarded as a linear transformation matrix of each order, and the core tensor can be regarded as a low-dimensional representation of the original quadruple. Through the n-mode product operation, the low-rank approximation of the high-dimensional tensor is realized, and the potential correlation characteristics and interaction information between entities and between entities and relations are captured.
[0010] Step 3: Implement the inner tensor ring decoupling operation. Since the core tensor of the model contains a large number of parameters, in order to obtain a lower model complexity, a new fully connected tensor ring method is introduced in the inner layer. The outer core tensor is reconstructed into a chain product structure by using the tensor ring decomposition, that is, G = TR(g1, g2,…g n ). Through the dimension folding mechanism, the parameter space is effectively reduced and the complex high-order core tensor in the outer layer is reconstructed, realizing the optimization control of the model complexity.
[0011] Step 4: Dynamic knowledge completion verification. Based on the embedding vectors obtained by tensor decomposition, a confidence evaluation function is constructed, and candidate entities are screened by probability ranking. An iterative optimization strategy is adopted for multiple rounds of training. Each time, candidate knowledge is selected according to the confidence threshold for graph completion until the loss function converges to the threshold interval, and finally a complete knowledge graph with time continuity is output. This process effectively maintains the coherence of the time series logic through the tensor constraint of the time stamp feature.
[0012] The beneficial effects of the present invention are as follows: First, the present invention first establishes a time-series feature modeling system for post-stroke cognitive impairment, upgrades traditional entity relationship analysis to time-dimensional feature analysis, and realizes hierarchical representation of timestamps through dynamic tensor topology reconstruction technology. By using multi-order tensor operations, the timestamp characteristics are integrated into the spatial distribution of the core tensor and the factor matrix, and a decomposition architecture with time perception ability is constructed, significantly reducing computational redundancy while maintaining prediction accuracy. Second, through the double-layer coupling mechanism of tensor chain deconstruction and circular constraint, the parameter inflation bottleneck of traditional decomposition models is broken through. The outer layer uses a time-series encoder to realize multi-modal projection of four-dimensional tensors, and the inner layer establishes a parameter sharing channel through tensor ring dimension folding technology, enabling the model to maintain high-order feature expression ability while capturing the entity interaction rules across time segments and realizing intelligent optimization of model complexity. Finally, an innovative time-series correlation constraint mechanism is designed, and a dynamic weight allocation algorithm is used to jointly model multi-timestamp facts. By establishing a composite evaluation function of time decay factor and position encoding, the contribution degree of historical events to the current prediction is accurately quantified, effectively solving the interference problem caused by the time drift phenomenon, and is particularly suitable for medical data analysis with strong time-series dependence such as post-stroke cognitive impairment. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is an example diagram of Tucker decomposition in an embodiment;
[0014] Figure 2 It is an example diagram of tensor ring decomposition in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] The present invention will be further described below with reference to the drawings and embodiments.
[0016] A two-layer tensor decomposition method for time-series knowledge graph oriented to post-stroke cognitive impairment includes the following steps:
[0017] Step 1: Construct a dynamic knowledge subgraph system. According to post-stroke cognitive impairment, construct a time-series knowledge graph, and based on the timestamp characteristics, cut the original time-series knowledge graph into a set of continuous knowledge units. Through slicing operations in the time dimension, a sequence of subgraphs with time correlation is formed, providing an input topological structure with time-series characteristics for subsequent tensor modeling.
[0018] The time-series knowledge subgraph of post-stroke cognitive impairment mainly consists of four parts, defined as:
[0019] Graph = {G1, G2, … G t}(1)
[0020] G t = {s, r, o, τ}(2)
[0021] Among them, each sub-graph unit of post-stroke cognitive impairment contains four-dimensional structural features, where the head entity \(s\in S\), the relationship \(r\in R\), the tail entity \(o\in O\), and the timestamp \(\tau\in T\). \(S\) is the set of the head entity \(s\), \(R\) is the set of the relationship \(r\), \(O\) is the set of the tail entity \(o\), and \(T\) is the set of the timestamp \(\tau\).
[0022] Step 2: Input the temporal knowledge sub-graph of post-stroke cognitive impairment constructed in Step 1 into the outer Tucker tensor decomposition model to capture the potential correlation features and interaction information between entities and between entities and relationships.
[0023] As Figure 1 shown, first, decompose the knowledge units in the sub-graph into \(\{G1, G2,...G n \}\), where each member tensor is composed of a core tensor and three factor matrices, defined as:
[0024] \(G\approx g\times_1 S\times_2 R\times_3 O^{(3)}\)
[0025] where \(g\) is the core tensor, \(S\) represents the factor matrix of the head entity, n \(R\)
[0026] represents the factor matrix of the relationship, Figure 2 \(O\)
[0027] represents the factor matrix of the tail entity, and \(\times n \) represents the n-mode product.
[0026] Step 3: Further decompose \(g\) in \(G\approx g\times_1 S\times_2 R\times_3 O\) obtained in Step 2. As Figure 2
[0027] m \(k\) m shown, use tensor ring decomposition to reconstruct the outer core tensor into a chain product structure, defined as:
[0030] \(G = TR(g_1, g_2,\ldots g
[0031]
[0032] n )(4)
[0028] where \(TR\) is the tensor unit, which effectively reduces the parameter space through the dimension folding mechanism and reconstructs the complex high-order core tensor of the outer layer, realizing the optimization control of the model complexity, defined as:
[0029] \(g\approx trace\{G_1^{k_1}, G_2^{k_2}\ldots G m k m \}(5)
[0030] where \(trace\) is the trace operation of the matrix. Further, we can get:
[0031]
[0032] Step 4: Calculate the confidence score of the missing knowledge based on the embedded vector representation of the temporal knowledge subgraph of post-stroke cognitive impairment, and add the post-stroke cognitive impairment knowledge with the highest confidence score to the temporal knowledge graph to improve the accuracy of predicting missing facts.
[0033] The confidence score is defined as:
[0034]
[0035] where is the training batch, is the negative sample obtained by replacing the positive sample (o, r, s, τ).
[0036] Based on the present invention, it is possible to effectively improve the data representation and the accuracy of predicting post-stroke cognitive impairment in a large-scale complex stroke scenario.
Claims
1. A two-layer tensor decomposition method for a temporal knowledge graph oriented to post-stroke cognitive impairment, characterized in that, The method includes the following steps: (1) Construct a temporal knowledge graph based on post-stroke cognitive impairment. Construct a set of continuous knowledge units by slicing the original temporal knowledge graph based on timestamp features. Through slicing operations in the time dimension, a sequence of subgraphs of post-stroke cognitive impairment with temporal relevance is formed, providing an input topological structure with temporal features for subsequent tensor modeling; (2) Input the post-stroke cognitive impairment knowledge subgraph into a two-layer tensor decomposition model. Construct Tucker decomposition in the outer layer to decompose the original four-tuple temporal knowledge graph into a core tensor and factor matrices. The factor matrices are regarded as linear transformation matrices of each order, and the core tensor is regarded as a low-dimensional representation of the original four-tuple. Through n-mode product operations, low-rank approximation of high-dimensional tensors is achieved, capturing potential correlation features and interaction information between entities, and between entities and relationships; (3) Further reconstruct the Tucker decomposition core tensor. In the inner layer, use tensor ring decomposition to reconstruct the outer layer core tensor into a chained product structure; the tensor ring decomposition is a chained tensor decomposition structure, which includes a series of cyclic multilinear products on low-dimensional cores to represent large-dimensional tensors, realizing the cyclic interconnection of third-order tensors; (4) Calculate the confidence score of missing knowledge according to the embedding vector representation of the temporal knowledge subgraph of post-stroke cognitive impairment, and add the knowledge with the highest confidence score to the temporal knowledge graph of post-stroke cognitive impairment to improve the accuracy of predicting missing facts.
2. The method for double-layer tensor decomposition of the temporal knowledge graph for post-stroke cognitive impairment according to claim 1, wherein The knowledge set described in step (1) refers to constructing a knowledge set Graph according to the time intervals of the knowledge in the temporal knowledge graph of post-stroke cognitive impairment; the post-stroke cognitive impairment knowledge subgraph refers to obtaining from the knowledge in the knowledge set Graph Graph = {G1, G2, … G t}, where t represents the number of temporal knowledge subgraphs of post-stroke cognitive impairment.
3. The temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment according to claim 2, wherein Each sub-graph unit contains a four-dimensional structural feature G t = {s, r, o, τ}, where the head entity s ∈ S, the relation r ∈ R, the tail entity o ∈ O, and the timestamp τ ∈ T; S is the set of the head entities s, R is the set of the relations r, O is the set of the tail entities o, and T is the set of the timestamps τ.
4. The temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment according to claim 1, wherein The outer Tucker decomposition G described in step (2) consists of four parts, namely G≈g×1S×2R×3O; where is the core tensor, represents the factor matrix of the head entity, represents the factor matrix of the relation, represents the factor matrix of the tail entity, × n represents the n-mode product; the input of the Tucker decomposition is the knowledge subgraph of post-stroke cognitive impairment, and the output is several initial sub-member tensors {g1, g2,... g n}, where each sub-member tensor is composed of a core tensor and three factor matrices.
5. The temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment according to claim 1, wherein The Tucker decomposition in step (2) is a process of transforming the original tensor through a set of factor matrices to obtain the corresponding low-dimensional core tensor.
6. The temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment according to claim 1, wherein The tensor ring decomposition in step (3) is established in the following two steps: (1) Reshape the core tensor g of the Tucker decomposition into G = TR(g1, g2, … g n ) through the TR decomposition; (2) Apply the trace(·) operation to the reshaped core tensor g, and further decompose it as g≈trace{G1k1,G2k2…G m k m}.
7. The temporal knowledge graph double tensor decomposition method for post-stroke cognitive impairment according to claim 1, characterized in that The confidence score in step (4) is: Among them is the training batch is the negative sample obtained by replacing the positive sample (o, r, s, τ).