Method for identifying epilepsy subtype of hypothalamic malocroma based on interpretable graph neural network

By combining the ST-AttnNet model with the GAT module and Bi-LSTM, the problem of identifying subtypes of hypothalamic hamartoma epilepsy was solved, enabling accurate differentiation between laughing epilepsy and non-laughing epilepsy, providing reliable biomarkers, and offering data-driven evidence for clinical diagnosis and treatment.

CN122000022APending Publication Date: 2026-05-08CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF TECH
Filing Date
2025-12-26
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish between subtypes of hypothalamic hamartoma-associated gelastic epilepsy (GS) and non-gelastic epilepsy (NGS). Imaging techniques fail to capture their essential differences, EEG-based models lack adaptability, and high-quality data is scarce, leading to difficulties in differentiation.

Method used

We employ a deep learning approach based on the ST-AttnNet model. By using the backbone layer, graph attention network (GAT) module, multi-scale frequency-time attention module, and bidirectional long short-term memory network (Bi-LSTM) to collaboratively capture the spatial topological features, multi-scale time-frequency features, and dynamic temporal features of brain functional connectivity, we combine network topology quantitative analysis to uncover potential biomarkers.

Benefits of technology

It enables accurate differentiation between gelastic epilepsy and non-gelastic epilepsy, provides objective electrophysiological evidence, adapts to limited datasets, has anti-interference capabilities and high generalization ability, and supports personalized surgical plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000022A_ABST
    Figure CN122000022A_ABST
Patent Text Reader

Abstract

The invention discloses a hypothalamic malocroma epilepsy subtype identification method based on an interpretable graph neural network, and belongs to the technical field of epilepsy diagnosis. The method comprises the following steps: acquiring a preoperative electroencephalogram signal of a hypothalamic malocclusion accompanied with epilepsy patient, and performing preprocessing and feature extraction to obtain time-frequency feature data; the method comprises the following steps of: firstly, acquiring a spatial topology feature, a multi-scale time-frequency feature and a dynamic time sequence feature of brain function connection through a main layer, a graph attention network module, a multi-scale frequency-time attention module and a bidirectional long-short-term memory network, and realizing subtype identification of the sphincter epilepsy and the non-sphincter epilepsy by cooperatively capturing the spatial topology feature, the multi-scale time-frequency feature and the dynamic time sequence feature of brain function connection; and finally, extracting an adjacent matrix after training convergence of the GAT module, and mining potential biomarkers through network topology quantitative analysis. The method breaks through the limitation of traditional subjective identification, improves the identification accuracy and stability through a multi-module collaborative architecture, provides an objective basis for clinic, and has an important clinical conversion value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of epilepsy diagnostic technology, specifically to the identification of preoperative electroencephalogram signals and biomarker mining in patients with hypothalamic hamartoma and epilepsy based on the ST-AttnNet model. Background Technology

[0002] Hypothalamic hamartoma (HH) is a rare but serious congenital brain lesion that often acts as a primary epileptogenic focus, directly triggering seizures, or indirectly causing epilepsy by inducing secondary epileptogenic focuses. Its incidence is approximately 1 in 200,000. Clinically, HH-related epilepsy is mainly divided into two categories: gelastic epilepsy (GS) and non-gelastic epilepsy (NGS). The presence or absence of gelastic symptoms is not only a key basis for disease classification but also closely related to disease progression, treatment options, and prognosis. Accurate identification of these two epilepsy subtypes is crucial for improving the targeting of surgical treatment and enhancing patient prognosis. However, current preoperative clinical assessments primarily rely on manual epilepsy diaries kept by patients and caregivers. This subjective symptom-based approach is easily affected by individual cognitive differences and the timeliness of recording, making it difficult to objectively and accurately capture the subtle characteristics of epileptic seizures, posing a significant challenge to subtype identification.

[0003] Imaging techniques are currently the primary means of detecting and analyzing hemangioma (HH) lesions. Techniques including magnetic resonance imaging (MRI) can effectively identify structural and morphological changes in HH, providing support for clinical diagnosis, surgical planning, and efficacy evaluation. However, for the GS and NGS subtypes with no significant structural differences, imaging techniques struggle to capture their essential distinctions, failing to meet the needs of precise clinical subtyping. In contrast, electroencephalography (EEG) can directly capture the abnormal synchronized firing process of neurons in the brain, possessing unique advantages such as high temporal resolution and quantitative assessment of changes in cerebral cortex function, and has been widely used in epilepsy localization, classification, and diagnosis. However, existing EEG-based studies on HH epilepsy subtypes mostly rely on manually designed features for statistical analysis and overemphasize temporal lobe regions related to HH pathology. This not only easily misses complex neural patterns that are difficult to extract manually but also ignores the crucial role of multi-brain region interactions from a whole-brain network perspective, making it difficult to comprehensively capture the high-dimensional and complex neural activity differences between GS and NGS subtypes.

[0004] With the rapid development of deep learning technology, methods based on architectures such as Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), and Transformers have demonstrated powerful capabilities in high-dimensional spatiotemporal pattern recognition and long-term dependency modeling in EEG signal processing, significantly improving the accuracy of epileptic focus localization and real-time early warning. However, the EEG activity of Henle-Herpes-related epilepsy has significant unique characteristics. Its interictal spikes often originate in the subcortical region near hamartomas and are accompanied by later cortical spread, which is fundamentally different from the cortical origin pattern of conventional epilepsy. At the same time, due to the rarity of HH disease itself, high-quality EEG data that can be used to distinguish between GS and NGS subtypes is scarce, making it difficult to meet the large sample requirements of deep learning models. As a result, models trained based on conventional epilepsy signals are unable to accurately capture the specific electrophysiological mechanisms of HH and cannot effectively distinguish between GS and NGS subtypes.

[0005] Graph Neural Networks (GNNs), as an emerging deep learning framework, can aggregate node neighborhood information through message passing mechanisms, efficiently learn graph node embedding representations, and capture global topological properties, demonstrating unique advantages in mining neurobiomarkers in epilepsy patients. However, no studies have yet applied GNNs to the differentiation of GS and NGS subtypes and biomarker mining in HH patients. Addressing the issues of strong subjective dependence, limited feature extraction, and insufficient model adaptability in existing technologies for HH epilepsy subtype differentiation, there is an urgent need to construct a deep learning method specifically adapted to the characteristics of HH EEG signals. This method should overcome the dual challenges posed by data limitations and signal specificity, achieving objective and accurate differentiation of GS and NGS subtypes, and mining the underlying potential biomarkers to provide data-driven objective evidence for clinical diagnosis and treatment. Summary of the Invention

[0006] To address the aforementioned technical problems, this application discloses a method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks, including:

