MSM-FT graph attention network based on multivariable blood glucose prediction
By using the MSM-FT graph attention network, Fourier transform and multi-scale time patch layers are used to extract features from multivariate blood glucose data, which solves the problem of difficulty in capturing multivariate relationships in existing technologies and achieves more efficient prediction performance and resource utilization.
Patent Information
- Application Number
- CN202410599188.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-11-18
AI Technical Summary
Existing graph neural network-based prediction methods struggle to effectively capture the latent feature relationships between multiple variables in the medical field, especially when spatiotemporal interdependencies are separated, which affects prediction performance.
A multivariate blood glucose prediction MSM-FT graph attention network is adopted. Features are extracted through Fourier transform and multi-scale time patch layers. The feature weighting and fusion are combined with multi-scale attention blocks and feedforward network to achieve feature extraction and prediction at multiple time scales.
It improves the ability to mine relationships between multivariate data, enhances prediction performance, saves computing resources, and makes better predictions by combining spatiotemporal dependencies.
Smart Images

Figure CN120975124A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a multi-time scale fusion Fourier graph attention network, in particular to a multi-time scale fusion graph attention network capable of predicting multivariate blood glucose values. BACKGROUND
[0002] At present, graph neural networks (GNN) in the medical field are mostly applied to drug discovery and design, disease diagnosis and prediction, protein structure and interaction prediction, medical image analysis, and disease transmission modeling. There is a large problem in the medical prediction field that needs to be solved, which is the influence of multivariate data on prediction effect. The relationship between multivariate data can be divided into linear correlation and nonlinear correlation, positive and negative correlation, and causal relationship. The traditional neural network has limited ability to extract the feature relationship between multivariate data, while the GNN can extract the potential features of multivariate data in the non-Euclidean space domain. In recent years, the application of Fourier graph neural network in multivariate prediction has gradually increased, but it is less applied to the medical time series prediction field.
[0003] Junchen Ye et al. model the multivariate time series data as a graph structure. In order to capture the correlation of different scales in the data, the concept of multi-scale is introduced, that is, time windows of different lengths are used to observe the relationship between variables at different time scales. An evolutionary algorithm is used to learn the optimal multi-scale graph structure to maximize the accuracy of time series prediction. On this basis, a graph convolutional network model is used to extract features in the graph structure and make time series prediction, as shown in Figure 3 ;
[0004] Zonghan Wu et al. proposed a general graph neural network framework designed for multivariate time series data. The graph learning module is used to automatically extract the one-way relationship between variables, and the graph convolution layer in space and the dilated convolution layer in time are further improved to capture the spatial and temporal dependencies in the time series, thereby improving the prediction effect of traffic flow data, as shown in Figure 4 ;
[0005] However, the existing prediction method based on the graph neural network usually needs a graph network and a time network to capture the spatial dynamics and temporal dependencies. The separated space-time modeling violates the unified space-time interdependent relationship in the real world, which greatly hinders the prediction performance, and the existing network has difficulty in extracting the potential features between multivariate data.
[0006] Therefore, an MSM-FT graph attention network based on multivariate blood glucose prediction is proposed. SUMMARY
[0007] The purpose of this invention is to provide an MSM-FT graph attention network based on multivariate blood glucose prediction to solve the problems mentioned in the background art.
[0008] To achieve the above objectives, the present invention provides the following technical solution: an MSM-FT graph attention network based on multivariate blood glucose prediction, comprising the following steps:
[0009] S1. In the data preprocessing stage, a hypervariable graph is modeled for the input blood glucose-related multivariable data. Through node embedding, the information of the original nodes can be converted into vector representation. Then, the hypervariable graph is input into the frequency domain space through Fourier transform, and feature extraction is performed using operators. The time domain features are returned after inverse Fourier transform.
[0010] S2. Input the preprocessed sequence data into the multi-scale time patch layer. The layer contains an encoder and a decoder. The encoder encodes the input to obtain a low-dimensional representation, and the output is obtained through the mapping function. The remaining connections of each layer are used as the input of the next layer, and the mapping output is accumulated layer by layer.
[0011] S3. The features extracted from the two paths are weighted and fused, and then input into a multi-scale attention block (EMA). A linear transformation is performed through a linear layer, and the weights are calculated through attention. The results are then connected and output as prediction results through a feedforward network.
[0012] Preferably, in step S1, a multivariate time series window is given, defined as n variable inputs at a certain time. Each element of the input is regarded as a node of the hypervariable graph. The hypervariable graph is used as an adjacency matrix through a fully connected layer to represent the feature relationship between the nodes.
[0013] Preferably, in step S1, the node embedding layer makes the features more concrete, the Fourier transform makes the complex feature extraction more convenient, and the Fourier graph operator (FGO) is the core of the network, similar to the convolutional network in the time domain, which has lower time complexity and deeper feature extraction.
[0014] Preferably, in step S1, the output of the previous FGO is used as the input of the next FGO, and the output of each graph operator is activated by σ. Finally, the activated output is combined with the recursive output features of the graph operator and transformed into the time domain output through inverse Fourier transform.
[0015] Preferably, in step S2, the input data X is processed and input into a multi-scale temporal network. The network consists of n MSD layers, and the low-dimensional features E processed by the MSD layers are... i and data S i As output, each S i The data serves as input to the next MSD layer, and is simultaneously processed by the current layer's S...i+1 The data are subtracted to identify differences in their characteristics, and these differences are then applied to each layer of the network.
[0016] Preferably, in step S2, each E i The features are summed as the final output. Feature differential is used to avoid extracting features at repeated time scales. Each MSD layer contains a patch / depatch layer, a patch encoding / decoding layer, and a function representation layer for low-dimensional features.
[0017] Preferably, in step S2, the patch layer processing method involves using the user-defined patch size (p) as a parameter to perform a two-dimensional transformation on the sequence data. The unpatch layer, on the other hand, transforms two-dimensional data into sequential data.
[0018] Preferably, the outputs of the two networks in S3 are first weighted and fused, and then passed through a multi-scale attention layer (EMA) and a feedforward network, i.e., a fully connected layer (FeedFNet), to obtain the final prediction result.
[0019] Compared with the prior art, the beneficial effects of the present invention are:
[0020] 1. Graph networks can better combine the dependencies between time and space, eliminating the impact of separate spatiotemporal modeling.
[0021] 2. Improve predictive performance by better uncovering potential relationships between multivariate data across multiple time scales.
[0022] 3. Processing data in the frequency domain can save more computing resources and improve efficiency. Attached Figure Description
[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a Fourier diagram of the attention architecture of the present invention;
[0025] Figure 2 This is a diagram of the multi-scale Fourier graph attention architecture of the present invention;
[0026] Figure 3 This paper proposes to extract features from graph structures and perform temporal prediction graphs based on existing graph convolutional network models.
[0027] Figure 4 A general graph neural network framework designed for existing time series data is shown in the diagram. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Please see Figures 1 to 4 The present invention provides a technical solution:
[0030] A multivariate glucose prediction-based MSM-FT graph attention network includes the following steps:
[0031] S1. In the data preprocessing stage, a hypervariable graph is modeled for the input blood glucose-related multivariable data. Through node embedding, the information of the original nodes can be converted into vector representation. Then, the hypervariable graph is input into the frequency domain space through Fourier transform, and feature extraction is performed using operators. The time domain features are returned after inverse Fourier transform.
[0032] S2. Input the preprocessed sequence data into the multi-scale time patch layer. The layer contains an encoder and a decoder. The encoder encodes the input to obtain a low-dimensional representation, and the output is obtained through the mapping function. The remaining connections of each layer are used as the input of the next layer, and the mapping output is accumulated layer by layer.
[0033] S3. The features extracted from the two paths are weighted and fused, and then input into a multi-scale attention block (EMA). A linear transformation is performed through a linear layer, and the weights are calculated through attention. The results are then connected and output as prediction results through a feedforward network.
[0034] Given a multivariate time series window defined as n variable inputs at a given time step, each input element is considered a node in a hypervariable graph. A fully connected layer transforms the hypervariable graph into an adjacency matrix, representing the feature relationships between nodes. Node embedding layers make the features more concrete, while Fourier transforms simplify complex feature extraction. The Fourier Graph Operator (FGO), as the core of the network, is similar to a convolutional network in the time domain, offering lower time complexity and deeper feature extraction. The output of the previous FGO serves as the input for the next FGO, and the output of each graph operator is activated by σ. Finally, the activated output is combined with the recursive output features of the graph operators and transformed into a time-domain output through an inverse Fourier transform.
[0035] Meanwhile, the input data X is processed and fed into a multi-scale temporal network, which consists of n MSD layers. The low-dimensional features E processed by the MSD layers are then processed. i and data S i As output, each S i The data serves as input to the next MSD layer, and is simultaneously processed by the current layer's S... i+1 The data are subtracted to identify differences in their characteristics, and these differences are applied to each layer of the network. Each E... i The features are summed to produce the final output. Feature differential is used to avoid extracting features at repeated time scales. Each MSD layer contains a patch / depatch layer, a patch encoding / decoding layer, and a function representation layer for low-dimensional features. The patch layer processes the sequence data using a user-defined patch size (p) as a parameter, performing a two-dimensional transformation based on this size. The unpatch layer, on the other hand, transforms the two-dimensional data into sequential data. Finally, the outputs of the two networks are weighted and fused, then passed through a multi-scale attention layer (EMA) and a feedforward network, i.e., a fully connected layer (FeedFNet), to obtain the final prediction result.
[0036]
[0037] in, Represents a hypervariable diagram, S 0:k Let FGO at level K satisfy the following condition: W represents the weight matrix, A represents the adjacency matrix, and b represents the complex-valued deviation. σ represents the Discrete Fourier Transform; σ is the activation function. Its core operation is equivalent to the recursive multiplication and summation of nonlinear activation functions. Specifically, The recursive multiplication between S and S is equivalent to multi-order convolution on a graph structure. The introduction of a non-linear activation function addresses the limitation in modeling the non-linear information diffusion on the graph during summation.
[0038]
[0039]
[0040] In multi-scale networks, the above equation z k The autocorrelation coefficient matrix of the layer is a i,j , z i,j Indicate z k For the i-th channel and j-th time step, the first term imposes a constraint on the autocorrelation coefficient of the residuals, where α is a hyperparameter controlling the maximum tolerance of the autocorrelation coefficient. This constraint is achieved by minimizing the mean square of the residuals, i.e., by... Multiplication eliminates the magnitude information of the input time series in the original data. Finally, the network is trained by simultaneously optimizing the weighted sum of the task-specific loss and the residual loss.
[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A MSM-FT graph attention network based on multivariate blood glucose prediction, characterized in that: Includes the following steps: S1. In the data preprocessing stage, a hypervariable graph is modeled for the input blood glucose-related multivariable data. Through node embedding, the information of the original nodes can be converted into vector representation. Then, the hypervariable graph is input into the frequency domain space through Fourier transform, and feature extraction is performed using operators. The time domain features are returned after inverse Fourier transform. S2. Input the preprocessed sequence data into the multi-scale time patch layer. The layer contains an encoder and a decoder. The encoder encodes the input to obtain a low-dimensional representation, and the output is obtained through the mapping function. The remaining connections of each layer are used as the input of the next layer, and the mapping output is accumulated layer by layer. S3. The features extracted from the two paths are weighted and fused, and then input into a multi-scale attention block (EMA). A linear transformation is performed through a linear layer, and the weights are calculated through attention. The results are then connected and output as prediction results through a feedforward network.
2. The MSM-FT graph attention network based on multivariate blood glucose prediction according to claim 1, characterized in that: In step S1, a multivariate time series window is given, defined as n variable inputs at a certain time. Each element of the input is regarded as a node of the hypervariable graph. The hypervariable graph is used as an adjacency matrix through a fully connected layer to represent the feature relationship between the nodes.
3. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 2, characterized in that: In step S1, the node embedding layer makes the features more concrete, the Fourier transform makes the complex feature extraction more convenient, and the Fourier graph operator (FGO), as the core of the network, is similar to the convolutional network in the time domain, with lower time complexity and deeper feature extraction.
4. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 3, characterized in that: In step S1, the output of the previous FGO is used as the input of the next FGO. At the same time, the output of each graph operator is activated by σ. Finally, the activated output is combined with the recursive output features of the graph operators and transformed into the time domain output through inverse Fourier transform.
5. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 1, characterized in that: In step S2, the input data X is processed and input into a multi-scale temporal network. The network consists of n MSD layers, and the low-dimensional features E processed by the MSD layers are... i and data S i As output, each S i The data serves as input to the next MSD layer, and is simultaneously processed by the current layer's S... i+1 The data are subtracted to identify differences in their characteristics, and these differences are then applied to each layer of the network.
6. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 5, characterized in that: In step S2, each E i The features are summed as the total output. Feature differentiation is used to avoid extracting features at repeated time scales. Each MSD layer contains a patch / unpatch layer, a patch encoding / decoding layer, and a function representation layer for low-dimensional features.
7. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 6, characterized in that: In step S2, the patch layer is processed by using the user-defined patch size (p) as a parameter to perform a two-dimensional transformation on the sequence data. The unpatch layer, on the other hand, transforms two-dimensional data into sequential data.
8. The MSM-FT graph attention network for multivariate blood glucose prediction according to claim 1, characterized in that: In S3, the outputs of the two networks are first weighted and fused, and then passed through a multi-scale attention layer (EMA) and a feedforward network, i.e., a fully connected layer (FeedFNet), to obtain the final prediction result.