ADHD brain function connection dynamic characterization system and method based on space-time diagram
By using a spatiotemporal graph-based dynamic representation system for ADHD brain functional connectivity, the problem of neglecting individual heterogeneity and time-varying dynamics in existing methods is solved, achieving high-accuracy dynamic representation of ADHD brain functional connectivity and improving the model's generalization ability in small sample scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGCHUN UNIV
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-12
AI Technical Summary
Existing deep learning methods, when constructing dynamic representations of brain functional connectivity in ADHD, neglect individual heterogeneity and time-varying dynamics, fail to effectively capture the spatiotemporal coupling characteristics of EEG, and have limited generalization ability in small sample scenarios.
A spatiotemporal graph-based dynamic representation system for ADHD brain function connectivity is adopted, which includes modules such as data preprocessing, node feature encoding, adaptive graph construction, stacked spatiotemporal graph convolution, graph pooling and global representation learning, and contrastive learning. The adaptive graph construction module discovers individualized topologies, combines Top-K sparsity and prior knowledge fusion, uses bi-branch spatiotemporal graph convolution for spatiotemporal joint modeling, and improves the model's generalization ability through a multi-view contrastive learning framework.
It achieved 90.1% accuracy and 89.9% F1 score on clinical EEG datasets, a 2.5% improvement over baseline methods. It performed well in small sample scenarios, and the learned functional connectivity patterns were consistent with neuroscience findings.
Smart Images