[0007] Preoperative electroencephalogram (EEG) signals were obtained from patients with hypothalamic hamartoma and epilepsy. The EEG signals were preprocessed and feature extracted to obtain time-frequency feature data.

[0008] The time-frequency feature data is input into the ST-AttnNet model. Through the backbone layer, graph attention network module, multi-scale frequency-time attention module and bidirectional long short-term memory network of the model, the spatial topological features, multi-scale time-frequency features and dynamic temporal features of brain functional connectivity are captured in a coordinated manner.

[0009] Based on the output of the model, the subtypes of hypothalamic hamartoma-related gelastic epilepsy and non-gelastic epilepsy can be differentiated.

[0010] The adjacency matrix after the GAT module training converges is extracted, and potential biomarkers for distinguishing the two types of epilepsy subtypes are mined through network topology quantification analysis.

[0011] Preferably, the electroencephalogram (EEG) signals are recorded by a multi-channel EEG acquisition device, covering channel signals from the frontal pole, frontal lobe, central region, parietal lobe, temporal lobe, occipital lobe, and midline region, to comprehensively capture the electrophysiological activity of the whole brain.

[0012] The patient's sleep state was recorded simultaneously during the data collection process, and signal segments that did not occur during deep sleep were extracted to avoid interference from abnormal discharges during epileptic seizures on feature extraction and classification results.

[0013] The sampling rate of the EEG acquisition device is set according to the frequency characteristics of the nerve discharge signal to ensure that the electrophysiological activity within the preset frequency band can be completely captured. The acquired raw signal is processed to reduce the influence of physiological artifacts such as electromyography and electrooculography, as well as environmental noise, and to ensure data quality.

[0014] Preferably, the preprocessing and feature extraction of the electroencephalogram (EEG) signal includes:

[0015] The EEG signal is segmented according to a set window length and step size. After baseline correction to eliminate slow drift, a cascaded digital filtering strategy is used to perform high-pass filtering and low-pass filtering in sequence to obtain a band-pass filtered signal in a preset frequency band.

[0016] The filtered signal is subjected to a short-time Fourier transform, and spectral leakage is suppressed by using a Hanning window to convert the time-domain signal into time-frequency characteristic data. The mathematical formula for the short-time Fourier transform is as follows: ,in, For time-frequency coefficients, Represents at discrete time points The sampled value at that location, For the Hanning window function, To determine the window length for Fast Fourier Transform, The overlap step size, This refers to the segment number corresponding to the time series dimension. For discrete frequency in the frequency domain;

[0017] After performing absolute value transformation on the time-frequency feature data, Z-fraction normalization is applied to map it to a preset interval. The normalization formula is: ,in, For standardized data, The absolute value of the original time-frequency coefficients. The mean of the original time-frequency data. This represents the standard deviation of the original time-frequency data.

[0018] Preferably, the backbone layer includes a depthwise separable convolutional layer, a batch normalization layer, and a GELU activation function. The kernel size of the depthwise separable convolutional layer is designed to adapt to the dimensions of the time-frequency feature data, separating the channel dimension and spatial dimension of the input features for processing, thus reducing the complexity of model parameters while retaining key feature information. The batch normalization layer standardizes the convolutional output features, eliminating the impact of feature distribution offset on model training. The GELU activation function enhances the model's ability to fit complex features through nonlinear transformation, achieving preliminary extraction and dimensionality reduction of time-frequency features, and providing low-dimensional, high-discrimination feature inputs for subsequent modules.

[0019] Preferably, the operation of the graph attention network module includes:

[0020] Based on the feature vectors output by the backbone layer, a node feature matrix corresponding to each channel of the EEG is constructed, and a learnable adjacency matrix is ​​initialized to characterize the potential functional connectivity between channels.

[0021] The attention coefficients between nodes are calculated through a self-attention mechanism, the importance of each connection is dynamically evaluated based on feature similarity, the attention coefficients are normalized using the Softmax function, and the adjacency matrix element values ​​are adaptively adjusted to generate a dynamic brain network that reflects the functional coupling strength between channels.

[0022] Any two channel nodes in the adjacency matrix and Functional connection strength Defined as the attention coefficient after min-max normalization. The formula is: ,in, The normalized connection strength, This represents the original attention coefficient. and These are the minimum and maximum values ​​in the attention coefficient matrix, respectively;

[0023] The attention-weighted node features are processed by linear transformation and activation function and then transmitted to the downstream module. The converged adjacency matrix is ​​used for subsequent network topology analysis.

[0024] Preferably, the multi-scale frequency-temporal attention module includes a main path and a residual connection, wherein the main path sequentially includes a temporal max pooling layer, a multi-scale depth-separable convolutional unit, and a channel-frequency attention module;

[0025] The temporal max pooling layer downsamples the input features along the temporal dimension, preserving key temporal information;

[0026] The separable convolutional unit extracts different receptive field features through four parallel branches. The four branches are a 1×1 pointwise convolutional branch, a 3×3 depthwise separable convolution followed by a 1×1 pointwise convolutional branch, a 1×1 pointwise convolution followed by a 3×3 max pooling branch, and two cascaded 3×3 depthwise separable convolutional branches. The outputs of each branch are concatenated in the channel dimension to achieve the fusion of multi-scale contextual information.

[0027] The frequency attention module computes frequency attention and channel attention in parallel. The frequency path learns key frequency band weights through one-dimensional convolution and activation functions. The channel path employs a Squeeze-and-Excitation mechanism, generating channel importance weights through global average pooling, fully connected layers, and activation functions. The input features are multiplied element-wise by the two attention weights to achieve dual enhancement, as shown in the formula: ,in, As input features, For channel attention weights, For frequency attention weights, This indicates element-wise multiplication;

[0028] The residual connection, after adjusting the channel dimension through 1×1 pointwise convolution, is added to the output features of the CFA module to alleviate the gradient degradation problem in deep networks and ensure smooth information transmission.

[0029] Preferably, the bidirectional long short-term memory network includes a forward LSTM layer and a backward LSTM layer. The feature map processed by the MS-CFA module is subjected to frequency-dimensional global average pooling and transposed to form a temporal sequence input. The forward LSTM layer extracts forward temporal features from the start to the end of the time sequence, and the backward LSTM layer extracts reverse temporal features from the end to the start of the time sequence. The bidirectional temporal information is fused by splicing the hidden layer states to capture the long-range dynamic dependence of neural firing.

[0030] The output of the Bi-LSTM is mapped to the category space through a fully connected layer, and the probability distribution of each category is output through the Softmax activation function. The category corresponding to the maximum probability is used as the subtype identification result to achieve the classification of laughing epilepsy and non-laughing epilepsy. Cross-validation and early stopping are used during model training to avoid overfitting and improve the model's generalization ability.

[0031] Preferably, the network topology quantitative analysis includes node clustering coefficient calculation and channel connection strength analysis, and the paired t-test is used to evaluate the significance of the differences between the two types of epilepsy subtypes in the above indicators;

[0032] The node clustering coefficient The formula used to characterize the local clustering of nodes is: ,in, For nodes The number of neighboring nodes, and Traversing nodes All neighbor node pairs, , and These are the normalized functional connection weights for the corresponding node pairs, and the node pairs together constitute a node. A triangular structure;

[0033] Statistical tests were used to screen out significantly different connection strength indices and node clustering coefficients as a potential biomarker candidate set to distinguish between the two types of epilepsy subtypes.

[0034] Preferably, the screening process for the potential biomarkers includes:

[0035] Multiple tests are performed on the connection strength index and node clustering coefficient in the candidate set to eliminate the influence of false positive results;

[0036] The contribution of each candidate indicator to subtype identification was calculated using the feature importance assessment method, and the Top N indicators were selected after being sorted by contribution.

[0037] By combining neurophysiological mechanism analysis and eliminating indicators without clear physiological significance, a set of biomarkers containing the connection strength between specific channels and the clustering coefficient of key nodes is finally formed. This set can reflect the essential differences in brain network topology between the two types of epilepsy subtypes.

[0038] Preferably, the discovery of potential biomarkers to distinguish between the two epilepsy subtypes includes:

[0039] Based on the training convergence adjacency matrix output by the GAT module, the intra-group average adjacency matrix of the laughing epilepsy group and the non-laughing epilepsy group were calculated respectively, and representative brain functional connectivity maps of the two groups were constructed.

[0040] By subtracting each element, two sets of differential connectivity matrices are obtained. Channel pairs with significant differences in connectivity strength are then selected to form a differential connectivity set.

[0041] Based on the inter-group difference analysis results of node clustering coefficients, the significantly different node clustering coefficients are integrated with the channel pairs in the differential connection set;

[0042] By eliminating redundant information through feature selection algorithms and retaining core indicators with strong discriminative power, potential biomarkers that can effectively distinguish between the two types of epilepsy subtypes are finally obtained, providing objective electrophysiological basis for clinical differentiation.

[0043] Compared with the prior art, the technical solution of this application has the following technical effects:

[0044] This invention utilizes a standardized EEG signal preprocessing workflow, combined with short-time Fourier transform and time-frequency normalization techniques, to effectively filter physiological artifacts and environmental noise, fully preserving key electrophysiological features related to epilepsy. This provides high-quality, highly discriminative data support for subsequent model training, ensuring the accuracy and stability of subtype identification from the source, and solving the problems of incomplete feature extraction and significant noise interference in traditional signal processing.

[0045] The ST-AttnNet model of this invention achieves simultaneous capture of spatial topological features, multi-scale time-frequency features, and dynamic temporal features of brain functional connectivity through a collaborative architecture of backbone layer, GAT module, MS-CFA module, and Bi-LSTM. It accurately adapts to the specific electrophysiological mechanism of hypothalamic hamartoma-related epilepsy, significantly improves the ability to distinguish between gelastic epilepsy and non-gelastic epilepsy, and solves the limitation of difficulty in learning multi-dimensional features.

[0046] This invention leverages the interpretability of the GAT module and combines it with network topology quantitative analysis to successfully uncover potential biomarkers that reflect the essential differences between two types of epilepsy subtypes. This provides objective and quantitative identification criteria for clinical practice, changes the traditional diagnostic model that relies on subjective symptom descriptions, helps to achieve accurate subtyping of hypothalamic hamartoma epilepsy, and provides data-driven support for the development of personalized surgical plans.

[0047] This invention does not rely on large-scale sample data. Through model structure optimization and feature engineering design, it can still maintain stable discrimination performance on limited datasets. At the same time, it has strong anti-interference ability and generalization ability, and is suitable for complex clinical EEG acquisition scenarios. It provides an efficient and reliable technical solution for the identification of hypothalamic hamartoma epilepsy subtypes and has clear clinical translational value.

[0048] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.

[0049] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0051] Based on the description of the figures and their corresponding technical content in the document, the titles of the figures are as follows:

[0052] Figure 1 Schematic diagram of a method for identifying epilepsy subtypes of hypothalamic hamartomas based on interpretable graph neural networks;

[0053] Figure 2 This application includes an ST-AttnNet model architecture diagram;

[0054] Figure 3 : Structure diagram of the multi-scale depthwise separable convolutional module in this application;

[0055] Figure 4 This application's channel-frequency attention module structure diagram;

[0056] Figure 5 The t-SNE method is used to create a visualization of the distribution of EEG sample points in the dimensionality-reduced feature space.

[0057] Figure 6 The channel importance topographic map learned by ST-AttnNet in this application;

[0058] Figure 7 The differential brain connectivity map of the GAT module in this application;

[0059] Figure 8 Box plots of key brain network indicators in HH patients in the embodiments. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.

[0061] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0062] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0063] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.

[0064] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.

[0065] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.

[0066] Example 1

[0067] This embodiment mainly describes a method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks, such as... Figure 1 As shown, it specifically includes:

[0068] Preoperative electroencephalogram (EEG) signals were obtained from patients with hypothalamic hamartoma and epilepsy. The EEG signals were preprocessed and feature extracted to obtain time-frequency feature data.

[0069] The time-frequency feature data is input into the ST-AttnNet model, and through the backbone layer, graph attention network (GAT) module, multi-scale frequency-time attention (MS-CFA) module and bidirectional long short-term memory network (Bi-LSTM) of the model, the spatial topological features, multi-scale time-frequency features and dynamic temporal features of brain functional connectivity are captured in a coordinated manner.

[0070] Based on the output of the model, the subtypes of hypothalamic hamartoma-related gelastic epilepsy and non-gelastic epilepsy can be differentiated.

[0071] The adjacency matrix after the GAT module training converges is extracted, and potential biomarkers for distinguishing the two types of epilepsy subtypes are mined through network topology quantification analysis.

[0072] The acquired EEG signals were obtained from preoperative recordings of patients with hypothalamic hamartoma and epilepsy. Data was acquired using a multi-channel EEG acquisition device according to the standard international 10-20 system. This acquisition system covers channel signals from the frontal pole, frontal lobe, central region, parietal lobe, temporal lobe, occipital lobe, and midline region, enabling comprehensive capture of electrophysiological activity in all brain regions.