Figure CN121687549B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of medical image processing and artificial intelligence, specifically relating to a dynamic representation system and method for ADHD brain functional connectivity based on spatiotemporal graphs. Background Technology
[0002] Attention deficit hyperactivity disorder (ADHD) is a neurodevelopmental disorder in children, with a global prevalence of 5-7%. EEG-based ADHD classification methods have attracted much attention due to their non-invasiveness and high temporal resolution. However, existing deep learning methods face three key challenges in constructing dynamic representations of brain functional connectivity for ADHD: (1) they rely on static predefined graph structures, ignoring the individual heterogeneity and time-varying dynamics of functional connectivity; (2) they process temporal and spatial modeling sequentially, failing to capture the inherent spatiotemporal coupling characteristics of EEG; and (3) the generalization ability of purely supervised learning is limited in small sample scenarios. Summary of the Invention
[0003] To address the shortcomings of existing deep learning methods in constructing dynamic representations of ADHD brain functional connectivity, this application proposes a spatiotemporal graph-based dynamic representation system and method for ADHD brain functional connectivity.
[0004] The system includes:
[0005] Data preprocessing and node feature encoding module: Collects the subject's EEG signals and performs preprocessing; encodes the EEG signal of each channel into a feature vector through node feature encoding to obtain the node feature matrix;
[0006] The adaptive graph construction module performs node embedding learning, adaptive adjacency matrix generation, and prior knowledge fusion sequentially on the node feature matrix to obtain the final adjacency matrix. ;
[0007] The stacked spatiotemporal graph convolutional module consists of two layers: a first-layer spatiotemporal graph convolutional module and a second-layer spatiotemporal graph convolutional module. Within each layer, a temporal convolutional branch captures the temporal dynamic features within each node, while a graph convolutional branch aggregates spatial neighborhood information. The outputs of the temporal and graph convolutional branches are then fused using a gating mechanism to obtain fused features. The second-layer spatiotemporal graph convolutional module also utilizes residual connections to obtain residual fused features. ;
[0008] Graph Pooling and Global Representation Learning Module: Gradually updates the adjacency matrix using a hierarchical graph pooling strategy. and residual fusion features The adaptive graph readout mechanism is used to generate residual fusion features. Different importance weights are assigned to different nodes to obtain a global graph representation. Then, robustness enhancement operations are performed to finally obtain the final global graph representation. ;
[0009] The contrastive learning module enhances EEG signals using a multi-view data augmentation strategy; it constructs an InfoNCE loss function for contrastive learning; and it employs a two-stage training strategy to improve global graph representation. The accuracy rate.
[0010] Furthermore, node feature encoding is performed through a node feature encoding module, which adopts a one-dimensional temporal convolutional neural network architecture, containing three convolutional blocks and a global adaptive average pooling layer. Each convolutional block consists of a convolutional layer, a batch normalization layer, and a ReLU activation function: the first convolutional layer captures the short-term oscillation patterns of EEG, the second convolutional layer further extracts abstract temporal features, and the third convolutional layer enhances feature representation while maintaining temporal resolution. Global adaptive average pooling unifies feature sequences of different lengths into a fixed-length feature vector, resulting in the node feature matrix. .
[0011] Furthermore, node embedding learning specifically involves learning a low-dimensional embedding vector for each node to capture its intrinsic attributes and role in the graph. In progress, among which... Indicates the final node embedding, The parameter is Multilayer perceptron;
[0012] The adaptive adjacency matrix generation process involves: calculating the similarity between node pairs as edge weights based on the final node embedding, and then obtaining the similarity matrix. ,for For each node in the matrix, a Top-K sparsity strategy is used to obtain a sparse adjacency matrix. For sparse adjacency matrices After symmetry and normalization processing, a data-driven adaptive adjacency matrix is obtained. ;
[0013] Prior knowledge fusion specifically involves constructing a prior adjacency matrix based on the Euclidean distance between electrodes using Gaussian radial basis functions. The final adjacency matrix is obtained through weighted combination. : ,in These are learnable weight parameters.
[0014] Furthermore, in the first-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the first temporal convolution branch. Represents a temporal convolutional network;
[0015] The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the first layer graph convolution branch. Represents a graph attention network;
[0016] The fusion features of the first layer's convolutional branches are obtained through: Obtain, among which, For adaptive gating coefficients.
[0017] Furthermore, in the second-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the second-layer temporal convolution branch;
[0018] The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the second-layer graph convolution branch;
[0019] The fusion features of the second-layer graph convolutional branch are obtained through: get;
[0020] In the second-layer spatiotemporal graph convolutional module, residual fusion features are obtained through residual connections. Specifically: ,in, This indicates a regularization operation.
[0021] Furthermore, the hierarchical graph pooling strategy specifically involves: computing the node selection matrix. ,in, This represents the graph convolution operation. This indicates the number of layers in the hierarchical graph pooling strategy. ; Initially The following is by It is concluded that Initially The following is by It can be concluded that;
[0022] Global graph representation pass Obtain, among which, The number of channels for the EEG signal. express The Middle The feature vector of each node Indicates the first Attention weights for each node;
[0023] Final global graph representation pass Obtain, among which, Represents the projection layer weight matrix. This represents the projection layer bias vector. For activation function, ,in For averaging operations, This is for retrieving the maximum value.
[0024] Furthermore, multi-view data augmentation strategies include temporal domain augmentation, frequency domain augmentation, and graph structure augmentation;
[0025] The InfoNCE loss function is as follows: ;in, and These are representations of two enhanced views of the same sample. It refers to the batch size. It is an indicator function. It's a temperature parameter, a similarity function. Using cosine similarity: ;
[0026] The two-stage training strategy includes self-supervised pre-training and supervised fine-tuning.
[0027] The method provided by this invention includes the following steps:
[0028] The EEG signals of the subjects were collected and preprocessed; the EEG signals of each channel were encoded into feature vectors through node feature encoding to obtain the node feature matrix;
[0029] The node feature matrix is sequentially processed through node embedding learning, adaptive adjacency matrix generation, and prior knowledge fusion to obtain the final adjacency matrix. ;
[0030] Spatiotemporal graph convolution is performed using two layers of spatiotemporal graph convolution modules, comprising a first layer and a second layer. Within each layer, temporal convolution branches capture the temporal dynamic features within each node, while graph convolution branches aggregate spatial neighborhood information. The outputs of the temporal and graph convolution branches are then fused using a gating mechanism to obtain fused features. The second layer also utilizes residual connections to obtain residual fused features. ;
[0031] By employing a hierarchical graph pooling strategy, the adjacency matrix is updated incrementally. and residual fusion features The adaptive graph readout mechanism is used to generate residual fusion features. Different importance weights are assigned to different nodes to obtain a global graph representation. Then, robustness enhancement operations are performed to finally obtain the final global graph representation. ;
[0032] EEG signals are enhanced using a multi-view data augmentation strategy; an InfoNCE loss function is constructed for comparative learning; and a two-stage training strategy is employed to improve the final global graph representation. The accuracy rate.
[0033] The beneficial effects of the system described in this invention are as follows:
[0034] (1) An end-to-end learnable adaptive graph construction module is designed. Individualized topologies are automatically discovered through node embedding learning and scaling dot product attention. Top-K sparsity and prior graph fusion based on RBF kernel are combined to ensure physiological rationality. (2) A bi-branch spatiotemporal graph convolution is proposed. The temporal branch uses dilated causal convolution and the spatial branch uses graph attention. Spatiotemporal joint modeling is achieved through adaptive gating fusion. (3) A multi-view contrastive learning framework is introduced. Three types of enhancements (temporal domain; frequency domain; graph structure) guided by domain knowledge are designed. InfoNCE loss and two-stage training are used to make full use of unlabeled data. (4) On the clinically collected EEG dataset (96 pediatric subjects, 101,872 samples), compared with six mainstream baseline methods, the accuracy reached 90.1%, F1 reached 89.9%, and AUC reached 0.948. Compared with the best baseline BENDR, the accuracy was improved by 2.5% (p<0.001). Ablation experiments validated the independent contributions of each module (adaptive graph +7.0%, spatiotemporal association +3.9%, contrastive learning +4.8%), and visualization analysis showed that the learned functional connectivity patterns were highly consistent with neuroscience findings (weakened prefrontal-parietal connectivity). Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the system structure described in an embodiment of the present invention. Detailed Implementation
[0036] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0037] Example 1
[0038] This embodiment provides a dynamic representation system for ADHD brain functional connectivity based on spatiotemporal graphs, such as Figure 1 As shown, the system includes:
[0039] Data preprocessing and node feature encoding module: Collects the subject's EEG signals and performs preprocessing; encodes the EEG signal of each channel into a feature vector through node feature encoding to obtain the node feature matrix;
[0040] The adaptive graph construction module performs node embedding learning, adaptive adjacency matrix generation, and prior knowledge fusion sequentially on the node feature matrix to obtain the final adjacency matrix. ;
[0041] The stacked spatiotemporal graph convolutional module consists of two layers: a first-layer spatiotemporal graph convolutional module and a second-layer spatiotemporal graph convolutional module. Within each layer, a temporal convolutional branch captures the temporal dynamic features within each node, while a graph convolutional branch aggregates spatial neighborhood information. The outputs of the temporal and graph convolutional branches are then fused using a gating mechanism to obtain fused features. The second-layer spatiotemporal graph convolutional module also utilizes residual connections to obtain residual fused features. ;
[0042] Graph Pooling and Global Representation Learning Module: Gradually updates the adjacency matrix using a hierarchical graph pooling strategy. and residual fusion features The adaptive graph readout mechanism is used to generate residual fusion features. Different importance weights are assigned to different nodes to obtain a global graph representation. Then, robustness enhancement operations are performed to finally obtain the final global graph representation. ;
[0043] The contrastive learning module enhances EEG signals using a multi-view data augmentation strategy; it constructs an InfoNCE loss function for contrastive learning; and it employs a two-stage training strategy to improve global graph representation. The accuracy rate.
[0044] Each module will be explained in detail below.
[0045] 1. Data preprocessing and node feature encoding module.
[0046] 1.1 Data Preprocessing: EEG signals were recorded using 19 standard electrode positions from the international 10-20 system, including Fp1, Fp2, F3, F4, F7, F8, C3, C4, T3, T4, T5, T6, P3, P4, O1, O2, Fz, Cz, and Pz. These electrodes cover key brain regions such as the prefrontal, frontal, central, temporal, parietal, and occipital lobes, comprehensively reflecting brain function. The raw EEG signals were acquired at a sampling rate of 1000Hz and then downsampled to 100Hz to reduce computational complexity and filter out high-frequency noise. A fourth-order Butterworth bandpass filter with a passband range of 0.5-45Hz was used to retain the main frequency components of the EEG (delta: 0.5-4Hz, theta: 4-8Hz, alpha: 8-13Hz, beta: 13-30Hz, gamma: 30-45Hz) and remove 50Hz power line interference.
[0047] For artifact removal, this paper employs Independent Component Analysis (ICA) to remove electrooculography (EOG) and electromyography (EMG) artifacts. ICA decomposes multi-channel EEG signals into independent components, reconstructing clean EEG signals by identifying and removing components related to eye movements, blinking, and muscle activity. Subsequently, continuous EEG signals are divided into 20-second time windows with a 50% overlap between windows, ensuring sample independence while increasing the number of training samples. Each time window contains 2000 sampling points (100Hz × 20s), constituting the input samples. ,in Indicates the number of channels. Indicates the number of time steps.
[0048] 1.2 Node Feature Encoder:
[0049] To convert the raw temporal signal into node features suitable for graph neural network processing, this embodiment designs a node feature encoder module. This module employs a one-dimensional temporal convolutional neural network (1D-CNN) architecture, containing three convolutional blocks. Each convolutional block consists of a convolutional layer, batch normalization, and a ReLU activation function.
[0050]
[0051] in Indicates the first The first channel in the Feature representation of each layer. The first convolutional layer uses 64 kernels of size 7 with a stride of 2, covering a receptive field of 70ms, capable of capturing short-term oscillation patterns in EEG. The second convolutional layer uses 128 kernels of size 5 with a stride of 2, further extracting abstract temporal features. The third convolutional layer uses 128 kernels of size 3 with a stride of 1, enhancing feature representation while maintaining temporal resolution. Global adaptive average pooling unifies feature sequences of different lengths into a fixed-length feature vector.
[0052]
[0053] Ultimately, the EEG signal for each channel is encoded as 3D eigenvectors yield node feature matrices. .
[0054] The node feature encoder is designed with full consideration of the characteristics of EEG signals. The choice of convolutional kernel size is based on the characteristics of EEG frequency components: larger kernels capture low-frequency (delta, theta) components, while smaller kernels focus on high-frequency (beta, gamma) components. Batch normalization layers help stabilize the training process and alleviate the internal covariate shift problem of deep networks. By stacking multiple convolutional layers, the model can learn multi-scale temporal features, providing rich node representations for subsequent graph modeling.
[0055] 2. Adaptive graph construction module.
[0056] Traditional methods typically employ predefined graph structures, such as k-nearest neighbor graphs based on Euclidean distance or functional connectivity graphs based on Pearson correlation coefficients. However, these static graph structures cannot adapt to individual differences and task specificity. This embodiment proposes an adaptive graph construction module that discovers the optimal graph topology from data through end-to-end learning.
[0057] 2.1 Node Embedding Learning:
[0058] First, a low-dimensional embedding vector is learned for each node to capture its intrinsic properties and role in the graph:
[0059] in, Indicates the final node embedding, The parameter is Multilayer perceptron, In terms of embedding dimension, node embedding learning uses a two-layer fully connected network:
[0060]
[0061]
[0062] in It is a learnable weight matrix. It is a bias term. Use... The activation function normalizes the embedding vector to The range is helpful for subsequent similarity calculations.
[0063] 2.2 Adaptive Adjacency Matrix Generation:
[0064] Employing dot product attention mechanism:
[0065]
[0066] in It is a similarity matrix. Represents a node and nodes The strength of the connection between them. Divide by It's a scaling factor to prevent the dot product from becoming too large. saturation.
[0067] To enhance the sparsity and interpretability of the graph, this embodiment employs a Top-K sparsification strategy.
[0068] For each node, only retain the one with the highest similarity. Connections to neighboring nodes:
[0069]
[0070] Setting up in practice This means that each node connects to an average of 15 neighbors, and the total number of edges is approximately (Undirected graph).
[0071] After applying the Top-K sparsification strategy, the sparse adjacency matrix... After symmetry and normalization processing, a data-driven adaptive adjacency matrix is obtained. :
[0072]
[0073]
[0074] in It is the symmetric adjacency matrix. It is a degree matrix. . This represents a brain region functional connectivity map obtained through purely data-driven learning, capturing individual-specific dynamic functional connectivity patterns.
[0075] 2.3 Prior Knowledge Fusion:
[0076] To maintain physiological plausibility, a data-driven adaptive graph is fused with a prior knowledge-based graph. (Prior graph) It can be constructed based on electrode spatial distance or known anatomical connection patterns. A prior adjacency matrix is constructed using Gaussian radial basis functions (RBF) based on the Euclidean distance between electrodes.
[0077]
[0078] in It is an electrode and Three-dimensional spatial coordinates, This is the bandwidth parameter. The final adjacency matrix is obtained through weighted combination:
[0079]
[0080] in These are learnable weight parameters, initialized to 0.5. Through end-to-end training, the model automatically learns the optimal combination ratio of the adaptive graph and the prior graph.
[0081] 3. Stacked spatiotemporal graph convolution module.
[0082] The Spatiotemporal Graph Convolution (STGC) module is the core component of the method in this embodiment, responsible for simultaneously modeling temporal dynamics and spatial interactions on an adaptive graph structure. The STGC module adopts a two-branch architecture: a temporal convolution branch and a graph convolution branch, and finally integrates the two information paths through a feature fusion layer.
[0083] In the first-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the first temporal convolution branch. Represents a temporal convolutional network;
[0084] The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the first layer graph convolution branch. Represents a graph attention network;
[0085] The fusion features of the first layer's convolutional branches are obtained through: Obtain, among which, For adaptive gating coefficients.
[0086] In the second-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the second-layer temporal convolution branch;
[0087] The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the second-layer graph convolution branch;
[0088] The fusion features of the second-layer graph convolutional branch are obtained through: get;
[0089] In the second-layer spatiotemporal graph convolutional module, residual fusion features are obtained through residual connections. Specifically: ,in, This indicates a regularization operation.
[0090] In the spatiotemporal graph convolution module, It consists of multiple dilated convolutional layers stacked together. Dilated convolution expands the receptive field by inserting intervals (dilation) into the convolutional kernel, and can capture long-range temporal dependencies without increasing the number of parameters. This embodiment uses two dilated convolutional layers with dilation rates of 1 and 2, respectively, enabling the network to capture dependencies spanning four time steps.
[0091] The calculation process is as follows: First, a linear transformation is performed on the node features:
[0092]
[0093] This represents the learnable linear transformation weight matrix. This represents the transformed node features. This represents the input node feature matrix.
[0094] Then, calculate the attention coefficient:
[0095]
[0096] Represents a node Transformed feature vectors Represents a node Transformed feature vectors For attention vectors, Represents a node For nodes The original attention score, This represents the splicing operation. Normalized attention coefficient:
[0097]
[0098] in This represents the normalized attention weights. It is a node The neighborhood group, By definition of the adjacency matrix, attention is calculated only for connected node pairs in the graph.
[0099] Finally, aggregate neighborhood features:
[0100]
[0101] Indicates the first Layered spatiotemporal graph convolution module, or , To represent the Sigmoid function and enhance expressiveness, this embodiment uses multi-head attention for parallel computation. Each element is considered individually, and then the data is spliced or averaged together.
[0102]
[0103] in It is the output projection matrix. This indicates the multi-head output after splicing.
[0104] 4. Graph Pooling and Global Representation Learning Module.
[0105] After multiple layers of STGC, node-level feature representations are obtained. To generate a global graph representation for classification, node features need to be pooled and read out.
[0106] 4.1 Hierarchical Graph Pooling:
[0107] Calculate the node selection matrix ,in, This represents the graph convolution operation. This indicates the number of layers in the hierarchical graph pooling strategy. ; Initially The following is by It is concluded that Initially The following is by The conclusion is as follows.
[0108] This embodiment uses two-layer pooling, with the number of nodes gradually decreasing from 19 to 10 and then to 5, ultimately obtaining coarse-grained global features.
[0109] 4.2: Adaptive graph reading:
[0110] During the graph readout phase, the features of all nodes are aggregated into a single graph-level representation. This embodiment employs an adaptive readout mechanism, assigning different importance weights to different nodes:
[0111]
[0112]
[0113] in It is attention weight. It is a global graph representation. for , This represents the learnable weight matrix of the readout layer. Indicates the first Attention weights for each node.
[0114] To enhance the robustness of the representation, both mean pooling and max pooling are used, and then concatenated:
[0115]
[0116] in, To capture the overall brain activity level of ADHD patients by averaging the feature vectors of nodes, To capture the most anomalous brain region activity by taking the maximum value of the features of all nodes column by column.
[0117] Finally obtained A 256-dimensional global graph representation. This is mapped to 256 dimensions through a fully connected projection layer:
[0118] Represents the projection layer weight matrix. This represents the projection layer bias vector.
[0119] 5. Comparative learning module.
[0120] To fully utilize unlabeled data and improve the model's generalization ability, this embodiment introduces a contrastive learning framework. The core idea of contrastive learning is to learn the intrinsic structure and invariant representations of the data by constructing positive and negative sample pairs.
[0121] 5.1 Multi-view data enhancement:
[0122] The key to contrastive learning lies in designing effective data augmentation strategies to generate sample pairs that are somewhat different but semantically identical. This paper designs the following augmentation operations for EEG signals and graph structures:
[0123] Temporal augmentation:
[0124] 1) Time Masking: Randomly select several time segments and set their characteristic values to zero to simulate the brief loss or noise interference in the signal.
[0125] 2) Time Shifting: Randomly shifts the signal over time to simulate slight differences in the acquisition time.
[0126] 3) Amplitude Scaling: Multiply the signal amplitude by a random factor (e.g., 0.9-1.1) to simulate individual differences and equipment calibration errors.
[0127] Frequency domain enhancement:
[0128] 1) Frequency Masking: Randomly masking certain frequency bands in the frequency domain, forcing the model to learn more robust multi-band features.
[0129] 2) Band Weighting: Applying different weights to different frequency bands (delta, theta, alpha, beta, gamma).
[0130] Graph structure enhancement:
[0131] 1) Edge Perturbation: Randomly delete or add edges in the graph, with a perturbation ratio of 15-20%, while maintaining the connectivity of the graph.
[0132] 2) Node Dropout (During the training of a graph neural network, a portion of nodes and all their related connections are randomly and temporarily "deleted" (masked) so that these nodes do not participate in forward and backward propagation in the current training batch): A portion of nodes and their connections are randomly dropped, with a dropout probability of 10%.
[0133] 3) Subgraph Sampling: Randomly sample connected subgraphs for training to increase the diversity of local-global modeling.
[0134] For each input sample By randomly applying the above combination of enhancement operations, two different views are generated. and These two views constitute a positive sample pair, while views from different samples constitute a negative sample pair.
[0135] 5.2 Projector Head and Contrast Loss:
[0136] Representing graphs Mapped into the contrast learning space via a nonlinear projector:
[0137]
[0138] The projection head is a two-layer MLP that projects a 256-dimensional representation onto 128 dimensions. Research shows that using a separate projection head, rather than direct comparison in the representation space, can improve the performance of downstream tasks.
[0139] This represents the projection vector in the contrast learning space. This indicates the weights of the second layer of the projection head. This indicates the weight of the first layer of the projection head.
[0140] This embodiment uses the InfoNCE loss function for comparative learning:
[0141]
[0142] in and It is a representation of two enhanced views of the same sample (positive sample pair). It is the first The representation vector of a sample after passing through the projection head. It refers to the batch size. It is an indicator function. This is a temperature parameter. The similarity function uses cosine similarity:
[0143]
[0144] Temperature parameters Control the smoothness of the distribution, smaller This makes the model pay more attention to hard negative samples. This embodiment demonstrates the experimental setup. .
[0145] 5.3 Two-stage training strategy:
[0146] Phase 1: Self-supervised pre-training. Contrastive learning loss is used on unlabeled data. The model is trained to learn general EEG representations. Pre-training enables the model to extract intrinsic structures and patterns from large amounts of unlabeled data.
[0147] Phase Two: Supervised Fine-Tuning. Fixing some low-level parameters (such as the node feature encoder), cross-entropy loss is applied to the labeled data. Make minor adjustments:
[0148]
[0149] in It is the number of categories (ADHD / control). It's a real label. This refers to the model's predicted probability. During the fine-tuning phase, the projection head is removed, and the representation layer is used directly. Connect the classification header.
[0150] This two-stage strategy enables the model to effectively learn discriminative representations using unlabeled data while achieving good classification performance on limited labeled data. Experiments show that compared to end-to-end supervised learning, this method can improve accuracy by 3-5 percentage points in small-sample scenarios.
[0151] Example 2
[0152] This embodiment further defines Embodiment 1, using the system from Embodiment 1 for experimental verification to demonstrate its superior performance.
[0153] 1. Dataset and Experiment Setup
[0154] 1.1 Dataset Description: This embodiment uses clinically collected EEG datasets for experimental validation. Data was collected by a collaborating medical institution and included 96 pediatric subjects aged 6-14 years. A 19-channel EEG device with an international 10-20 system was used, with a raw sampling rate of 1000Hz. Each subject received approximately 60 minutes of resting-state EEG recordings. The 19 standard electrode locations included: Fp1, Fp2, F3, F4, F7, F8, C3, C4, T3, T4, T5, T6, P3, P4, O1, O2, Fz, Cz, and Pz, covering the prefrontal, frontal, central, temporal, parietal, and occipital lobes. Data collection was approved by the hospital's ethics committee, and informed consent was obtained from the guardians of all subjects.
[0155] 1.2 Data Preprocessing:
[0156] The raw EEG signal undergoes the following preprocessing steps:
[0157] Downsampling (reducing the sampling rate from 1000 samples per second to 100 samples per second): 1000Hz → 100Hz, reducing computational complexity;
[0158] Bandpass filtering: 1-40Hz (4th order Butterworth filter), preserving the delta (1-4Hz), theta (4-8Hz), alpha (8-13Hz), beta (13-30Hz), and low gamma (30-40Hz) frequency bands;
[0159] Band-stop filtering: 50Hz notch filtering removes power frequency interference;
[0160] Baseline correction: Removes DC offset;
[0161] Robust normalization: Standardization is performed using the median and interquartile range, making it more robust to outliers;
[0162] Time windowing: Divided into 20-second windows (2000 sampling points @ 100Hz), with 50% overlap between windows.
[0163] After preprocessing, a total of 101,872 samples were obtained, which were divided into a training set (81,498 samples) and a validation set (20,374 samples) in an 8:2 ratio. Data quality assessment after preprocessing showed a mean of approximately 1.03 × 10⁻⁶. - ¹ 8 (Close to 0), standard deviation ≈ 1.00, no NaN / Inf values, meets the input requirements for deep learning.
[0164] 1.3 Implementation Details:
[0165] The model was implemented using PyTorch 1.12 and PyTorch Geometric 2.2. The main hyperparameter settings are as follows:
[0166] Model Architecture: Node Embedding Dimension =64, hidden layer dimensions =32, STGC layer number =2, number of attention heads =4, projection dimension=32.
[0167] Graph Construction: Top-K Sparsification =15 (each node connects to 15 neighbors, sparsity 79%), prior graph fusion weights Initialized to 0.5 (learnable), RBF core bandwidth =50mm.
[0168] Temporal convolution: kernel size = 3, dilations = [1, 2], effective receptive field = 7 timesteps.
[0169] Regularization: Dropout rate = 0.5, Graph Neural Network (GNN) Dropout = 0.3, Attention layer Dropout = 0.3, Weight Decay = 1 × 10⁻⁶ -4 .
[0170] Training configuration: Batch size = 64 (64 samples per training iteration), Learning rate = 1 × 10⁻⁶ - ³(pre-training) / 5×10 -4 (Fine-tuning), Optimizer = AdamW(β1=0.9, β2=0.999) (AdamW: an improved version of Adam optimizer, decoupling weight decay; β1: exponential decay rate (momentum) of the first moment estimate; β2: exponential decay rate (adaptive learning rate) of the second moment estimate), using a cosine annealing scheduler, Warmup epochs = 5.
[0171] Comparative Learning: Temperature Parameters =0.1 (Temperature, controls the sharpness of the similarity distribution in contrastive learning), Edge perturbation = 15-20% (Edge perturbation, randomly adds or removes 15-20% of graph edges (connections), function: data augmentation, improves the robustness of the model to changes in graph structure), Node dropout = 10% (Node dropout, randomly discards 10% of nodes and their connections), pre-training for 50 epochs, fine-tuning for 100 epochs.
[0172] The experiment was conducted on an NVIDIA RTX 3090 GPU (24GB), with approximately 50K model parameters, a sample / parameter ratio of approximately 1,630:1, and a single inference time of approximately 19ms.
[0173] 1.4 Evaluation Indicators and Statistical Tests: The following indicators were used to evaluate classification performance:
[0174] Accuracy: The proportion of correctly classified samples out of the total sample.
[0175] Precision: The proportion of cases predicted as positive that are actually positive.
[0176] Recall: The proportion of the actual positive class that is correctly predicted;
[0177] Specificity: The proportion of actual negative classes that are correctly predicted;
[0178] F1 Score: The harmonic mean of precision and recall;
[0179] AUC: Area under the ROC curve, measures the model's ability to distinguish between different models;
[0180] Cohen's Kappa coefficient measures the consistency between the classification result and the true label, correcting for the influence of random consistency.
[0181] All experiments used 5-fold cross-validation, and the results are reported as mean ± standard deviation. Statistical significance was tested using paired t-tests, and Bonferroni correction was used for multiple comparisons. Significance level labeling: p<0.05, p <0.01, p <0.001. Effect size is reported using Cohen's d value.
[0182] 2. Ablation test
[0183] 2.1 Ablation of the adaptive graph construction module, the ablation results are shown in Table 1:
[0184] Table 1:
[0185]
[0186] Note: p-values are the results of paired t-tests with the method of this invention, corrected by Bonferroni.
[0187] The adaptive graph construction module of the present invention consists of adaptive graph fusion (part 2.2 in embodiment 1) and prior fusion (part 2.3 in embodiment 2).
[0188] Experimental results show that: (1) the adaptive graph without prior knowledge improves the accuracy by 5.0% compared with the phase-locked value phase-synchrony graph (PLV phase synchrony graph), which verifies the effectiveness of the end-to-end learning graph structure; (2) the introduction of prior knowledge fusion further improves the accuracy by 1.6%; (3) compared with the static k-NN graph (k=15), the adaptive graph construction module improves the accuracy by 7.0% (83.1%→90.1%, p<0.001).
[0189] 2.2 Ablation experiment of spatiotemporal graph convolution module. The ablation results are shown in Table 2:
[0190] Table 2:
[0191]
[0192] Experimental results show that: (1) Temporal convolutional networks or graph attention networks alone have limited performance, verifying the necessity of spatio-temporal joint modeling; (2) Parallel architecture is superior to serial architecture (accuracy improvement of 2.7%-3.9%), indicating that simultaneous processing of spatio-temporal information is more effective than sequential processing; (3) Gating fusion improves accuracy by 2.7% (Cohen's d=1.08) compared to simple concatenation, verifying the importance of adaptive weight allocation; (4) Compared to the optimal serial architecture (TCN→GAT 86.2%), the dual-branch parallel architecture of this invention improves accuracy by 3.9% (p<0.001).
[0193] 2.3 Ablation experiment of contrastive learning strategy, the ablation results are shown in Table 3:
[0194] Table 3:
[0195]
[0196] This invention employs a two-stage training strategy: self-supervised pre-training + supervised fine-tuning. Experimental results show that: (1) self-supervised pre-training (time domain + frequency domain + graph structure enhancement) improves accuracy by 3.8% (Cohen's d=1.71) compared to supervised learning alone, verifying the effectiveness of self-supervised pre-training; (2) time domain + frequency domain + graph structure enhancement (multi-view) outperforms a single enhancement strategy, indicating that diverse views help learn more robust representations; (3) the two-stage training strategy (pre-training + fine-tuning) further improves accuracy by 1.0%, verifying the advantages of the two-stage training strategy.
[0197] 3. Baseline Method Comparison
[0198] The system of this invention is compared with the following six mainstream methods:
[0199] EEGNet is a lightweight convolutional network that uses depthwise separable convolution to extract time-frequency features.
[0200] Deep ConvNet is a deep convolutional network that uses a deep convolutional network architecture with multiple layers of convolutions stacked together.
[0201] LSTM-Attention: LSTM (Long Short-Term Memory) network combined with attention mechanism to model temporal dependencies.
[0202] BrainNetCNN: A graph convolution network based on a functional connectivity matrix.
[0203] GCN-ADHD: A graph convolution network that uses the Pearson correlation graph.
[0204] BENDR: Large-scale pre-trained models based on Transformer (Transformer architecture).
[0205] All baseline methods use the hyperparameters recommended in the original paper and are compared fairly on the same data partition.
[0206] Table 4 shows the performance comparison of the clinical dataset (N=96).
[0207] Table 4:
[0208]
[0209] Note: * indicates that the difference from the suboptimal method (BENDR) is significant at the p<0.001 level (paired t-test).
[0210] Experimental results show that: (1) The method of this invention achieves the best performance on all indicators, with an accuracy of 90.1%, which is 2.5% higher than the best baseline BENDR (Cohen's d=0.96, p<0.001); (2) Compared with traditional convolutional network methods (EEGNet, Deep ConvNet), the accuracy is improved by 7.8%-10.3%, which verifies the advantages of graph neural networks in brain network modeling; (3) Compared with existing convolutional network methods (BrainNetCNN, GCN-ADHD), the accuracy is improved by 4.5%-5.9%, which verifies the effectiveness of adaptive graph construction and spatiotemporal joint modeling; (4) The method of this invention has only 50K parameters, which is 84 times smaller than BENDR, and the inference speed is 2.4 times faster, resulting in better deployment efficiency.
[0211] 4. Small sample scenario experiment
[0212] To verify the advantages of contrastive learning in scenarios with scarce data, this embodiment conducts experiments with different training sample sizes. The performance comparisons for different training sample sizes are shown in Table 5.
[0213] Table 5:
[0214]
[0215] Note: Improvement refers to the increase in accuracy of AST-GNN contrastive learning compared to AST-GNN supervised learning.
[0216] AST-GNN contrastive learning represents the present invention (AST-GNN) and uses a contrastive learning strategy. AST-GNN supervised learning represents the present invention by replacing the contrastive learning strategy with supervised learning.
[0217] Experimental results show that: (1) In the extreme small sample scenario with 50 training samples, the contrastive learning method of this invention achieves an accuracy of 83.3%, which is 10.1% higher than supervised learning (73.2%) (Cohen's d=2.45, p<0.001) and 12.1% higher than the optimal baseline BENDR (71.2%); (2) As the number of training samples increases, the advantage of contrastive learning gradually decreases but always remains ahead (3.6%-10.1%); (3) Contrastive learning effectively alleviates the overfitting problem in the small sample scenario and shows stronger data efficiency.
Claims
1. A dynamic representation system for ADHD brain functional connectivity based on spatiotemporal graphs, characterized in that, The system includes: Data preprocessing and node feature encoding module: Collects and preprocesses the EEG signals of the subjects; encodes the EEG signal of each channel into a feature vector through node feature encoding, thus obtaining the node feature matrix. ; The adaptive graph construction module performs node embedding learning, adaptive adjacency matrix generation, and prior knowledge fusion sequentially on the node feature matrix to obtain the final adjacency matrix. ; Node embedding learning specifically involves learning a low-dimensional embedding vector for each node to capture its intrinsic attributes and role in the graph. In progress, among which... Indicates the final node embedding, The parameter is Multilayer perceptron; The adaptive adjacency matrix generation process involves: calculating the similarity between node pairs as edge weights based on the final node embedding, and then obtaining the similarity matrix. ,for For each node in the matrix, a Top-K sparsity strategy is used to obtain a sparse adjacency matrix. For sparse adjacency matrices After symmetry and normalization processing, a data-driven adaptive adjacency matrix is obtained. ; Prior knowledge fusion specifically involves constructing a prior adjacency matrix based on the Euclidean distance between electrodes using Gaussian radial basis functions. The final adjacency matrix is obtained through weighted combination. : ,in These are learnable weight parameters; The stacked spatiotemporal graph convolutional module consists of two layers: a first-layer spatiotemporal graph convolutional module and a second-layer spatiotemporal graph convolutional module. Within each layer, a temporal convolutional branch captures the temporal dynamic features within each node, while a graph convolutional branch aggregates spatial neighborhood information. The outputs of the temporal and graph convolutional branches are then fused using a gating mechanism to obtain fused features. The second-layer spatiotemporal graph convolutional module also utilizes residual connections to obtain residual fused features. ; Graph Pooling and Global Representation Learning Module: Gradually updates the adjacency matrix using a hierarchical graph pooling strategy. and residual fusion features The adaptive graph readout mechanism is used to generate residual fusion features. Different importance weights are assigned to different nodes to obtain a global graph representation. Then, robustness enhancement operations are performed to finally obtain the final global graph representation. ; The contrastive learning module enhances EEG signals using a multi-view data augmentation strategy; it constructs an InfoNCE loss function for contrastive learning; and it employs a two-stage training strategy to improve the final global graph representation. The accuracy rate.
2. The ADHD brain functional connectivity dynamic representation system based on spatiotemporal graphs according to claim 1, characterized in that, Node feature encoding is performed through a node feature encoding module, which employs a one-dimensional temporal convolutional neural network architecture. This module contains three convolutional blocks and a global adaptive average pooling layer. Each convolutional block consists of a convolutional layer, a batch normalization layer, and a ReLU activation function. The first convolutional layer captures short-term oscillation patterns in EEG data; the second convolutional layer further extracts abstract temporal features; and the third convolutional layer enhances feature representation while maintaining temporal resolution. Global adaptive average pooling unifies feature sequences of different lengths into a fixed-length feature vector, resulting in the node feature matrix. .
3. The ADHD brain functional connectivity dynamic representation system based on spatiotemporal graphs according to claim 2, characterized in that, In the first-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the first temporal convolution branch. Represents a temporal convolutional network; The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the first layer graph convolution branch. Represents a graph attention network; The fusion features of the first layer's convolutional branches are obtained through: Obtain, among which, It is an adaptive gating coefficient.
4. The ADHD brain functional connectivity dynamic representation system based on spatiotemporal graphs according to claim 3, characterized in that, In the second-layer spatiotemporal graph convolution module, the specific operations in the temporal convolution branch are as follows: ;in, This represents the output features of the second-layer temporal convolution branch; The specific operations in the graph convolution branch are as follows: ;in, This represents the output features of the second-layer graph convolution branch; The fusion features of the second-layer graph convolutional branch are obtained through: get; In the second-layer spatiotemporal graph convolutional module, residual fusion features are obtained through residual connections. Specifically: ,in, This indicates a regularization operation.
5. The ADHD brain functional connectivity dynamic representation system based on spatiotemporal graphs according to claim 4, characterized in that, The hierarchical graph pooling strategy specifically involves: computing the node selection matrix. ,in, This represents the graph convolution operation. This indicates the number of layers in the hierarchical graph pooling strategy. ; Initially The following is by It is concluded that Initially The following is by It can be concluded that; Global graph representation pass Obtain, among which, The number of channels for the EEG signal. express The Middle The feature vector of each node Indicates the first Attention weights for each node; Final global graph representation pass Obtain, among which, Represents the projection layer weight matrix. This represents the projection layer bias vector. For activation function, ,in For averaging operations, This is for retrieving the maximum value.
6. The ADHD brain functional connectivity dynamic representation system based on spatiotemporal graphs according to claim 5, characterized in that, Multi-view data augmentation strategies include time-domain augmentation, frequency-domain augmentation, and graph structure augmentation; The InfoNCE loss function is as follows: ;in, and These are representations of two enhanced views of the same sample. It is the first The representation vector of a sample after passing through the projection head It refers to the batch size. It is an indicator function. It's a temperature parameter, a similarity function. Using cosine similarity: ; The two-stage training strategy includes self-supervised pre-training and supervised fine-tuning.
7. A dynamic representation method for ADHD brain functional connectivity based on spatiotemporal graphs, characterized in that, The method includes: EEG signals from the subjects were collected and preprocessed; the EEG signal of each channel was encoded into a feature vector through node feature encoding, resulting in a node feature matrix. ; The node feature matrix is sequentially processed through node embedding learning, adaptive adjacency matrix generation, and prior knowledge fusion to obtain the final adjacency matrix. ; Node embedding learning specifically involves learning a low-dimensional embedding vector for each node to capture its intrinsic attributes and role in the graph. In progress, among which... Indicates the final node embedding, The parameter is Multilayer perceptron; The adaptive adjacency matrix generation process involves: calculating the similarity between node pairs as edge weights based on the final node embedding, and then obtaining the similarity matrix. ,for For each node in the matrix, a Top-K sparsity strategy is used to obtain a sparse adjacency matrix. For sparse adjacency matrices After symmetry and normalization processing, a data-driven adaptive adjacency matrix is obtained. ; Prior knowledge fusion specifically involves constructing a prior adjacency matrix based on the Euclidean distance between electrodes using Gaussian radial basis functions. The final adjacency matrix is obtained through weighted combination. : ,in These are learnable weight parameters; Spatiotemporal graph convolution is performed using two layers of spatiotemporal graph convolution modules, comprising a first layer and a second layer. Within each layer, temporal convolution branches capture the temporal dynamic features within each node, while graph convolution branches aggregate spatial neighborhood information. The outputs of the temporal and graph convolution branches are then fused using a gating mechanism to obtain fused features. The second layer also utilizes residual connections to obtain residual fused features. ; By employing a hierarchical graph pooling strategy, the adjacency matrix is updated incrementally. and residual fusion features The adaptive graph readout mechanism is used to generate residual fusion features. Different importance weights are assigned to different nodes to obtain a global graph representation. Then, robustness enhancement operations are performed to finally obtain the final global graph representation. ; EEG signals are enhanced using a multi-view data augmentation strategy; an InfoNCE loss function is constructed for comparative learning; and a two-stage training strategy is employed to improve the final global graph representation. The accuracy rate.