[0073] During the data acquisition process, the patient's sleep state was recorded simultaneously. Signal segments not exhibiting epileptic seizures during deep sleep were specifically extracted to avoid interference from abnormal discharges during seizures on subsequent feature extraction and classification results. This ensures that the data used for model training and analysis accurately reflects the patient's fundamental EEG activity. The sampling rate of the acquisition equipment was strictly set according to the frequency characteristics of neural discharge signals to ensure complete capture of electrophysiological activity within the preset frequency band. The acquired raw signals also underwent anti-interference processing to effectively reduce the impact of physiological artifacts such as electromyography and electrooculography, as well as environmental noise. This ensures data quality from the source, laying a reliable foundation for subsequent signal processing and model training.

[0074] The acquired raw EEG signals are systematically preprocessed. The preprocessing process mainly includes three core steps: data segmentation, baseline correction, and cascaded digital filtering. Each step is closely linked to gradually improve the signal quality.

[0075] Data segmentation is performed, dividing the original signal into discrete segments according to a set window length and step size, transforming the continuous EEG signal into discrete signal fragments to facilitate subsequent feature extraction and analysis. Baseline correction is then performed, using specialized algorithms to eliminate slow drift caused by electrode offset or physiological movement, stabilizing the signal baseline and reducing the impact of non-specific interference on signal characteristics.

[0076] After initial processing of the time-domain signal, a cascaded digital filtering strategy is employed for further denoising and feature enhancement. This strategy first uses a high-pass filter to eliminate electromyography artifacts and high-frequency environmental noise, then uses a low-pass filter to suppress baseline drift and extremely low-frequency interference, ultimately forming a bandpass filtered signal within a specific frequency band. This cascaded filtering process effectively preserves low-frequency abnormal rhythms associated with epilepsy while minimizing high and low-frequency noise interference, providing high signal-to-noise ratio signal data for subsequent feature extraction.

[0077] Furthermore, the feature extraction stage mainly uses Short Time Fourier Transform (STFT) to convert the preprocessed time-domain signal into time-frequency feature data, and then performs normalization processing to adapt to the input requirements of the model.

[0078] The short-time Fourier transform suppresses spectral leakage through the Hanning window, decomposing the time-domain signal into time-varying characteristics of different frequency components. Its mathematical formula is: ,in, For time-frequency coefficients, Represents at discrete time points The sampled value at that location, For the Hanning window function, To determine the window length for Fast Fourier Transform, The overlap step size, This refers to the segment number corresponding to the time series dimension. This represents the discrete frequency index in the frequency domain. This transformation combines the time-domain and frequency-domain characteristics of EEG signals, enabling a comprehensive capture of the time-frequency dynamics of neural discharges.

[0079] To ensure the model focuses on the relative changes of the signal rather than its absolute value, and to avoid interference from differences in signal amplitude, the representation results of the short-time Fourier transform are first subjected to absolute value transformation, and then mapped to a preset interval through Z-score normalization. The normalization formula is: ,in, For standardized data, The absolute value of the original time-frequency coefficients. The mean of the original time-frequency data. This represents the standard deviation of the original time-frequency data. Normalization not only improves the model's training stability and convergence speed but also enhances its adaptability to different patients' EEG signals.

[0080] Furthermore, the ST-AttnNet model is an interpretable deep learning framework specifically designed for identifying subtypes of hypothalamic hamartoma epilepsy. Its overall architecture is as follows: Figure 2As shown, it mainly consists of a backbone layer, a graph attention network (GAT) module, three cascaded multi-scale frequency-time attention (MS-CFA) modules, and a bidirectional long short-term memory network (Bi-LSTM). Each module performs its own function and works collaboratively to efficiently capture the spatial topological features, multi-scale time-frequency features, and dynamic temporal features of brain functional connectivity, providing strong technical support for subsequent subtype identification and biomarker mining.

[0081] The backbone layer, as the initial feature extraction unit of the model, is mainly responsible for preliminary feature extraction and dimensionality reduction of the input time-frequency feature data, providing low-dimensional, high-discrimination feature input for subsequent modules. This layer consists of a depthwise separable convolutional (DWConv) layer, a batch normalization layer (BatchNorm), and a GELU activation function. These components work together to effectively control the complexity of model parameters while ensuring the effectiveness of feature extraction.

[0082] The kernel size of the depthwise separable convolutional layer is designed to fit the dimensions of the time-frequency feature data at 7×3. This size has been validated through extensive experiments, demonstrating that it can minimize the number of parameters while balancing feature extraction range and accuracy. Unlike traditional convolution operations, depthwise separable convolution separates the channel dimension and spatial dimension of the input features. It first performs independent spatial convolution on each channel, and then fuses the feature information from different channels through pointwise convolution. This separable convolution strategy can significantly reduce model parameter complexity, decrease computational load, and improve model training and inference efficiency while preserving key feature information.

[0083] Batch normalization layers standardize the output features of convolutions, adjusting the mean and variance of the features to stabilize the feature distribution and effectively eliminate the impact of feature distribution shifts on model training. This process not only accelerates the convergence speed of the model but also effectively alleviates the vanishing or exploding gradient problems common in deep networks, improving the training stability and generalization ability of the model.

[0084] The GELU activation function enhances a model's ability to fit complex features through nonlinear transformations. Compared to the traditional ReLU activation function, GELU has smoother gradient characteristics, enabling it to better capture nonlinear relationships between features, making it particularly suitable for processing complex and continuous physiological data such as EEG signals. Through the GELU activation function, the backbone layer can achieve in-depth mining and nonlinear transformation of time-frequency features, providing more discriminative feature representations for subsequent modules.

[0085] The Graph Attention Network (GAT) module is a core component of the model that captures the topological features of the brain's functional connectivity space. Its core objective is to adaptively capture the dynamic functional connectivity relationships between channels in an electroencephalogram (EEG) and provide an interpretable adjacency matrix for subsequent biomarker mining. Based on the low-dimensional features output from the backbone layer, this module generates a dynamic brain network that reflects the strength of functional coupling between channels through a series of refinements.

[0086] Based on the feature vectors output by the backbone layer, node feature matrices corresponding to each channel of the EEG are constructed. The feature vector of each channel serves as a node in the graph network, and the node feature matrix collectively represents the feature information of all channels. Simultaneously, a learnable adjacency matrix is ​​initialized to represent the potential functional connections between channels. Its initial value is randomly generated and will be iteratively optimized during model training.

[0087] Attention coefficients between nodes are calculated using a self-attention mechanism. This mechanism dynamically evaluates the importance of each connection based on the similarity of node features, without requiring a predefined fixed connection pattern, thus offering greater flexibility and adaptability. Specifically, for each node, its feature similarity to all other nodes is calculated. Higher similarity results in a larger attention coefficient, indicating that the connection plays a more important role in feature propagation and information aggregation. To ensure comparability and normalization of attention coefficients, the attention coefficient of each node is normalized using the Softmax function, ensuring that the sum of all output attention coefficients is 1.

[0088] Based on the normalized attention coefficients, the adjacency matrix elements are adaptively adjusted to generate a dynamic brain network reflecting the strength of functional coupling between channels. Any two channel nodes in the adjacency matrix... and Functional connection strength Defined as the attention coefficient after min-max normalization. Its formula is: .in, The normalized connection strength, This represents the original attention coefficient. and These are the minimum and maximum values ​​in the attention coefficient matrix, respectively. This normalization process maps the connection strength to a uniform range, facilitating subsequent network topology analysis and comparison.

[0089] Attention-weighted node features are processed through linear transformations and activation functions before being transmitted to the downstream MS-CFA module. Linear transformations adjust feature dimensions and distribution, while activation functions further enhance the non-linear expressive power of the features. Simultaneously, the adjacency matrix after convergence of the GAT module training is extracted separately, serving as the core data foundation for subsequent network topology quantification analysis and potential biomarker mining. This is also a crucial aspect of model interpretability.

[0090] Furthermore, the Multi-Scale Frequency-Time Attention (MS-CFA) module is a key component for the model to capture multi-scale time-frequency features. Its design goal is to achieve multi-scale collaborative extraction and enhancement of EEG signal time-frequency features. Through three cascaded connections, it progressively improves the abstraction level and discriminative ability of the features. Each MS-CFA module consists of a main path and residual connections. The main path is responsible for feature extraction and enhancement, while the residual connections ensure gradient flow and information aggregation, effectively mitigating the gradient degradation problem in deep networks.

[0091] The main path sequentially includes a temporal max pooling layer, a multi-scale depthwise separable convolution (MS-DSConv) unit, and a channel-frequency attention (CFA) module. Each component is interconnected, forming a complete feature processing flow.

[0092] Temporal max pooling layers downsample the input features along the temporal dimension. By selecting the maximum value within each time window as the representative feature of that window, key temporal information is preserved while reducing the amount of feature data, thus improving the model's computational efficiency. This downsampling strategy can highlight significant features in the temporal dimension, such as the peak time of neural discharges, providing more targeted data for subsequent feature extraction.

[0093] Multi-scale depthwise separable convolution (MS-DSConv) units such as Figure 3As shown, features from different receptive fields are extracted through four parallel branches, achieving efficient fusion of multi-scale contextual information. The four branches are: a 1×1 pointwise convolution branch, a 3×3 depthwise separable convolution followed by a 1×1 pointwise convolution branch, a 1×1 pointwise convolution followed by a 3×3 max pooling branch, and two cascaded 3×3 depthwise separable convolution branches. Different branches correspond to different receptive field sizes, enabling them to capture local detail features, mesoscale structural features, and global contextual features respectively: the 1×1 pointwise convolution branch is mainly used for feature dimension adjustment and inter-channel information interaction without changing the spatial dimension of the features; the 3×3 depthwise separable convolution followed by a 1×1 pointwise convolution branch can capture mesoscale local features while reducing parameters; the 1×1 pointwise convolution followed by a 3×3 max pooling branch further highlights salient features through max pooling operations, enhancing feature robustness; and the two cascaded 3×3 depthwise separable convolution branches can capture a wider range of contextual information, improving the abstraction level of the features. The outputs of each branch are concatenated along the channel dimension, fusing features at different scales into a unified feature representation, providing a rich feature foundation for subsequent attention enhancement.

[0094] Channel-Frequency Attention (CFA) module, such as Figure 4 As shown, a parallel dual attention mechanism is used to optimize features in both the frequency and channel dimensions, achieving dual feature enhancement. The frequency path learns key frequency band weights through one-dimensional convolution and activation functions. One-dimensional convolution captures local dependencies in the frequency dimension, while activation functions enhance the model's sensitivity to key frequency bands, enabling the model to automatically focus on important frequency band features relevant to epilepsy subtype identification and suppress interference from irrelevant frequency bands. The channel path employs a Squeeze-and-Excitation (SE) mechanism, compressing the features of each channel into a scalar value through global average pooling. This scalar value reflects the global importance of the corresponding channel. Subsequently, fully connected layers and activation functions perform nonlinear transformations on these scalar values ​​to generate channel importance weights, achieving adaptive adjustment of features from different channels.

[0095] The input features are multiplied element-wise with the frequency attention weights and channel attention weights to achieve dual enhancement. The formula is as follows: ,in, As input features, For channel attention weights, For frequency attention weights, This indicates element-wise multiplication; this operation enables the model to focus on key features simultaneously in both the channel and frequency dimensions, significantly improving the feature discrimination capability.

[0096] The residual connections, after adjusting the channel dimensions through 1×1 pointwise convolutions, are added to the output features of the CFA module to form the complete MS-CFA module output. The introduction of residual connections effectively alleviates the gradient degradation problem in deep networks, ensuring smooth information transfer and enabling the model to maintain good training performance even with increased depth. Three cascaded MS-CFA modules sequentially extract and enhance features at multiple scales, gradually improving the abstraction and discriminative power of the features, providing high-quality temporal feature input for the subsequent Bi-LSTM module.

[0097] Furthermore, the Bi-Long Short-Term Memory (Bi-LSTM) module serves as the core of the model's temporal feature capture. It is primarily responsible for dynamically and temporally modeling the multi-scale time-frequency features processed by the MS-CFA module, capturing the long-range dynamic dependencies of neural discharges, and providing a decision-making basis for the final subtype identification.

[0098] The feature map processed by the MS-CFA module is subjected to frequency-dimensional global average pooling and transposed, transforming the feature map into a one-dimensional time-series sequence input suitable for time-series modeling. The global average pooling operation integrates feature information in the frequency dimension to generate a comprehensive feature representation for each time step; the transpose operation adjusts the dimensional order of the features to meet the input requirements of the Bi-LSTM module.

[0099] The Bi-LSTM module consists of a forward LSTM layer and a backward LSTM layer, which operate in parallel, extracting temporal features from different directions. The forward LSTM layer extracts forward temporal features from the start to the end of the sequence, capturing the chronological order and development trend of neural discharge events; the backward LSTM layer extracts reverse temporal features from the end to the start, capturing the influence and correlation of subsequent events on the current event. This bidirectional modeling approach can comprehensively capture the contextual information in the temporal sequence, avoiding the limitations of unidirectional LSTM which can only focus on historical or future information, and is particularly suitable for processing physiological signals with complex temporal dependencies, such as neural discharges.

[0100] The LSTM layer effectively addresses the vanishing or exploding gradient problems inherent in traditional recurrent neural networks (RNNs) for long sequence modeling through the synergistic action of its input gate, forget gate, and output gate. The input gate controls the intensity of new information input, the forget gate determines whether to retain or discard historical information, and the output gate adjusts the intensity of the output for the current state. Through fine-tuning of these three gates, the LSTM layer can adaptively remember and forget temporal information, efficiently capturing long-range dynamic dependencies.

[0101] The outputs of the forward and backward LSTM layers are fused through hidden layer state concatenation to form a global representation containing bidirectional temporal information. This global representation integrates the historical trend and future correlation of neural discharges, comprehensively reflecting the dynamic temporal characteristics of EEG signals. Subsequently, this global representation is input into a fully connected layer, which is mapped to a category space through a linear transformation. Finally, the probability distributions of two categories, gelastic epilepsy and non-gelastic epilepsy, are output through a Softmax activation function. The model uses the category corresponding to the maximum probability as the subtype identification result, achieving accurate classification of hypothalamic hamartoma-related epilepsy subtypes.

[0102] During model training, a strategy combining cross-validation and early stopping is employed to avoid overfitting and improve the model's generalization ability. Cross-validation divides the dataset into multiple training and validation sets, training and validating the model multiple times to ensure the stability and reliability of model performance. Early stopping monitors the validation set accuracy; when the validation set accuracy no longer improves over several consecutive periods, model training is stopped to prevent overfitting on the training set and ensure the model's generalization performance on new data.

[0103] Furthermore, epilepsy subtype identification is the core application goal of the model. Based on the probability distribution results output by the Bi-LSTM module, the model can determine the subtype classification of patients with hypothalamic hamartoma-related epilepsy and clearly distinguish between gelastic epilepsy (GS) and non-gelastic epilepsy (NGS).

[0104] The probability distribution output by the model directly reflects the likelihood of a patient belonging to one of the two epilepsy subtypes; the closer the probability value is to 1, the higher the likelihood that the patient belongs to that subtype. By comparing the two probability values, the category corresponding to the maximum probability is selected as the final identification result. For example, if the model outputs a probability of 0.95 for the patient to have gelastic epilepsy and a probability of 0.05 for the patient to have non-gelastic epilepsy, then the patient is identified as having gelastic epilepsy; otherwise, the patient is identified as having non-gelastic epilepsy.

[0105] To ensure the reliability and accuracy of the identification results, the model employed rigorous performance evaluation metrics and validation strategies during training. The model's classification performance was comprehensively evaluated using multiple metrics, including Overall Accuracy (OA), Recall, Precision, F1 score, and Davies-Bouldin Index (DBI), ensuring excellent performance across all evaluation indicators.

[0106] This embodiment details how standardized EEG signal preprocessing and precise feature extraction ensure data quality. Relying on the multi-module collaborative architecture of the ST-AttnNet model, it efficiently captures key multi-dimensional features of EEG signals, enabling accurate identification of hypothalamic hamartoma-related epilepsy subtypes. Simultaneously, by leveraging the interpretability of the GAT module and network topology quantification analysis, it uncovers potential biomarkers reflecting essential subtype differences, providing objective identification evidence for clinical practice. This overcomes the subjective limitations of traditional methods and improves diagnostic reliability and specificity.

[0107] Based on Example 1, this example details the classification performance of the proposed model (ST-AttnNet) in distinguishing HH patients using GS / NGS, and systematically compares it with several representative methods, including traditional machine learning models (such as Support Vector Machine (SVM) and Random Forest (RF)) and several deep learning methods (such as CNN, EEG-Net, EEG-ATCNet, and others). The comparative experimental results are shown in Table 1. It should be noted that the results of other methods in the table are all reproduced in this paper.

[0108] Experimental results show that ST-AttnNet significantly outperforms other comparative methods across multiple evaluation metrics (p<0.05). Specifically, the model achieves 98.38% accuracy, an F1 score of 0.9838, 98.53% precision, and 98.22% recall. Compared to the baseline CNN model, ST-AttnNet improves overall accuracy by 1.41% and F1 score by 1.31%, demonstrating its superior performance in capturing discriminative features from GS / NGS models.

[0109] To visually represent the differences in class separability of features learned by different models, t-SNE is used to reduce the dimensionality of high-dimensional features for visualization. For example... Figure 5 As shown, Figure 5 (a) In the original data, GS (cyan squares) and NGS (red dots) samples are completely mixed, and the DBI value is high, indicating that the two types of features have no distinguishing effect; Figure 5 (b) After SVM classification, the samples are still intertwined, and the DBI is reduced but the differentiation effect is limited; Figure 5 (c) After random forest processing, the samples begin to show initial separation, but there is still a lot of overlap; Figure 5 (d) EEG-Net, Figure 5 (e) After CNN classification, the two classes of samples have formed a clear block distribution, and the DBI has been further reduced; Figure 5(f) After processing with ST-AttnNet, GS and NGS samples are almost completely separated, with the lowest DBI value, indicating that the features extracted by this model have optimal inter-class discriminative power and intra-class aggregation. In the original EEG data, GS and NGS sample points have extensive overlap, reflecting the difficulty in distinguishing the two classes in the original feature space. In contrast, while the feature distribution after processing by traditional methods (such as RF and SVM) and some deep learning models (such as EEG-Net and CNN) has improved, the class boundaries remain relatively blurry. The ST-AttnNet model proposed in this paper exhibits superior discriminative power; its generated features form clearly separated cluster structures in the low-dimensional embedding space, indicating that the model can effectively extract highly discriminative representations.

[0110] To further quantify and evaluate the clustering performance of different models, the Davies-Bouldin index (DBI) was calculated. The results are highly consistent with the visual observations: ST-AttnNet achieved the lowest DBI value (0.581), indicating that its generated features, while maintaining intra-class compactness, also achieved better inter-class separation, numerically verifying the model's advantages in feature learning.

[0111] Table 1: Performance Comparison Results of Different Methods

[0112] To evaluate the independent contributions and synergistic effects of each component in the ST-AttnNet model on the final performance, ablation experiments were systematically conducted. The results are shown in Table 2. The experiments used the CNN-GAT composite structure, which possesses spatial modeling capabilities, as the baseline model. After integrating the graph attention mechanism, this model achieved an overall accuracy (OA) of 96.32%, preliminarily validating the effectiveness of introducing brain functional connectivity modeling. Based on this, other key modules were gradually integrated to examine their gain effects. After sequentially introducing residual connections, the model performance improved to an OA of 97.45%, indicating that it effectively alleviated the gradient degradation problem in deep networks. Further addition of a multi-scale convolution module increased the OA to 97.87%, confirming the positive effect of multi-receptive field feature fusion on enhancing discriminative ability. Subsequently, embedding a channel-frequency attention mechanism resulted in an OA of 98.02%, demonstrating the value of adaptive feature reweighting in key frequency band and channel selection. The fully configured ST-AttnNet model (including the BiLSTM temporal modeling module) achieved state-of-the-art results across all evaluation metrics, with an overall accuracy of 98.38% ± 0.01% and an F1 score of 0.9838. The continuous performance improvement resulting from the sequential introduction of each module fully demonstrates the effectiveness and necessity of the proposed components in terms of structural design and functional supplementation, and also reflects their excellent synergistic effect in complex EEG classification tasks.

[0113] Table 2 Comparison of model performance in ablation experiments

[0114] To reveal the underlying neurophysiological mechanisms distinguishing the GS and NGS subgroups, this study fully utilized the interpretability of the ST-AttnNet model to systematically conduct a multi-level analysis, from the localization of key brain regions to the comparison of connectivity patterns. The specific process was as follows: identifying key brain regions in the classification (node ​​importance), analyzing the overall connectivity structure within each group (intra-group network topology), and finally extracting the specific functional connections that best distinguish the two groups (inter-group differences).

[0115] At the node level Figure 6 The ST-AttnNet model demonstrates the brain region focus patterns when classifying different epilepsy subtypes: Figure 6 (a) shows the channel importance distribution when the model classifies GS. The blue area is concentrated in some brain regions, indicating that the model focuses on the electrophysiological signals of specific regions. Figure 6 (b) shows the distribution when classifying NGS. The red area covers a wider range, indicating that the model relies on features from more brain regions for NGS recognition. Figure 6 (c) is a normalized difference map. The red areas correspond to key brain regions identified by GS, and the blue areas correspond to key brain regions identified by NGS. This visually demonstrates the core differences between the two subtypes in model identification. The results show that the model significantly focuses on the frontal and temporal lobe regions (such as F3, F7, F8, Fp1, etc.) in both types of samples, but their spatial distribution patterns differ significantly. In the GS samples... Figure 5 (a) Attention is highly focused on the frontotemporal region, exhibiting strong local focusing characteristics; while in NGS Figure 5 (b) Attention distribution is more diffuse, covering the frontal lobe, central area and posterior cortex.

[0116] Building upon this, the topological characteristics of the brain functional networks learned by the model were further explored. Representative brain functional connectivity maps for GS and NGS samples were constructed by averaging the adjacency matrices learned in GAT, respectively. Figure 7 As shown, the connection mode of the GS group Figure 7 (a) It exhibits obvious focalization characteristics, with connections mainly concentrated in the fronto-central region, and is dominated by strong local clustering and interhemispheric connections; in contrast, the NGS group Figure 7 (b) exhibits a highly diffuse network architecture, characterized by long-range connections throughout the entire brain and spanning multiple lobes. To directly identify key differential pathways between groups, differential connectivity maps between the GS and NGS networks were further calculated. Figure 7(c, d). The analysis showed that the significantly enhanced connectivity in the GS group exhibited a typical diffusion pattern, including long-range pathways such as temporo-occipital (T5–O1), fronto-occipital (FP1–O2), and transhemispheric fronto-parietal (F7–P4); while the relatively stronger connectivity in the NGS group supported its focal prefrontal network characteristics, manifested as multiple high-weight interhemispheric frontal connections (FP1–FP2, F3–F4) and a connection pattern converging towards the frontal lobe and the central midline.

[0117] The above visual observations were quantitatively verified through statistical tests, such as... Figure 8 As shown, a total of six network indicators with statistically significant differences were identified (p<0.05). Figure 8 (a) The T5-O1 connection strength differed significantly between the two groups (P<0.0001). Figure 8 (b)-(f) show the clustering coefficients of nodes F3, F7, F8, Fp1, and Pz, respectively. The clustering coefficients of F3, F7, F8, and Pz showed highly significant differences between the two groups (P < 0.0001), while the clustering coefficient of Fp1 showed a significant difference (P = 0.0020). These significant differences validate their reliability as potential biomarkers for distinguishing between the two epilepsy subtypes. Notably, the T5–O1 connectivity strength was significantly higher in the GS group ( Figure 8 (a) This directly confirms the key pathways highlighted in the differential connectivity map; as a measure of local network organization, the node clustering coefficient showed significant inter-group differences in multiple brain regions: the clustering coefficients of F3, F7, Fp1, and Pz nodes were higher in the GS group, while those of F8 node were higher in the NGS group. These quantitative results provide statistical support for the relationship between node importance and network structure differences, further clarifying their value as potential biomarkers.

[0118] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter changes made to these embodiments within the spirit and principles of the present invention, without departing from the principles and spirit of the present invention, through conventional substitutions or to achieve the same function, fall within the scope of protection of the present invention.

Claims

1. A method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks, characterized in that, include: Preoperative electroencephalogram (EEG) signals were obtained from patients with hypothalamic hamartoma and epilepsy. The EEG signals were preprocessed and feature extracted to obtain time-frequency feature data. The time-frequency feature data is input into the ST-AttnNet model. Through the backbone layer, graph attention network module, multi-scale frequency-time attention module and bidirectional long short-term memory network of the model, the spatial topological features, multi-scale time-frequency features and dynamic temporal features of brain functional connectivity are captured in a coordinated manner. Based on the output of the model, the subtypes of hypothalamic hamartoma-related gelastic epilepsy and non-gelastic epilepsy can be differentiated. The adjacency matrix after the GAT module training converges is extracted, and potential biomarkers for distinguishing the two types of epilepsy subtypes are mined through network topology quantification analysis.

2. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 1, characterized in that, The EEG signals are recorded by a multi-channel EEG acquisition device, covering channel signals from the frontal pole, frontal lobe, central area, parietal lobe, temporal lobe, occipital lobe and midline region, comprehensively capturing the electrophysiological activity of the whole brain; The patient's sleep state was recorded simultaneously during the data collection process, and signal segments that did not occur during deep sleep were extracted to avoid interference from abnormal discharges during epileptic seizures on feature extraction and classification results. The sampling rate of the EEG acquisition device is set according to the frequency characteristics of the nerve discharge signal to ensure that the electrophysiological activity within the preset frequency band can be completely captured. The acquired raw signal is processed to reduce the influence of physiological artifacts such as electromyography and electrooculography, as well as environmental noise, and to ensure data quality.

3. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 1, characterized in that, The preprocessing and feature extraction of the electroencephalogram (EEG) signals include: The EEG signal is segmented according to a set window length and step size. After baseline correction to eliminate slow drift, a cascaded digital filtering strategy is used to perform high-pass filtering and low-pass filtering in sequence to obtain a band-pass filtered signal in a preset frequency band. The filtered signal is subjected to a short-time Fourier transform, and spectral leakage is suppressed by using a Hanning window to convert the time-domain signal into time-frequency characteristic data. The mathematical formula for the short-time Fourier transform is as follows: ,in, For time-frequency coefficients, Represents at discrete time points The sampled value at that location, For the Hanning window function, To determine the window length for Fast Fourier Transform, The overlap step size, This refers to the segment number corresponding to the time series dimension. For discrete frequency in the frequency domain; After performing absolute value transformation on the time-frequency feature data, Z-fraction normalization is applied to map it to a preset interval. The normalization formula is: ,in, For standardized data, The absolute value of the original time-frequency coefficients. The mean of the original time-frequency data. This represents the standard deviation of the original time-frequency data.

4. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 1, characterized in that, The backbone layer includes a depthwise separable convolutional layer, a batch normalization layer, and a GELU activation function. The kernel size of the depthwise separable convolutional layer is designed to adapt to the dimensions of the time-frequency feature data, separating the channel dimension and spatial dimension of the input features for processing. This reduces the complexity of the model parameters while retaining key feature information. The batch normalization layer standardizes the convolutional output features, eliminating the impact of feature distribution offset on model training. The GELU activation function enhances the model's ability to fit complex features through nonlinear transformation, achieving preliminary extraction and dimensionality reduction of time-frequency features, and providing low-dimensional, high-discrimination feature inputs for subsequent modules.

5. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 4, characterized in that, The working process of the graph attention network module includes: Based on the feature vectors output by the backbone layer, a node feature matrix corresponding to each channel of the EEG is constructed, and a learnable adjacency matrix is ​​initialized to characterize the potential functional connectivity between channels. The attention coefficients between nodes are calculated through a self-attention mechanism, the importance of each connection is dynamically evaluated based on feature similarity, the attention coefficients are normalized using the Softmax function, and the adjacency matrix element values ​​are adaptively adjusted to generate a dynamic brain network that reflects the functional coupling strength between channels. Any two channel nodes in the adjacency matrix and Functional connection strength Defined as the attention coefficient after min-max normalization. The formula is: ,in, The normalized connection strength, This represents the original attention coefficient. and These are the minimum and maximum values ​​in the attention coefficient matrix, respectively; The attention-weighted node features are processed by linear transformation and activation function and then transmitted to the downstream module. The converged adjacency matrix is ​​used for subsequent network topology analysis.

6. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 5, characterized in that, The multi-scale frequency-temporal attention module includes a main path and a residual connection. The main path sequentially includes a temporal max pooling layer, a multi-scale depth-separable convolutional unit, and a channel-frequency attention module. The temporal max pooling layer downsamples the input features along the temporal dimension, preserving key temporal information; The separable convolutional unit extracts different receptive field features through four parallel branches. The four branches are a 1×1 pointwise convolutional branch, a 3×3 depthwise separable convolution followed by a 1×1 pointwise convolutional branch, a 1×1 pointwise convolution followed by a 3×3 max pooling branch, and two cascaded 3×3 depthwise separable convolutional branches. The outputs of each branch are concatenated in the channel dimension to achieve the fusion of multi-scale contextual information. The frequency attention module computes frequency attention and channel attention in parallel. The frequency path learns key frequency band weights through one-dimensional convolution and activation functions. The channel path employs a Squeeze-and-Excitation mechanism, generating channel importance weights through global average pooling, fully connected layers, and activation functions. The input features are multiplied element-wise by the two attention weights to achieve dual enhancement, as shown in the formula: ,in, As input features, For channel attention weights, For frequency attention weights, This indicates element-wise multiplication; The residual connection, after adjusting the channel dimension through 1×1 pointwise convolution, is added to the output features of the CFA module to alleviate the gradient degradation problem in deep networks and ensure smooth information transmission.

7. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 6, characterized in that, The bidirectional long short-term memory network includes a forward LSTM layer and a backward LSTM layer. The feature map processed by the MS-CFA module is subjected to frequency-dimensional global average pooling and transposed to form a temporal sequence input. The forward LSTM layer extracts forward temporal features from the start to the end of the time sequence, and the backward LSTM layer extracts reverse temporal features from the end to the start of the time sequence. The bidirectional temporal information is fused by splicing the hidden layer states to capture the long-range dynamic dependence of neural firing. The output of the Bi-LSTM is mapped to the category space through a fully connected layer, and the probability distribution of each category is output through the Softmax activation function. The category corresponding to the maximum probability is used as the subtype identification result to achieve the classification of laughing epilepsy and non-laughing epilepsy. Cross-validation and early stopping are used during model training to avoid overfitting and improve the model's generalization ability.

8. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 1, characterized in that, The network topology quantitative analysis includes node clustering coefficient calculation and channel connection strength analysis. Paired t-tests are used to evaluate the significance of differences between the two types of epilepsy subtypes in the above indicators. The node clustering coefficient The formula used to characterize the local clustering of nodes is: ,in, For nodes The number of neighboring nodes, and Traversing nodes All neighbor node pairs, , and These are the normalized functional connection weights for the corresponding node pairs, and the node pairs together constitute a node. A triangular structure; Statistical tests were used to screen out significantly different connection strength indices and node clustering coefficients as a potential biomarker candidate set to distinguish between the two types of epilepsy subtypes.

9. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 8, characterized in that, The screening process for the potential biomarkers includes: Multiple tests are performed on the connection strength index and node clustering coefficient in the candidate set to eliminate the influence of false positive results; The contribution of each candidate indicator to subtype identification was calculated using the feature importance assessment method, and the Top N indicators were selected after being sorted by contribution. By combining neurophysiological mechanism analysis and eliminating indicators without clear physiological significance, a set of biomarkers containing the connection strength between specific channels and the clustering coefficient of key nodes is finally formed. This set can reflect the essential differences in brain network topology between the two types of epilepsy subtypes.

10. The method for identifying hypothalamic hamartoma epilepsy subtypes based on interpretable graph neural networks according to claim 1, characterized in that, The discovery of potential biomarkers to distinguish between the two types of epilepsy subtypes includes: Based on the training convergence adjacency matrix output by the GAT module, the intra-group average adjacency matrix of the laughing epilepsy group and the non-laughing epilepsy group were calculated respectively, and representative brain functional connectivity maps of the two groups were constructed. By subtracting each element, two sets of differential connectivity matrices are obtained. Channel pairs with significant differences in connectivity strength are then selected to form a differential connectivity set. Based on the inter-group difference analysis results of node clustering coefficients, the significantly different node clustering coefficients are integrated with the channel pairs in the differential connection set; By eliminating redundant information through feature selection algorithms and retaining core indicators with strong discriminative power, potential biomarkers that can effectively distinguish between the two types of epilepsy subtypes are finally obtained, providing objective electrophysiological basis for clinical differentiation.